From b82b210bf049f4acd710636834e9da052c8b2d72 Mon Sep 17 00:00:00 2001 From: Kalle Valo Date: Tue, 13 Dec 2011 14:51:58 +0200 Subject: [PATCH] --- yaml --- r: 279246 b: refs/heads/master c: 277d90f4ba4b7ebb35b85a5d6c58dce2f1e1b58d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath/ath6kl/init.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 474cc61bf8c1..2a982c935391 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 75ae3bc48fc8f5d1e5f5fe43cd07078325a6194b +refs/heads/master: 277d90f4ba4b7ebb35b85a5d6c58dce2f1e1b58d diff --git a/trunk/drivers/net/wireless/ath/ath6kl/init.c b/trunk/drivers/net/wireless/ath/ath6kl/init.c index c97f83ca0ff2..5753f00a0c0d 100644 --- a/trunk/drivers/net/wireless/ath/ath6kl/init.c +++ b/trunk/drivers/net/wireless/ath/ath6kl/init.c @@ -913,12 +913,15 @@ static int ath6kl_fetch_fw_api2(struct ath6kl *ar) ar->hw.reserved_ram_size); break; case ATH6KL_FW_IE_CAPABILITIES: + if (ie_len < DIV_ROUND_UP(ATH6KL_FW_CAPABILITY_MAX, 8)) + break; + ath6kl_dbg(ATH6KL_DBG_BOOT, "found firmware capabilities ie (%zd B)\n", ie_len); for (i = 0; i < ATH6KL_FW_CAPABILITY_MAX; i++) { - index = ALIGN(i, 8) / 8; + index = i / 8; bit = i % 8; if (data[index] & (1 << bit))