linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mac80211: Fix bss_info_changed comment regarding sleeping
@ 2010-06-13 18:15 Ivo van Doorn
  2010-06-13 18:16 ` [PATCH 2/2] rt2x00: Disable Mesh mode for USB drivers Ivo van Doorn
  0 siblings, 1 reply; 2+ messages in thread
From: Ivo van Doorn @ 2010-06-13 18:15 UTC (permalink / raw)
  To: John W. Linville; +Cc: rt2x00 Users List, linux-wireless, Johannes Berg

The bss_info_changed callback function is allowed to sleep,
however when operating in Mesh mode, it can be used in
atomic context. Fixing it would seem to require major
locking changes in the mesh implementation.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 include/net/mac80211.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index de22cbf..73cf3ad 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1533,7 +1533,8 @@ enum ieee80211_ampdu_mlme_action {
  *	This function should not be used if no BSS has been set, unless
  *	for association indication. The @changed parameter indicates which
  *	of the bss parameters has changed when a call is made. The callback
- *	can sleep.
+ *	can sleep except when operating in Mesh mode where the callback
+ *	must be atomic.
  *
  * @prepare_multicast: Prepare for multicast filter configuration.
  *	This callback is optional, and its return value is passed
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] rt2x00: Disable Mesh mode for USB drivers
  2010-06-13 18:15 [PATCH 1/2] mac80211: Fix bss_info_changed comment regarding sleeping Ivo van Doorn
@ 2010-06-13 18:16 ` Ivo van Doorn
  0 siblings, 0 replies; 2+ messages in thread
From: Ivo van Doorn @ 2010-06-13 18:16 UTC (permalink / raw)
  To: John W. Linville; +Cc: rt2x00 Users List, linux-wireless, Johannes Berg

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@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-13 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-13 18:15 [PATCH 1/2] mac80211: Fix bss_info_changed comment regarding sleeping Ivo van Doorn
2010-06-13 18:16 ` [PATCH 2/2] rt2x00: Disable Mesh mode for USB drivers Ivo van Doorn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).