linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: r8188eu: remove unused constants and variables
@ 2021-10-17 11:17 Michael Straube
  2021-10-17 11:23 ` Martin Kaiser
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Straube @ 2021-10-17 11:17 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube,
	Martin Kaiser

Remove some unused constants and variables that are left over from
previous cleanup patches.

Suggested-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/hal/odm.c          |  8 --------
 drivers/staging/r8188eu/hal/odm_HWConfig.c |  3 ---
 drivers/staging/r8188eu/include/odm.h      | 17 -----------------
 3 files changed, 28 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/odm.c b/drivers/staging/r8188eu/hal/odm.c
index 0987ff3e382a..fc425d359b15 100644
--- a/drivers/staging/r8188eu/hal/odm.c
+++ b/drivers/staging/r8188eu/hal/odm.c
@@ -979,14 +979,6 @@ void ODM_TXPowerTrackingCheck(struct odm_dm_struct *pDM_Odm)
 	}
 }
 
-/* antenna mapping info */
-/*  1: right-side antenna */
-/*  2/0: left-side antenna */
-/* PDM_SWAT_Table->CCK_Ant1_Cnt /OFDM_Ant1_Cnt:  for right-side antenna:   Ant:1    RxDefaultAnt1 */
-/* PDM_SWAT_Table->CCK_Ant2_Cnt /OFDM_Ant2_Cnt:  for left-side antenna:     Ant:0    RxDefaultAnt2 */
-/*  We select left antenna as default antenna in initial process, modify it as needed */
-/*  */
-
 void odm_InitHybridAntDiv(struct odm_dm_struct *pDM_Odm)
 {
 	if (!(pDM_Odm->SupportAbility & ODM_BB_ANT_DIV))
diff --git a/drivers/staging/r8188eu/hal/odm_HWConfig.c b/drivers/staging/r8188eu/hal/odm_HWConfig.c
index 3d639b2720b2..af28af6f66d7 100644
--- a/drivers/staging/r8188eu/hal/odm_HWConfig.c
+++ b/drivers/staging/r8188eu/hal/odm_HWConfig.c
@@ -58,7 +58,6 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,
 			struct odm_per_pkt_info *pPktinfo,
 			struct adapter *adapt)
 {
-	struct sw_ant_switch *pDM_SWAT_Table = &dm_odm->DM_SWAT_Table;
 	u8 i, Max_spatial_stream;
 	s8 rx_pwr[4], rx_pwr_all = 0;
 	u8 EVM, PWDB_ALL = 0, PWDB_ALL_BT;
@@ -224,8 +223,6 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,
 			pPhyInfo->SignalStrength = (u8)(odm_SignalScaleMapping(dm_odm, total_rssi /= rf_rx_num));
 	}
 
-	/* For 92C/92D HW (Hybrid) Antenna Diversity */
-	pDM_SWAT_Table->antsel = pPhyStaRpt->ant_sel;
 	/* For 88E HW Antenna Diversity */
 	dm_odm->DM_FatTable.antsel_rx_keep_0 = pPhyStaRpt->ant_sel;
 	dm_odm->DM_FatTable.antsel_rx_keep_1 = pPhyStaRpt->ant_sel_b;
diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h
index 841603b341bd..f1ea9fa89a26 100644
--- a/drivers/staging/r8188eu/include/odm.h
+++ b/drivers/staging/r8188eu/include/odm.h
@@ -111,12 +111,6 @@ struct rx_hpc {
 
 #define ODM_ASSOCIATE_ENTRY_NUM	32 /*  Max size of AsocEntry[]. */
 
-/*  This indicates two different steps. */
-/*  Using SWAW_STEP_PEAK, driver needs to switch antenna and listen to
- *  the signal on the air. */
-
-#define SWAW_STEP_PEAK		0
-
 struct sw_ant_switch {
 	u8	try_flag;
 	s32	PreRSSI;
@@ -131,8 +125,6 @@ struct sw_ant_switch {
 	/*  Before link Antenna Switch check */
 	u8	SWAS_NoLink_State;
 	u32	SWAS_NoLink_BK_Reg860;
-	bool	ANTA_ON;	/* To indicate Ant A is or not */
-	bool	ANTB_ON;	/* To indicate Ant B is on or not */
 
 	s32	RSSI_sum_A;
 	s32	RSSI_sum_B;
@@ -146,16 +138,8 @@ struct sw_ant_switch {
 	u64	RXByteCnt_B;
 	u8	TrafficLoad;
 	struct timer_list SwAntennaSwitchTimer;
-	/* Hybrid Antenna Diversity */
-	u32	CCK_Ant1_Cnt[ODM_ASSOCIATE_ENTRY_NUM];
-	u32	CCK_Ant2_Cnt[ODM_ASSOCIATE_ENTRY_NUM];
-	u32	OFDM_Ant1_Cnt[ODM_ASSOCIATE_ENTRY_NUM];
-	u32	OFDM_Ant2_Cnt[ODM_ASSOCIATE_ENTRY_NUM];
-	u32	RSSI_Ant1_Sum[ODM_ASSOCIATE_ENTRY_NUM];
-	u32	RSSI_Ant2_Sum[ODM_ASSOCIATE_ENTRY_NUM];
 	u8	TxAnt[ODM_ASSOCIATE_ENTRY_NUM];
 	u8	TargetSTA;
-	u8	antsel;
 	u8	RxIdleAnt;
 };
 
@@ -574,7 +558,6 @@ enum ant_div_type {
 	CGCS_RX_HW_ANTDIV		= 0x02,
 	FIXED_HW_ANTDIV			= 0x03,
 	CG_TRX_SMART_ANTDIV		= 0x04,
-	CGCS_RX_SW_ANTDIV		= 0x05,
 };
 
 /* Copy from SD4 defined structure. We use to support PHY DM integration. */
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: r8188eu: remove unused constants and variables
  2021-10-17 11:17 [PATCH] staging: r8188eu: remove unused constants and variables Michael Straube
@ 2021-10-17 11:23 ` Martin Kaiser
  2021-10-17 11:43   ` Michael Straube
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Kaiser @ 2021-10-17 11:23 UTC (permalink / raw)
  To: Michael Straube; +Cc: gregkh, Larry.Finger, phil, linux-staging, linux-kernel

Thus wrote Michael Straube (straube.linux@gmail.com):

> Remove some unused constants and variables that are left over from
> previous cleanup patches.

> Suggested-by: Martin Kaiser <martin@kaiser.cx>
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
>  drivers/staging/r8188eu/hal/odm.c          |  8 --------
>  drivers/staging/r8188eu/hal/odm_HWConfig.c |  3 ---
>  drivers/staging/r8188eu/include/odm.h      | 17 -----------------
>  3 files changed, 28 deletions(-)

> diff --git a/drivers/staging/r8188eu/hal/odm.c b/drivers/staging/r8188eu/hal/odm.c
> index 0987ff3e382a..fc425d359b15 100644
> --- a/drivers/staging/r8188eu/hal/odm.c
> +++ b/drivers/staging/r8188eu/hal/odm.c
> @@ -979,14 +979,6 @@ void ODM_TXPowerTrackingCheck(struct odm_dm_struct *pDM_Odm)
>  	}
>  }

> -/* antenna mapping info */
> -/*  1: right-side antenna */
> -/*  2/0: left-side antenna */
> -/* PDM_SWAT_Table->CCK_Ant1_Cnt /OFDM_Ant1_Cnt:  for right-side antenna:   Ant:1    RxDefaultAnt1 */
> -/* PDM_SWAT_Table->CCK_Ant2_Cnt /OFDM_Ant2_Cnt:  for left-side antenna:     Ant:0    RxDefaultAnt2 */
> -/*  We select left antenna as default antenna in initial process, modify it as needed */
> -/*  */
> -
>  void odm_InitHybridAntDiv(struct odm_dm_struct *pDM_Odm)
>  {
>  	if (!(pDM_Odm->SupportAbility & ODM_BB_ANT_DIV))
> diff --git a/drivers/staging/r8188eu/hal/odm_HWConfig.c b/drivers/staging/r8188eu/hal/odm_HWConfig.c
> index 3d639b2720b2..af28af6f66d7 100644
> --- a/drivers/staging/r8188eu/hal/odm_HWConfig.c
> +++ b/drivers/staging/r8188eu/hal/odm_HWConfig.c
> @@ -58,7 +58,6 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,
>  			struct odm_per_pkt_info *pPktinfo,
>  			struct adapter *adapt)
>  {
> -	struct sw_ant_switch *pDM_SWAT_Table = &dm_odm->DM_SWAT_Table;
>  	u8 i, Max_spatial_stream;
>  	s8 rx_pwr[4], rx_pwr_all = 0;
>  	u8 EVM, PWDB_ALL = 0, PWDB_ALL_BT;
> @@ -224,8 +223,6 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,
>  			pPhyInfo->SignalStrength = (u8)(odm_SignalScaleMapping(dm_odm, total_rssi /= rf_rx_num));
>  	}

> -	/* For 92C/92D HW (Hybrid) Antenna Diversity */
> -	pDM_SWAT_Table->antsel = pPhyStaRpt->ant_sel;
>  	/* For 88E HW Antenna Diversity */
>  	dm_odm->DM_FatTable.antsel_rx_keep_0 = pPhyStaRpt->ant_sel;
>  	dm_odm->DM_FatTable.antsel_rx_keep_1 = pPhyStaRpt->ant_sel_b;
> diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h
> index 841603b341bd..f1ea9fa89a26 100644
> --- a/drivers/staging/r8188eu/include/odm.h
> +++ b/drivers/staging/r8188eu/include/odm.h
> @@ -111,12 +111,6 @@ struct rx_hpc {

>  #define ODM_ASSOCIATE_ENTRY_NUM	32 /*  Max size of AsocEntry[]. */

> -/*  This indicates two different steps. */
> -/*  Using SWAW_STEP_PEAK, driver needs to switch antenna and listen to
> - *  the signal on the air. */
> -
> -#define SWAW_STEP_PEAK		0
> -
>  struct sw_ant_switch {
>  	u8	try_flag;
>  	s32	PreRSSI;
> @@ -131,8 +125,6 @@ struct sw_ant_switch {
>  	/*  Before link Antenna Switch check */
>  	u8	SWAS_NoLink_State;
>  	u32	SWAS_NoLink_BK_Reg860;
> -	bool	ANTA_ON;	/* To indicate Ant A is or not */
> -	bool	ANTB_ON;	/* To indicate Ant B is on or not */

>  	s32	RSSI_sum_A;
>  	s32	RSSI_sum_B;
> @@ -146,16 +138,8 @@ struct sw_ant_switch {
>  	u64	RXByteCnt_B;
>  	u8	TrafficLoad;
>  	struct timer_list SwAntennaSwitchTimer;
> -	/* Hybrid Antenna Diversity */
> -	u32	CCK_Ant1_Cnt[ODM_ASSOCIATE_ENTRY_NUM];
> -	u32	CCK_Ant2_Cnt[ODM_ASSOCIATE_ENTRY_NUM];
> -	u32	OFDM_Ant1_Cnt[ODM_ASSOCIATE_ENTRY_NUM];
> -	u32	OFDM_Ant2_Cnt[ODM_ASSOCIATE_ENTRY_NUM];
> -	u32	RSSI_Ant1_Sum[ODM_ASSOCIATE_ENTRY_NUM];
> -	u32	RSSI_Ant2_Sum[ODM_ASSOCIATE_ENTRY_NUM];
>  	u8	TxAnt[ODM_ASSOCIATE_ENTRY_NUM];
>  	u8	TargetSTA;
> -	u8	antsel;
>  	u8	RxIdleAnt;
>  };

> @@ -574,7 +558,6 @@ enum ant_div_type {
>  	CGCS_RX_HW_ANTDIV		= 0x02,
>  	FIXED_HW_ANTDIV			= 0x03,
>  	CG_TRX_SMART_ANTDIV		= 0x04,
> -	CGCS_RX_SW_ANTDIV		= 0x05,
>  };

>  /* Copy from SD4 defined structure. We use to support PHY DM integration. */
> -- 
> 2.33.0

Hi Michael,

Looks good, thanks.

Acked-by: Martin Kaiser <martin@kaiser.cx>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: r8188eu: remove unused constants and variables
  2021-10-17 11:23 ` Martin Kaiser
@ 2021-10-17 11:43   ` Michael Straube
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Straube @ 2021-10-17 11:43 UTC (permalink / raw)
  To: Martin Kaiser; +Cc: gregkh, Larry.Finger, phil, linux-staging, linux-kernel

On 10/17/21 13:23, Martin Kaiser wrote:
> Thus wrote Michael Straube (straube.linux@gmail.com):
> 
>> Remove some unused constants and variables that are left over from
>> previous cleanup patches.
> 
>> Suggested-by: Martin Kaiser <martin@kaiser.cx>
>> Signed-off-by: Michael Straube <straube.linux@gmail.com>
>> ---
>>   drivers/staging/r8188eu/hal/odm.c          |  8 --------
>>   drivers/staging/r8188eu/hal/odm_HWConfig.c |  3 ---
>>   drivers/staging/r8188eu/include/odm.h      | 17 -----------------
>>   3 files changed, 28 deletions(-)

> 
> 
> Hi Michael,
> 
> Looks good, thanks.
> 
> Acked-by: Martin Kaiser <martin@kaiser.cx>
> 

Thank you, Martin.

Greg, I forgot to mention that this patch should be applied on top of
the series.

[PATCH 0/7] staging: r8188eu: odm cleanups

Thanks,
Michael

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-17 11:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-17 11:17 [PATCH] staging: r8188eu: remove unused constants and variables Michael Straube
2021-10-17 11:23 ` Martin Kaiser
2021-10-17 11:43   ` Michael Straube

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).