Skip to contentSkip to conversation

mac80211: don't return beacons when mesh is disabled

PATCH New Johannes Berg 1 participant 1 message Jan 18, 2011 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: don't return beacons when mesh is disabled

From: Johannes Berg <[email protected]>

When mesh is disabled, mac80211 was returning beacons with an empty mesh ID. That isn't desirable, even if drivers shouldn't be trying to get beacons to start with.

---
 net/mac80211/tx.c |    5 +++++
 1 file changed, 5 insertions(+)
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);