summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2013-04-08 19:53:21 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-04-10 14:10:34 -0400
commitaf132051ceeb0cb8f4e2eefb596c13fbeb760f7c (patch)
tree3875fa668c67186b0ad1c5d4049ccfa407f96cc2
parent99ba6a4610c8413c9166e600b1797f0a8f1c4498 (diff)
downloadop-kernel-dev-af132051ceeb0cb8f4e2eefb596c13fbeb760f7c.zip
op-kernel-dev-af132051ceeb0cb8f4e2eefb596c13fbeb760f7c.tar.gz
rtlwifi: rtl8188ee: Fix loop that ends early
In routine _rtl8188e_read_power_value_fromprom(), there are loops initializing index_cck_base and index_bw40_base from the PROM. As the result of a typo, the second loop is ended one element too soon. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8188ee/hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
index bcff497..b68cae3 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
@@ -1635,7 +1635,7 @@ static void _rtl8188e_read_power_value_fromprom(struct ieee80211_hw *hw,
if (pwr2g->index_cck_base[path][i] == 0xFF)
pwr2g->index_cck_base[path][i] = 0x2D;
}
- for (i = 0; i < MAX_CHNL_GROUP_24G-1; i++) {
+ for (i = 0; i < MAX_CHNL_GROUP_24G; i++) {
pwr2g->index_bw40_base[path][i] = hwinfo[eadr++];
if (pwr2g->index_bw40_base[path][i] == 0xFF)
pwr2g->index_bw40_base[path][i] = 0x2D;
OpenPOWER on IntegriCloud