diff options
author | Michael Buesch <mb@bu3sch.de> | 2009-02-20 06:24:52 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:52:50 -0500 |
commit | 2d071ca50e9f20bf0203a7e8dbb1c784934e324d (patch) | |
tree | 02038ba172ffe9e483f7f1839c74c4a926e9f3fe /drivers/net/wireless/b43 | |
parent | 20977d3e685abb8b84c385426c39de1fca0a58ac (diff) |
b43: Add slot count compiletime assertion
This adds a compiletime assertion for a recently introduced
assumption on the slot counts.
The tx header cache handling code assumes that the TX slot count
can be divided evenly by the number of TX slots per frame.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r-- | drivers/net/wireless/b43/dma.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index 189b2ec1bac7..c69b70e0a721 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
@@ -842,6 +842,9 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, | |||
842 | #endif | 842 | #endif |
843 | 843 | ||
844 | if (for_tx) { | 844 | if (for_tx) { |
845 | /* Assumption: B43_TXRING_SLOTS can be divided by TX_SLOTS_PER_FRAME */ | ||
846 | BUILD_BUG_ON(B43_TXRING_SLOTS % TX_SLOTS_PER_FRAME != 0); | ||
847 | |||
845 | ring->txhdr_cache = kcalloc(ring->nr_slots / TX_SLOTS_PER_FRAME, | 848 | ring->txhdr_cache = kcalloc(ring->nr_slots / TX_SLOTS_PER_FRAME, |
846 | b43_txhdr_size(dev), | 849 | b43_txhdr_size(dev), |
847 | GFP_KERNEL); | 850 | GFP_KERNEL); |