staging: rtl8192e: Remove variable reg_bw_40mhz and further
cover staging: rtl8192e: Remove variable reg_bw_40mhz and further
Remove unused or unchanged variables.
Tested with rtl8192e (WLL6130-D99) in Mode n (12.5 MB/s) Transferred this patch over wlan connection of rtl8192e. Tested in b,g,n mode and n mode in channels 2, 9, 10, 13
Philipp Hortmann (10):
staging: rtl8192e: Remove unused struct iw_range_with_scan_capa
staging: rtl8192e: Remove variable ht_info->reg_bw_40mhz
staging: rtl8192e: Remove variable ht_info->reg_supp_cck
staging: rtl8192e: Remove variable ht_info->reg_short_gi_20mhz
staging: rtl8192e: Remove variable ht_info->reg_short_gi_40mhz
staging: rtl8192e: Remove variable ForcedAMPDUMode
staging: rtl8192e: Remove variable ForcedAMSDUMode
staging: rtl8192e: Remove equation with pPeerHTCap->DssCCk
staging: rtl8192e: Remove variable ht_info->bCurSuppCCK
staging: rtl8192e: Remove struct ht_info_ele SelfHTInfo
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 22 -------------- drivers/staging/rtl8192e/rtl819x_HT.h | 8 ----- drivers/staging/rtl8192e/rtl819x_HTProc.c | 34 +++------------------- drivers/staging/rtl8192e/rtllib_softmac.c | 5 +--- drivers/staging/rtl8192e/rtllib_tx.c | 21 ++----------- 5 files changed, 7 insertions(+), 83 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/10 staging: rtl8192e: Remove unused struct iw_range_with_scan_capa
Remove unused struct iw_range_with_scan_capa.
--- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 22 ---------------------- 1 file changed, 22 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +0 -22
@@ -158,28 +158,6 @@ static int _rtl92e_wx_set_mode(struct net_device *dev,return ret; } -struct iw_range_with_scan_capa { -/* Informative stuff (to choose between different interface) */ -__u32 throughput;/* To give an idea... */ -/* In theory this value should be the maximum benchmarked -* TCP/IP throughput, because with most of these devices the -* bit rate is meaningless (overhead an co) to estimate how -* fast the connection will go and pick the fastest one. -* I suggest people to play with Netperf or any benchmark... -*/ - -/* NWID (or domain id) */ -__u32 min_nwid;/* Minimal NWID we are able to set */ -__u32 max_nwid;/* Maximal NWID we are able to set */ - -/* Old Frequency (backward compat - moved lower ) */ -__u16 old_num_channels; -__u8 old_num_frequency; - -/* Scan capabilities */ -__u8 scan_capa; -}; -static int _rtl92e_wx_get_range (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra)
Signature · 1 line
2.43.0
PATCH 2/10 staging: rtl8192e: Remove variable ht_info->reg_bw_40mhz
In reply to Philipp Hortmannht_info->reg_bw_40mhz is set to 1 and unchanged. Therefore all equations result accordingly and ht_info->reg_bw_40mhz can be removed.
--- drivers/staging/rtl8192e/rtl819x_HT.h | 1 - drivers/staging/rtl8192e/rtl819x_HTProc.c | 14 +++----------- 2 files changed, 3 insertions(+), 12 deletions(-)
drivers/staging/rtl8192e/rtl819x_HT.h +0 -1
@@ -94,7 +94,6 @@ enum ht_aggre_mode {struct rt_hi_throughput {u8 enable_ht;u8 current_ht_support; -u8 reg_bw_40mhz;u8 cur_bw_40mhz;u8 reg_short_gi_40mhz;u8 cur_short_gi_40mhz;
drivers/staging/rtl8192e/rtl819x_HTProc.c +3 -11
@@ -74,12 +74,7 @@ void ht_update_default_setting(struct rtllib_device *ieee) ht_info->reg_short_gi_20mhz =1 ; ht_info->reg_short_gi_40mhz =1 ; - ht_info->reg_bw_40mhz =1 ; - -if (ht_info->reg_bw_40mhz) - ht_info->reg_supp_cck =1 ; -else - ht_info->reg_supp_cck = true; + ht_info->reg_supp_cck =1 ; ht_info->amsdu_max_size =7935UL ; ht_info->amsdu_support =0 ;
@@ -275,7 +270,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap,if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) pCapELE->ChlWidth =0 ;else - pCapELE->ChlWidth = (pHT->reg_bw_40mhz ?1 :0 ); + pCapELE->ChlWidth =1 ; pCapELE->MimoPwrSave = pHT->self_mimo_ps; pCapELE->GreenField =0 ;
@@ -286,7 +281,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap, pCapELE->RxSTBC =0 ; pCapELE->DelayBA =0 ; pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE >=7935 ) ?1 :0 ; - pCapELE->DssCCk = ((pHT->reg_bw_40mhz) ? (pHT->reg_supp_cck ?1 :0 ) :0 ); + pCapELE->DssCCk = (pHT->reg_supp_cck ?1 :0 ); pCapELE->PSMP =0 ; pCapELE->LSigTxopProtect =0 ;
@@ -734,9 +729,6 @@ void HTSetConnectBwMode(struct rtllib_device *ieee, {struct rt_hi_throughput *ht_info = ieee->ht_info; -if (!ht_info->reg_bw_40mhz) -return ; -if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) bandwidth =HT_CHANNEL_WIDTH_20 ;
Signature · 1 line
2.43.0
PATCH 3/10 staging: rtl8192e: Remove variable ht_info->reg_supp_cck
In reply to Philipp Hortmannht_info->reg_supp_cck is set to 1 and unchanged. Therefore all equations result accordingly and ht_info->reg_supp_cck can be removed.
--- drivers/staging/rtl8192e/rtl819x_HT.h | 1 - drivers/staging/rtl8192e/rtl819x_HTProc.c | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-)
drivers/staging/rtl8192e/rtl819x_HT.h +0 -1
@@ -99,7 +99,6 @@ struct rt_hi_throughput {u8 cur_short_gi_40mhz;u8 reg_short_gi_20mhz;u8 cur_short_gi_20mhz; -u8 reg_supp_cck;u8 bCurSuppCCK;enum ht_spec_ver ePeerHTSpecVer;struct ht_capab_ele SelfHTCap;
drivers/staging/rtl8192e/rtl819x_HTProc.c +2 -6
@@ -74,8 +74,6 @@ void ht_update_default_setting(struct rtllib_device *ieee) ht_info->reg_short_gi_20mhz =1 ; ht_info->reg_short_gi_40mhz =1 ; - ht_info->reg_supp_cck =1 ; - ht_info->amsdu_max_size =7935UL ; ht_info->amsdu_support =0 ;
@@ -281,7 +279,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap, pCapELE->RxSTBC =0 ; pCapELE->DelayBA =0 ; pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE >=7935 ) ?1 :0 ; - pCapELE->DssCCk = (pHT->reg_supp_cck ?1 :0 ); + pCapELE->DssCCk =1 ; pCapELE->PSMP =0 ; pCapELE->LSigTxopProtect =0 ;
@@ -480,9 +478,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee) ((pPeerHTCap->ShortGI40Mhz ==1 ) ? true : false) : false); - ht_info->bCurSuppCCK = ((ht_info->reg_supp_cck) ? - ((pPeerHTCap->DssCCk ==1 ) ? true : - false) : false); + ht_info->bCurSuppCCK = ((pPeerHTCap->DssCCk ==1 ) ? true : false); ht_info->bCurrent_AMSDU_Support = ht_info->amsdu_support;
Signature · 1 line
2.43.0
PATCH 4/10 staging: rtl8192e: Remove variable ht_info->reg_short_gi_20mhz
In reply to Philipp Hortmannht_info->reg_short_gi_20mhz is set to 1 and unchanged. Therefore all equations result accordingly and ht_info->reg_short_gi_20mhz can be removed.
--- drivers/staging/rtl8192e/rtl819x_HT.h | 1 - drivers/staging/rtl8192e/rtl819x_HTProc.c | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-)
drivers/staging/rtl8192e/rtl819x_HT.h +0 -1
@@ -97,7 +97,6 @@ struct rt_hi_throughput {u8 cur_bw_40mhz;u8 reg_short_gi_40mhz;u8 cur_short_gi_40mhz; -u8 reg_short_gi_20mhz;u8 cur_short_gi_20mhz;u8 bCurSuppCCK;enum ht_spec_ver ePeerHTSpecVer;
drivers/staging/rtl8192e/rtl819x_HTProc.c +1 -4
@@ -71,7 +71,6 @@ void ht_update_default_setting(struct rtllib_device *ieee) {struct rt_hi_throughput *ht_info = ieee->ht_info; - ht_info->reg_short_gi_20mhz =1 ; ht_info->reg_short_gi_40mhz =1 ; ht_info->amsdu_max_size =7935UL ;
@@ -471,9 +470,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee) ht_info->cur_tx_bw40mhz = ((pPeerHTInfo->RecommemdedTxWidth ==1 ) ? true : false); - ht_info->cur_short_gi_20mhz = ((ht_info->reg_short_gi_20mhz) ? - ((pPeerHTCap->ShortGI20Mhz ==1 ) ? - true : false) : false); + ht_info->cur_short_gi_20mhz = ((pPeerHTCap->ShortGI20Mhz ==1 ) ? true : false); ht_info->cur_short_gi_40mhz = ((ht_info->reg_short_gi_40mhz) ? ((pPeerHTCap->ShortGI40Mhz ==1 ) ? true : false) : false);
Signature · 1 line
2.43.0
PATCH 5/10 staging: rtl8192e: Remove variable ht_info->reg_short_gi_40mhz
In reply to Philipp Hortmannht_info->reg_short_gi_40mhz is set to 1 and unchanged. Therefore all equations result accordingly and ht_info->reg_short_gi_40mhz can be removed.
--- drivers/staging/rtl8192e/rtl819x_HT.h | 1 - drivers/staging/rtl8192e/rtl819x_HTProc.c | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-)
drivers/staging/rtl8192e/rtl819x_HT.h +0 -1
@@ -95,7 +95,6 @@ struct rt_hi_throughput {u8 enable_ht;u8 current_ht_support;u8 cur_bw_40mhz; -u8 reg_short_gi_40mhz;u8 cur_short_gi_40mhz;u8 cur_short_gi_20mhz;u8 bCurSuppCCK;
drivers/staging/rtl8192e/rtl819x_HTProc.c +1 -5
@@ -71,8 +71,6 @@ void ht_update_default_setting(struct rtllib_device *ieee) {struct rt_hi_throughput *ht_info = ieee->ht_info; - ht_info->reg_short_gi_40mhz =1 ; - ht_info->amsdu_max_size =7935UL ; ht_info->amsdu_support =0 ;
@@ -471,9 +469,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee) true : false); ht_info->cur_short_gi_20mhz = ((pPeerHTCap->ShortGI20Mhz ==1 ) ? true : false); - ht_info->cur_short_gi_40mhz = ((ht_info->reg_short_gi_40mhz) ? - ((pPeerHTCap->ShortGI40Mhz ==1 ) ? - true : false) : false); + ht_info->cur_short_gi_40mhz = ((pPeerHTCap->ShortGI40Mhz ==1 ) ? true : false); ht_info->bCurSuppCCK = ((pPeerHTCap->DssCCk ==1 ) ? true : false);
Signature · 1 line
2.43.0
PATCH 6/10 staging: rtl8192e: Remove variable ForcedAMPDUMode
In reply to Philipp HortmannForcedAMPDUMode is set to 0 and unchanged. Therefore all equations result accordingly and ForcedAMPDUMode can be removed. As a result label FORCED_AGG_SETTING is unused and can be removed as well.
--- drivers/staging/rtl8192e/rtl819x_HT.h | 1 - drivers/staging/rtl8192e/rtllib_tx.c | 21 ++------------------- 2 files changed, 2 insertions(+), 20 deletions(-)
drivers/staging/rtl8192e/rtl819x_HT.h +0 -1
@@ -113,7 +113,6 @@ struct rt_hi_throughput {u8 CurrentAMPDUFactor;u8 mpdu_density;u8 current_mpdu_density; -enum ht_aggre_mode ForcedAMPDUMode;u8 forced_ampdu_factor;u8 forced_mpdu_density;enum ht_aggre_mode ForcedAMSDUMode;
drivers/staging/rtl8192e/rtllib_tx.c +2 -19
@@ -303,13 +303,13 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee, }else if (!ts->disable_add_ba) {TsStartAddBaProcess (ieee, ts); } - goto FORCED_AGG_SETTING; +return ; }else if (!ts->using_ba) {if (SN_LESS (ts->tx_admitted_ba_record.ba_start_seq_ctrl.field.seq_num, (ts->tx_cur_seq +1 ) %4096 )) ts->using_ba = true;else - goto FORCED_AGG_SETTING; +return ; }if (ieee->iw_mode ==IW_MODE_INFRA ) { tcb_desc->ampdu_enable = true;
@@ -317,23 +317,6 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee, tcb_desc->ampdu_density = ht_info->current_mpdu_density; } } -FORCED_AGG_SETTING: -switch (ht_info->ForcedAMPDUMode) { -case HT_AGG_AUTO : -break ; - -case HT_AGG_FORCE_ENABLE : - tcb_desc->ampdu_enable = true; - tcb_desc->ampdu_density = ht_info->forced_mpdu_density; - tcb_desc->ampdu_factor = ht_info->forced_ampdu_factor; -break ; - -case HT_AGG_FORCE_DISABLE : - tcb_desc->ampdu_enable = false; - tcb_desc->ampdu_density =0 ; - tcb_desc->ampdu_factor =0 ; -break ; - } } static void rtllib_query_ShortPreambleMode(struct rtllib_device *ieee,
Signature · 1 line
2.43.0
PATCH 7/10 staging: rtl8192e: Remove variable ForcedAMSDUMode
In reply to Philipp HortmannForcedAMSDUMode is set to 1 and then never evaluated.
--- drivers/staging/rtl8192e/rtl819x_HT.h | 1 - drivers/staging/rtl8192e/rtl819x_HTProc.c | 1 - 2 files changed, 2 deletions(-)
drivers/staging/rtl8192e/rtl819x_HT.h +0 -1
@@ -115,7 +115,6 @@ struct rt_hi_throughput {u8 current_mpdu_density;u8 forced_ampdu_factor;u8 forced_mpdu_density; -enum ht_aggre_mode ForcedAMSDUMode;u8 forced_short_gi;u8 current_op_mode;u8 self_mimo_ps;
drivers/staging/rtl8192e/rtl819x_HTProc.c +0 -1
@@ -513,7 +513,6 @@ void HTOnAssocRsp(struct rtllib_device *ieee) pPeerHTCap->MPDUDensity);if (ht_info->iot_action &HT_IOT_ACT_TX_USE_AMSDU_8K ) { ht_info->current_ampdu_enable = false; - ht_info->ForcedAMSDUMode =HT_AGG_FORCE_ENABLE ; } ht_info->cur_rx_reorder_enable = ht_info->reg_rx_reorder_enable;
Signature · 1 line
2.43.0
PATCH 8/10 staging: rtl8192e: Remove equation with pPeerHTCap->DssCCk
In reply to Philipp HortmannRemove equation with pPeerHTCap->DssCCk as it is set to 1 and unchanged.
--- drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +1 -1
@@ -471,7 +471,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee) ht_info->cur_short_gi_20mhz = ((pPeerHTCap->ShortGI20Mhz ==1 ) ? true : false); ht_info->cur_short_gi_40mhz = ((pPeerHTCap->ShortGI40Mhz ==1 ) ? true : false); - ht_info->bCurSuppCCK = ((pPeerHTCap->DssCCk ==1 ) ? true : false); + ht_info->bCurSuppCCK = true; ht_info->bCurrent_AMSDU_Support = ht_info->amsdu_support;
Signature · 1 line
2.43.0
PATCH 9/10 staging: rtl8192e: Remove variable ht_info->bCurSuppCCK
In reply to Philipp Hortmannht_info->bCurSuppCCK is set to 1 and unchanged. Therefore all equations result accordingly and ht_info->bCurSuppCCK can be removed.
--- drivers/staging/rtl8192e/rtl819x_HT.h | 1 - drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 ---- drivers/staging/rtl8192e/rtllib_softmac.c | 5 +---- 3 files changed, 1 insertion(+), 9 deletions(-)
drivers/staging/rtl8192e/rtl819x_HT.h +0 -1
@@ -97,7 +97,6 @@ struct rt_hi_throughput {u8 cur_bw_40mhz;u8 cur_short_gi_40mhz;u8 cur_short_gi_20mhz; -u8 bCurSuppCCK;enum ht_spec_ver ePeerHTSpecVer;struct ht_capab_ele SelfHTCap;struct ht_info_ele SelfHTInfo;
drivers/staging/rtl8192e/rtl819x_HTProc.c +0 -4
@@ -471,8 +471,6 @@ void HTOnAssocRsp(struct rtllib_device *ieee) ht_info->cur_short_gi_20mhz = ((pPeerHTCap->ShortGI20Mhz ==1 ) ? true : false); ht_info->cur_short_gi_40mhz = ((pPeerHTCap->ShortGI40Mhz ==1 ) ? true : false); - ht_info->bCurSuppCCK = true; - ht_info->bCurrent_AMSDU_Support = ht_info->amsdu_support; nMaxAMSDUSize = (pPeerHTCap->MaxAMSDUSize ==0 ) ?3839 :7935 ;
@@ -549,8 +547,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee) ht_info->cur_short_gi_40mhz = false; ht_info->forced_short_gi = false; - ht_info->bCurSuppCCK = true; - ht_info->bCurrent_AMSDU_Support = false; ht_info->nCurrent_AMSDU_MaxSize = ht_info->amsdu_max_size; ht_info->current_mpdu_density = ht_info->mpdu_density;
drivers/staging/rtl8192e/rtllib_softmac.c +1 -4
@@ -173,10 +173,7 @@ static u8 MgntQuery_MgntFrameTxRate(struct rtllib_device *ieee) rate = ieee->basic_rate &0x7f ;if (rate ==0 ) { -if (ieee->mode ==WIRELESS_MODE_N_24G && !ht_info->bCurSuppCCK) - rate =0x0c ; -else - rate =0x02 ; + rate =0x02 ; }return rate;
Signature · 1 line
2.43.0
PATCH 10/10 staging: rtl8192e: Remove struct ht_info_ele SelfHTInfo
In reply to Philipp HortmannRemove struct ht_info_ele SelfHTInfo as it is unused.
--- drivers/staging/rtl8192e/rtl819x_HT.h | 1 - drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 -- 2 files changed, 3 deletions(-)
drivers/staging/rtl8192e/rtl819x_HT.h +0 -1
@@ -99,7 +99,6 @@ struct rt_hi_throughput {u8 cur_short_gi_20mhz;enum ht_spec_ver ePeerHTSpecVer;struct ht_capab_ele SelfHTCap; -struct ht_info_ele SelfHTInfo;u8 PeerHTCapBuf[32 ];u8 PeerHTInfoBuf[32 ];u8 amsdu_support;
drivers/staging/rtl8192e/rtl819x_HTProc.c +0 -2
@@ -554,8 +554,6 @@ void HTInitializeHTInfo(struct rtllib_device *ieee)memset ((void *)(&ht_info->SelfHTCap),0 ,sizeof (ht_info->SelfHTCap)); -memset ((void *)(&ht_info->SelfHTInfo),0 , -sizeof (ht_info->SelfHTInfo));memset ((void *)(&ht_info->PeerHTCapBuf),0 ,sizeof (ht_info->PeerHTCapBuf)); memset((void *)(&ht_info->PeerHTInfoBuf), 0,
Signature · 1 line
2.43.0