aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2011-10-11 12:08:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-10-14 14:48:14 -0400
commita2fe81667410723d941a688e1958a49d67ca3346 (patch)
tree4330d321d7a62f50f5ec7e7f14e4f258b721e7a7 /net/mac80211/main.c
parent7bd9897e1a07d97e6297f38f741e2d1851e243b8 (diff)
mac80211: Build TX radiotap header dynamically
Get rid of the ieee80211_tx_status_rtap_hdr struct and instead build the rtap header dynamically. This makes it easier to extend the rtap header generation in the future. Add ieee80211_tx_radiotap_len to calculate the expected size of the rtap header before generating it. Since we can't check if the rtap header fits into the requested headroom during compile time anymore add a WARN_ON_ONCE. Also move the actual rtap header generation into its own function. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 17b038aeac9b..d4ee6d234a78 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -904,12 +904,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
904 * and we need some headroom for passing the frame to monitor 904 * and we need some headroom for passing the frame to monitor
905 * interfaces, but never both at the same time. 905 * interfaces, but never both at the same time.
906 */ 906 */
907#ifndef __CHECKER__
908 BUILD_BUG_ON(IEEE80211_TX_STATUS_HEADROOM !=
909 sizeof(struct ieee80211_tx_status_rtap_hdr));
910#endif
911 local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom, 907 local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom,
912 sizeof(struct ieee80211_tx_status_rtap_hdr)); 908 IEEE80211_TX_STATUS_HEADROOM);
913 909
914 debugfs_hw_add(local); 910 debugfs_hw_add(local);
915 911