Parcourir la source

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 <j@w1.fi>
Jouni Malinen il y a 12 ans
Parent
commit
1d0c6fb1eb
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      src/drivers/driver_nl80211.c

+ 4 - 1
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;