Skip to contentSkip to conversation

Mesh join/leave

DISCUSSION Steve Brown 3 participants 9 messages Jan 11, 2011 – Jan 13, 2011 mac80211

lore
Share & tools
lore
#0 lore raw

In testing this, the command "iw mesh0 mesh leave" doesn't stop beaconing. Beaconing continues with a null mesh id.

Is this the intended behavior?

Steve

iw version 0.9.21-35-gba292ae
wireless-testing at commit 315f05c479f8e98e2df0e23a1bc0829b7e374fe9

maintainer
#1 lore raw
Quoted 4 lines · Steve Brown

In testing this, the command "iw mesh0 mesh leave" doesn't stop beaconing. Beaconing continues with a null mesh id.

Is this the intended behavior?

No, it's not -- what driver are you using?

johannes

#2 lore raw
Quoted 10 lines · Johannes Berg
Quoted 4 lines · Steve Brown

In testing this, the command "iw mesh0 mesh leave" doesn't stop beaconing. Beaconing continues with a null mesh id.

Is this the intended behavior?

No, it's not -- what driver are you using?

johannes

ath9k with adapter AR9160 802.11abgn Wireless PCI Adapter (168c:2082)

Steve

maintainer
#3 lore raw
Quoted 5 lines · Steve Brown
Quoted 4 lines · Johannes Berg
Quoted 3 lines · Steve Brown

In testing this, the command "iw mesh0 mesh leave" doesn't stop beaconing. Beaconing continues with a null mesh id.

Quoted 7 lines
Quoted 6 lines
Quoted 1 line

Is this the intended behavior?

No, it's not -- what driver are you using?

johannes

ath9k with adapter AR9160 802.11abgn Wireless PCI Adapter (168c:2082)

No idea then, it looks like ath9k correctly handles ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED); so you should look at what's happening around there.

johannes

#8 lore raw
In reply to Johannes Berg
Quoted 10 lines · Johannes Berg
Quoted 4 lines · Steve Brown

In testing this, the command "iw mesh0 mesh leave" doesn't stop beaconing. Beaconing continues with a null mesh id.

Is this the intended behavior?

No, it's not -- what driver are you using?

johannes

The ath5k driver behaves differently. On "leave" it stops beaconing and on "join", starts back up.

Steve

maintainer
#4 lore raw
In reply to Steve Brown
Quoted 8 lines · Steve Brown
Quoted 7 lines · Johannes Berg
Quoted 4 lines · Steve Brown

In testing this, the command "iw mesh0 mesh leave" doesn't stop beaconing. Beaconing continues with a null mesh id.

Is this the intended behavior?

No, it's not -- what driver are you using?

Of course maybe mac80211 should be doings omething like this too:

johannes

net/mac80211/tx.c +5 -0
@@ -2299,6 +2299,11 @@ struct sk_buff *ieee80211_beacon_get_tim
 		struct ieee80211_mgmt *mgmt;
 		u8 *pos;
 
+#ifdef CONFIG_MAC80211_MESH
+		if (!sdata->u.mesh.mesh_id_len)
+			goto out;
+#endif
+
 		/* headroom, head length, tail length and maximum TIM length */
 		skb = dev_alloc_skb(local->tx_headroom + 400 +
 				sdata->u.mesh.vendor_ie_len);
#5 lore raw
Quoted 20 lines · Johannes Berg
Quoted 8 lines · Steve Brown
Quoted 7 lines · Johannes Berg
Quoted 4 lines · Steve Brown

In testing this, the command "iw mesh0 mesh leave" doesn't stop beaconing. Beaconing continues with a null mesh id.

Is this the intended behavior?

No, it's not -- what driver are you using?

Of course maybe mac80211 should be doings omething like this too:

johannes

net/mac80211/tx.c +0 -0
@@ -2299,6 +2299,11 @@ struct sk_buff *ieee80211_beacon_get_tim
 		struct ieee80211_mgmt *mgmt;

net/mac80211/tx.c struct sk_buff *ieee80211_beacon_get_tim · line 2309

Quoted 10 lines
net/mac80211/tx.c +5 -0
 		u8 *pos;
 
+#ifdef CONFIG_MAC80211_MESH
+		if (!sdata->u.mesh.mesh_id_len)
+			goto out;
+#endif
+
 		/* headroom, head length, tail length and maximum TIM length */
 		skb = dev_alloc_skb(local->tx_headroom + 400 +
 				sdata->u.mesh.vendor_ie_len);

With the patch, leave/join stop and restart beaconing.

Thanks,
Steve

maintainer
#6 lore raw
Quoted 10 lines · Steve Brown
Quoted 10 lines

Of course maybe mac80211 should be doings omething like this too:

johannes

net/mac80211/tx.c +0 -0
@@ -2299,6 +2299,11 @@ struct sk_buff *ieee80211_beacon_get_tim
 		struct ieee80211_mgmt *mgmt;
 		u8 *pos;
 
Quoted 11 lines

net/mac80211/tx.c struct sk_buff *ieee80211_beacon_get_tim · line 2309

Quoted 10 lines
net/mac80211/tx.c +5 -0
+#ifdef CONFIG_MAC80211_MESH
+		if (!sdata->u.mesh.mesh_id_len)
+			goto out;
+#endif
+
 		/* headroom, head length, tail length and maximum TIM length */
 		skb = dev_alloc_skb(local->tx_headroom + 400 +
 				sdata->u.mesh.vendor_ie_len);

With the patch, leave/join stop and restart beaconing.

Yeah but evidently ath9k isn't cleanly stopping beaconing, it's still attempting to beacon but doesn't get a beacon from mac80211 so can't send one.

johannes

#7 lore raw
Quoted 10 lines · Johannes Berg
Quoted 6 lines

net/mac80211/tx.c struct sk_buff *ieee80211_beacon_get_tim · line 2302

Quoted 6 lines

Of course maybe mac80211 should be doings omething like this too:

net/mac80211/tx.c +4 -0
@@ -2299,6 +2299,11 @@ struct sk_buff *ieee80211_beacon_get_tim
+#ifdef CONFIG_MAC80211_MESH
+		if (!sdata->u.mesh.mesh_id_len)
+			goto out;
+#endif

Yeah but evidently ath9k isn't cleanly stopping beaconing, it's still attempting to beacon but doesn't get a beacon from mac80211 so can't send one.

Sounds like SWBA interrupt should be disabled or at least masked in some cases when mac80211 indicates some kind of change. I have not looked at details on what exactly is missing from ath9k. Anyway, yes, it would be good to make ieee80211_beacon_get_tim() return NULL when mac80211 does not want any Beacon frames to be transmitted.

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA