diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index 62e25ccd1016..f90b5db741cf 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c | |||
@@ -1004,9 +1004,6 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) | |||
1004 | ar->hw.reserved_ram_size); | 1004 | ar->hw.reserved_ram_size); |
1005 | break; | 1005 | break; |
1006 | case ATH6KL_FW_IE_CAPABILITIES: | 1006 | case ATH6KL_FW_IE_CAPABILITIES: |
1007 | if (ie_len < DIV_ROUND_UP(ATH6KL_FW_CAPABILITY_MAX, 8)) | ||
1008 | break; | ||
1009 | |||
1010 | ath6kl_dbg(ATH6KL_DBG_BOOT, | 1007 | ath6kl_dbg(ATH6KL_DBG_BOOT, |
1011 | "found firmware capabilities ie (%zd B)\n", | 1008 | "found firmware capabilities ie (%zd B)\n", |
1012 | ie_len); | 1009 | ie_len); |
@@ -1015,6 +1012,9 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) | |||
1015 | index = i / 8; | 1012 | index = i / 8; |
1016 | bit = i % 8; | 1013 | bit = i % 8; |
1017 | 1014 | ||
1015 | if (index == ie_len) | ||
1016 | break; | ||
1017 | |||
1018 | if (data[index] & (1 << bit)) | 1018 | if (data[index] & (1 << bit)) |
1019 | __set_bit(i, ar->fw_capabilities); | 1019 | __set_bit(i, ar->fw_capabilities); |
1020 | } | 1020 | } |