diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2007-11-26 09:14:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:05:44 -0500 |
commit | 67d620357a186adc0f4e7d1f5b095ea2c77e7072 (patch) | |
tree | d5ee39e9837d01aefdccfb8fc084b561f8fa7367 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | fd105e79d19439d29a6561178fb5fe511e141f6b (diff) |
iwlwifi: 802.11n comply HT add station flow with mac80211 framework
This patch conforms the addition of a new station to the iwlwifi station
table according to the new mac80211's HT framework
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
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 | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 2c706395e0a4..9f89f596283c 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -497,7 +497,8 @@ static void iwl4965_clear_stations_table(struct iwl4965_priv *priv) | |||
497 | /** | 497 | /** |
498 | * iwl4965_add_station_flags - Add station to tables in driver and device | 498 | * iwl4965_add_station_flags - Add station to tables in driver and device |
499 | */ | 499 | */ |
500 | u8 iwl4965_add_station_flags(struct iwl4965_priv *priv, const u8 *addr, int is_ap, u8 flags) | 500 | u8 iwl4965_add_station_flags(struct iwl4965_priv *priv, const u8 *addr, |
501 | int is_ap, u8 flags, void *ht_data) | ||
501 | { | 502 | { |
502 | int i; | 503 | int i; |
503 | int index = IWL_INVALID_STATION; | 504 | int index = IWL_INVALID_STATION; |
@@ -554,7 +555,8 @@ u8 iwl4965_add_station_flags(struct iwl4965_priv *priv, const u8 *addr, int is_a | |||
554 | /* BCAST station and IBSS stations do not work in HT mode */ | 555 | /* BCAST station and IBSS stations do not work in HT mode */ |
555 | if (index != priv->hw_setting.bcast_sta_id && | 556 | if (index != priv->hw_setting.bcast_sta_id && |
556 | priv->iw_mode != IEEE80211_IF_TYPE_IBSS) | 557 | priv->iw_mode != IEEE80211_IF_TYPE_IBSS) |
557 | iwl4965_set_ht_add_station(priv, index); | 558 | iwl4965_set_ht_add_station(priv, index, |
559 | (struct ieee80211_ht_info *) ht_data); | ||
558 | #endif /*CONFIG_IWL4965_HT*/ | 560 | #endif /*CONFIG_IWL4965_HT*/ |
559 | 561 | ||
560 | spin_unlock_irqrestore(&priv->sta_lock, flags_spin); | 562 | spin_unlock_irqrestore(&priv->sta_lock, flags_spin); |
@@ -900,7 +902,19 @@ static int iwl4965_rxon_add_station(struct iwl4965_priv *priv, | |||
900 | u8 sta_id; | 902 | u8 sta_id; |
901 | 903 | ||
902 | /* Add station to device's station table */ | 904 | /* Add station to device's station table */ |
903 | sta_id = iwl4965_add_station_flags(priv, addr, is_ap, 0); | 905 | #ifdef CONFIG_IWL4965_HT |
906 | struct ieee80211_conf *conf = &priv->hw->conf; | ||
907 | struct ieee80211_ht_info *cur_ht_config = &conf->ht_conf; | ||
908 | |||
909 | if ((is_ap) && | ||
910 | (conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) && | ||
911 | (priv->iw_mode == IEEE80211_IF_TYPE_STA)) | ||
912 | sta_id = iwl4965_add_station_flags(priv, addr, is_ap, | ||
913 | 0, cur_ht_config); | ||
914 | else | ||
915 | #endif /* CONFIG_IWL4965_HT */ | ||
916 | sta_id = iwl4965_add_station_flags(priv, addr, is_ap, | ||
917 | 0, NULL); | ||
904 | 918 | ||
905 | /* Set up default rate scaling table in device's station table */ | 919 | /* Set up default rate scaling table in device's station table */ |
906 | iwl4965_add_station(priv, addr, is_ap); | 920 | iwl4965_add_station(priv, addr, is_ap); |
@@ -2834,7 +2848,8 @@ static int iwl4965_get_sta_id(struct iwl4965_priv *priv, | |||
2834 | return sta_id; | 2848 | return sta_id; |
2835 | 2849 | ||
2836 | /* Create new station table entry */ | 2850 | /* Create new station table entry */ |
2837 | sta_id = iwl4965_add_station_flags(priv, hdr->addr1, 0, CMD_ASYNC); | 2851 | sta_id = iwl4965_add_station_flags(priv, hdr->addr1, |
2852 | 0, CMD_ASYNC, NULL); | ||
2838 | 2853 | ||
2839 | if (sta_id != IWL_INVALID_STATION) | 2854 | if (sta_id != IWL_INVALID_STATION) |
2840 | return sta_id; | 2855 | return sta_id; |