From nobody Wed Jul 1 00:49:19 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 167CBC433EF for ; Wed, 5 Jan 2022 08:34:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238550AbiAEIep (ORCPT ); Wed, 5 Jan 2022 03:34:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229962AbiAEIen (ORCPT ); Wed, 5 Jan 2022 03:34:43 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4388BC061761 for ; Wed, 5 Jan 2022 00:34:43 -0800 (PST) Received: from dslb-188-097-046-135.188.097.pools.vodafone-ip.de ([188.97.46.135] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1n51kl-0005mc-CQ; Wed, 05 Jan 2022 09:34:39 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 1/7] staging: r8188eu: rfPath is always 0 Date: Wed, 5 Jan 2022 09:34:20 +0100 Message-Id: <20220105083426.177128-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220105083426.177128-1-martin@kaiser.cx> References: <20220105083426.177128-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The rfPath variable in Hal_ReadTxPowerInfo88E is always 0. Remove the variable and use 0 directly. Signed-off-by: Martin Kaiser Acked-by: Michael Straube --- .../staging/r8188eu/hal/rtl8188e_hal_init.c | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/stag= ing/r8188eu/hal/rtl8188e_hal_init.c index cce291ca44b1..b07ccc27b96b 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c @@ -1121,7 +1121,6 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter,= u8 *PROMContent, bool Auto { struct hal_data_8188e *pHalData =3D &padapter->haldata; struct txpowerinfo24g pwrInfo24G; - u8 rfPath =3D 0; u8 ch, group; u8 TxCount; =20 @@ -1130,26 +1129,26 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapte= r, u8 *PROMContent, bool Auto for (ch =3D 0; ch < CHANNEL_MAX_NUMBER; ch++) { hal_get_chnl_group_88e(ch, &group); =20 - pHalData->Index24G_CCK_Base[rfPath][ch] =3D pwrInfo24G.IndexCCK_Base[rfP= ath][group]; + pHalData->Index24G_CCK_Base[0][ch] =3D pwrInfo24G.IndexCCK_Base[0][group= ]; if (ch =3D=3D 14) - pHalData->Index24G_BW40_Base[rfPath][ch] =3D pwrInfo24G.IndexBW40_Base[= rfPath][4]; + pHalData->Index24G_BW40_Base[0][ch] =3D pwrInfo24G.IndexBW40_Base[0][4]; else - pHalData->Index24G_BW40_Base[rfPath][ch] =3D pwrInfo24G.IndexBW40_Base[= rfPath][group]; + pHalData->Index24G_BW40_Base[0][ch] =3D pwrInfo24G.IndexBW40_Base[0][gr= oup]; =20 - DBG_88E("=3D=3D=3D=3D=3D=3D=3D Path %d, Channel %d =3D=3D=3D=3D=3D=3D=3D= \n", rfPath, ch); - DBG_88E("Index24G_CCK_Base[%d][%d] =3D 0x%x\n", rfPath, ch, pHalData->In= dex24G_CCK_Base[rfPath][ch]); - DBG_88E("Index24G_BW40_Base[%d][%d] =3D 0x%x\n", rfPath, ch, pHalData->I= ndex24G_BW40_Base[rfPath][ch]); + DBG_88E("=3D=3D=3D=3D=3D=3D=3D Path 0, Channel %d =3D=3D=3D=3D=3D=3D=3D\= n", ch); + DBG_88E("Index24G_CCK_Base[0][%d] =3D 0x%x\n", ch, pHalData->Index24G_CC= K_Base[0][ch]); + DBG_88E("Index24G_BW40_Base[0][%d] =3D 0x%x\n", ch, pHalData->Index24G_B= W40_Base[0][ch]); } for (TxCount =3D 0; TxCount < MAX_TX_COUNT; TxCount++) { - pHalData->CCK_24G_Diff[rfPath][TxCount] =3D pwrInfo24G.CCK_Diff[rfPath][= TxCount]; - pHalData->OFDM_24G_Diff[rfPath][TxCount] =3D pwrInfo24G.OFDM_Diff[rfPath= ][TxCount]; - pHalData->BW20_24G_Diff[rfPath][TxCount] =3D pwrInfo24G.BW20_Diff[rfPath= ][TxCount]; - pHalData->BW40_24G_Diff[rfPath][TxCount] =3D pwrInfo24G.BW40_Diff[rfPath= ][TxCount]; + pHalData->CCK_24G_Diff[0][TxCount] =3D pwrInfo24G.CCK_Diff[0][TxCount]; + pHalData->OFDM_24G_Diff[0][TxCount] =3D pwrInfo24G.OFDM_Diff[0][TxCount]; + pHalData->BW20_24G_Diff[0][TxCount] =3D pwrInfo24G.BW20_Diff[0][TxCount]; + pHalData->BW40_24G_Diff[0][TxCount] =3D pwrInfo24G.BW40_Diff[0][TxCount]; DBG_88E("=3D=3D=3D=3D=3D=3D=3D TxCount %d =3D=3D=3D=3D=3D=3D=3D\n", TxCo= unt); - DBG_88E("CCK_24G_Diff[%d][%d] =3D %d\n", rfPath, TxCount, pHalData->CCK_= 24G_Diff[rfPath][TxCount]); - DBG_88E("OFDM_24G_Diff[%d][%d] =3D %d\n", rfPath, TxCount, pHalData->OFD= M_24G_Diff[rfPath][TxCount]); - DBG_88E("BW20_24G_Diff[%d][%d] =3D %d\n", rfPath, TxCount, pHalData->BW2= 0_24G_Diff[rfPath][TxCount]); - DBG_88E("BW40_24G_Diff[%d][%d] =3D %d\n", rfPath, TxCount, pHalData->BW4= 0_24G_Diff[rfPath][TxCount]); + DBG_88E("CCK_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->CCK_24G_Diff[= 0][TxCount]); + DBG_88E("OFDM_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->OFDM_24G_Dif= f[0][TxCount]); + DBG_88E("BW20_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->BW20_24G_Dif= f[0][TxCount]); + DBG_88E("BW40_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->BW40_24G_Dif= f[0][TxCount]); } =20 /* 2010/10/19 MH Add Regulator recognize for CU. */ --=20 2.30.2 From nobody Wed Jul 1 00:49:19 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16D04C433F5 for ; Wed, 5 Jan 2022 08:34:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbiAEIeu (ORCPT ); Wed, 5 Jan 2022 03:34:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238545AbiAEIer (ORCPT ); Wed, 5 Jan 2022 03:34:47 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49F03C061761 for ; Wed, 5 Jan 2022 00:34:47 -0800 (PST) Received: from dslb-188-097-046-135.188.097.pools.vodafone-ip.de ([188.97.46.135] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1n51ko-0005mc-Ht; Wed, 05 Jan 2022 09:34:42 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 2/7] staging: r8188eu: make Index24G_CCK_Base a 1-D array Date: Wed, 5 Jan 2022 09:34:21 +0100 Message-Id: <20220105083426.177128-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220105083426.177128-1-martin@kaiser.cx> References: <20220105083426.177128-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Make Index24G_CCK_Base a one-dimensional array. This driver uses only Index24G_CCK_Base[0]. Signed-off-by: Martin Kaiser Acked-by: Michael Straube --- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 4 ++-- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 2 +- drivers/staging/r8188eu/include/rtl8188e_hal.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/stag= ing/r8188eu/hal/rtl8188e_hal_init.c index b07ccc27b96b..1a82b2df7f21 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c @@ -1129,14 +1129,14 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapte= r, u8 *PROMContent, bool Auto for (ch =3D 0; ch < CHANNEL_MAX_NUMBER; ch++) { hal_get_chnl_group_88e(ch, &group); =20 - pHalData->Index24G_CCK_Base[0][ch] =3D pwrInfo24G.IndexCCK_Base[0][group= ]; + pHalData->Index24G_CCK_Base[ch] =3D pwrInfo24G.IndexCCK_Base[0][group]; if (ch =3D=3D 14) pHalData->Index24G_BW40_Base[0][ch] =3D pwrInfo24G.IndexBW40_Base[0][4]; else pHalData->Index24G_BW40_Base[0][ch] =3D pwrInfo24G.IndexBW40_Base[0][gr= oup]; =20 DBG_88E("=3D=3D=3D=3D=3D=3D=3D Path 0, Channel %d =3D=3D=3D=3D=3D=3D=3D\= n", ch); - DBG_88E("Index24G_CCK_Base[0][%d] =3D 0x%x\n", ch, pHalData->Index24G_CC= K_Base[0][ch]); + DBG_88E("Index24G_CCK_Base[%d] =3D 0x%x\n", ch, pHalData->Index24G_CCK_B= ase[ch]); DBG_88E("Index24G_BW40_Base[0][%d] =3D 0x%x\n", ch, pHalData->Index24G_B= W40_Base[0][ch]); } for (TxCount =3D 0; TxCount < MAX_TX_COUNT; TxCount++) { diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/stagin= g/r8188eu/hal/rtl8188e_phycfg.c index faabfd61f5b4..de7a2f5caf48 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c @@ -589,7 +589,7 @@ static void getTxPowerIndex88E(struct adapter *Adapter,= u8 channel, u8 *cckPower u8 index =3D (channel - 1); =20 /* 1. CCK */ - cckPowerLevel[RF_PATH_A] =3D pHalData->Index24G_CCK_Base[RF_PATH_A][index= ]; + cckPowerLevel[RF_PATH_A] =3D pHalData->Index24G_CCK_Base[index]; /* 2. OFDM */ ofdmPowerLevel[RF_PATH_A] =3D pHalData->Index24G_BW40_Base[RF_PATH_A][ind= ex] + pHalData->OFDM_24G_Diff[RF_PATH_A][RF_PATH_A]; diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/stagi= ng/r8188eu/include/rtl8188e_hal.h index 25f3c04e81b7..66b525ca3510 100644 --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h @@ -178,7 +178,7 @@ struct hal_data_8188e { u8 EEPROMRegulatory; u8 EEPROMThermalMeter; =20 - u8 Index24G_CCK_Base[RF_PATH_MAX][CHANNEL_MAX_NUMBER]; + u8 Index24G_CCK_Base[CHANNEL_MAX_NUMBER]; u8 Index24G_BW40_Base[RF_PATH_MAX][CHANNEL_MAX_NUMBER]; /* If only one tx, only BW20 and OFDM are used. */ s8 CCK_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; --=20 2.30.2 From nobody Wed Jul 1 00:49:19 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF8FFC433EF for ; Wed, 5 Jan 2022 08:34:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238552AbiAEIe5 (ORCPT ); Wed, 5 Jan 2022 03:34:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238565AbiAEIew (ORCPT ); Wed, 5 Jan 2022 03:34:52 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A460AC061792 for ; Wed, 5 Jan 2022 00:34:51 -0800 (PST) Received: from dslb-188-097-046-135.188.097.pools.vodafone-ip.de ([188.97.46.135] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1n51kr-0005mc-Og; Wed, 05 Jan 2022 09:34:45 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 3/7] staging: r8188eu: make Index24G_BW40_Base a 1-D array Date: Wed, 5 Jan 2022 09:34:22 +0100 Message-Id: <20220105083426.177128-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220105083426.177128-1-martin@kaiser.cx> References: <20220105083426.177128-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Make Index24G_BW40_Base a one-dimensional array. This driver uses only Index24G_BW40_Base[0]. Signed-off-by: Martin Kaiser Acked-by: Michael Straube --- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 6 +++--- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 6 +++--- drivers/staging/r8188eu/include/rtl8188e_hal.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/stag= ing/r8188eu/hal/rtl8188e_hal_init.c index 1a82b2df7f21..3325bc876d38 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c @@ -1131,13 +1131,13 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapte= r, u8 *PROMContent, bool Auto =20 pHalData->Index24G_CCK_Base[ch] =3D pwrInfo24G.IndexCCK_Base[0][group]; if (ch =3D=3D 14) - pHalData->Index24G_BW40_Base[0][ch] =3D pwrInfo24G.IndexBW40_Base[0][4]; + pHalData->Index24G_BW40_Base[ch] =3D pwrInfo24G.IndexBW40_Base[0][4]; else - pHalData->Index24G_BW40_Base[0][ch] =3D pwrInfo24G.IndexBW40_Base[0][gr= oup]; + pHalData->Index24G_BW40_Base[ch] =3D pwrInfo24G.IndexBW40_Base[0][group= ]; =20 DBG_88E("=3D=3D=3D=3D=3D=3D=3D Path 0, Channel %d =3D=3D=3D=3D=3D=3D=3D\= n", ch); DBG_88E("Index24G_CCK_Base[%d] =3D 0x%x\n", ch, pHalData->Index24G_CCK_B= ase[ch]); - DBG_88E("Index24G_BW40_Base[0][%d] =3D 0x%x\n", ch, pHalData->Index24G_B= W40_Base[0][ch]); + DBG_88E("Index24G_BW40_Base[%d] =3D 0x%x\n", ch, pHalData->Index24G_BW40= _Base[ch]); } for (TxCount =3D 0; TxCount < MAX_TX_COUNT; TxCount++) { pHalData->CCK_24G_Diff[0][TxCount] =3D pwrInfo24G.CCK_Diff[0][TxCount]; diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/stagin= g/r8188eu/hal/rtl8188e_phycfg.c index de7a2f5caf48..650de81b7ed3 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c @@ -591,13 +591,13 @@ static void getTxPowerIndex88E(struct adapter *Adapte= r, u8 channel, u8 *cckPower /* 1. CCK */ cckPowerLevel[RF_PATH_A] =3D pHalData->Index24G_CCK_Base[index]; /* 2. OFDM */ - ofdmPowerLevel[RF_PATH_A] =3D pHalData->Index24G_BW40_Base[RF_PATH_A][ind= ex] + + ofdmPowerLevel[RF_PATH_A] =3D pHalData->Index24G_BW40_Base[index] + pHalData->OFDM_24G_Diff[RF_PATH_A][RF_PATH_A]; /* 1. BW20 */ - BW20PowerLevel[RF_PATH_A] =3D pHalData->Index24G_BW40_Base[RF_PATH_A][ind= ex] + + BW20PowerLevel[RF_PATH_A] =3D pHalData->Index24G_BW40_Base[index] + pHalData->BW20_24G_Diff[RF_PATH_A][RF_PATH_A]; /* 2. BW40 */ - BW40PowerLevel[RF_PATH_A] =3D pHalData->Index24G_BW40_Base[RF_PATH_A][ind= ex]; + BW40PowerLevel[RF_PATH_A] =3D pHalData->Index24G_BW40_Base[index]; } =20 static void phy_PowerIndexCheck88E(struct adapter *Adapter, u8 channel, u8= *cckPowerLevel, diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/stagi= ng/r8188eu/include/rtl8188e_hal.h index 66b525ca3510..3420830396dc 100644 --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h @@ -179,7 +179,7 @@ struct hal_data_8188e { u8 EEPROMThermalMeter; =20 u8 Index24G_CCK_Base[CHANNEL_MAX_NUMBER]; - u8 Index24G_BW40_Base[RF_PATH_MAX][CHANNEL_MAX_NUMBER]; + u8 Index24G_BW40_Base[CHANNEL_MAX_NUMBER]; /* If only one tx, only BW20 and OFDM are used. */ s8 CCK_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; s8 OFDM_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; --=20 2.30.2 From nobody Wed Jul 1 00:49:19 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FE39C433EF for ; Wed, 5 Jan 2022 08:34:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238545AbiAEIey (ORCPT ); Wed, 5 Jan 2022 03:34:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238560AbiAEIev (ORCPT ); Wed, 5 Jan 2022 03:34:51 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6524AC061784 for ; Wed, 5 Jan 2022 00:34:51 -0800 (PST) Received: from dslb-188-097-046-135.188.097.pools.vodafone-ip.de ([188.97.46.135] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1n51kt-0005mc-6s; Wed, 05 Jan 2022 09:34:47 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 4/7] staging: r8188eu: CCK_24G_Diff is set but not used Date: Wed, 5 Jan 2022 09:34:23 +0100 Message-Id: <20220105083426.177128-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220105083426.177128-1-martin@kaiser.cx> References: <20220105083426.177128-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The CCK_24G_Diff array is set but not used. Remove it. Signed-off-by: Martin Kaiser Acked-by: Michael Straube --- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 -- drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/stag= ing/r8188eu/hal/rtl8188e_hal_init.c index 3325bc876d38..63467b1d0224 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c @@ -1140,12 +1140,10 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapte= r, u8 *PROMContent, bool Auto DBG_88E("Index24G_BW40_Base[%d] =3D 0x%x\n", ch, pHalData->Index24G_BW40= _Base[ch]); } for (TxCount =3D 0; TxCount < MAX_TX_COUNT; TxCount++) { - pHalData->CCK_24G_Diff[0][TxCount] =3D pwrInfo24G.CCK_Diff[0][TxCount]; pHalData->OFDM_24G_Diff[0][TxCount] =3D pwrInfo24G.OFDM_Diff[0][TxCount]; pHalData->BW20_24G_Diff[0][TxCount] =3D pwrInfo24G.BW20_Diff[0][TxCount]; pHalData->BW40_24G_Diff[0][TxCount] =3D pwrInfo24G.BW40_Diff[0][TxCount]; DBG_88E("=3D=3D=3D=3D=3D=3D=3D TxCount %d =3D=3D=3D=3D=3D=3D=3D\n", TxCo= unt); - DBG_88E("CCK_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->CCK_24G_Diff[= 0][TxCount]); DBG_88E("OFDM_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->OFDM_24G_Dif= f[0][TxCount]); DBG_88E("BW20_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->BW20_24G_Dif= f[0][TxCount]); DBG_88E("BW40_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->BW40_24G_Dif= f[0][TxCount]); diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/stagi= ng/r8188eu/include/rtl8188e_hal.h index 3420830396dc..3f818e97bde0 100644 --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h @@ -181,7 +181,6 @@ struct hal_data_8188e { u8 Index24G_CCK_Base[CHANNEL_MAX_NUMBER]; u8 Index24G_BW40_Base[CHANNEL_MAX_NUMBER]; /* If only one tx, only BW20 and OFDM are used. */ - s8 CCK_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; s8 OFDM_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; s8 BW20_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; s8 BW40_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; --=20 2.30.2 From nobody Wed Jul 1 00:49:19 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FE4DC433F5 for ; Wed, 5 Jan 2022 08:35:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238629AbiAEIfF (ORCPT ); Wed, 5 Jan 2022 03:35:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238576AbiAEIey (ORCPT ); Wed, 5 Jan 2022 03:34:54 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B040C061784 for ; Wed, 5 Jan 2022 00:34:52 -0800 (PST) Received: from dslb-188-097-046-135.188.097.pools.vodafone-ip.de ([188.97.46.135] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1n51ku-0005mc-Ie; Wed, 05 Jan 2022 09:34:48 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 5/7] staging: r8188eu: BW40_24G_Diff is set but not used Date: Wed, 5 Jan 2022 09:34:24 +0100 Message-Id: <20220105083426.177128-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220105083426.177128-1-martin@kaiser.cx> References: <20220105083426.177128-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The BW40_24G_Diff array is set but not used. Remove it. Signed-off-by: Martin Kaiser Acked-by: Michael Straube --- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 -- drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/stag= ing/r8188eu/hal/rtl8188e_hal_init.c index 63467b1d0224..8f78682640f0 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c @@ -1142,11 +1142,9 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter= , u8 *PROMContent, bool Auto for (TxCount =3D 0; TxCount < MAX_TX_COUNT; TxCount++) { pHalData->OFDM_24G_Diff[0][TxCount] =3D pwrInfo24G.OFDM_Diff[0][TxCount]; pHalData->BW20_24G_Diff[0][TxCount] =3D pwrInfo24G.BW20_Diff[0][TxCount]; - pHalData->BW40_24G_Diff[0][TxCount] =3D pwrInfo24G.BW40_Diff[0][TxCount]; DBG_88E("=3D=3D=3D=3D=3D=3D=3D TxCount %d =3D=3D=3D=3D=3D=3D=3D\n", TxCo= unt); DBG_88E("OFDM_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->OFDM_24G_Dif= f[0][TxCount]); DBG_88E("BW20_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->BW20_24G_Dif= f[0][TxCount]); - DBG_88E("BW40_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->BW40_24G_Dif= f[0][TxCount]); } =20 /* 2010/10/19 MH Add Regulator recognize for CU. */ diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/stagi= ng/r8188eu/include/rtl8188e_hal.h index 3f818e97bde0..0f743c3a2ac5 100644 --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h @@ -183,7 +183,6 @@ struct hal_data_8188e { /* If only one tx, only BW20 and OFDM are used. */ s8 OFDM_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; s8 BW20_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; - s8 BW40_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; =20 /* HT 20<->40 Pwr diff */ u8 TxPwrHt20Diff[RF_PATH_MAX][CHANNEL_MAX_NUMBER]; --=20 2.30.2 From nobody Wed Jul 1 00:49:19 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40038C433EF for ; Wed, 5 Jan 2022 08:35:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238592AbiAEIfA (ORCPT ); Wed, 5 Jan 2022 03:35:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238574AbiAEIex (ORCPT ); Wed, 5 Jan 2022 03:34:53 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8718C061785 for ; Wed, 5 Jan 2022 00:34:52 -0800 (PST) Received: from dslb-188-097-046-135.188.097.pools.vodafone-ip.de ([188.97.46.135] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1n51kw-0005mc-0Z; Wed, 05 Jan 2022 09:34:50 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 6/7] staging: r8188eu: make OFDM_24G_Diff a 1-D array Date: Wed, 5 Jan 2022 09:34:25 +0100 Message-Id: <20220105083426.177128-7-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220105083426.177128-1-martin@kaiser.cx> References: <20220105083426.177128-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Make OFDM_24G_Diff one-dimensional array. This driver uses only OFDM_24G_Diff[0]. Signed-off-by: Martin Kaiser Acked-by: Michael Straube --- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 4 ++-- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 2 +- drivers/staging/r8188eu/include/rtl8188e_hal.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/stag= ing/r8188eu/hal/rtl8188e_hal_init.c index 8f78682640f0..d07b16ebe936 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c @@ -1140,10 +1140,10 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapte= r, u8 *PROMContent, bool Auto DBG_88E("Index24G_BW40_Base[%d] =3D 0x%x\n", ch, pHalData->Index24G_BW40= _Base[ch]); } for (TxCount =3D 0; TxCount < MAX_TX_COUNT; TxCount++) { - pHalData->OFDM_24G_Diff[0][TxCount] =3D pwrInfo24G.OFDM_Diff[0][TxCount]; + pHalData->OFDM_24G_Diff[TxCount] =3D pwrInfo24G.OFDM_Diff[0][TxCount]; pHalData->BW20_24G_Diff[0][TxCount] =3D pwrInfo24G.BW20_Diff[0][TxCount]; DBG_88E("=3D=3D=3D=3D=3D=3D=3D TxCount %d =3D=3D=3D=3D=3D=3D=3D\n", TxCo= unt); - DBG_88E("OFDM_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->OFDM_24G_Dif= f[0][TxCount]); + DBG_88E("OFDM_24G_Diff[%d] =3D %d\n", TxCount, pHalData->OFDM_24G_Diff[T= xCount]); DBG_88E("BW20_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->BW20_24G_Dif= f[0][TxCount]); } =20 diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/stagin= g/r8188eu/hal/rtl8188e_phycfg.c index 650de81b7ed3..3b5ddc00606e 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c @@ -592,7 +592,7 @@ static void getTxPowerIndex88E(struct adapter *Adapter,= u8 channel, u8 *cckPower cckPowerLevel[RF_PATH_A] =3D pHalData->Index24G_CCK_Base[index]; /* 2. OFDM */ ofdmPowerLevel[RF_PATH_A] =3D pHalData->Index24G_BW40_Base[index] + - pHalData->OFDM_24G_Diff[RF_PATH_A][RF_PATH_A]; + pHalData->OFDM_24G_Diff[RF_PATH_A]; /* 1. BW20 */ BW20PowerLevel[RF_PATH_A] =3D pHalData->Index24G_BW40_Base[index] + pHalData->BW20_24G_Diff[RF_PATH_A][RF_PATH_A]; diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/stagi= ng/r8188eu/include/rtl8188e_hal.h index 0f743c3a2ac5..e748bdcbd867 100644 --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h @@ -181,7 +181,7 @@ struct hal_data_8188e { u8 Index24G_CCK_Base[CHANNEL_MAX_NUMBER]; u8 Index24G_BW40_Base[CHANNEL_MAX_NUMBER]; /* If only one tx, only BW20 and OFDM are used. */ - s8 OFDM_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; + s8 OFDM_24G_Diff[MAX_TX_COUNT]; s8 BW20_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; =20 /* HT 20<->40 Pwr diff */ --=20 2.30.2 From nobody Wed Jul 1 00:49:19 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B930C433F5 for ; Wed, 5 Jan 2022 08:35:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238641AbiAEIfH (ORCPT ); Wed, 5 Jan 2022 03:35:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238580AbiAEIe5 (ORCPT ); Wed, 5 Jan 2022 03:34:57 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0328FC061784 for ; Wed, 5 Jan 2022 00:34:56 -0800 (PST) Received: from dslb-188-097-046-135.188.097.pools.vodafone-ip.de ([188.97.46.135] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1n51kx-0005mc-GU; Wed, 05 Jan 2022 09:34:51 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 7/7] staging: r8188eu: make BW20_24G_Diff a 1-D array Date: Wed, 5 Jan 2022 09:34:26 +0100 Message-Id: <20220105083426.177128-8-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220105083426.177128-1-martin@kaiser.cx> References: <20220105083426.177128-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Make BW20_24G_Diff a one-dimensional array. This driver uses only BW20_24G_Diff[0]. Signed-off-by: Martin Kaiser Acked-by: Michael Straube --- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 4 ++-- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 2 +- drivers/staging/r8188eu/include/rtl8188e_hal.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/stag= ing/r8188eu/hal/rtl8188e_hal_init.c index d07b16ebe936..c9ccd05909e5 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c @@ -1141,10 +1141,10 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapte= r, u8 *PROMContent, bool Auto } for (TxCount =3D 0; TxCount < MAX_TX_COUNT; TxCount++) { pHalData->OFDM_24G_Diff[TxCount] =3D pwrInfo24G.OFDM_Diff[0][TxCount]; - pHalData->BW20_24G_Diff[0][TxCount] =3D pwrInfo24G.BW20_Diff[0][TxCount]; + pHalData->BW20_24G_Diff[TxCount] =3D pwrInfo24G.BW20_Diff[0][TxCount]; DBG_88E("=3D=3D=3D=3D=3D=3D=3D TxCount %d =3D=3D=3D=3D=3D=3D=3D\n", TxCo= unt); DBG_88E("OFDM_24G_Diff[%d] =3D %d\n", TxCount, pHalData->OFDM_24G_Diff[T= xCount]); - DBG_88E("BW20_24G_Diff[0][%d] =3D %d\n", TxCount, pHalData->BW20_24G_Dif= f[0][TxCount]); + DBG_88E("BW20_24G_Diff[%d] =3D %d\n", TxCount, pHalData->BW20_24G_Diff[T= xCount]); } =20 /* 2010/10/19 MH Add Regulator recognize for CU. */ diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/stagin= g/r8188eu/hal/rtl8188e_phycfg.c index 3b5ddc00606e..302b15b2874d 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c @@ -595,7 +595,7 @@ static void getTxPowerIndex88E(struct adapter *Adapter,= u8 channel, u8 *cckPower pHalData->OFDM_24G_Diff[RF_PATH_A]; /* 1. BW20 */ BW20PowerLevel[RF_PATH_A] =3D pHalData->Index24G_BW40_Base[index] + - pHalData->BW20_24G_Diff[RF_PATH_A][RF_PATH_A]; + pHalData->BW20_24G_Diff[RF_PATH_A]; /* 2. BW40 */ BW40PowerLevel[RF_PATH_A] =3D pHalData->Index24G_BW40_Base[index]; } diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/stagi= ng/r8188eu/include/rtl8188e_hal.h index e748bdcbd867..8134a173ea07 100644 --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h @@ -182,7 +182,7 @@ struct hal_data_8188e { u8 Index24G_BW40_Base[CHANNEL_MAX_NUMBER]; /* If only one tx, only BW20 and OFDM are used. */ s8 OFDM_24G_Diff[MAX_TX_COUNT]; - s8 BW20_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT]; + s8 BW20_24G_Diff[MAX_TX_COUNT]; =20 /* HT 20<->40 Pwr diff */ u8 TxPwrHt20Diff[RF_PATH_MAX][CHANNEL_MAX_NUMBER]; --=20 2.30.2