diff options
author | Johannes Berg | 2007-12-28 14:32:58 +0100 |
---|---|---|
committer | David S. Miller | 2008-01-28 15:09:43 -0800 |
commit | 471b3efdfccc257591331724145f8ccf8b3217e1 (patch) | |
tree | c9e576442c7b62c8c667ae1046e560323f0821fd /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | 2bc454b0b30b3645d114689b64321cb49be99923 (diff) |
mac80211: add unified BSS configuration
This patch (based on Ron Rindjunsky's) creates a framework for
a unified way to pass BSS configuration to drivers that require
the information, e.g. for implementing power save mode.
This patch introduces new ieee80211_bss_conf structure that is
passed to the driver via the new bss_info_changed() callback
when the BSS configuration changes.
This new BSS configuration infrastructure adds the following
new features:
* drivers are notified of their association AID
* drivers are notified of association status
and replaces the erp_ie_changed() callback. The patch also does
the relevant driver updates for the latter change.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 92bb7e13a1f0..2597c08a2395 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c @@ -7764,25 +7764,35 @@ static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw, IWL_DEBUG_MAC80211("leave\n"); } -static void iwl4965_mac_erp_ie_changed(struct ieee80211_hw *hw, - u8 changes, int cts_protection, int preamble) + +static void iwl4965_bss_info_changed(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *bss_conf, + u32 changes) { struct iwl4965_priv *priv = hw->priv; - if (changes & IEEE80211_ERP_CHANGE_PREAMBLE) { - if (preamble == WLAN_ERP_PREAMBLE_SHORT) + if (changes & BSS_CHANGED_ERP_PREAMBLE) { + if (bss_conf->use_short_preamble) priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; else priv->staging_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK; } - if (changes & IEEE80211_ERP_CHANGE_PROTECTION) { - if (cts_protection && (priv->phymode != MODE_IEEE80211A)) + if (changes & BSS_CHANGED_ERP_CTS_PROT) { + if (bss_conf->use_cts_prot && (priv->phymode != MODE_IEEE80211A)) priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK; else priv->staging_rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK; } + if (changes & BSS_CHANGED_ASSOC) { + /* + * TODO: + * do stuff instead of sniffing assoc resp + */ + } + if (iwl4965_is_associated(priv)) iwl4965_send_rxon_assoc(priv); } @@ -8952,7 +8962,7 @@ static struct ieee80211_ops iwl4965_hw_ops = { .get_tsf = iwl4965_mac_get_tsf, .reset_tsf = iwl4965_mac_reset_tsf, .beacon_update = iwl4965_mac_beacon_update, - .erp_ie_changed = iwl4965_mac_erp_ie_changed, + .bss_info_changed = iwl4965_bss_info_changed, #ifdef CONFIG_IWL4965_HT .conf_ht = iwl4965_mac_conf_ht, .ampdu_action = iwl4965_mac_ampdu_action, |