diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-12-14 07:54:53 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-16 06:14:07 -0500 |
commit | 70dabeb74ee3bff71b65f47546dafb83edbb06b9 (patch) | |
tree | 8069d86b7683faa28a583597d446df0f6f560bc8 /net | |
parent | 7907c7d33c3733b2265dadc6385fe028af72b4c7 (diff) |
mac80211: let the driver reserve extra tailroom in beacons
Can be used to add extra IEs (such as P2P NoA) without having to
reallocate the buffer.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/tx.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 6d59e21cdb9f..002ded2c01f6 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -2549,7 +2549,8 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
2549 | */ | 2549 | */ |
2550 | skb = dev_alloc_skb(local->tx_headroom + | 2550 | skb = dev_alloc_skb(local->tx_headroom + |
2551 | beacon->head_len + | 2551 | beacon->head_len + |
2552 | beacon->tail_len + 256); | 2552 | beacon->tail_len + 256 + |
2553 | local->hw.extra_beacon_tailroom); | ||
2553 | if (!skb) | 2554 | if (!skb) |
2554 | goto out; | 2555 | goto out; |
2555 | 2556 | ||
@@ -2581,7 +2582,8 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
2581 | ieee80211_update_csa(sdata, presp); | 2582 | ieee80211_update_csa(sdata, presp); |
2582 | 2583 | ||
2583 | 2584 | ||
2584 | skb = dev_alloc_skb(local->tx_headroom + presp->head_len); | 2585 | skb = dev_alloc_skb(local->tx_headroom + presp->head_len + |
2586 | local->hw.extra_beacon_tailroom); | ||
2585 | if (!skb) | 2587 | if (!skb) |
2586 | goto out; | 2588 | goto out; |
2587 | skb_reserve(skb, local->tx_headroom); | 2589 | skb_reserve(skb, local->tx_headroom); |
@@ -2608,7 +2610,8 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
2608 | skb = dev_alloc_skb(local->tx_headroom + | 2610 | skb = dev_alloc_skb(local->tx_headroom + |
2609 | bcn->head_len + | 2611 | bcn->head_len + |
2610 | 256 + /* TIM IE */ | 2612 | 256 + /* TIM IE */ |
2611 | bcn->tail_len); | 2613 | bcn->tail_len + |
2614 | local->hw.extra_beacon_tailroom); | ||
2612 | if (!skb) | 2615 | if (!skb) |
2613 | goto out; | 2616 | goto out; |
2614 | skb_reserve(skb, local->tx_headroom); | 2617 | skb_reserve(skb, local->tx_headroom); |