]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix re-enabling of 802.11b rates after P2P use
authorJouni Malinen <j@w1.fi>
Fri, 10 Aug 2012 08:48:57 +0000 (11:48 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 10 Aug 2012 08:48:57 +0000 (11:48 +0300)
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 <j@w1.fi>

src/drivers/driver_nl80211.c

index 058ad276161738e85ff2ba9ed28c262978ce7a73..f560aff5f7c878490012cf11a06a8e6ec42e9e15 100644 (file)
@@ -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;