summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-01-18 13:45:32 +0100
committerJohn W. Linville <linville@tuxdriver.com>2011-01-19 11:36:11 -0500
commitac1bd8464f161ed1475ef73c431b926256c6b5bb (patch)
tree6a755cadfd24e1c988e75383d30c789c5b149b3d /net/mac80211
parent4801416c76a3a355076d6d371c00270dfe332e1c (diff)
downloadlinux-ac1bd8464f161ed1475ef73c431b926256c6b5bb.tar.bz2
mac80211: don't return beacons when mesh is disabled
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. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/tx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 2378305f7534..e46c801320e1 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2299,6 +2299,11 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
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);