Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1243832

[PATCH 2/3] staging: rtl8188eu: bugfix: correct channels range is set in Hal_ReadTxPowerInfo88E

From Ivan Safonov <insafonov@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 2/3] staging: rtl8188eu: bugfix: correct channels range is set in Hal_ReadTxPowerInfo88E
Date 2015-10-10 08:30 +0200
Message-ID <qhVPk-134-17@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Correct channels range is 1..14 (numbering from 1) but not 0..13.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
index 4fa2c78..46e0fdd 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
@@ -481,18 +481,18 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *PROMContent, bool Auto
 		pHalData->bTXPowerDataReadFromEEPORM = true;
 
 	for (rfPath = 0; rfPath < pHalData->NumTotalRFPath; rfPath++) {
-		for (ch = 0; ch < CHANNEL_MAX_NUMBER; ch++) {
+		for (ch = 1; ch <= CHANNEL_MAX_NUMBER; ch++) {
 			group = get_channel_group(ch);
 
-			pHalData->Index24G_CCK_Base[rfPath][ch] = pwrInfo24G.IndexCCK_Base[rfPath][group];
+			pHalData->Index24G_CCK_Base[rfPath][ch - 1] = pwrInfo24G.IndexCCK_Base[rfPath][group];
 			if (ch == 14)
-				pHalData->Index24G_BW40_Base[rfPath][ch] = pwrInfo24G.IndexBW40_Base[rfPath][4];
+				pHalData->Index24G_BW40_Base[rfPath][ch - 1] = pwrInfo24G.IndexBW40_Base[rfPath][4];
 			else
-				pHalData->Index24G_BW40_Base[rfPath][ch] = pwrInfo24G.IndexBW40_Base[rfPath][group];
+				pHalData->Index24G_BW40_Base[rfPath][ch - 1] = pwrInfo24G.IndexBW40_Base[rfPath][group];
 
 			DBG_88E("======= Path %d, Channel %d =======\n", rfPath, ch);
-			DBG_88E("Index24G_CCK_Base[%d][%d] = 0x%x\n", rfPath, ch, pHalData->Index24G_CCK_Base[rfPath][ch]);
-			DBG_88E("Index24G_BW40_Base[%d][%d] = 0x%x\n", rfPath, ch, pHalData->Index24G_BW40_Base[rfPath][ch]);
+			DBG_88E("Index24G_CCK_Base[%d][%d] = 0x%x\n", rfPath, ch, pHalData->Index24G_CCK_Base[rfPath][ch - 1]);
+			DBG_88E("Index24G_BW40_Base[%d][%d] = 0x%x\n", rfPath, ch, pHalData->Index24G_BW40_Base[rfPath][ch - 1]);
 		}
 		for (TxCount = 0; TxCount < MAX_TX_COUNT; TxCount++) {
 			pHalData->CCK_24G_Diff[rfPath][TxCount] = pwrInfo24G.CCK_Diff[rfPath][TxCount];
-- 
2.4.9

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 2/3] staging: rtl8188eu: bugfix: correct channels range is  set in Hal_ReadTxPowerInfo88E Ivan Safonov <insafonov@gmail.com> - 2015-10-10 08:30 +0200
  Re: [PATCH 2/3] staging: rtl8188eu: bugfix: correct channels range  is set in Hal_ReadTxPowerInfo88E Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-13 07:50 +0200
    Re: [PATCH 2/3] staging: rtl8188eu: bugfix: correct channels range is  set in Hal_ReadTxPowerInfo88E Ivan Safonov <insafonov@gmail.com> - 2015-10-13 17:40 +0200

csiph-web