From 1d0c6fb1ebe1feaec76bfb7f00c05349e18973aa Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 10 Aug 2012 11:48:57 +0300 Subject: [PATCH] nl80211: Fix re-enabling of 802.11b rates after P2P use Commit a11241fa114923b47892ad3279966839e9c2741d removed the 802.11b rate enabling/disabling code from wpa_driver_nl80211_set_mode() and while doing that, removed the only place where drv->disabled_11b_rates was set. Fix this by updating the flag in nl80211_disable_11b_rates(). In addition, re-enable the 802.11b rates when changing to non-P2P mode. Signed-hostap: Jouni Malinen --- src/drivers/driver_nl80211.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 058ad2761..f560aff5f 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -7081,6 +7081,8 @@ done: if (is_p2p_interface(nlmode)) nl80211_disable_11b_rates(drv, drv->ifindex, 1); + else if (drv->disabled_11b_rates) + nl80211_disable_11b_rates(drv, drv->ifindex, 0); if (is_ap_interface(nlmode)) { nl80211_mgmt_unsubscribe(bss, "start AP"); @@ -8371,7 +8373,8 @@ static int nl80211_disable_11b_rates(struct wpa_driver_nl80211_data *drv, if (ret) { wpa_printf(MSG_DEBUG, "nl80211: Set TX rates failed: ret=%d " "(%s)", ret, strerror(-ret)); - } + } else + drv->disabled_11b_rates = disabled; return ret;