Skip to contentSkip to conversation

mac80211: Add exception for mesh on running check to set beaconing

RFC New Steve deRosier 1 participant 1 message Sep 12, 2010 mac80211

lore
Share & tools
lore
#0 lore raw

RFC 1/1 mac80211: Add exception for mesh on running check to set beaconing

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.

---
 net/mac80211/main.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
net/mac80211/main.c +3 -1
index 4935b84..d1ad7fa 100644
@@ -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 {
Signature · 1 line
1.7.0