aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index fcac73cf82bc..e0b13fb78653 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -1045,24 +1045,19 @@ int iwl_rxon_add_station(struct iwl_priv *priv, const u8 *addr, bool is_ap)
1045 struct ieee80211_sta_ht_cap *cur_ht_config = NULL; 1045 struct ieee80211_sta_ht_cap *cur_ht_config = NULL;
1046 u8 sta_id; 1046 u8 sta_id;
1047 1047
1048 /* Add station to device's station table */
1049
1050 /* 1048 /*
1051 * XXX: This check is definitely not correct, if we're an AP 1049 * Set HT capabilities. It is ok to set this struct even if not using
1052 * it'll always be false which is not what we want, but 1050 * HT config: the priv->current_ht_config.is_ht flag will just be false
1053 * it doesn't look like iwlagn is prepared to be an HT
1054 * AP anyway.
1055 */ 1051 */
1056 if (priv->current_ht_config.is_ht) { 1052 rcu_read_lock();
1057 rcu_read_lock(); 1053 sta = ieee80211_find_sta(priv->vif, addr);
1058 sta = ieee80211_find_sta(priv->vif, addr); 1054 if (sta) {
1059 if (sta) { 1055 memcpy(&ht_config, &sta->ht_cap, sizeof(ht_config));
1060 memcpy(&ht_config, &sta->ht_cap, sizeof(ht_config)); 1056 cur_ht_config = &ht_config;
1061 cur_ht_config = &ht_config;
1062 }
1063 rcu_read_unlock();
1064 } 1057 }
1058 rcu_read_unlock();
1065 1059
1060 /* Add station to device's station table */
1066 sta_id = iwl_add_station(priv, addr, is_ap, CMD_SYNC, cur_ht_config); 1061 sta_id = iwl_add_station(priv, addr, is_ap, CMD_SYNC, cur_ht_config);
1067 1062
1068 /* Set up default rate scaling table in device's station table */ 1063 /* Set up default rate scaling table in device's station table */