Commit 2d071ca5 authored by Michael Buesch's avatar Michael Buesch Committed by John W. Linville
Browse files

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: default avatarMichael Buesch <>
Signed-off-by: default avatarJohn W. Linville <>
parent 20977d3e
...@@ -842,6 +842,9 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, ...@@ -842,6 +842,9 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
#endif #endif
if (for_tx) { if (for_tx) {
/* Assumption: B43_TXRING_SLOTS can be divided by TX_SLOTS_PER_FRAME */
ring->txhdr_cache = kcalloc(ring->nr_slots / TX_SLOTS_PER_FRAME, ring->txhdr_cache = kcalloc(ring->nr_slots / TX_SLOTS_PER_FRAME,
b43_txhdr_size(dev), b43_txhdr_size(dev),
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment