diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-28 04:58:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-10 14:54:07 -0400 |
commit | 24398e39c8ee4a9d9123eed322b859ece4d16cac (patch) | |
tree | 28e054cd2feaf289bc4fbe279936d2d21ceaba5e /net/mac80211/ieee80211_i.h | |
parent | 1d98fb122d8f0c33504576da4107bc807176be1d (diff) |
mac80211: set HT channel before association
Changing the channel type during operation is
confusing to some drivers and will be hard to
handle in multi-channel scenarios. Instead of
changing the channel, set it to the right HT
channel before authenticating/associating and
don't change it -- just update the 20/40 MHz
restrictions in rate control as needed when
changed by the AP.
This also fixes a problem that Paul missed in
his fix for the "regulatory makes us deaf"
issue -- when we couldn't use 40 MHz we still
associated saying we were using 40 MHz, which
could in similarly broken APs make us never
even connect successfully.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 54f5b5b299d5..a67ba7c85a1e 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -379,6 +379,7 @@ enum ieee80211_sta_flags { | |||
379 | IEEE80211_STA_UAPSD_ENABLED = BIT(7), | 379 | IEEE80211_STA_UAPSD_ENABLED = BIT(7), |
380 | IEEE80211_STA_NULLFUNC_ACKED = BIT(8), | 380 | IEEE80211_STA_NULLFUNC_ACKED = BIT(8), |
381 | IEEE80211_STA_RESET_SIGNAL_AVE = BIT(9), | 381 | IEEE80211_STA_RESET_SIGNAL_AVE = BIT(9), |
382 | IEEE80211_STA_DISABLE_40MHZ = BIT(10), | ||
382 | }; | 383 | }; |
383 | 384 | ||
384 | struct ieee80211_mgd_auth_data { | 385 | struct ieee80211_mgd_auth_data { |
@@ -511,6 +512,8 @@ struct ieee80211_if_managed { | |||
511 | int rssi_min_thold, rssi_max_thold; | 512 | int rssi_min_thold, rssi_max_thold; |
512 | int last_ave_beacon_signal; | 513 | int last_ave_beacon_signal; |
513 | 514 | ||
515 | enum nl80211_channel_type tx_chantype; | ||
516 | |||
514 | struct ieee80211_ht_cap ht_capa; /* configured ht-cap over-rides */ | 517 | struct ieee80211_ht_cap ht_capa; /* configured ht-cap over-rides */ |
515 | struct ieee80211_ht_cap ht_capa_mask; /* Valid parts of ht_capa */ | 518 | struct ieee80211_ht_cap ht_capa_mask; /* Valid parts of ht_capa */ |
516 | }; | 519 | }; |
@@ -667,12 +670,6 @@ struct ieee80211_sub_if_data { | |||
667 | 670 | ||
668 | char name[IFNAMSIZ]; | 671 | char name[IFNAMSIZ]; |
669 | 672 | ||
670 | /* | ||
671 | * keep track of whether the HT opmode (stored in | ||
672 | * vif.bss_info.ht_operation_mode) is valid. | ||
673 | */ | ||
674 | bool ht_opmode_valid; | ||
675 | |||
676 | /* to detect idle changes */ | 673 | /* to detect idle changes */ |
677 | bool old_idle; | 674 | bool old_idle; |
678 | 675 | ||
@@ -1300,7 +1297,6 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1300 | struct net_device *dev); | 1297 | struct net_device *dev); |
1301 | 1298 | ||
1302 | /* HT */ | 1299 | /* HT */ |
1303 | bool ieee80111_cfg_override_disables_ht40(struct ieee80211_sub_if_data *sdata); | ||
1304 | void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, | 1300 | void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, |
1305 | struct ieee80211_sta_ht_cap *ht_cap); | 1301 | struct ieee80211_sta_ht_cap *ht_cap); |
1306 | void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata, | 1302 | void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata, |