From: Johannes Berg Date: Tue, 18 Jan 2011 12:45:32 +0000 (+0100) Subject: mac80211: don't return beacons when mesh is disabled X-Git-Tag: v2.6.39-rc1~468^2~448^2~40 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=ac1bd8464f161ed1475ef73c431b926256c6b5bb;p=~shefty%2Frdma-dev.git 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 Signed-off-by: John W. Linville --- diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 2378305f753..e46c801320e 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);