提交 50ae34a2 编写于 作者: L Luciano Coelho 提交者: Johannes Berg

mac80211: use the correct capability info in ieee80211_set_associated()

If an AP is beaconing with different capabilities than the one we get
in the associate response, we were still using the capabilities
received in the beacons.  One example is when the AP is beaconing with
the short slot bit set to zero and then we try to connect to it with
long slot.  In this case, we would keep using long slot until the next
beacon was received.

Fix this by using the correct capability value when calling
ieee80211_handle_bss_capability().  We were using cbss->capability,
but we should use the bss_conf->assoc_capability instead.
Signed-off-by: NLuciano Coelho <coelho@ti.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 46c1dd0c
...@@ -1275,7 +1275,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, ...@@ -1275,7 +1275,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
bss_info_changed |= BSS_CHANGED_BEACON_INT; bss_info_changed |= BSS_CHANGED_BEACON_INT;
bss_info_changed |= ieee80211_handle_bss_capability(sdata, bss_info_changed |= ieee80211_handle_bss_capability(sdata,
cbss->capability, bss->has_erp_value, bss->erp_value); bss_conf->assoc_capability, bss->has_erp_value, bss->erp_value);
sdata->u.mgd.beacon_timeout = usecs_to_jiffies(ieee80211_tu_to_usec( sdata->u.mgd.beacon_timeout = usecs_to_jiffies(ieee80211_tu_to_usec(
IEEE80211_BEACON_LOSS_COUNT * bss_conf->beacon_int)); IEEE80211_BEACON_LOSS_COUNT * bss_conf->beacon_int));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册