aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-12-28 08:32:58 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:09:43 -0500
commit471b3efdfccc257591331724145f8ccf8b3217e1 (patch)
treec9e576442c7b62c8c667ae1046e560323f0821fd /drivers/net/wireless/iwlwifi
parent2bc454b0b30b3645d114689b64321cb49be99923 (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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c24
3 files changed, 21 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index a793cd11f738..77e7202c026b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -520,10 +520,8 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv,
520 break; 520 break;
521 521
522 /* 522 /*
523 * TODO: There is no callback function from upper 523 * TODO: Use the new callback function from
524 * stack to inform us when associated status. this 524 * mac80211 instead of sniffing these packets.
525 * work around to sniff assoc_resp management frame
526 * and finish the association process.
527 */ 525 */
528 case IEEE80211_STYPE_ASSOC_RESP: 526 case IEEE80211_STYPE_ASSOC_RESP:
529 case IEEE80211_STYPE_REASSOC_RESP:{ 527 case IEEE80211_STYPE_REASSOC_RESP:{
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 89e2c44bfcca..ed3f119b56cd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -4095,10 +4095,8 @@ static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv,
4095 break; 4095 break;
4096 4096
4097 /* 4097 /*
4098 * TODO: There is no callback function from upper 4098 * TODO: Use the new callback function from
4099 * stack to inform us when associated status. this 4099 * mac80211 instead of sniffing these packets.
4100 * work around to sniff assoc_resp management frame
4101 * and finish the association process.
4102 */ 4100 */
4103 case IEEE80211_STYPE_ASSOC_RESP: 4101 case IEEE80211_STYPE_ASSOC_RESP:
4104 case IEEE80211_STYPE_REASSOC_RESP: 4102 case IEEE80211_STYPE_REASSOC_RESP:
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,
7764 IWL_DEBUG_MAC80211("leave\n"); 7764 IWL_DEBUG_MAC80211("leave\n");
7765 7765
7766} 7766}
7767static void iwl4965_mac_erp_ie_changed(struct ieee80211_hw *hw, 7767
7768 u8 changes, int cts_protection, int preamble) 7768static void iwl4965_bss_info_changed(struct ieee80211_hw *hw,
7769 struct ieee80211_vif *vif,
7770 struct ieee80211_bss_conf *bss_conf,
7771 u32 changes)
7769{ 7772{
7770 struct iwl4965_priv *priv = hw->priv; 7773 struct iwl4965_priv *priv = hw->priv;
7771 7774
7772 if (changes & IEEE80211_ERP_CHANGE_PREAMBLE) { 7775 if (changes & BSS_CHANGED_ERP_PREAMBLE) {
7773 if (preamble == WLAN_ERP_PREAMBLE_SHORT) 7776 if (bss_conf->use_short_preamble)
7774 priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; 7777 priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK;
7775 else 7778 else
7776 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK; 7779 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK;
7777 } 7780 }
7778 7781
7779 if (changes & IEEE80211_ERP_CHANGE_PROTECTION) { 7782 if (changes & BSS_CHANGED_ERP_CTS_PROT) {
7780 if (cts_protection && (priv->phymode != MODE_IEEE80211A)) 7783 if (bss_conf->use_cts_prot && (priv->phymode != MODE_IEEE80211A))
7781 priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK; 7784 priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK;
7782 else 7785 else
7783 priv->staging_rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK; 7786 priv->staging_rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
7784 } 7787 }
7785 7788
7789 if (changes & BSS_CHANGED_ASSOC) {
7790 /*
7791 * TODO:
7792 * do stuff instead of sniffing assoc resp
7793 */
7794 }
7795
7786 if (iwl4965_is_associated(priv)) 7796 if (iwl4965_is_associated(priv))
7787 iwl4965_send_rxon_assoc(priv); 7797 iwl4965_send_rxon_assoc(priv);
7788} 7798}
@@ -8952,7 +8962,7 @@ static struct ieee80211_ops iwl4965_hw_ops = {
8952 .get_tsf = iwl4965_mac_get_tsf, 8962 .get_tsf = iwl4965_mac_get_tsf,
8953 .reset_tsf = iwl4965_mac_reset_tsf, 8963 .reset_tsf = iwl4965_mac_reset_tsf,
8954 .beacon_update = iwl4965_mac_beacon_update, 8964 .beacon_update = iwl4965_mac_beacon_update,
8955 .erp_ie_changed = iwl4965_mac_erp_ie_changed, 8965 .bss_info_changed = iwl4965_bss_info_changed,
8956#ifdef CONFIG_IWL4965_HT 8966#ifdef CONFIG_IWL4965_HT
8957 .conf_ht = iwl4965_mac_conf_ht, 8967 .conf_ht = iwl4965_mac_conf_ht,
8958 .ampdu_action = iwl4965_mac_ampdu_action, 8968 .ampdu_action = iwl4965_mac_ampdu_action,