diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-01-18 07:45:32 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-19 11:36:11 -0500 |
commit | ac1bd8464f161ed1475ef73c431b926256c6b5bb (patch) | |
tree | 6a755cadfd24e1c988e75383d30c789c5b149b3d /net/mac80211/tx.c | |
parent | 4801416c76a3a355076d6d371c00270dfe332e1c (diff) |
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/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 5 |
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, | |||
2299 | struct ieee80211_mgmt *mgmt; | 2299 | struct ieee80211_mgmt *mgmt; |
2300 | u8 *pos; | 2300 | u8 *pos; |
2301 | 2301 | ||
2302 | #ifdef CONFIG_MAC80211_MESH | ||
2303 | if (!sdata->u.mesh.mesh_id_len) | ||
2304 | goto out; | ||
2305 | #endif | ||
2306 | |||
2302 | /* headroom, head length, tail length and maximum TIM length */ | 2307 | /* headroom, head length, tail length and maximum TIM length */ |
2303 | skb = dev_alloc_skb(local->tx_headroom + 400 + | 2308 | skb = dev_alloc_skb(local->tx_headroom + 400 + |
2304 | sdata->u.mesh.vendor_ie_len); | 2309 | sdata->u.mesh.vendor_ie_len); |