Search Linux Wireless

[PATCH 2/2] rt2x00: Disable Mesh mode for USB drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bss_info_changed must be atomic in Mesh mode.
As a result it must be disabled for all USB drivers.

Signed-off-by: Ivo van Doorn <IvDoorn@xxxxxxxxx>
---
 drivers/net/wireless/rt2x00/rt2x00dev.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 7d30efd..8661ada 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -852,13 +852,22 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
 	 * beacon entries.
 	 */
 	rt2x00dev->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
-	if (rt2x00dev->ops->bcn->entry_num > 0)
+	if (rt2x00dev->ops->bcn->entry_num > 0) {
 		rt2x00dev->hw->wiphy->interface_modes |=
 		    BIT(NL80211_IFTYPE_ADHOC) |
 		    BIT(NL80211_IFTYPE_AP) |
-		    BIT(NL80211_IFTYPE_MESH_POINT) |
 		    BIT(NL80211_IFTYPE_WDS);
 
+		/*
+ 		 * The bss_info_changed() callback function is not
+ 		 * allowed to sleep in mesh mode. As a result, we
+ 		 * can't support Mesh mode for the USB drivers.
+ 		 */
+		if (!rt2x00_is_usb(rt2x00dev))
+			rt2x00dev->hw->wiphy->interface_modes |=
+			    BIT(NL80211_IFTYPE_MESH_POINT);
+	}
+
 	/*
 	 * Let the driver probe the device to detect the capabilities.
 	 */
-- 
1.6.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux