aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-07-06 11:37:43 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-09 08:49:00 -0400
commit7d25745d05e7a0f0fb0d5e29bef40cb6326efc96 (patch)
tree2ceeabda37b314a95a02adce8a92d7ffa762a560 /net/mac80211/mlme.c
parent56af8f9af99223610f0582594bd4ac0a0320eb71 (diff)
mac80211: update BSS info on AC parameters change
When the AC parameters change, drivers might rely on getting a bss_info_changed notification with BSS_CHANGED_QOS in addition to the conf_tx call. Always call the function when userspace updates are made (in AP/GO modes) and also set the change flag when updates were made by the AP (in managed mode.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index d563f7c55531..6eab63388c64 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1108,7 +1108,7 @@ void ieee80211_dynamic_ps_timer(unsigned long data)
1108} 1108}
1109 1109
1110/* MLME */ 1110/* MLME */
1111static void ieee80211_sta_wmm_params(struct ieee80211_local *local, 1111static bool ieee80211_sta_wmm_params(struct ieee80211_local *local,
1112 struct ieee80211_sub_if_data *sdata, 1112 struct ieee80211_sub_if_data *sdata,
1113 u8 *wmm_param, size_t wmm_param_len) 1113 u8 *wmm_param, size_t wmm_param_len)
1114{ 1114{
@@ -1119,23 +1119,23 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
1119 u8 *pos, uapsd_queues = 0; 1119 u8 *pos, uapsd_queues = 0;
1120 1120
1121 if (!local->ops->conf_tx) 1121 if (!local->ops->conf_tx)
1122 return; 1122 return false;
1123 1123
1124 if (local->hw.queues < IEEE80211_NUM_ACS) 1124 if (local->hw.queues < IEEE80211_NUM_ACS)
1125 return; 1125 return false;
1126 1126
1127 if (!wmm_param) 1127 if (!wmm_param)
1128 return; 1128 return false;
1129 1129
1130 if (wmm_param_len < 8 || wmm_param[5] /* version */ != 1) 1130 if (wmm_param_len < 8 || wmm_param[5] /* version */ != 1)
1131 return; 1131 return false;
1132 1132
1133 if (ifmgd->flags & IEEE80211_STA_UAPSD_ENABLED) 1133 if (ifmgd->flags & IEEE80211_STA_UAPSD_ENABLED)
1134 uapsd_queues = ifmgd->uapsd_queues; 1134 uapsd_queues = ifmgd->uapsd_queues;
1135 1135
1136 count = wmm_param[6] & 0x0f; 1136 count = wmm_param[6] & 0x0f;
1137 if (count == ifmgd->wmm_last_param_set) 1137 if (count == ifmgd->wmm_last_param_set)
1138 return; 1138 return false;
1139 ifmgd->wmm_last_param_set = count; 1139 ifmgd->wmm_last_param_set = count;
1140 1140
1141 pos = wmm_param + 8; 1141 pos = wmm_param + 8;
@@ -1202,6 +1202,7 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
1202 1202
1203 /* enable WMM or activate new settings */ 1203 /* enable WMM or activate new settings */
1204 sdata->vif.bss_conf.qos = true; 1204 sdata->vif.bss_conf.qos = true;
1205 return true;
1205} 1206}
1206 1207
1207static void __ieee80211_stop_poll(struct ieee80211_sub_if_data *sdata) 1208static void __ieee80211_stop_poll(struct ieee80211_sub_if_data *sdata)
@@ -2438,14 +2439,6 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
2438 directed_tim = ieee80211_check_tim(elems.tim, elems.tim_len, 2439 directed_tim = ieee80211_check_tim(elems.tim, elems.tim_len,
2439 ifmgd->aid); 2440 ifmgd->aid);
2440 2441
2441 if (ncrc != ifmgd->beacon_crc || !ifmgd->beacon_crc_valid) {
2442 ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems,
2443 true);
2444
2445 ieee80211_sta_wmm_params(local, sdata, elems.wmm_param,
2446 elems.wmm_param_len);
2447 }
2448
2449 if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) { 2442 if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) {
2450 if (directed_tim) { 2443 if (directed_tim) {
2451 if (local->hw.conf.dynamic_ps_timeout > 0) { 2444 if (local->hw.conf.dynamic_ps_timeout > 0) {
@@ -2476,6 +2469,13 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
2476 ifmgd->beacon_crc = ncrc; 2469 ifmgd->beacon_crc = ncrc;
2477 ifmgd->beacon_crc_valid = true; 2470 ifmgd->beacon_crc_valid = true;
2478 2471
2472 ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems,
2473 true);
2474
2475 if (ieee80211_sta_wmm_params(local, sdata, elems.wmm_param,
2476 elems.wmm_param_len))
2477 changed |= BSS_CHANGED_QOS;
2478
2479 if (elems.erp_info && elems.erp_info_len >= 1) { 2479 if (elems.erp_info && elems.erp_info_len >= 1) {
2480 erp_valid = true; 2480 erp_valid = true;
2481 erp_value = elems.erp_info[0]; 2481 erp_value = elems.erp_info[0];