* [PATCH 1/5] staging: r8188eu: remove rf_type from writeOFDMPowerReg88E()
2021-11-28 13:53 [PATCH 0/5] staging: r8188eu: remove rf_type and rtw_rf_config Michael Straube
@ 2021-11-28 13:53 ` Michael Straube
2021-11-28 13:53 ` [PATCH 2/5] staging: r8188eu: remove rf_type from bb_reg_dump() Michael Straube
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Michael Straube @ 2021-11-28 13:53 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
pHalData->rf_type is always RF_1T1R. Remove unnecessary checks from
writeOFDMPowerReg88E().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/rtl8188e_rf6052.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c b/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c
index 946a1b97d96f..813dd938c817 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c
@@ -272,7 +272,6 @@ static void get_rx_power_val_by_reg(struct adapter *Adapter, u8 Channel,
}
static void writeOFDMPowerReg88E(struct adapter *Adapter, u8 index, u32 *pValue)
{
- struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
u16 regoffset_a[6] = {
rTxAGC_A_Rate18_06, rTxAGC_A_Rate54_24,
rTxAGC_A_Mcs03_Mcs00, rTxAGC_A_Mcs07_Mcs04,
@@ -302,10 +301,7 @@ static void writeOFDMPowerReg88E(struct adapter *Adapter, u8 index, u32 *pValue)
PHY_SetBBReg(Adapter, regoffset, bMaskDWord, writeVal);
/* 201005115 Joseph: Set Tx Power diff for Tx power training mechanism. */
- if (((pHalData->rf_type == RF_2T2R) &&
- (regoffset == rTxAGC_A_Mcs15_Mcs12 || regoffset == rTxAGC_B_Mcs15_Mcs12)) ||
- ((pHalData->rf_type != RF_2T2R) &&
- (regoffset == rTxAGC_A_Mcs07_Mcs04 || regoffset == rTxAGC_B_Mcs07_Mcs04))) {
+ if (regoffset == rTxAGC_A_Mcs07_Mcs04 || regoffset == rTxAGC_B_Mcs07_Mcs04) {
writeVal = pwr_val[3];
if (regoffset == rTxAGC_A_Mcs15_Mcs12 || regoffset == rTxAGC_A_Mcs07_Mcs04)
regoffset = 0xc90;
--
2.34.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/5] staging: r8188eu: remove rf_type from bb_reg_dump()
2021-11-28 13:53 [PATCH 0/5] staging: r8188eu: remove rf_type and rtw_rf_config Michael Straube
2021-11-28 13:53 ` [PATCH 1/5] staging: r8188eu: remove rf_type from writeOFDMPowerReg88E() Michael Straube
@ 2021-11-28 13:53 ` Michael Straube
2021-11-28 13:53 ` [PATCH 3/5] staging: r8188eu: remove unused HW_VAR_RF_TYPE Michael Straube
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Michael Straube @ 2021-11-28 13:53 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
rf_type is always RF_1T1R. Remove it from bb_reg_dump() and remove
resulting dead code.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 27 +++++++-------------
1 file changed, 9 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 52d42e576443..0d8b0b9a9851 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -3611,27 +3611,18 @@ static void bb_reg_dump(struct adapter *padapter)
static void rf_reg_dump(struct adapter *padapter)
{
- int i, j = 1, path;
+ int i, j = 1, path = 0;
u32 value;
- u8 rf_type, path_nums = 0;
- GetHwReg8188EU(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
pr_info("\n ======= RF REG =======\n");
- if ((RF_1T2R == rf_type) || (RF_1T1R == rf_type))
- path_nums = 1;
- else
- path_nums = 2;
-
- for (path = 0; path < path_nums; path++) {
- pr_info("\nRF_Path(%x)\n", path);
- for (i = 0; i < 0x100; i++) {
- value = rtl8188e_PHY_QueryRFReg(padapter, path, i, 0xffffffff);
- if (j % 4 == 1)
- pr_info("0x%02x ", i);
- pr_info(" 0x%08x ", value);
- if ((j++) % 4 == 0)
- pr_info("\n");
- }
+ pr_info("\nRF_Path(%x)\n", path);
+ for (i = 0; i < 0x100; i++) {
+ value = rtl8188e_PHY_QueryRFReg(padapter, path, i, 0xffffffff);
+ if (j % 4 == 1)
+ pr_info("0x%02x ", i);
+ pr_info(" 0x%08x ", value);
+ if ((j++) % 4 == 0)
+ pr_info("\n");
}
}
--
2.34.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/5] staging: r8188eu: remove unused HW_VAR_RF_TYPE
2021-11-28 13:53 [PATCH 0/5] staging: r8188eu: remove rf_type and rtw_rf_config Michael Straube
2021-11-28 13:53 ` [PATCH 1/5] staging: r8188eu: remove rf_type from writeOFDMPowerReg88E() Michael Straube
2021-11-28 13:53 ` [PATCH 2/5] staging: r8188eu: remove rf_type from bb_reg_dump() Michael Straube
@ 2021-11-28 13:53 ` Michael Straube
2021-11-28 15:42 ` kernel test robot
2021-11-28 13:53 ` [PATCH 4/5] staging: r8188eu: remove rf_type from struct hal_data_8188e Michael Straube
2021-11-28 13:53 ` [PATCH 5/5] staging: r8188eu: remove module parameter rtw_rf_config Michael Straube
4 siblings, 1 reply; 9+ messages in thread
From: Michael Straube @ 2021-11-28 13:53 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
After previous cleanups HW_VAR_RF_TYPE is unused now.
Remove it.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/usb_halinit.c | 3 ---
drivers/staging/r8188eu/include/hal_intf.h | 1 -
2 files changed, 4 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 04518e9838ea..9d6ce74d7c31 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -1685,9 +1685,6 @@ void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
case HW_VAR_DM_FLAG:
val[0] = podmpriv->SupportAbility;
break;
- case HW_VAR_RF_TYPE:
- val[0] = haldata->rf_type;
- break;
case HW_VAR_FWLPS_RF_ON:
{
/* When we halt NIC, we should check if FW LPS is leave. */
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 693eb32fe1a9..7385ebaaba5c 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -29,7 +29,6 @@ enum hw_variables {
HW_VAR_ACK_PREAMBLE,
HW_VAR_SEC_CFG,
HW_VAR_BCN_VALID,
- HW_VAR_RF_TYPE,
HW_VAR_DM_FLAG,
HW_VAR_DM_FUNC_OP,
HW_VAR_DM_FUNC_SET,
--
2.34.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 3/5] staging: r8188eu: remove unused HW_VAR_RF_TYPE
2021-11-28 13:53 ` [PATCH 3/5] staging: r8188eu: remove unused HW_VAR_RF_TYPE Michael Straube
@ 2021-11-28 15:42 ` kernel test robot
0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2021-11-28 15:42 UTC (permalink / raw)
To: Michael Straube, gregkh
Cc: kbuild-all, Larry.Finger, phil, linux-staging, linux-kernel,
Michael Straube
Hi Michael,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Michael-Straube/staging-r8188eu-remove-rf_type-and-rtw_rf_config/20211128-215723
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 84c365f8ff8fc93a34d6cabe780d0b0f49c177e2
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20211128/202111282351.uz9rOZoR-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/2bbed14e0a91de19b146dc8a6202e4123bb328d8
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Michael-Straube/staging-r8188eu-remove-rf_type-and-rtw_rf_config/20211128-215723
git checkout 2bbed14e0a91de19b146dc8a6202e4123bb328d8
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/staging/r8188eu/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/staging/r8188eu/core/rtw_mlme.c: In function 'rtw_update_ht_cap':
>> drivers/staging/r8188eu/core/rtw_mlme.c:2004:42: error: 'HW_VAR_RF_TYPE' undeclared (first use in this function); did you mean 'HAL_RF_TYPE'?
2004 | GetHwReg8188EU(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
| ^~~~~~~~~~~~~~
| HAL_RF_TYPE
drivers/staging/r8188eu/core/rtw_mlme.c:2004:42: note: each undeclared identifier is reported only once for each function it appears in
--
drivers/staging/r8188eu/core/rtw_mlme_ext.c: In function 'issue_assocreq':
>> drivers/staging/r8188eu/core/rtw_mlme_ext.c:5188:50: error: 'HW_VAR_RF_TYPE' undeclared (first use in this function); did you mean 'HAL_RF_TYPE'?
5188 | GetHwReg8188EU(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
| ^~~~~~~~~~~~~~
| HAL_RF_TYPE
drivers/staging/r8188eu/core/rtw_mlme_ext.c:5188:50: note: each undeclared identifier is reported only once for each function it appears in
vim +2004 drivers/staging/r8188eu/core/rtw_mlme.c
15865124feed88 Phillip Potter 2021-07-28 1954
15865124feed88 Phillip Potter 2021-07-28 1955 /* the function is > passive_level (in critical_section) */
15865124feed88 Phillip Potter 2021-07-28 1956 void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len)
15865124feed88 Phillip Potter 2021-07-28 1957 {
15865124feed88 Phillip Potter 2021-07-28 1958 u8 *p, max_ampdu_sz;
15865124feed88 Phillip Potter 2021-07-28 1959 int len;
15865124feed88 Phillip Potter 2021-07-28 1960 struct ieee80211_ht_cap *pht_capie;
15865124feed88 Phillip Potter 2021-07-28 1961 struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
15865124feed88 Phillip Potter 2021-07-28 1962 struct ht_priv *phtpriv = &pmlmepriv->htpriv;
15865124feed88 Phillip Potter 2021-07-28 1963 struct registry_priv *pregistrypriv = &padapter->registrypriv;
15865124feed88 Phillip Potter 2021-07-28 1964 struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
a8962b247ae37c Michael Straube 2021-08-09 1965 struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
15865124feed88 Phillip Potter 2021-07-28 1966
15865124feed88 Phillip Potter 2021-07-28 1967 if (!phtpriv->ht_option)
15865124feed88 Phillip Potter 2021-07-28 1968 return;
15865124feed88 Phillip Potter 2021-07-28 1969
15865124feed88 Phillip Potter 2021-07-28 1970 if ((!pmlmeinfo->HT_info_enable) || (!pmlmeinfo->HT_caps_enable))
15865124feed88 Phillip Potter 2021-07-28 1971 return;
15865124feed88 Phillip Potter 2021-07-28 1972
15865124feed88 Phillip Potter 2021-07-28 1973 DBG_88E("+rtw_update_ht_cap()\n");
15865124feed88 Phillip Potter 2021-07-28 1974
15865124feed88 Phillip Potter 2021-07-28 1975 /* maybe needs check if ap supports rx ampdu. */
15865124feed88 Phillip Potter 2021-07-28 1976 if ((!phtpriv->ampdu_enable) && (pregistrypriv->ampdu_enable == 1)) {
15865124feed88 Phillip Potter 2021-07-28 1977 if (pregistrypriv->wifi_spec == 1)
15865124feed88 Phillip Potter 2021-07-28 1978 phtpriv->ampdu_enable = false;
15865124feed88 Phillip Potter 2021-07-28 1979 else
15865124feed88 Phillip Potter 2021-07-28 1980 phtpriv->ampdu_enable = true;
15865124feed88 Phillip Potter 2021-07-28 1981 } else if (pregistrypriv->ampdu_enable == 2) {
15865124feed88 Phillip Potter 2021-07-28 1982 phtpriv->ampdu_enable = true;
15865124feed88 Phillip Potter 2021-07-28 1983 }
15865124feed88 Phillip Potter 2021-07-28 1984
15865124feed88 Phillip Potter 2021-07-28 1985 /* check Max Rx A-MPDU Size */
15865124feed88 Phillip Potter 2021-07-28 1986 len = 0;
15865124feed88 Phillip Potter 2021-07-28 1987 p = rtw_get_ie(pie + sizeof(struct ndis_802_11_fixed_ie), _HT_CAPABILITY_IE_, &len, ie_len - sizeof(struct ndis_802_11_fixed_ie));
15865124feed88 Phillip Potter 2021-07-28 1988 if (p && len > 0) {
15865124feed88 Phillip Potter 2021-07-28 1989 pht_capie = (struct ieee80211_ht_cap *)(p + 2);
f33ce7100b6b18 Michael Straube 2021-08-14 1990 max_ampdu_sz = (pht_capie->ampdu_params_info & IEEE80211_HT_AMPDU_PARM_FACTOR);
15865124feed88 Phillip Potter 2021-07-28 1991 max_ampdu_sz = 1 << (max_ampdu_sz + 3); /* max_ampdu_sz (kbytes); */
15865124feed88 Phillip Potter 2021-07-28 1992 phtpriv->rx_ampdu_maxlen = max_ampdu_sz;
15865124feed88 Phillip Potter 2021-07-28 1993 }
15865124feed88 Phillip Potter 2021-07-28 1994 len = 0;
15865124feed88 Phillip Potter 2021-07-28 1995 p = rtw_get_ie(pie + sizeof(struct ndis_802_11_fixed_ie), _HT_ADD_INFO_IE_, &len, ie_len - sizeof(struct ndis_802_11_fixed_ie));
15865124feed88 Phillip Potter 2021-07-28 1996
15865124feed88 Phillip Potter 2021-07-28 1997 /* update cur_bwmode & cur_ch_offset */
15865124feed88 Phillip Potter 2021-07-28 1998 if ((pregistrypriv->cbw40_enable) &&
15865124feed88 Phillip Potter 2021-07-28 1999 (le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info) & BIT(1)) &&
15865124feed88 Phillip Potter 2021-07-28 2000 (pmlmeinfo->HT_info.infos[0] & BIT(2))) {
15865124feed88 Phillip Potter 2021-07-28 2001 int i;
15865124feed88 Phillip Potter 2021-07-28 2002 u8 rf_type;
15865124feed88 Phillip Potter 2021-07-28 2003
9c44c0f6da146f Michael Straube 2021-10-07 @2004 GetHwReg8188EU(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
15865124feed88 Phillip Potter 2021-07-28 2005
15865124feed88 Phillip Potter 2021-07-28 2006 /* update the MCS rates */
15865124feed88 Phillip Potter 2021-07-28 2007 for (i = 0; i < 16; i++) {
15865124feed88 Phillip Potter 2021-07-28 2008 if ((rf_type == RF_1T1R) || (rf_type == RF_1T2R))
15865124feed88 Phillip Potter 2021-07-28 2009 pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_1R[i];
15865124feed88 Phillip Potter 2021-07-28 2010 else
15865124feed88 Phillip Potter 2021-07-28 2011 pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_2R[i];
15865124feed88 Phillip Potter 2021-07-28 2012 }
15865124feed88 Phillip Potter 2021-07-28 2013 /* switch to the 40M Hz mode according to the AP */
15865124feed88 Phillip Potter 2021-07-28 2014 pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_40;
15865124feed88 Phillip Potter 2021-07-28 2015 switch ((pmlmeinfo->HT_info.infos[0] & 0x3)) {
15865124feed88 Phillip Potter 2021-07-28 2016 case HT_EXTCHNL_OFFSET_UPPER:
15865124feed88 Phillip Potter 2021-07-28 2017 pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
15865124feed88 Phillip Potter 2021-07-28 2018 break;
15865124feed88 Phillip Potter 2021-07-28 2019 case HT_EXTCHNL_OFFSET_LOWER:
15865124feed88 Phillip Potter 2021-07-28 2020 pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_UPPER;
15865124feed88 Phillip Potter 2021-07-28 2021 break;
15865124feed88 Phillip Potter 2021-07-28 2022 default:
15865124feed88 Phillip Potter 2021-07-28 2023 pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
15865124feed88 Phillip Potter 2021-07-28 2024 break;
15865124feed88 Phillip Potter 2021-07-28 2025 }
15865124feed88 Phillip Potter 2021-07-28 2026 }
15865124feed88 Phillip Potter 2021-07-28 2027
15865124feed88 Phillip Potter 2021-07-28 2028 /* Config SM Power Save setting */
15865124feed88 Phillip Potter 2021-07-28 2029 pmlmeinfo->SM_PS = (le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info) & 0x0C) >> 2;
15865124feed88 Phillip Potter 2021-07-28 2030 if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
15865124feed88 Phillip Potter 2021-07-28 2031 DBG_88E("%s(): WLAN_HT_CAP_SM_PS_STATIC\n", __func__);
15865124feed88 Phillip Potter 2021-07-28 2032
15865124feed88 Phillip Potter 2021-07-28 2033 /* Config current HT Protection mode. */
15865124feed88 Phillip Potter 2021-07-28 2034 pmlmeinfo->HT_protection = pmlmeinfo->HT_info.infos[1] & 0x3;
15865124feed88 Phillip Potter 2021-07-28 2035 }
15865124feed88 Phillip Potter 2021-07-28 2036
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/5] staging: r8188eu: remove rf_type from struct hal_data_8188e
2021-11-28 13:53 [PATCH 0/5] staging: r8188eu: remove rf_type and rtw_rf_config Michael Straube
` (2 preceding siblings ...)
2021-11-28 13:53 ` [PATCH 3/5] staging: r8188eu: remove unused HW_VAR_RF_TYPE Michael Straube
@ 2021-11-28 13:53 ` Michael Straube
2021-11-28 16:43 ` kernel test robot
2021-11-28 13:53 ` [PATCH 5/5] staging: r8188eu: remove module parameter rtw_rf_config Michael Straube
4 siblings, 1 reply; 9+ messages in thread
From: Michael Straube @ 2021-11-28 13:53 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
The field rf_type of struct hal_data_8188e is set to RF_1T1R and
never changed. Also it is used only in a call to netdev_dbg() which
is not very useful since RTL8188EU chips are always 1T1R. Remove
the netdev_dbg() and remove rf_type from the hal_data_8188e
structure.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 4 ----
drivers/staging/r8188eu/include/rtl8188e_hal.h | 3 ---
2 files changed, 7 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 001e4a198630..eeb5f46687e2 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -854,10 +854,6 @@ void rtl8188e_read_chip_version(struct adapter *padapter)
dump_chip_info(ChipVersion);
pHalData->VersionID = ChipVersion;
-
- pHalData->rf_type = RF_1T1R;
-
- netdev_dbg(padapter->pnetdev, "RF_Type is %x!!\n", pHalData->rf_type);
}
void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet)
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 5848f1d4191a..be8af7497f4b 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -168,9 +168,6 @@ struct hal_data_8188e {
u16 BasicRateSet;
- /* rf_ctrl */
- u8 rf_type;
-
/* EEPROM setting. */
u16 EEPROMSVID;
u16 EEPROMSDID;
--
2.34.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 4/5] staging: r8188eu: remove rf_type from struct hal_data_8188e
2021-11-28 13:53 ` [PATCH 4/5] staging: r8188eu: remove rf_type from struct hal_data_8188e Michael Straube
@ 2021-11-28 16:43 ` kernel test robot
0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2021-11-28 16:43 UTC (permalink / raw)
To: Michael Straube, gregkh
Cc: kbuild-all, Larry.Finger, phil, linux-staging, linux-kernel,
Michael Straube
Hi Michael,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Michael-Straube/staging-r8188eu-remove-rf_type-and-rtw_rf_config/20211128-215723
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 84c365f8ff8fc93a34d6cabe780d0b0f49c177e2
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20211129/202111290017.K4fY1Rzb-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/24ae4273c618f09d6a87c4c86b67a18a8fbacc59
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Michael-Straube/staging-r8188eu-remove-rf_type-and-rtw_rf_config/20211128-215723
git checkout 24ae4273c618f09d6a87c4c86b67a18a8fbacc59
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/staging/r8188eu/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c: In function 'storePwrIndexDiffRateOffset':
>> drivers/staging/r8188eu/hal/rtl8188e_phycfg.c:509:29: error: 'struct hal_data_8188e' has no member named 'rf_type'
509 | if (pHalData->rf_type == RF_1T1R)
| ^~
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c:528:29: error: 'struct hal_data_8188e' has no member named 'rf_type'
528 | if (pHalData->rf_type != RF_1T1R)
| ^~
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c: In function 'getTxPowerIndex88E':
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c:620:33: error: 'struct hal_data_8188e' has no member named 'rf_type'
620 | if ((RF_1T2R == pHalData->rf_type) || (RF_1T1R == pHalData->rf_type))
| ^~
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c:620:67: error: 'struct hal_data_8188e' has no member named 'rf_type'
620 | if ((RF_1T2R == pHalData->rf_type) || (RF_1T1R == pHalData->rf_type))
| ^~
vim +509 drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
8cd574e6af5463 Phillip Potter 2021-07-28 488
8cd574e6af5463 Phillip Potter 2021-07-28 489 void storePwrIndexDiffRateOffset(struct adapter *Adapter, u32 RegAddr, u32 BitMask, u32 Data)
8cd574e6af5463 Phillip Potter 2021-07-28 490 {
8cd574e6af5463 Phillip Potter 2021-07-28 491 struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
8cd574e6af5463 Phillip Potter 2021-07-28 492
8cd574e6af5463 Phillip Potter 2021-07-28 493 if (RegAddr == rTxAGC_A_Rate18_06)
8cd574e6af5463 Phillip Potter 2021-07-28 494 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][0] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 495 if (RegAddr == rTxAGC_A_Rate54_24)
8cd574e6af5463 Phillip Potter 2021-07-28 496 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][1] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 497 if (RegAddr == rTxAGC_A_CCK1_Mcs32)
8cd574e6af5463 Phillip Potter 2021-07-28 498 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][6] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 499 if (RegAddr == rTxAGC_B_CCK11_A_CCK2_11 && BitMask == 0xffffff00)
8cd574e6af5463 Phillip Potter 2021-07-28 500 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][7] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 501 if (RegAddr == rTxAGC_A_Mcs03_Mcs00)
8cd574e6af5463 Phillip Potter 2021-07-28 502 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][2] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 503 if (RegAddr == rTxAGC_A_Mcs07_Mcs04)
8cd574e6af5463 Phillip Potter 2021-07-28 504 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][3] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 505 if (RegAddr == rTxAGC_A_Mcs11_Mcs08)
8cd574e6af5463 Phillip Potter 2021-07-28 506 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][4] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 507 if (RegAddr == rTxAGC_A_Mcs15_Mcs12) {
8cd574e6af5463 Phillip Potter 2021-07-28 508 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][5] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 @509 if (pHalData->rf_type == RF_1T1R)
8cd574e6af5463 Phillip Potter 2021-07-28 510 pHalData->pwrGroupCnt++;
8cd574e6af5463 Phillip Potter 2021-07-28 511 }
8cd574e6af5463 Phillip Potter 2021-07-28 512 if (RegAddr == rTxAGC_B_Rate18_06)
8cd574e6af5463 Phillip Potter 2021-07-28 513 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][8] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 514 if (RegAddr == rTxAGC_B_Rate54_24)
8cd574e6af5463 Phillip Potter 2021-07-28 515 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][9] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 516 if (RegAddr == rTxAGC_B_CCK1_55_Mcs32)
8cd574e6af5463 Phillip Potter 2021-07-28 517 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][14] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 518 if (RegAddr == rTxAGC_B_CCK11_A_CCK2_11 && BitMask == 0x000000ff)
8cd574e6af5463 Phillip Potter 2021-07-28 519 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][15] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 520 if (RegAddr == rTxAGC_B_Mcs03_Mcs00)
8cd574e6af5463 Phillip Potter 2021-07-28 521 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][10] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 522 if (RegAddr == rTxAGC_B_Mcs07_Mcs04)
8cd574e6af5463 Phillip Potter 2021-07-28 523 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][11] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 524 if (RegAddr == rTxAGC_B_Mcs11_Mcs08)
8cd574e6af5463 Phillip Potter 2021-07-28 525 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][12] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 526 if (RegAddr == rTxAGC_B_Mcs15_Mcs12) {
8cd574e6af5463 Phillip Potter 2021-07-28 527 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][13] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 528 if (pHalData->rf_type != RF_1T1R)
8cd574e6af5463 Phillip Potter 2021-07-28 529 pHalData->pwrGroupCnt++;
8cd574e6af5463 Phillip Potter 2021-07-28 530 }
8cd574e6af5463 Phillip Potter 2021-07-28 531 }
8cd574e6af5463 Phillip Potter 2021-07-28 532
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 5/5] staging: r8188eu: remove module parameter rtw_rf_config
2021-11-28 13:53 [PATCH 0/5] staging: r8188eu: remove rf_type and rtw_rf_config Michael Straube
` (3 preceding siblings ...)
2021-11-28 13:53 ` [PATCH 4/5] staging: r8188eu: remove rf_type from struct hal_data_8188e Michael Straube
@ 2021-11-28 13:53 ` Michael Straube
2021-11-28 17:45 ` kernel test robot
4 siblings, 1 reply; 9+ messages in thread
From: Michael Straube @ 2021-11-28 13:53 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
The module parameter rtw_rf_config is not used in the driver.
Remove it and remove the now unused enum rt_rf_type_def.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/include/drv_types.h | 1 -
drivers/staging/r8188eu/include/rtw_rf.h | 10 ----------
drivers/staging/r8188eu/os_dep/os_intfs.c | 3 ---
3 files changed, 14 deletions(-)
diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
index 3e4928320f17..edcdbd646eaa 100644
--- a/drivers/staging/r8188eu/include/drv_types.h
+++ b/drivers/staging/r8188eu/include/drv_types.h
@@ -85,7 +85,6 @@ struct registry_priv {
u8 ampdu_amsdu;/* A-MPDU Supports A-MSDU is permitted */
u8 lowrate_two_xmit;
- u8 rf_config;
u8 low_power;
u8 wifi_spec;/* !turbo_mode */
diff --git a/drivers/staging/r8188eu/include/rtw_rf.h b/drivers/staging/r8188eu/include/rtw_rf.h
index 7ec252fec054..d0a408b903dc 100644
--- a/drivers/staging/r8188eu/include/rtw_rf.h
+++ b/drivers/staging/r8188eu/include/rtw_rf.h
@@ -99,16 +99,6 @@ enum ht_extchnl_offset {
HT_EXTCHNL_OFFSET_LOWER = 3,
};
-/* 2007/11/15 MH Define different RF type. */
-enum rt_rf_type_def {
- RF_1T2R = 0,
- RF_2T4R = 1,
- RF_2T2R = 2,
- RF_1T1R = 3,
- RF_2T2R_GREEN = 4,
- RF_819X_MAX_TYPE = 5,
-};
-
u32 rtw_ch2freq(u32 ch);
#endif /* _RTL8711_RF_H_ */
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 5a5f182d30c9..0021ca578949 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -75,7 +75,6 @@ static int rtw_ampdu_amsdu;/* 0: disabled, 1:enabled, 2:auto */
static int rtw_lowrate_two_xmit = 1;/* Use 2 path Tx to transmit MCS0~7 and legacy mode */
-static int rtw_rf_config = RF_819X_MAX_TYPE; /* auto */
static int rtw_low_power;
static int rtw_wifi_spec;
static int rtw_channel_plan = RT_CHANNEL_DOMAIN_MAX;
@@ -123,7 +122,6 @@ module_param(rtw_ampdu_enable, int, 0644);
module_param(rtw_rx_stbc, int, 0644);
module_param(rtw_ampdu_amsdu, int, 0644);
module_param(rtw_lowrate_two_xmit, int, 0644);
-module_param(rtw_rf_config, int, 0644);
module_param(rtw_power_mgnt, int, 0644);
module_param(rtw_smart_ps, int, 0644);
module_param(rtw_low_power, int, 0644);
@@ -205,7 +203,6 @@ static uint loadparam(struct adapter *padapter, struct net_device *pnetdev)
registry_par->rx_stbc = (u8)rtw_rx_stbc;
registry_par->ampdu_amsdu = (u8)rtw_ampdu_amsdu;
registry_par->lowrate_two_xmit = (u8)rtw_lowrate_two_xmit;
- registry_par->rf_config = (u8)rtw_rf_config;
registry_par->low_power = (u8)rtw_low_power;
registry_par->wifi_spec = (u8)rtw_wifi_spec;
registry_par->channel_plan = (u8)rtw_channel_plan;
--
2.34.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 5/5] staging: r8188eu: remove module parameter rtw_rf_config
2021-11-28 13:53 ` [PATCH 5/5] staging: r8188eu: remove module parameter rtw_rf_config Michael Straube
@ 2021-11-28 17:45 ` kernel test robot
0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2021-11-28 17:45 UTC (permalink / raw)
To: Michael Straube, gregkh
Cc: kbuild-all, Larry.Finger, phil, linux-staging, linux-kernel,
Michael Straube
Hi Michael,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Michael-Straube/staging-r8188eu-remove-rf_type-and-rtw_rf_config/20211128-215723
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 84c365f8ff8fc93a34d6cabe780d0b0f49c177e2
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20211129/202111290156.knQNxdhP-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/598ff48bdd977b1ec251f5b9ea41320aa5b36ef0
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Michael-Straube/staging-r8188eu-remove-rf_type-and-rtw_rf_config/20211128-215723
git checkout 598ff48bdd977b1ec251f5b9ea41320aa5b36ef0
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/staging/r8188eu/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c: In function 'storePwrIndexDiffRateOffset':
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c:509:29: error: 'struct hal_data_8188e' has no member named 'rf_type'
509 | if (pHalData->rf_type == RF_1T1R)
| ^~
>> drivers/staging/r8188eu/hal/rtl8188e_phycfg.c:509:42: error: 'RF_1T1R' undeclared (first use in this function)
509 | if (pHalData->rf_type == RF_1T1R)
| ^~~~~~~
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c:509:42: note: each undeclared identifier is reported only once for each function it appears in
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c:528:29: error: 'struct hal_data_8188e' has no member named 'rf_type'
528 | if (pHalData->rf_type != RF_1T1R)
| ^~
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c: In function 'getTxPowerIndex88E':
>> drivers/staging/r8188eu/hal/rtl8188e_phycfg.c:620:14: error: 'RF_1T2R' undeclared (first use in this function)
620 | if ((RF_1T2R == pHalData->rf_type) || (RF_1T1R == pHalData->rf_type))
| ^~~~~~~
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c:620:33: error: 'struct hal_data_8188e' has no member named 'rf_type'
620 | if ((RF_1T2R == pHalData->rf_type) || (RF_1T1R == pHalData->rf_type))
| ^~
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c:620:48: error: 'RF_1T1R' undeclared (first use in this function)
620 | if ((RF_1T2R == pHalData->rf_type) || (RF_1T1R == pHalData->rf_type))
| ^~~~~~~
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c:620:67: error: 'struct hal_data_8188e' has no member named 'rf_type'
620 | if ((RF_1T2R == pHalData->rf_type) || (RF_1T1R == pHalData->rf_type))
| ^~
--
drivers/staging/r8188eu/core/rtw_mlme.c: In function 'rtw_update_ht_cap':
drivers/staging/r8188eu/core/rtw_mlme.c:2004:42: error: 'HW_VAR_RF_TYPE' undeclared (first use in this function); did you mean 'HAL_RF_TYPE'?
2004 | GetHwReg8188EU(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
| ^~~~~~~~~~~~~~
| HAL_RF_TYPE
drivers/staging/r8188eu/core/rtw_mlme.c:2004:42: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/staging/r8188eu/core/rtw_mlme.c:2008:41: error: 'RF_1T1R' undeclared (first use in this function)
2008 | if ((rf_type == RF_1T1R) || (rf_type == RF_1T2R))
| ^~~~~~~
>> drivers/staging/r8188eu/core/rtw_mlme.c:2008:65: error: 'RF_1T2R' undeclared (first use in this function)
2008 | if ((rf_type == RF_1T1R) || (rf_type == RF_1T2R))
| ^~~~~~~
--
drivers/staging/r8188eu/core/rtw_mlme_ext.c: In function 'issue_assocreq':
drivers/staging/r8188eu/core/rtw_mlme_ext.c:5188:50: error: 'HW_VAR_RF_TYPE' undeclared (first use in this function); did you mean 'HAL_RF_TYPE'?
5188 | GetHwReg8188EU(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
| ^~~~~~~~~~~~~~
| HAL_RF_TYPE
drivers/staging/r8188eu/core/rtw_mlme_ext.c:5188:50: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/staging/r8188eu/core/rtw_mlme_ext.c:5190:30: error: 'RF_1T1R' undeclared (first use in this function)
5190 | case RF_1T1R:
| ^~~~~~~
>> drivers/staging/r8188eu/core/rtw_mlme_ext.c:5195:30: error: 'RF_2T2R' undeclared (first use in this function)
5195 | case RF_2T2R:
| ^~~~~~~
>> drivers/staging/r8188eu/core/rtw_mlme_ext.c:5196:30: error: 'RF_1T2R' undeclared (first use in this function)
5196 | case RF_1T2R:
| ^~~~~~~
vim +/RF_1T1R +509 drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
8cd574e6af5463 Phillip Potter 2021-07-28 488
8cd574e6af5463 Phillip Potter 2021-07-28 489 void storePwrIndexDiffRateOffset(struct adapter *Adapter, u32 RegAddr, u32 BitMask, u32 Data)
8cd574e6af5463 Phillip Potter 2021-07-28 490 {
8cd574e6af5463 Phillip Potter 2021-07-28 491 struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
8cd574e6af5463 Phillip Potter 2021-07-28 492
8cd574e6af5463 Phillip Potter 2021-07-28 493 if (RegAddr == rTxAGC_A_Rate18_06)
8cd574e6af5463 Phillip Potter 2021-07-28 494 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][0] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 495 if (RegAddr == rTxAGC_A_Rate54_24)
8cd574e6af5463 Phillip Potter 2021-07-28 496 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][1] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 497 if (RegAddr == rTxAGC_A_CCK1_Mcs32)
8cd574e6af5463 Phillip Potter 2021-07-28 498 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][6] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 499 if (RegAddr == rTxAGC_B_CCK11_A_CCK2_11 && BitMask == 0xffffff00)
8cd574e6af5463 Phillip Potter 2021-07-28 500 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][7] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 501 if (RegAddr == rTxAGC_A_Mcs03_Mcs00)
8cd574e6af5463 Phillip Potter 2021-07-28 502 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][2] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 503 if (RegAddr == rTxAGC_A_Mcs07_Mcs04)
8cd574e6af5463 Phillip Potter 2021-07-28 504 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][3] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 505 if (RegAddr == rTxAGC_A_Mcs11_Mcs08)
8cd574e6af5463 Phillip Potter 2021-07-28 506 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][4] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 507 if (RegAddr == rTxAGC_A_Mcs15_Mcs12) {
8cd574e6af5463 Phillip Potter 2021-07-28 508 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][5] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 @509 if (pHalData->rf_type == RF_1T1R)
8cd574e6af5463 Phillip Potter 2021-07-28 510 pHalData->pwrGroupCnt++;
8cd574e6af5463 Phillip Potter 2021-07-28 511 }
8cd574e6af5463 Phillip Potter 2021-07-28 512 if (RegAddr == rTxAGC_B_Rate18_06)
8cd574e6af5463 Phillip Potter 2021-07-28 513 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][8] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 514 if (RegAddr == rTxAGC_B_Rate54_24)
8cd574e6af5463 Phillip Potter 2021-07-28 515 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][9] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 516 if (RegAddr == rTxAGC_B_CCK1_55_Mcs32)
8cd574e6af5463 Phillip Potter 2021-07-28 517 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][14] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 518 if (RegAddr == rTxAGC_B_CCK11_A_CCK2_11 && BitMask == 0x000000ff)
8cd574e6af5463 Phillip Potter 2021-07-28 519 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][15] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 520 if (RegAddr == rTxAGC_B_Mcs03_Mcs00)
8cd574e6af5463 Phillip Potter 2021-07-28 521 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][10] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 522 if (RegAddr == rTxAGC_B_Mcs07_Mcs04)
8cd574e6af5463 Phillip Potter 2021-07-28 523 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][11] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 524 if (RegAddr == rTxAGC_B_Mcs11_Mcs08)
8cd574e6af5463 Phillip Potter 2021-07-28 525 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][12] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 526 if (RegAddr == rTxAGC_B_Mcs15_Mcs12) {
8cd574e6af5463 Phillip Potter 2021-07-28 527 pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][13] = Data;
8cd574e6af5463 Phillip Potter 2021-07-28 528 if (pHalData->rf_type != RF_1T1R)
8cd574e6af5463 Phillip Potter 2021-07-28 529 pHalData->pwrGroupCnt++;
8cd574e6af5463 Phillip Potter 2021-07-28 530 }
8cd574e6af5463 Phillip Potter 2021-07-28 531 }
8cd574e6af5463 Phillip Potter 2021-07-28 532
8cd574e6af5463 Phillip Potter 2021-07-28 533 static int phy_BB8188E_Config_ParaFile(struct adapter *Adapter)
8cd574e6af5463 Phillip Potter 2021-07-28 534 {
2f4b652d744fa6 Michael Straube 2021-09-12 535 struct eeprom_priv *pEEPROM = &Adapter->eeprompriv;
8cd574e6af5463 Phillip Potter 2021-07-28 536 struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
8cd574e6af5463 Phillip Potter 2021-07-28 537 int rtStatus = _SUCCESS;
8cd574e6af5463 Phillip Potter 2021-07-28 538
8cd574e6af5463 Phillip Potter 2021-07-28 539 /* */
8cd574e6af5463 Phillip Potter 2021-07-28 540 /* 1. Read PHY_REG.TXT BB INIT!! */
8cd574e6af5463 Phillip Potter 2021-07-28 541 /* We will separate as 88C / 92C according to chip version */
8cd574e6af5463 Phillip Potter 2021-07-28 542 /* */
8cd574e6af5463 Phillip Potter 2021-07-28 543 if (HAL_STATUS_FAILURE == ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG))
8cd574e6af5463 Phillip Potter 2021-07-28 544 rtStatus = _FAIL;
8cd574e6af5463 Phillip Potter 2021-07-28 545 if (rtStatus != _SUCCESS)
8cd574e6af5463 Phillip Potter 2021-07-28 546 goto phy_BB8190_Config_ParaFile_Fail;
8cd574e6af5463 Phillip Potter 2021-07-28 547
8cd574e6af5463 Phillip Potter 2021-07-28 548 /* 2. If EEPROM or EFUSE autoload OK, We must config by PHY_REG_PG.txt */
8cd574e6af5463 Phillip Potter 2021-07-28 549 if (!pEEPROM->bautoload_fail_flag) {
8cd574e6af5463 Phillip Potter 2021-07-28 550 pHalData->pwrGroupCnt = 0;
8cd574e6af5463 Phillip Potter 2021-07-28 551
8cd574e6af5463 Phillip Potter 2021-07-28 552 if (HAL_STATUS_FAILURE == ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG_PG))
8cd574e6af5463 Phillip Potter 2021-07-28 553 rtStatus = _FAIL;
8cd574e6af5463 Phillip Potter 2021-07-28 554 }
8cd574e6af5463 Phillip Potter 2021-07-28 555
8cd574e6af5463 Phillip Potter 2021-07-28 556 if (rtStatus != _SUCCESS)
8cd574e6af5463 Phillip Potter 2021-07-28 557 goto phy_BB8190_Config_ParaFile_Fail;
8cd574e6af5463 Phillip Potter 2021-07-28 558
8cd574e6af5463 Phillip Potter 2021-07-28 559 /* 3. BB AGC table Initialization */
8cd574e6af5463 Phillip Potter 2021-07-28 560 if (HAL_STATUS_FAILURE == ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_AGC_TAB))
8cd574e6af5463 Phillip Potter 2021-07-28 561 rtStatus = _FAIL;
8cd574e6af5463 Phillip Potter 2021-07-28 562
8cd574e6af5463 Phillip Potter 2021-07-28 563 if (rtStatus != _SUCCESS)
8cd574e6af5463 Phillip Potter 2021-07-28 564 goto phy_BB8190_Config_ParaFile_Fail;
8cd574e6af5463 Phillip Potter 2021-07-28 565
8cd574e6af5463 Phillip Potter 2021-07-28 566 phy_BB8190_Config_ParaFile_Fail:
8cd574e6af5463 Phillip Potter 2021-07-28 567
8cd574e6af5463 Phillip Potter 2021-07-28 568 return rtStatus;
8cd574e6af5463 Phillip Potter 2021-07-28 569 }
8cd574e6af5463 Phillip Potter 2021-07-28 570
8cd574e6af5463 Phillip Potter 2021-07-28 571 int
8cd574e6af5463 Phillip Potter 2021-07-28 572 PHY_BBConfig8188E(
8cd574e6af5463 Phillip Potter 2021-07-28 573 struct adapter *Adapter
8cd574e6af5463 Phillip Potter 2021-07-28 574 )
8cd574e6af5463 Phillip Potter 2021-07-28 575 {
8cd574e6af5463 Phillip Potter 2021-07-28 576 int rtStatus = _SUCCESS;
8cd574e6af5463 Phillip Potter 2021-07-28 577 struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
8cd574e6af5463 Phillip Potter 2021-07-28 578 u32 RegVal;
8cd574e6af5463 Phillip Potter 2021-07-28 579 u8 CrystalCap;
8cd574e6af5463 Phillip Potter 2021-07-28 580
8cd574e6af5463 Phillip Potter 2021-07-28 581 phy_InitBBRFRegisterDefinition(Adapter);
8cd574e6af5463 Phillip Potter 2021-07-28 582
8cd574e6af5463 Phillip Potter 2021-07-28 583 /* Enable BB and RF */
8cd574e6af5463 Phillip Potter 2021-07-28 584 RegVal = rtw_read16(Adapter, REG_SYS_FUNC_EN);
dcda94c9412a07 Larry Finger 2021-08-10 585 rtw_write16(Adapter, REG_SYS_FUNC_EN, (u16)(RegVal | BIT(13) | BIT(0) | BIT(1)));
8cd574e6af5463 Phillip Potter 2021-07-28 586
8cd574e6af5463 Phillip Potter 2021-07-28 587 /* 20090923 Joseph: Advised by Steven and Jenyu. Power sequence before init RF. */
8cd574e6af5463 Phillip Potter 2021-07-28 588
8cd574e6af5463 Phillip Potter 2021-07-28 589 rtw_write8(Adapter, REG_RF_CTRL, RF_EN | RF_RSTB | RF_SDMRSTB);
8cd574e6af5463 Phillip Potter 2021-07-28 590
8cd574e6af5463 Phillip Potter 2021-07-28 591 rtw_write8(Adapter, REG_SYS_FUNC_EN, FEN_USBA | FEN_USBD | FEN_BB_GLB_RSTn | FEN_BBRSTB);
8cd574e6af5463 Phillip Potter 2021-07-28 592
8cd574e6af5463 Phillip Potter 2021-07-28 593 /* Config BB and AGC */
8cd574e6af5463 Phillip Potter 2021-07-28 594 rtStatus = phy_BB8188E_Config_ParaFile(Adapter);
8cd574e6af5463 Phillip Potter 2021-07-28 595
8cd574e6af5463 Phillip Potter 2021-07-28 596 /* write 0x24[16:11] = 0x24[22:17] = CrystalCap */
8cd574e6af5463 Phillip Potter 2021-07-28 597 CrystalCap = pHalData->CrystalCap & 0x3F;
8cd574e6af5463 Phillip Potter 2021-07-28 598 PHY_SetBBReg(Adapter, REG_AFE_XTAL_CTRL, 0x7ff800, (CrystalCap | (CrystalCap << 6)));
8cd574e6af5463 Phillip Potter 2021-07-28 599
8cd574e6af5463 Phillip Potter 2021-07-28 600 return rtStatus;
8cd574e6af5463 Phillip Potter 2021-07-28 601 }
8cd574e6af5463 Phillip Potter 2021-07-28 602
8cd574e6af5463 Phillip Potter 2021-07-28 603 int PHY_RFConfig8188E(struct adapter *Adapter)
8cd574e6af5463 Phillip Potter 2021-07-28 604 {
8cd574e6af5463 Phillip Potter 2021-07-28 605 int rtStatus = _SUCCESS;
8cd574e6af5463 Phillip Potter 2021-07-28 606
8cd574e6af5463 Phillip Potter 2021-07-28 607 /* RF config */
8cd574e6af5463 Phillip Potter 2021-07-28 608 rtStatus = PHY_RF6052_Config8188E(Adapter);
8cd574e6af5463 Phillip Potter 2021-07-28 609 return rtStatus;
8cd574e6af5463 Phillip Potter 2021-07-28 610 }
8cd574e6af5463 Phillip Potter 2021-07-28 611
8cd574e6af5463 Phillip Potter 2021-07-28 612 static void getTxPowerIndex88E(struct adapter *Adapter, u8 channel, u8 *cckPowerLevel,
8cd574e6af5463 Phillip Potter 2021-07-28 613 u8 *ofdmPowerLevel, u8 *BW20PowerLevel,
8cd574e6af5463 Phillip Potter 2021-07-28 614 u8 *BW40PowerLevel)
8cd574e6af5463 Phillip Potter 2021-07-28 615 {
8cd574e6af5463 Phillip Potter 2021-07-28 616 struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
8cd574e6af5463 Phillip Potter 2021-07-28 617 u8 index = (channel - 1);
8cd574e6af5463 Phillip Potter 2021-07-28 618 u8 TxCount = 0, path_nums;
8cd574e6af5463 Phillip Potter 2021-07-28 619
8cd574e6af5463 Phillip Potter 2021-07-28 @620 if ((RF_1T2R == pHalData->rf_type) || (RF_1T1R == pHalData->rf_type))
8cd574e6af5463 Phillip Potter 2021-07-28 621 path_nums = 1;
8cd574e6af5463 Phillip Potter 2021-07-28 622 else
8cd574e6af5463 Phillip Potter 2021-07-28 623 path_nums = 2;
8cd574e6af5463 Phillip Potter 2021-07-28 624
8cd574e6af5463 Phillip Potter 2021-07-28 625 for (TxCount = 0; TxCount < path_nums; TxCount++) {
8cd574e6af5463 Phillip Potter 2021-07-28 626 if (TxCount == RF_PATH_A) {
8cd574e6af5463 Phillip Potter 2021-07-28 627 /* 1. CCK */
8cd574e6af5463 Phillip Potter 2021-07-28 628 cckPowerLevel[TxCount] = pHalData->Index24G_CCK_Base[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 629 /* 2. OFDM */
8cd574e6af5463 Phillip Potter 2021-07-28 630 ofdmPowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 631 pHalData->OFDM_24G_Diff[TxCount][RF_PATH_A];
8cd574e6af5463 Phillip Potter 2021-07-28 632 /* 1. BW20 */
8cd574e6af5463 Phillip Potter 2021-07-28 633 BW20PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 634 pHalData->BW20_24G_Diff[TxCount][RF_PATH_A];
8cd574e6af5463 Phillip Potter 2021-07-28 635 /* 2. BW40 */
8cd574e6af5463 Phillip Potter 2021-07-28 636 BW40PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 637 } else if (TxCount == RF_PATH_B) {
8cd574e6af5463 Phillip Potter 2021-07-28 638 /* 1. CCK */
8cd574e6af5463 Phillip Potter 2021-07-28 639 cckPowerLevel[TxCount] = pHalData->Index24G_CCK_Base[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 640 /* 2. OFDM */
8cd574e6af5463 Phillip Potter 2021-07-28 641 ofdmPowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 642 pHalData->BW20_24G_Diff[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 643 pHalData->BW20_24G_Diff[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 644 /* 1. BW20 */
8cd574e6af5463 Phillip Potter 2021-07-28 645 BW20PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 646 pHalData->BW20_24G_Diff[TxCount][RF_PATH_A] +
8cd574e6af5463 Phillip Potter 2021-07-28 647 pHalData->BW20_24G_Diff[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 648 /* 2. BW40 */
8cd574e6af5463 Phillip Potter 2021-07-28 649 BW40PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 650 } else if (TxCount == RF_PATH_C) {
8cd574e6af5463 Phillip Potter 2021-07-28 651 /* 1. CCK */
8cd574e6af5463 Phillip Potter 2021-07-28 652 cckPowerLevel[TxCount] = pHalData->Index24G_CCK_Base[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 653 /* 2. OFDM */
8cd574e6af5463 Phillip Potter 2021-07-28 654 ofdmPowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 655 pHalData->BW20_24G_Diff[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 656 pHalData->BW20_24G_Diff[RF_PATH_B][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 657 pHalData->BW20_24G_Diff[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 658 /* 1. BW20 */
8cd574e6af5463 Phillip Potter 2021-07-28 659 BW20PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 660 pHalData->BW20_24G_Diff[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 661 pHalData->BW20_24G_Diff[RF_PATH_B][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 662 pHalData->BW20_24G_Diff[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 663 /* 2. BW40 */
8cd574e6af5463 Phillip Potter 2021-07-28 664 BW40PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 665 } else if (TxCount == RF_PATH_D) {
8cd574e6af5463 Phillip Potter 2021-07-28 666 /* 1. CCK */
8cd574e6af5463 Phillip Potter 2021-07-28 667 cckPowerLevel[TxCount] = pHalData->Index24G_CCK_Base[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 668 /* 2. OFDM */
8cd574e6af5463 Phillip Potter 2021-07-28 669 ofdmPowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 670 pHalData->BW20_24G_Diff[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 671 pHalData->BW20_24G_Diff[RF_PATH_B][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 672 pHalData->BW20_24G_Diff[RF_PATH_C][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 673 pHalData->BW20_24G_Diff[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 674
8cd574e6af5463 Phillip Potter 2021-07-28 675 /* 1. BW20 */
8cd574e6af5463 Phillip Potter 2021-07-28 676 BW20PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 677 pHalData->BW20_24G_Diff[RF_PATH_A][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 678 pHalData->BW20_24G_Diff[RF_PATH_B][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 679 pHalData->BW20_24G_Diff[RF_PATH_C][index] +
8cd574e6af5463 Phillip Potter 2021-07-28 680 pHalData->BW20_24G_Diff[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 681
8cd574e6af5463 Phillip Potter 2021-07-28 682 /* 2. BW40 */
8cd574e6af5463 Phillip Potter 2021-07-28 683 BW40PowerLevel[TxCount] = pHalData->Index24G_BW40_Base[TxCount][index];
8cd574e6af5463 Phillip Potter 2021-07-28 684 }
8cd574e6af5463 Phillip Potter 2021-07-28 685 }
8cd574e6af5463 Phillip Potter 2021-07-28 686 }
8cd574e6af5463 Phillip Potter 2021-07-28 687
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 9+ messages in thread