Skip to contentSkip to conversation

staging: rtl8723bs: remove some fields from the

PATCH New Nikolay Kulikov 1 participant 6 messages Jul 10 Staging

lore
Share & tools
lore
#0 lore raw

v2 cover staging: rtl8723bs: remove some fields from the

Remaining patches from v1 for cleaning up struct hal_com_data.

Changes in v2:
- Fix the build error: remove the unused local variable
- Rebase on staging-testing

v1:
https://lore.kernel.org/linux-staging/[email protected]/T/

Nikolay Kulikov (5):
staging: rtl8723bs: remove unused 'EEPROMCustomerID' from hal_com_data
staging: rtl8723bs: remove unused ForcedDataRate from hal_com_data
staging: rtl8723bs: remove unused EEPROMVersion from struct
hal_com_data
staging: rtl8723bs: remove unused EEPROMBluetoothType from
hal_com_data
staging: rtl8723bs: remove unused 'bTXPowerDataReadFromEEPORM'

 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c   |  1 -
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 30 -------------------
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  |  2 --
 drivers/staging/rtl8723bs/include/hal_data.h  |  5 ----
 drivers/staging/rtl8723bs/include/hal_pg.h    |  6 ----
 .../staging/rtl8723bs/include/rtl8723b_hal.h  |  4 ---
 6 files changed, 48 deletions(-)

base-commit: cfea8865cba0264777a3cc464ffba64f0102317f

Signature · 1 line
2.54.0
#1 lore raw

PATCH v2 1/5 staging: rtl8723bs: remove unused 'EEPROMCustomerID' from hal_com_data

This field is set during initialization but never used, so remove it.

---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 12 ------------
 drivers/staging/rtl8723bs/hal/sdio_halinit.c      |  1 -
 drivers/staging/rtl8723bs/include/hal_data.h      |  1 -
 drivers/staging/rtl8723bs/include/hal_pg.h        |  1 -
 drivers/staging/rtl8723bs/include/rtl8723b_hal.h  |  2 --
 5 files changed, 17 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -12
index ecd66f090a50..367f3facb255 100644
@@ -1459,18 +1459,6 @@ void Hal_EfuseParseChnlPlan_8723B(
 	Hal_ChannelPlanToRegulation(padapter, padapter->mlmepriv.ChannelPlan);
 }
 
-void Hal_EfuseParseCustomerID_8723B(
-	struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
-)
-{
-	struct hal_com_data	*pHalData = GET_HAL_DATA(padapter);
-
-	if (!AutoLoadFail)
-		pHalData->EEPROMCustomerID = hwinfo[EEPROM_CustomID_8723B];
-	else
-		pHalData->EEPROMCustomerID = 0;
-}
-
 void Hal_EfuseParseXtal_8723B(
 	struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
 )
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -1
index 6f2aea984b30..80119559664f 100644
@@ -1046,7 +1046,6 @@ static void _ReadEfuseInfo8723BS(struct adapter *padapter)
 	Hal_EfuseParseChnlPlan_8723B(padapter, hwinfo, pEEPROM->bautoload_fail_flag);
 	Hal_EfuseParseXtal_8723B(padapter, hwinfo, pEEPROM->bautoload_fail_flag);
 	Hal_EfuseParseThermalMeter_8723B(padapter, hwinfo, pEEPROM->bautoload_fail_flag);
-	Hal_EfuseParseCustomerID_8723B(padapter, hwinfo, pEEPROM->bautoload_fail_flag);
 
 	Hal_EfuseParseVoltage_8723B(padapter, hwinfo, pEEPROM->bautoload_fail_flag);
 
drivers/staging/rtl8723bs/include/hal_data.h +0 -1
index c93b21822ea7..273080ae62d1 100644
@@ -162,7 +162,6 @@ struct hal_com_data {
 	u8 PackageType;
 
 	/*  EEPROM setting. */
-	u8 EEPROMCustomerID;
 	u8 EEPROMVersion;
 	u8 EEPROMRegulatory;
 	u8 EEPROMThermalMeter;
drivers/staging/rtl8723bs/include/hal_pg.h +0 -1
index 7cb9c441fc01..c0fca8fc7270 100644
@@ -39,7 +39,6 @@
 #define	EEPROM_RF_BOARD_OPTION_8723B		0xC1
 #define	EEPROM_RF_BT_SETTING_8723B		0xC3
 #define	EEPROM_VERSION_8723B			0xC4
-#define	EEPROM_CustomID_8723B			0xC5
 #define EEPROM_DEFAULT_DIFF			0XFE
 
 /* RTL8723BS */
drivers/staging/rtl8723bs/include/rtl8723b_hal.h +0 -2
index 259ba63ba4bc..f2979cde78e5 100644
@@ -215,8 +215,6 @@ void Hal_EfuseParseEEPROMVer_8723B(struct adapter *padapter, u8 *hwinfo,
 				   bool AutoLoadFail);
 void Hal_EfuseParseChnlPlan_8723B(struct adapter *padapter, u8 *hwinfo,
 				  bool AutoLoadFail);
-void Hal_EfuseParseCustomerID_8723B(struct adapter *padapter, u8 *hwinfo,
-				    bool AutoLoadFail);
 void Hal_EfuseParseXtal_8723B(struct adapter *padapter, u8 *hwinfo,
 			      bool AutoLoadFail);
 void Hal_EfuseParseThermalMeter_8723B(struct adapter *padapter, u8 *hwinfo,
Signature · 1 line
2.54.0
#2 lore raw

PATCH v2 2/5 staging: rtl8723bs: remove unused ForcedDataRate from hal_com_data

In reply to Nikolay Kulikov

This field is set once and never used, so remove it.

---
 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c  | 1 -
 drivers/staging/rtl8723bs/include/hal_data.h | 1 -
 2 files changed, 2 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +0 -1
index bd6fbb80ddb7..13efbfa5b58a 100644
@@ -94,7 +94,6 @@ static void Update_ODM_ComInfo_8723b(struct adapter *Adapter)
 	ODM_CmnInfoHook(pDM_Odm, ODM_CMNINFO_NET_CLOSED, &(Adapter->net_closed));
 	ODM_CmnInfoHook(pDM_Odm, ODM_CMNINFO_MP_MODE, &zero);
 	ODM_CmnInfoHook(pDM_Odm, ODM_CMNINFO_FORCED_IGI_LB, &(pHalData->u1ForcedIgiLb));
-	ODM_CmnInfoHook(pDM_Odm, ODM_CMNINFO_FORCED_RATE, &(pHalData->ForcedDataRate));
 
 	ODM_CmnInfoHook(pDM_Odm, ODM_CMNINFO_SCAN, &(pmlmepriv->bScanInProcess));
 	ODM_CmnInfoHook(pDM_Odm, ODM_CMNINFO_POWER_SAVING, &(pwrctrlpriv->bpower_saving));
drivers/staging/rtl8723bs/include/hal_data.h +0 -1
index 273080ae62d1..578cff14adc5 100644
@@ -154,7 +154,6 @@ struct hal_com_data {
 
 	u16 CustomerID;
 	u16 BasicRateSet;
-	u16 ForcedDataRate;/*  Force Data Rate. 0: Auto, 0x02: 1M ~ 0x6C: 54M. */
 	u32 ReceiveConfig;
 
 	/* rf_ctrl */
Signature · 1 line
2.54.0
#3 lore raw

PATCH v2 3/5 staging: rtl8723bs: remove unused EEPROMVersion from struct hal_com_data

In reply to Nikolay Kulikov

A value is written to this field, but it is never used. Remove it, along with the associated functions and macros, to simplify the code.

---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 12 ------------
 drivers/staging/rtl8723bs/hal/sdio_halinit.c      |  1 -
 drivers/staging/rtl8723bs/include/hal_data.h      |  1 -
 drivers/staging/rtl8723bs/include/hal_pg.h        |  1 -
 drivers/staging/rtl8723bs/include/rtl8723b_hal.h  |  2 --
 5 files changed, 17 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -12
index 367f3facb255..20ee21c83500 100644
@@ -1389,18 +1389,6 @@ void Hal_EfuseParseBTCoexistInfo_8723B(
 		hal_btcoex_SetSingleAntPath(padapter, pHalData->ant_path);
 }
 
-void Hal_EfuseParseEEPROMVer_8723B(
-	struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
-)
-{
-	struct hal_com_data	*pHalData = GET_HAL_DATA(padapter);
-
-	if (!AutoLoadFail)
-		pHalData->EEPROMVersion = hwinfo[EEPROM_VERSION_8723B];
-	else
-		pHalData->EEPROMVersion = 1;
-}
-
 void Hal_EfuseParsePackageType_8723B(
 	struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
 )
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -1
index 80119559664f..a08f7c78a921 100644
@@ -1031,7 +1031,6 @@ static void _ReadEfuseInfo8723BS(struct adapter *padapter)
 	Hal_InitPGData(padapter, hwinfo);
 
 	Hal_EfuseParseIDCode(padapter, hwinfo);
-	Hal_EfuseParseEEPROMVer_8723B(padapter, hwinfo, pEEPROM->bautoload_fail_flag);
 
 	Hal_EfuseParseMACAddr_8723BS(padapter, hwinfo, pEEPROM->bautoload_fail_flag);
 
drivers/staging/rtl8723bs/include/hal_data.h +0 -1
index 578cff14adc5..0a25688de041 100644
@@ -161,7 +161,6 @@ struct hal_com_data {
 	u8 PackageType;
 
 	/*  EEPROM setting. */
-	u8 EEPROMVersion;
 	u8 EEPROMRegulatory;
 	u8 EEPROMThermalMeter;
 	u8 EEPROMBluetoothCoexist;
drivers/staging/rtl8723bs/include/hal_pg.h +0 -1
index c0fca8fc7270..3362b349904d 100644
@@ -38,7 +38,6 @@
 
 #define	EEPROM_RF_BOARD_OPTION_8723B		0xC1
 #define	EEPROM_RF_BT_SETTING_8723B		0xC3
-#define	EEPROM_VERSION_8723B			0xC4
 #define EEPROM_DEFAULT_DIFF			0XFE
 
 /* RTL8723BS */
drivers/staging/rtl8723bs/include/rtl8723b_hal.h +0 -2
index f2979cde78e5..c442f01aa585 100644
@@ -211,8 +211,6 @@ void Hal_EfuseParseTxPowerInfo_8723B(struct adapter *padapter, u8 *PROMContent,
 				     bool AutoLoadFail);
 void Hal_EfuseParseBTCoexistInfo_8723B(struct adapter *padapter, u8 *hwinfo,
 				       bool AutoLoadFail);
-void Hal_EfuseParseEEPROMVer_8723B(struct adapter *padapter, u8 *hwinfo,
-				   bool AutoLoadFail);
 void Hal_EfuseParseChnlPlan_8723B(struct adapter *padapter, u8 *hwinfo,
 				  bool AutoLoadFail);
 void Hal_EfuseParseXtal_8723B(struct adapter *padapter, u8 *hwinfo,
Signature · 1 line
2.54.0
#4 lore raw

PATCH v2 4/5 staging: rtl8723bs: remove unused EEPROMBluetoothType from hal_com_data

In reply to Nikolay Kulikov

The value 'BT_RTL8723B' is written to this field, but it is not used in any other way, so remove it.

---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 3 ---
 drivers/staging/rtl8723bs/include/hal_data.h      | 1 -
 drivers/staging/rtl8723bs/include/hal_pg.h        | 4 ----
 3 files changed, 8 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -3
index 20ee21c83500..a4149ba47069 100644
@@ -1345,8 +1345,6 @@ void Hal_EfuseParseBTCoexistInfo_8723B(
 		else
 			pHalData->EEPROMBluetoothCoexist = false;
 
-		pHalData->EEPROMBluetoothType = BT_RTL8723B;
-
 		tempval = hwinfo[EEPROM_RF_BT_SETTING_8723B];
 		if (tempval != 0xFF) {
 			pHalData->EEPROMBluetoothAntNum = tempval & BIT(0);
@@ -1365,7 +1363,6 @@ void Hal_EfuseParseBTCoexistInfo_8723B(
 		}
 	} else {
 		pHalData->EEPROMBluetoothCoexist = false;
-		pHalData->EEPROMBluetoothType = BT_RTL8723B;
 		pHalData->EEPROMBluetoothAntNum = Ant_x1;
 		pHalData->ant_path = RF_PATH_A;
 	}
drivers/staging/rtl8723bs/include/hal_data.h +0 -1
index 0a25688de041..f4d4127ed5a1 100644
@@ -164,7 +164,6 @@ struct hal_com_data {
 	u8 EEPROMRegulatory;
 	u8 EEPROMThermalMeter;
 	u8 EEPROMBluetoothCoexist;
-	u8 EEPROMBluetoothType;
 	u8 EEPROMBluetoothAntNum;
 	u8 bTXPowerDataReadFromEEPORM;
 	u8 bDisableSWChannelPlan; /*  flag of disable software change channel plan */
drivers/staging/rtl8723bs/include/hal_pg.h +0 -4
index 3362b349904d..32e66fe451b0 100644
@@ -60,8 +60,4 @@ enum {
 	Ant_x1	= 1
 };
 
-enum {
-	BT_RTL8723B = 8,
-};
-
 #endif
Signature · 1 line
2.54.0
#5 lore raw

PATCH v2 5/5 staging: rtl8723bs: remove unused 'bTXPowerDataReadFromEEPORM'

In reply to Nikolay Kulikov

The 'bTXPowerDataReadFromEEPORM' field of the struct hal_com_data is set but never used; remove it.

---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 3 ---
 drivers/staging/rtl8723bs/include/hal_data.h      | 1 -
 2 files changed, 4 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -3
index a4149ba47069..3dac9a8fe5d8 100644
@@ -1182,7 +1182,6 @@ static void Hal_ReadPowerValueFromPROM_8723B(
 	bool AutoLoadFail
 )
 {
-	struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
 	u32 rfPath, eeAddr = EEPROM_TX_PWR_INX_8723B, group, TxCount = 0;
 
 	memset(pwrInfo24G, 0, sizeof(struct TxPowerInfo24G));
@@ -1214,8 +1213,6 @@ static void Hal_ReadPowerValueFromPROM_8723B(
 		return;
 	}
 
-	pHalData->bTXPowerDataReadFromEEPORM = true;		/* YJ, move, 120316 */
-
 	for (rfPath = 0; rfPath < MAX_RF_PATH; rfPath++) {
 		/* 2 2.4G default value */
 		for (group = 0; group < MAX_CHNL_GROUP_24G; group++) {
drivers/staging/rtl8723bs/include/hal_data.h +0 -1
index f4d4127ed5a1..df0c3248a4e1 100644
@@ -165,7 +165,6 @@ struct hal_com_data {
 	u8 EEPROMThermalMeter;
 	u8 EEPROMBluetoothCoexist;
 	u8 EEPROMBluetoothAntNum;
-	u8 bTXPowerDataReadFromEEPORM;
 	u8 bDisableSWChannelPlan; /*  flag of disable software change channel plan */
 
 	bool		EepromOrEfuse;
Signature · 1 line
2.54.0