nl80211: Try to unmask 11b rates again on next connection request

It is possible for unmasking of 11b rates to fail if a P2P group is
terminated while the netdev is down (e.g., due to rfkill block). This
could result in the 11b TX rates being left masked for non-P2P
operations. This would be particularly unfortunate for channel 14 use
since OFDM rates are not allowed on channel 14 and only OFDM rates were
configured P2P. This issue showed up, e.g., when running hwsim test case
rfkill_autogo followed by ap_wps_conf_chan14.

It may be possible to allow the failed operation in cfg80211/mac80211,
but it looks better to work around this on wpa_supplicant side as well.
Try to unmask the 11b rates again on the next connection request if the
rate unmasking operation had failed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2014-12-08 16:10:46 +02:00 committed by Jouni Malinen
parent 3e208481b5
commit 4bd7195466

View file

@ -2707,6 +2707,25 @@ static void nl80211_copy_auth_params(struct wpa_driver_nl80211_data *drv,
}
static void nl80211_unmask_11b_rates(struct i802_bss *bss)
{
struct wpa_driver_nl80211_data *drv = bss->drv;
if (is_p2p_net_interface(drv->nlmode) || !drv->disabled_11b_rates)
return;
/*
* Looks like we failed to unmask 11b rates previously. This could
* happen, e.g., if the interface was down at the point in time when a
* P2P group was terminated.
*/
wpa_printf(MSG_DEBUG,
"nl80211: Interface %s mode is for non-P2P, but 11b rates were disabled - re-enable them",
bss->ifname);
nl80211_disable_11b_rates(drv, drv->ifindex, 0);
}
static int wpa_driver_nl80211_authenticate(
struct i802_bss *bss, struct wpa_driver_auth_params *params)
{
@ -2718,6 +2737,8 @@ static int wpa_driver_nl80211_authenticate(
int count = 0;
int is_retry;
nl80211_unmask_11b_rates(bss);
is_retry = drv->retry_auth;
drv->retry_auth = 0;
drv->ignore_deauth_event = 0;
@ -4568,6 +4589,8 @@ static int wpa_driver_nl80211_associate(
int ret = -1;
struct nl_msg *msg;
nl80211_unmask_11b_rates(bss);
if (params->mode == IEEE80211_MODE_AP)
return wpa_driver_nl80211_ap(drv, params);