diff options
Diffstat (limited to 'drivers/net/wireless/b43/xmit.c')
-rw-r--r-- | drivers/net/wireless/b43/xmit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c index 5b85e7d73592..5280ebc8c6e9 100644 --- a/drivers/net/wireless/b43/xmit.c +++ b/drivers/net/wireless/b43/xmit.c | |||
@@ -237,7 +237,7 @@ int b43_generate_txhdr(struct b43_wldev *dev, | |||
237 | int wlhdr_len; | 237 | int wlhdr_len; |
238 | size_t iv_len; | 238 | size_t iv_len; |
239 | 239 | ||
240 | B43_WARN_ON(key_idx >= dev->max_nr_keys); | 240 | B43_WARN_ON(key_idx >= ARRAY_SIZE(dev->key)); |
241 | key = &(dev->key[key_idx]); | 241 | key = &(dev->key[key_idx]); |
242 | 242 | ||
243 | if (unlikely(!key->keyconf)) { | 243 | if (unlikely(!key->keyconf)) { |
@@ -578,7 +578,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) | |||
578 | * key index, but the ucode passed it slightly different. | 578 | * key index, but the ucode passed it slightly different. |
579 | */ | 579 | */ |
580 | keyidx = b43_kidx_to_raw(dev, keyidx); | 580 | keyidx = b43_kidx_to_raw(dev, keyidx); |
581 | B43_WARN_ON(keyidx >= dev->max_nr_keys); | 581 | B43_WARN_ON(keyidx >= ARRAY_SIZE(dev->key)); |
582 | 582 | ||
583 | if (dev->key[keyidx].algorithm != B43_SEC_ALGO_NONE) { | 583 | if (dev->key[keyidx].algorithm != B43_SEC_ALGO_NONE) { |
584 | wlhdr_len = ieee80211_hdrlen(fctl); | 584 | wlhdr_len = ieee80211_hdrlen(fctl); |