diff options
Diffstat (limited to 'net/mac80211/ieee80211_sta.c')
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 1d553d78b227..87830c04a1ca 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -1437,6 +1437,19 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev, | |||
1437 | } | 1437 | } |
1438 | sta->supp_rates = rates; | 1438 | sta->supp_rates = rates; |
1439 | 1439 | ||
1440 | if (elems.ht_cap_elem && elems.ht_info_elem && elems.wmm_param && | ||
1441 | local->ops->conf_ht) { | ||
1442 | struct ieee80211_ht_bss_info bss_info; | ||
1443 | |||
1444 | ieee80211_ht_cap_ie_to_ht_info( | ||
1445 | (struct ieee80211_ht_cap *) | ||
1446 | elems.ht_cap_elem, &sta->ht_info); | ||
1447 | ieee80211_ht_addt_info_ie_to_ht_bss_info( | ||
1448 | (struct ieee80211_ht_addt_info *) | ||
1449 | elems.ht_info_elem, &bss_info); | ||
1450 | ieee80211_hw_config_ht(local, 1, &sta->ht_info, &bss_info); | ||
1451 | } | ||
1452 | |||
1440 | rate_control_rate_init(sta, local); | 1453 | rate_control_rate_init(sta, local); |
1441 | 1454 | ||
1442 | if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { | 1455 | if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { |
@@ -1859,6 +1872,8 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev, | |||
1859 | struct ieee80211_if_sta *ifsta; | 1872 | struct ieee80211_if_sta *ifsta; |
1860 | size_t baselen; | 1873 | size_t baselen; |
1861 | struct ieee802_11_elems elems; | 1874 | struct ieee802_11_elems elems; |
1875 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
1876 | struct ieee80211_conf *conf = &local->hw.conf; | ||
1862 | 1877 | ||
1863 | ieee80211_rx_bss_info(dev, mgmt, len, rx_status, 1); | 1878 | ieee80211_rx_bss_info(dev, mgmt, len, rx_status, 1); |
1864 | 1879 | ||
@@ -1881,6 +1896,23 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev, | |||
1881 | if (elems.erp_info && elems.erp_info_len >= 1) | 1896 | if (elems.erp_info && elems.erp_info_len >= 1) |
1882 | ieee80211_handle_erp_ie(dev, elems.erp_info[0]); | 1897 | ieee80211_handle_erp_ie(dev, elems.erp_info[0]); |
1883 | 1898 | ||
1899 | if (elems.ht_cap_elem && elems.ht_info_elem && | ||
1900 | elems.wmm_param && local->ops->conf_ht && | ||
1901 | conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) { | ||
1902 | struct ieee80211_ht_bss_info bss_info; | ||
1903 | |||
1904 | ieee80211_ht_addt_info_ie_to_ht_bss_info( | ||
1905 | (struct ieee80211_ht_addt_info *) | ||
1906 | elems.ht_info_elem, &bss_info); | ||
1907 | /* check if AP changed bss inforamation */ | ||
1908 | if ((conf->ht_bss_conf.primary_channel != | ||
1909 | bss_info.primary_channel) || | ||
1910 | (conf->ht_bss_conf.bss_cap != bss_info.bss_cap) || | ||
1911 | (conf->ht_bss_conf.bss_op_mode != bss_info.bss_op_mode)) | ||
1912 | ieee80211_hw_config_ht(local, 1, &conf->ht_conf, | ||
1913 | &bss_info); | ||
1914 | } | ||
1915 | |||
1884 | if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { | 1916 | if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { |
1885 | ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param, | 1917 | ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param, |
1886 | elems.wmm_param_len); | 1918 | elems.wmm_param_len); |