All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] mac80211: Add exception for mesh on running check to set beaconing
@ 2010-09-12  3:06 Steve deRosier
  0 siblings, 0 replies; only message in thread
From: Steve deRosier @ 2010-09-12  3:06 UTC (permalink / raw)
  To: linux-wireless, johannes; +Cc: Steve deRosier

There was a problem with mesh not enabling beacons in select
drivers (notably libertas_tf, though others are likely affected),
due to the addition of the SDATA_STATE_RUNNING flag at the end
of ieee80211_do_open.  The problem is mesh gets started and
wants to send the beacon-enable message to the driver before
SDATA_STATE_RUNNING gets set, but ieee80211_bss_info_change_notify
has the following check before enabling beacons:
!ieee80211_sdata_running(sdata)

This patch adds an exception for mesh to the sdata running check,
to allow mesh to start beacons.

I don't know if this is the best solution, perhaps moving the
SDATA_STATE_RUNNING set, or a driver modification is in order,
but this seems the easiest and least dammaging way to do this.

For reference the SDATA_STATE_RUNNING stuff was added in commit 
34d4bc4d about two weeks ago.

Signed-off-by: Steve deRosier <steve@cozybit.com>

---
 net/mac80211/main.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 4935b84..d1ad7fa 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -221,7 +221,9 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
 	}
 
 	if (changed & BSS_CHANGED_BEACON_ENABLED) {
-		if (local->quiescing || !ieee80211_sdata_running(sdata) ||
+		if (local->quiescing ||
+		    (!ieee80211_sdata_running(sdata) &&
+		    sdata->vif.type != NL80211_IFTYPE_MESH_POINT) ||
 		    test_bit(SCAN_SW_SCANNING, &local->scanning)) {
 			sdata->vif.bss_conf.enable_beacon = false;
 		} else {
-- 
1.7.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-12  3:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-12  3:06 [RFC] mac80211: Add exception for mesh on running check to set beaconing Steve deRosier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.