staging: rtl8723bs: remove 5Ghz code
cover staging: rtl8723bs: remove 5Ghz code
This patch series removes all occurences of 5Ghz code over the driver as required from driver's TODO list:
- find and remove remaining code valid only for 5 GHz. most of the obvious one have been removed, but things like channel > 14 still exist.
rtl8723bs work on 2.4Ghz band and supports 802.11bgn standards. So all code related to 802.11a/ac standard is removed, as well as code related to channel numbers above 14.
VHT code is deleted as well, for it's related to 802.11ac.
Comments are fixed accordingly and many unused variables are deleted.
Every single patch of this series has been tested on a Lenovo Ideapad MIIX 300-10IBY except for the last one, for obvious reason (it deletes just the TODO item).
So:
Fabio Aiuto (18):
staging: rtl8723bs: remove all 5Ghz network types
staging: rtl8723bs: remove code related to unsupported channel
bandwidth
staging: rtl8723bs: remove unused enum items related to channel
bonding
staging: rtl8723bs: rename enum items related to channel bonding
staging: rtl8723bs: remove 5Ghz field in struct registry_priv
staging: rtl8723bs: remove struct rt_channel_plan_5g
staging: rtl8723bs: remove all branchings between 2.4Ghz and 5Ghz band
types
staging: rtl8723bs: beautify prototypes in include/hal_com_phycfg.h
staging: rtl8723bs: remove 5Ghz code related to channel plan
definition
staging: rtl8723bs: remove some unused 5Ghz macro definitions
staging: rtl8723bs: remove 5Ghz code related to RF power calibration
staging: rtl8723bs: remove VHT dead code
staging: rtl8723bs: remove unused ODM_CMNINFO_BOARD_TYPE enum item
staging: rtl8723bs: fix macro value for 2.4Ghz only device
staging: rtl8723bs: remove register initializations tied to 802.11ac
standard
staging: rtl8723bs: remove obsolete 5Ghz comments
staging: rtl8723bs: fix check allowing 5Ghz settings
staging: rtl8723bs: remove item from TODO list
drivers/staging/rtl8723bs/TODO | 2 - drivers/staging/rtl8723bs/core/rtw_ap.c | 10 +- .../staging/rtl8723bs/core/rtw_ieee80211.c | 22 +- drivers/staging/rtl8723bs/core/rtw_mlme.c | 10 - drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 328 ++--- .../staging/rtl8723bs/core/rtw_wlan_util.c | 29 +- drivers/staging/rtl8723bs/core/rtw_xmit.c | 5 +- .../staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 4 +- .../staging/rtl8723bs/hal/HalBtc8723b2Ant.c | 5 +- drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 1 - .../staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 17 +- .../staging/rtl8723bs/hal/HalHWImg8723B_RF.c | 595 ++++----- .../staging/rtl8723bs/hal/HalPhyRf_8723B.c | 19 +- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 - drivers/staging/rtl8723bs/hal/hal_com.c | 241 ---- .../staging/rtl8723bs/hal/hal_com_phycfg.c | 1059 +++-------------- drivers/staging/rtl8723bs/hal/odm.c | 50 - drivers/staging/rtl8723bs/hal/odm.h | 42 +- drivers/staging/rtl8723bs/hal/odm_DIG.c | 2 - .../rtl8723bs/hal/odm_EdcaTurboCheck.c | 4 +- .../rtl8723bs/hal/odm_RegConfig8723B.c | 5 +- .../rtl8723bs/hal/odm_RegConfig8723B.h | 2 - drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 1 - .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 53 +- .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 43 +- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 5 - .../rtl8723bs/include/Hal8192CPhyReg.h | 2 - drivers/staging/rtl8723bs/include/drv_types.h | 10 +- drivers/staging/rtl8723bs/include/hal_com.h | 62 +- .../rtl8723bs/include/hal_com_phycfg.h | 198 +-- .../staging/rtl8723bs/include/hal_com_reg.h | 1 - drivers/staging/rtl8723bs/include/hal_data.h | 40 +- drivers/staging/rtl8723bs/include/hal_pg.h | 2 - drivers/staging/rtl8723bs/include/hal_phy.h | 10 - drivers/staging/rtl8723bs/include/ieee80211.h | 67 +- .../staging/rtl8723bs/include/rtl8723b_xmit.h | 21 - drivers/staging/rtl8723bs/include/rtw_ht.h | 4 - .../staging/rtl8723bs/include/rtw_mlme_ext.h | 52 +- drivers/staging/rtl8723bs/include/rtw_rf.h | 33 +- drivers/staging/rtl8723bs/include/wifi.h | 1 - .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 - .../staging/rtl8723bs/os_dep/ioctl_linux.c | 8 +- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 13 +- drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 4 - 44 files changed, 640 insertions(+), 2450 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/18 staging: rtl8723bs: remove all 5Ghz network types
remove all 5Ghz network types. rtl8723bs works on
802.11bgn standards and on 2.4Ghz band.
So remove all code related to 802.11a and 802.11ac standards, which the device doesn't support.
--- drivers/staging/rtl8723bs/core/rtw_ap.c | 10 +--- .../staging/rtl8723bs/core/rtw_ieee80211.c | 22 ++------ drivers/staging/rtl8723bs/core/rtw_mlme.c | 10 ---- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 55 ------------------- .../staging/rtl8723bs/core/rtw_wlan_util.c | 14 +---- drivers/staging/rtl8723bs/hal/odm.c | 30 ---------- drivers/staging/rtl8723bs/hal/odm.h | 3 - .../rtl8723bs/hal/odm_EdcaTurboCheck.c | 4 +- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 5 -- drivers/staging/rtl8723bs/include/hal_phy.h | 3 - drivers/staging/rtl8723bs/include/ieee80211.h | 22 +------- drivers/staging/rtl8723bs/include/wifi.h | 1 - drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +- 13 files changed, 14 insertions(+), 167 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ap.c +2 -8
@@ -343,10 +343,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)if (pcur_network->Configuration.DSConfig >14 ) {if (tx_ra_bitmap &0xffff000 ) - sta_band |=WIRELESS_11_5N ; - -if (tx_ra_bitmap &0xff0 ) - sta_band |=WIRELESS_11A ; + sta_band |=WIRELESS_INVALID ; }else {if (tx_ra_bitmap &0xffff000 ) sta_band |=WIRELESS_11_24N ;
@@ -412,7 +409,7 @@ void update_bmc_sta(struct adapter *padapter) }else if (network_type ==WIRELESS_INVALID ) {/* error handling */ if (pcur_network->Configuration.DSConfig >14 ) - network_type =WIRELESS_11A ; + network_type =WIRELESS_INVALID ;else network_type =WIRELESS_11B ; }
@@ -1115,9 +1112,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)case WIRELESS_11BG_24N : pbss_network->NetworkTypeInUse = Ndis802_11OFDM24;break ; -case WIRELESS_11A : - pbss_network->NetworkTypeInUse = Ndis802_11OFDM5; -break ;default : pbss_network->NetworkTypeInUse = Ndis802_11OFDM24;break ;
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +4 -18
@@ -96,10 +96,7 @@ bool rtw_is_cckratesonly_included(u8 *rate)int rtw_check_network_type (unsigned char *rate,int ratelen,int channel) {if (channel >14 ) { -if (rtw_is_cckrates_included (rate)) -return WIRELESS_INVALID ; -else -return WIRELESS_11A ; +return WIRELESS_INVALID ; }else {/* could be pure B, pure G, or B/G */ if (rtw_is_cckratesonly_included (rate))return WIRELESS_11B ;
@@ -266,10 +263,6 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode)break ;case WIRELESS_11G : -case WIRELESS_11A : -case WIRELESS_11_5N : -case WIRELESS_11A_5N :/* Todo: no basic rate for ofdm ? */ -case WIRELESS_11_5AC :memcpy (SupportedRates,WIFI_OFDMRATES ,IEEE80211_NUM_OFDM_RATESLEN );break ;
@@ -327,14 +320,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) ie =rtw_set_ie (ie,WLAN_EID_SSID , pdev_network->Ssid.SsidLength, pdev_network->Ssid.Ssid, &sz);/* supported rates */ -if (pregistrypriv->wireless_mode ==WIRELESS_11ABGN ) { -if (pdev_network->Configuration.DSConfig >14 ) - wireless_mode =WIRELESS_11A_5N ; -else - wireless_mode =WIRELESS_11BG_24N ; - }else { - wireless_mode = pregistrypriv->wireless_mode; - } + wireless_mode = pregistrypriv->wireless_mode;rtw_set_supported_rate (pdev_network->SupportedRates, wireless_mode);
@@ -359,8 +345,8 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) }/* HT Cap. */ -if (((pregistrypriv->wireless_mode&WIRELESS_11_5N ) || (pregistrypriv->wireless_mode&WIRELESS_11_24N )) - && (pregistrypriv->ht_enable == true)) { +if ((pregistrypriv->wireless_mode &WIRELESS_11_24N ) && + (pregistrypriv->ht_enable == true)) {/* todo: */ }
drivers/staging/rtl8723bs/core/rtw_mlme.c +0 -10
@@ -2184,16 +2184,6 @@ void rtw_update_registrypriv_dev_network(struct adapter *adapter)case WIRELESS_11BG_24N : pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24);break ; -case WIRELESS_11A : -case WIRELESS_11A_5N : - pdev_network->NetworkTypeInUse = (Ndis802_11OFDM5); -break ; -case WIRELESS_11ABGN : -if (pregistrypriv->channel >14 ) - pdev_network->NetworkTypeInUse = (Ndis802_11OFDM5); -else - pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24); -break ;default :/* TODO */ break ;
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -55
61 lines not on this page · raw message
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +3 -11
@@ -55,9 +55,6 @@ u8 networktype_to_raid_ex(struct adapter *adapter, struct sta_info *psta)if (cur_rf_type ==RF_1T1R ) { rf_type =RF_1T1R ; - }else if (IsSupportedVHT (psta->wireless_mode)) { -if (psta->ra_mask &0xffc00000 ) - rf_type =RF_2T2R ; }else if (IsSupportedHT (psta->wireless_mode)) {if (psta->ra_mask &0xfff00000 ) rf_type =RF_2T2R ;
@@ -67,7 +64,6 @@ u8 networktype_to_raid_ex(struct adapter *adapter, struct sta_info *psta)case WIRELESS_11B : raid =RATEID_IDX_B ;break ; -case WIRELESS_11A :case WIRELESS_11G : raid =RATEID_IDX_G ;break ;
@@ -75,8 +71,6 @@ u8 networktype_to_raid_ex(struct adapter *adapter, struct sta_info *psta) raid =RATEID_IDX_BG ;break ;case WIRELESS_11_24N : -case WIRELESS_11_5N : -case WIRELESS_11A_5N :case WIRELESS_11G_24N :if (rf_type ==RF_2T2R ) raid =RATEID_IDX_GN_N2SS ;
@@ -827,7 +821,7 @@ void WMMOnAssocRsp(struct adapter *padapter)AIFS = aSifsTime + (2 * pmlmeinfo->slotTime); -if (pmlmeext->cur_wireless_mode & (WIRELESS_11G |WIRELESS_11A )) { +if (pmlmeext->cur_wireless_mode &WIRELESS_11G ) { ECWMin =4 ; ECWMax =10 ; }else if (pmlmeext->cur_wireless_mode &WIRELESS_11B ) {
@@ -1623,7 +1617,7 @@ void update_capinfo(struct adapter *Adapter, u16 updateCap) pmlmeinfo->slotTime =NON_SHORT_SLOT_TIME ; }else {/* Filen: See 802.11-2007 p.90 */ -if (pmlmeext->cur_wireless_mode & (WIRELESS_11_24N |WIRELESS_11A |WIRELESS_11_5N |WIRELESS_11AC )) { +if (pmlmeext->cur_wireless_mode & (WIRELESS_11_24N )) { pmlmeinfo->slotTime =SHORT_SLOT_TIME ; }else if (pmlmeext->cur_wireless_mode & (WIRELESS_11G )) {if ((updateCap & cShortSlotTime)/* && (!(pMgntInfo->pHTInfo->RT2RT_HT_Mode & RT_HT_CAP_USE_LONG_PREAMBLE)) */ )
@@ -1653,9 +1647,7 @@ void update_wireless_mode(struct adapter *padapter)if ((pmlmeinfo->HT_info_enable) && (pmlmeinfo->HT_caps_enable)) pmlmeinfo->HT_enable =1 ; -if (pmlmeinfo->VHT_enable) - network_type =WIRELESS_11AC ; -else if (pmlmeinfo->HT_enable) +if (pmlmeinfo->HT_enable) network_type =WIRELESS_11_24N ;if (rtw_is_cckratesonly_included (rate))
drivers/staging/rtl8723bs/hal/odm.c +0 -30
@@ -377,7 +377,6 @@ u32 ODM_Get_Rate_Bitmap(break ;case (ODM_WM_G ): -case (ODM_WM_A ):if (rssi_level ==DM_RATR_STA_HIGH ) rate_bitmap =0x00000f00 ;else
@@ -396,7 +395,6 @@ u32 ODM_Get_Rate_Bitmap(case (ODM_WM_B |ODM_WM_G |ODM_WM_N24G ):case (ODM_WM_B |ODM_WM_N24G ):case (ODM_WM_G |ODM_WM_N24G ): -case (ODM_WM_A |ODM_WM_N5G ):if (pDM_Odm->RFType ==ODM_1T2R || pDM_Odm->RFType ==ODM_1T1R ) {if (rssi_level ==DM_RATR_STA_HIGH ) rate_bitmap =0x000f0000 ;
@@ -422,34 +420,6 @@ u32 ODM_Get_Rate_Bitmap( }break ; -case (ODM_WM_AC |ODM_WM_G ): -if (rssi_level ==1 ) - rate_bitmap =0xfc3f0000 ; -else if (rssi_level ==2 ) - rate_bitmap =0xfffff000 ; -else - rate_bitmap =0xffffffff ; -break ; - -case (ODM_WM_AC |ODM_WM_A ): - -if (pDM_Odm->RFType ==RF_1T1R ) { -if (rssi_level ==1 )/* add by Gary for ac-series */ - rate_bitmap =0x003f8000 ; -else if (rssi_level ==2 ) - rate_bitmap =0x003ff000 ; -else - rate_bitmap =0x003ff010 ; - }else { -if (rssi_level ==1 )/* add by Gary for ac-series */ - rate_bitmap =0xfe3f8000 ;/* VHT 2SS MCS3~9 */ -else if (rssi_level ==2 ) - rate_bitmap =0xfffff000 ;/* VHT 2SS MCS0~9 */ -else - rate_bitmap =0xfffff010 ;/* All */ - } -break ; -default :if (pDM_Odm->RFType ==RF_1T2R ) rate_bitmap =0x000fffff ;
drivers/staging/rtl8723bs/hal/odm.h +0 -3
@@ -455,11 +455,8 @@ enum { /* tag_Wireless_Mode_Definition */ODM_WM_UNKNOWN =0x0 ,ODM_WM_B =BIT0 ,ODM_WM_G =BIT1 , -ODM_WM_A =BIT2 ,ODM_WM_N24G =BIT3 , -ODM_WM_N5G =BIT4 , ODM_WM_AUTO = BIT5, - ODM_WM_AC = BIT6, };/* ODM_CMNINFO_BAND */
drivers/staging/rtl8723bs/hal/odm_EdcaTurboCheck.c +1 -3
@@ -124,12 +124,10 @@ void odm_EdcaTurboCheckCE(void *pDM_VOID) }else if ((iot_peer ==HT_IOT_PEER_CISCO ) && ((wirelessmode ==ODM_WM_G ) || (wirelessmode == (ODM_WM_B |ODM_WM_G )) || - (wirelessmode ==ODM_WM_A ) || (wirelessmode ==ODM_WM_B ))) {EDCA_BE_DL = edca_setting_DL_GMode[iot_peer]; }else if ((iot_peer ==HT_IOT_PEER_AIRGO ) && - ((wirelessmode ==ODM_WM_G ) || - (wirelessmode ==ODM_WM_A ))) { + (wirelessmode ==ODM_WM_G )) {EDCA_BE_DL =0xa630 ; }else if (iot_peer ==HT_IOT_PEER_MARVELL ) {EDCA_BE_DL = edca_setting_DL[iot_peer];
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -5
@@ -512,8 +512,6 @@ static void _InitOperationMode(struct adapter *padapter)case WIRELESS_MODE_B : regBwOpMode =BW_OPMODE_20MHZ ;break ; -case WIRELESS_MODE_A : -break ;case WIRELESS_MODE_G : regBwOpMode =BW_OPMODE_20MHZ ;break ;
@@ -525,9 +523,6 @@ static void _InitOperationMode(struct adapter *padapter)/* CCK rate will be filtered out only when associated AP does not support it. */ regBwOpMode =BW_OPMODE_20MHZ ;break ; -case WIRELESS_MODE_N_5G : - regBwOpMode =BW_OPMODE_5G ; -break ;default :/* for MacOSX compiler warning. */ break ;
drivers/staging/rtl8723bs/include/hal_phy.h +0 -3
@@ -51,13 +51,10 @@ enum rf_path {enum wireless_mode {WIRELESS_MODE_UNKNOWN =0x00 , -WIRELESS_MODE_A =0x01 ,WIRELESS_MODE_B =0x02 ,WIRELESS_MODE_G =0x04 ,WIRELESS_MODE_AUTO =0x08 ,WIRELESS_MODE_N_24G =0x10 , -WIRELESS_MODE_N_5G =0x20 , -WIRELESS_MODE_AC_5G =0x40 ,WIRELESS_MODE_AC_24G =0x80 ,WIRELESS_MODE_AC_ONLY =0x100 , };
drivers/staging/rtl8723bs/include/ieee80211.h +3 -19
@@ -144,33 +144,20 @@ enum network_type {/* Sub-Element */ WIRELESS_11B =BIT (0 ),/* tx: cck only , rx: cck only, hw: cck */ WIRELESS_11G =BIT (1 ),/* tx: ofdm only, rx: ofdm & cck, hw: cck & ofdm */ -WIRELESS_11A =BIT (2 ),/* tx: ofdm only, rx: ofdm only, hw: ofdm only */ WIRELESS_11_24N =BIT (3 ),/* tx: MCS only, rx: MCS & cck, hw: MCS & cck */ -WIRELESS_11_5N =BIT (4 ),/* tx: MCS only, rx: MCS & ofdm, hw: ofdm only */ WIRELESS_AUTO =BIT (5 ), -WIRELESS_11AC =BIT (6 ),/* Combination */ /* Type for current wireless mode */ WIRELESS_11BG = (WIRELESS_11B |WIRELESS_11G ),/* tx: cck & ofdm, rx: cck & ofdm & MCS, hw: cck & ofdm */ WIRELESS_11G_24N = (WIRELESS_11G |WIRELESS_11_24N ),/* tx: ofdm & MCS, rx: ofdm & cck & MCS, hw: cck & ofdm */ -WIRELESS_11A_5N = (WIRELESS_11A |WIRELESS_11_5N ),/* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */ WIRELESS_11B_24N = (WIRELESS_11B |WIRELESS_11_24N ),/* tx: ofdm & cck & MCS, rx: ofdm & cck & MCS, hw: ofdm & cck */ WIRELESS_11BG_24N = (WIRELESS_11B|WIRELESS_11G|WIRELESS_11_24N), /* tx: ofdm & cck & MCS, rx: ofdm & cck & MCS, hw: ofdm & cck */ -WIRELESS_11_24AC = (WIRELESS_11G |WIRELESS_11AC ), -WIRELESS_11_5AC = (WIRELESS_11A |WIRELESS_11AC ), - - -/* Type for registry default wireless mode */ -WIRELESS_11AGN = (WIRELESS_11A |WIRELESS_11G |WIRELESS_11_24N |WIRELESS_11_5N ),/* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */ -WIRELESS_11ABGN = (WIRELESS_11A |WIRELESS_11B |WIRELESS_11G |WIRELESS_11_24N |WIRELESS_11_5N ), -WIRELESS_MODE_24G = (WIRELESS_11B |WIRELESS_11G |WIRELESS_11_24N |WIRELESS_11AC ), - WIRELESS_MODE_MAX = (WIRELESS_11A|WIRELESS_11B|WIRELESS_11G|WIRELESS_11_24N|WIRELESS_11_5N|WIRELESS_11AC), };#define SUPPORTED_24G_NETTYPE_MSK (WIRELESS_11B | WIRELESS_11G | WIRELESS_11_24N) -#define IsLegacyOnly (NetType) ((NetType) == ((NetType) & (WIRELESS_11BG|WIRELESS_11A))) +#define IsLegacyOnly (NetType) ((NetType) == ((NetType) & (WIRELESS_11BG)))#define IsSupported24G (NetType) ((NetType) & SUPPORTED_24G_NETTYPE_MSK ? true : false)
@@ -182,11 +169,8 @@ enum network_type {#define IsSupportedRxHT (NetType) IsEnableHWOFDM(NetType)#define IsSupportedTxCCK (NetType) (((NetType) & (WIRELESS_11B)) ? true : false) -#define IsSupportedTxOFDM (NetType) (((NetType) & (WIRELESS_11G|WIRELESS_11A)) ? true : false) -#define IsSupportedHT (NetType) (((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N)) ? true : false) - -#define IsSupportedVHT (NetType) (((NetType) & (WIRELESS_11AC)) ? true : false) - +#define IsSupportedTxOFDM (NetType) (((NetType) & (WIRELESS_11G) ? true : false) +#define IsSupportedHT (NetType) (((NetType) & (WIRELESS_11_24N)) ? true : false)struct ieee_param {u32 cmd;
drivers/staging/rtl8723bs/include/wifi.h +0 -1
@@ -336,7 +336,6 @@ static inline int IsFrameTypeCtrl(unsigned char *pframe)#define _PRE_ALLOCICVHDR_ 5#define _PRE_ALLOCMICHDR_ 6 -#define _SIFSTIME_ ((priv->pmib->dot11BssType.net_work_type&WIRELESS_11A)?16:10)#define _ACKCTSLNG_ 14/* 14 bytes long, including crclng */ #define _CRCLNG_ 4
drivers/staging/rtl8723bs/os_dep/os_intfs.c +1 -1
@@ -22,7 +22,7 @@ static int rtw_lbkmode;/* RTL8712_AIR_TRX; */static int rtw_network_mode = Ndis802_11IBSS;/* Ndis802_11Infrastructure;infra, ad-hoc, auto */ /* struct ndis_802_11_ssid ssid; */ static int rtw_channel =1 ;/* ad-hoc support requirement */ -static int rtw_wireless_mode =WIRELESS_MODE_MAX ; +static int rtw_wireless_mode =WIRELESS_11BG_24N ;static int rtw_vrtl_carrier_sense =AUTO_VCS ;static int rtw_vcs_type =RTS_CTS ;/* */ static int rtw_rts_thresh =2347 ;/* */
Signature · 1 line
2.20.1
PATCH 2/18 staging: rtl8723bs: remove code related to unsupported channel bandwidth
In reply to Fabio Aiutoremove all code related to unsupported channel bandwidth (i.e. 80, 80+80, 160 Mhz). rtl8723bs NIC works only on 20 and 40 Mhz channels.
Module parameter rtw_bw_mode can only have two
values: 0 and 1 (20 Mhz and 40Mhz). So modify the default value setting to zero the 5Ghz nibble.
Comments modified accordingly.
--- .../staging/rtl8723bs/core/rtw_wlan_util.c | 15 +------- drivers/staging/rtl8723bs/core/rtw_xmit.c | 5 +-- .../staging/rtl8723bs/hal/hal_com_phycfg.c | 34 ------------------- drivers/staging/rtl8723bs/hal/odm.h | 3 -- drivers/staging/rtl8723bs/hal/odm_DIG.c | 2 -- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 31 ++--------------- .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 33 +----------------- drivers/staging/rtl8723bs/include/drv_types.h | 8 +++-- drivers/staging/rtl8723bs/include/rtw_rf.h | 4 --- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 10 +++--- 10 files changed, 17 insertions(+), 128 deletions(-)
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +1 -14
@@ -336,9 +336,7 @@ u8 rtw_get_center_ch(u8 channel, u8 chnl_bw, u8 chnl_offset) {u8 center_ch = channel; -if (chnl_bw ==CHANNEL_WIDTH_80 ) { - center_ch =7 ; - }else if (chnl_bw ==CHANNEL_WIDTH_40 ) { +if (chnl_bw ==CHANNEL_WIDTH_40 ) {if (chnl_offset ==HAL_PRIME_CHNL_OFFSET_LOWER ) center_ch = channel +2 ;else
@@ -375,14 +373,6 @@ void set_channel_bwmode(struct adapter *padapter, unsigned char channel, unsigne center_ch =rtw_get_center_ch (channel, bwmode, channel_offset); -if (bwmode ==CHANNEL_WIDTH_80 ) { -if (center_ch > channel) - chnl_offset80 =HAL_PRIME_CHNL_OFFSET_LOWER ; -else if (center_ch < channel) - chnl_offset80 =HAL_PRIME_CHNL_OFFSET_UPPER ; -else - chnl_offset80 =HAL_PRIME_CHNL_OFFSET_DONT_CARE ; - }/* set Channel */ if (mutex_lock_interruptible (&(adapter_to_dvobj (padapter)->setch_mutex)))
@@ -919,9 +909,6 @@ static void bwmode_update_check(struct adapter *padapter, struct ndis_80211_var_if (phtpriv->ht_option == false)return ; -if (pmlmeext->cur_bwmode >=CHANNEL_WIDTH_80 ) -return ; -if (pIE->Length >sizeof (struct HT_info_element ))return ;
drivers/staging/rtl8723bs/core/rtw_xmit.c +1 -4
@@ -321,15 +321,12 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)u8 query_ra_short_GI (struct sta_info *psta) { -u8 sgi = false, sgi_20m = false, sgi_40m = false, sgi_80m = false; +u8 sgi = false, sgi_20m = false, sgi_40m = false; sgi_20m = psta->htpriv.sgi_20m; sgi_40m = psta->htpriv.sgi_40m;switch (psta->bw_mode) { -case CHANNEL_WIDTH_80 : - sgi = sgi_80m; -break ;case CHANNEL_WIDTH_40 : sgi = sgi_40m;break ;
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0 -34
@@ -995,7 +995,6 @@ u8 PHY_GetTxPowerIndexBase( ) {struct hal_com_data *pHalData =GET_HAL_DATA (padapter); -u8 i =0 ;/* default set to 1S */ u8 txPower =0 ;u8 chnlIdx = (Channel-1 );
@@ -1035,18 +1034,6 @@ u8 PHY_GetTxPowerIndexBase( txPower += pHalData->BW40_24G_Diff[RFPath][TX_4S ]; } -/* Willis suggest adopt BW 40M power index while in BW 80 mode */ -else if (BandWidth ==CHANNEL_WIDTH_80 ) { -if ((MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT1SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) - txPower += pHalData->BW40_24G_Diff[RFPath][TX_1S ]; -if ((MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT2SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) - txPower += pHalData->BW40_24G_Diff[RFPath][TX_2S ]; -if ((MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT3SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) - txPower += pHalData->BW40_24G_Diff[RFPath][TX_3S ]; -if ((MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT4SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) - txPower += pHalData->BW40_24G_Diff[RFPath][TX_4S ]; - - } }else {/* 3 ============================== 5 G ============================== */ if (MGN_6M <= Rate) txPower = pHalData->Index5G_BW40_Base[RFPath][chnlIdx];
@@ -1076,23 +1063,6 @@ u8 PHY_GetTxPowerIndexBase(if ((MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT4SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) txPower += pHalData->BW40_5G_Diff[RFPath][TX_4S ]; - }else if (BandWidth ==CHANNEL_WIDTH_80 ) {/* BW80-1S, BW80-2S */ -/* <20121220, Kordan> Get the index of array "Index5G_BW80_Base". */ -u8 channel5G_80M[CHANNEL_MAX_NUMBER_5G_80M ] = {42 ,58 ,106 ,122 ,138 ,155 ,171 }; -for (i =0 ; i <ARRAY_SIZE (channel5G_80M); ++i) -if (channel5G_80M[i] == Channel) - chnlIdx = i; - - txPower = pHalData->Index5G_BW80_Base[RFPath][chnlIdx]; - -if ((MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT1SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) - txPower += + pHalData->BW80_5G_Diff[RFPath][TX_1S ]; -if ((MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT2SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) - txPower += pHalData->BW80_5G_Diff[RFPath][TX_2S ]; -if ((MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT3SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) - txPower += pHalData->BW80_5G_Diff[RFPath][TX_3S ]; -if ((MGN_MCS23 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT4SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) - txPower += pHalData->BW80_5G_Diff[RFPath][TX_4S ]; } }
@@ -1512,10 +1482,6 @@ static s16 get_bandwidth_idx(const enum channel_width bandwidth)return 0 ;case CHANNEL_WIDTH_40 :return 1 ; -case CHANNEL_WIDTH_80 : -return 2 ; -case CHANNEL_WIDTH_160 : -return 3 ;default :return -1 ; }
drivers/staging/rtl8723bs/hal/odm.h +0 -3
@@ -471,9 +471,6 @@ enum { /* tag_Band_Type_Definition */enum {/* tag_Bandwidth_Definition */ ODM_BW20M =0 ,ODM_BW40M =1 , -ODM_BW80M =2 , -ODM_BW160M =3 , -ODM_BW10M =4 , };/* ODM_CMNINFO_BOARD_TYPE */
drivers/staging/rtl8723bs/hal/odm_DIG.c +0 -2
@@ -230,8 +230,6 @@ void odm_Adaptivity(void *pDM_VOID, u8 IGI) IGI_target = pDM_Odm->IGI_Base; else if (*pDM_Odm->pBandWidth == ODM_BW40M) IGI_target = pDM_Odm->IGI_Base +2 ; - else if (*pDM_Odm->pBandWidth == ODM_BW80M) - IGI_target = pDM_Odm->IGI_Base +2 ; else IGI_target = pDM_Odm->IGI_Base; pDM_Odm->IGI_target = (u8 ) IGI_target;
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +3 -28
@@ -2509,15 +2509,8 @@ u8 BWMapping_8723B(struct adapter *Adapter, struct pkt_attrib *pattrib)u8 BWSettingOfDesc =0 ;struct hal_com_data *pHalData =GET_HAL_DATA (Adapter); -if (pHalData->CurrentChannelBW ==CHANNEL_WIDTH_80 ) { -if (pattrib->bwmode ==CHANNEL_WIDTH_80 ) - BWSettingOfDesc =2 ; -else if (pattrib->bwmode ==CHANNEL_WIDTH_40 ) - BWSettingOfDesc =1 ; -else - BWSettingOfDesc =0 ; - }else if (pHalData->CurrentChannelBW ==CHANNEL_WIDTH_40 ) { -if ((pattrib->bwmode ==CHANNEL_WIDTH_40 ) || (pattrib->bwmode ==CHANNEL_WIDTH_80 )) +if (pHalData->CurrentChannelBW ==CHANNEL_WIDTH_40 ) { +if (pattrib->bwmode ==CHANNEL_WIDTH_40 ) BWSettingOfDesc =1 ;else BWSettingOfDesc =0 ;
@@ -2535,25 +2528,7 @@ u8 SCMapping_8723B(struct adapter *Adapter, struct pkt_attrib *pattrib)u8 SCSettingOfDesc =0 ;struct hal_com_data *pHalData =GET_HAL_DATA (Adapter); -if (pHalData->CurrentChannelBW ==CHANNEL_WIDTH_80 ) { -if (pattrib->bwmode ==CHANNEL_WIDTH_80 ) { - SCSettingOfDesc =VHT_DATA_SC_DONOT_CARE ; - }else if (pattrib->bwmode ==CHANNEL_WIDTH_40 ) { -if (pHalData->nCur80MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER ) - SCSettingOfDesc =VHT_DATA_SC_40_LOWER_OF_80MHZ ; -else if (pHalData->nCur80MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER ) - SCSettingOfDesc =VHT_DATA_SC_40_UPPER_OF_80MHZ ; - }else { -if ((pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER ) && (pHalData->nCur80MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER )) - SCSettingOfDesc =VHT_DATA_SC_20_LOWEST_OF_80MHZ ; -else if ((pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER ) && (pHalData->nCur80MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER )) - SCSettingOfDesc =VHT_DATA_SC_20_LOWER_OF_80MHZ ; -else if ((pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER ) && (pHalData->nCur80MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER )) - SCSettingOfDesc =VHT_DATA_SC_20_UPPER_OF_80MHZ ; -else if ((pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER ) && (pHalData->nCur80MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER )) - SCSettingOfDesc =VHT_DATA_SC_20_UPPERST_OF_80MHZ ; - } - }else if (pHalData->CurrentChannelBW ==CHANNEL_WIDTH_40 ) { +if (pHalData->CurrentChannelBW ==CHANNEL_WIDTH_40 ) {if (pattrib->bwmode ==CHANNEL_WIDTH_40 ) { SCSettingOfDesc =VHT_DATA_SC_DONOT_CARE ; }else if (pattrib->bwmode ==CHANNEL_WIDTH_20 ) {
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +1 -32
@@ -609,11 +609,6 @@ static void phy_SetRegBW_8723B(rtw_write16 (Adapter,REG_TRXPTCL_CTL_8723B , (u2tmp &0xFEFF ));/* BIT 7 = 1, BIT 8 = 0 */ break ; -case CHANNEL_WIDTH_80 : - u2tmp = RegRfMod_BW |BIT8 ; -rtw_write16 (Adapter,REG_TRXPTCL_CTL_8723B , (u2tmp &0xFF7F ));/* BIT 7 = 0, BIT 8 = 1 */ -break ; -default :break ; }
@@ -624,33 +619,7 @@ static u8 phy_GetSecondaryChnl_8723B(struct adapter *Adapter)u8 SCSettingOf40 =0 , SCSettingOf20 =0 ;struct hal_com_data *pHalData =GET_HAL_DATA (Adapter); -if (pHalData->CurrentChannelBW ==CHANNEL_WIDTH_80 ) { -if (pHalData->nCur80MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER ) - SCSettingOf40 =VHT_DATA_SC_40_LOWER_OF_80MHZ ; -else if (pHalData->nCur80MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER ) - SCSettingOf40 =VHT_DATA_SC_40_UPPER_OF_80MHZ ; - -if ( - (pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER ) && - (pHalData->nCur80MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER ) - ) - SCSettingOf20 =VHT_DATA_SC_20_LOWEST_OF_80MHZ ; -else if ( - (pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER ) && - (pHalData->nCur80MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER ) - ) - SCSettingOf20 =VHT_DATA_SC_20_LOWER_OF_80MHZ ; -else if ( - (pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER ) && - (pHalData->nCur80MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER ) - ) - SCSettingOf20 =VHT_DATA_SC_20_UPPER_OF_80MHZ ; -else if ( - (pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER ) && - (pHalData->nCur80MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER ) - ) - SCSettingOf20 =VHT_DATA_SC_20_UPPERST_OF_80MHZ ; - }else if (pHalData->CurrentChannelBW ==CHANNEL_WIDTH_40 ) { +if (pHalData->CurrentChannelBW ==CHANNEL_WIDTH_40 ) {if (pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER ) SCSettingOf20 =VHT_DATA_SC_20_UPPER_OF_80MHZ ;else if (pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER )
drivers/staging/rtl8723bs/include/drv_types.h +5 -3
@@ -108,9 +108,11 @@ struct registry_priv {struct wlan_bssid_ex dev_network;u8 ht_enable; -/* 0: 20 MHz, 1: 40 MHz, 2: 80 MHz, 3: 160MHz */ -/* 2.4G use bit 0 ~ 3, 5G use bit 4 ~ 7 */ -/* 0x21 means enable 2.4G 40MHz & 5G 80MHz */ +/* +* 0: 20 MHz, 1: 40 MHz +* 2.4G use bit 0 ~ 3 +* 0x01 means enable 2.4G 40MHz +*/ u8 bw_mode;u8 ampdu_enable;/* for tx */ u8 rx_stbc;
drivers/staging/rtl8723bs/include/rtw_rf.h +0 -4
@@ -83,10 +83,6 @@ enum {enum channel_width {CHANNEL_WIDTH_20 =0 ,CHANNEL_WIDTH_40 =1 , -CHANNEL_WIDTH_80 =2 , -CHANNEL_WIDTH_160 =3 , -CHANNEL_WIDTH_80_80 =4 , -CHANNEL_WIDTH_MAX =5 , };/* Represent Extension Channel Offset in HT Capabilities */
drivers/staging/rtl8723bs/os_dep/os_intfs.c +6 -4
@@ -65,10 +65,12 @@ static int rtw_uapsd_acvi_en;static int rtw_uapsd_acvo_en;int rtw_ht_enable =1 ; -/* 0: 20 MHz, 1: 40 MHz, 2: 80 MHz, 3: 160MHz, 4: 80+80MHz */ -/* 2.4G use bit 0 ~ 3, 5G use bit 4 ~ 7 */ -/* 0x21 means enable 2.4G 40MHz & 5G 80MHz */ -static int rtw_bw_mode =0x21 ; +/* +* 0: 20 MHz, 1: 40 MHz +* 2.4G use bit 0 ~ 3 +* 0x01 means enable 2.4G 40MHz +*/ +static int rtw_bw_mode =0x01 ;static int rtw_ampdu_enable =1 ;/* for enable tx_ampdu ,0: disable, 0x1:enable (but wifi_spec should be 0), 0x2: force enable (don't care wifi_spec) */ static int rtw_rx_stbc =1 ;/* 0: disable, 1:enable 2.4g */ static int rtw_ampdu_amsdu;/* 0: disabled, 1:enabled, 2:auto . There is an IOT issu with DLINK DIR-629 when the flag turn on */
Signature · 1 line
2.20.1
PATCH 3/18 staging: rtl8723bs: remove unused enum items related to channel bonding
In reply to Fabio Aiutoremove unused enum items related to channel bonding.
--- drivers/staging/rtl8723bs/include/rtw_rf.h | 8 -------- 1 file changed, 8 deletions(-)
drivers/staging/rtl8723bs/include/rtw_rf.h +0 -8
@@ -98,14 +98,6 @@ enum {VHT_DATA_SC_DONOT_CARE =0 ,VHT_DATA_SC_20_UPPER_OF_80MHZ =1 , VHT_DATA_SC_20_LOWER_OF_80MHZ = 2, -VHT_DATA_SC_20_UPPERST_OF_80MHZ =3 , -VHT_DATA_SC_20_LOWEST_OF_80MHZ =4 , -VHT_DATA_SC_20_RECV1 =5 , -VHT_DATA_SC_20_RECV2 =6 , -VHT_DATA_SC_20_RECV3 =7 , -VHT_DATA_SC_20_RECV4 =8 , -VHT_DATA_SC_40_UPPER_OF_80MHZ =9 , - VHT_DATA_SC_40_LOWER_OF_80MHZ = 10, };/* 2007/11/15 MH Define different RF type. */
Signature · 1 line
2.20.1
PATCH 4/18 staging: rtl8723bs: rename enum items related to channel bonding
In reply to Fabio Aiutosince rtl8723bs card allows only 20Mhz and 40Mhz channels, rename enum items related to channel bonding accordingly to the only composite channel bandwidth allowed in 2.4Ghz (i.e. 40Mhz) in a HT context (since VHT isn't supported)
Example:
VHT_DATA_SC_20_LOWER_OF_80MHZ ->
HT_DATA_SC_LOWER_OF_40MHZ
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 10 +++++----- drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 4 ++-- drivers/staging/rtl8723bs/include/rtw_rf.h | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +5 -5
@@ -2530,18 +2530,18 @@ u8 SCMapping_8723B(struct adapter *Adapter, struct pkt_attrib *pattrib)if (pHalData->CurrentChannelBW ==CHANNEL_WIDTH_40 ) {if (pattrib->bwmode ==CHANNEL_WIDTH_40 ) { - SCSettingOfDesc =VHT_DATA_SC_DONOT_CARE ; + SCSettingOfDesc =HT_DATA_SC_DONOT_CARE ; }else if (pattrib->bwmode ==CHANNEL_WIDTH_20 ) {if (pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER ) { - SCSettingOfDesc =VHT_DATA_SC_20_UPPER_OF_80MHZ ; + SCSettingOfDesc =HT_DATA_SC_20_UPPER_OF_40MHZ ; }else if (pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER ) { - SCSettingOfDesc =VHT_DATA_SC_20_LOWER_OF_80MHZ ; + SCSettingOfDesc =HT_DATA_SC_20_LOWER_OF_40MHZ ; }else { - SCSettingOfDesc =VHT_DATA_SC_DONOT_CARE ; + SCSettingOfDesc =HT_DATA_SC_DONOT_CARE ; } } }else { - SCSettingOfDesc =VHT_DATA_SC_DONOT_CARE ; + SCSettingOfDesc =HT_DATA_SC_DONOT_CARE ; }return SCSettingOfDesc;
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +2 -2
@@ -621,9 +621,9 @@ static u8 phy_GetSecondaryChnl_8723B(struct adapter *Adapter)if (pHalData->CurrentChannelBW ==CHANNEL_WIDTH_40 ) {if (pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_UPPER ) - SCSettingOf20 =VHT_DATA_SC_20_UPPER_OF_80MHZ ; + SCSettingOf20 =HT_DATA_SC_20_UPPER_OF_40MHZ ;else if (pHalData->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER ) - SCSettingOf20 =VHT_DATA_SC_20_LOWER_OF_80MHZ ; + SCSettingOf20 =HT_DATA_SC_20_LOWER_OF_40MHZ ; }return (SCSettingOf40 <<4 ) | SCSettingOf20;
drivers/staging/rtl8723bs/include/rtw_rf.h +3 -3
@@ -95,9 +95,9 @@ enum extchnl_offset { };enum { -VHT_DATA_SC_DONOT_CARE =0 , -VHT_DATA_SC_20_UPPER_OF_80MHZ =1 , -VHT_DATA_SC_20_LOWER_OF_80MHZ =2 , +HT_DATA_SC_DONOT_CARE =0 , +HT_DATA_SC_20_UPPER_OF_40MHZ =1 , +HT_DATA_SC_20_LOWER_OF_40MHZ =2 , };/* 2007/11/15 MH Define different RF type. */
Signature · 1 line
2.20.1
PATCH 5/18 staging: rtl8723bs: remove 5Ghz field in struct registry_priv
In reply to Fabio Aiutoremove unused 5Ghz field in struct registry_priv.
--- drivers/staging/rtl8723bs/include/drv_types.h | 2 -- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 1 - 2 files changed, 3 deletions(-)
drivers/staging/rtl8723bs/include/drv_types.h +0 -2
@@ -171,9 +171,7 @@ struct registry_priv {u8 RegPowerBase;u8 RegPwrTblSel;s8 TxBBSwing_2G; -s8 TxBBSwing_5G;u8 AmplifierType_2G; -u8 AmplifierType_5G;u8 bEn_RFE;u8 RFE_Type;u8 check_fw_ps;
drivers/staging/rtl8723bs/os_dep/os_intfs.c +0 -1
@@ -289,7 +289,6 @@ static void loadparam(struct adapter *padapter, struct net_device *pnetdev) registry_par->RegPowerBase =14 ; registry_par->TxBBSwing_2G =0xFF ; - registry_par->TxBBSwing_5G =0xFF ; registry_par->bEn_RFE =1 ; registry_par->RFE_Type =64 ;
Signature · 1 line
2.20.1
PATCH 6/18 staging: rtl8723bs: remove struct rt_channel_plan_5g
In reply to Fabio Aiutoremove struct rt_channel_plan_5g, for rtl8723bs works only on 2.4Ghz band.
--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 58 +------------------ .../staging/rtl8723bs/include/rtw_mlme_ext.h | 5 -- drivers/staging/rtl8723bs/include/rtw_rf.h | 15 ++--- 3 files changed, 8 insertions(+), 70 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +2 -56
@@ -79,46 +79,6 @@ static struct rt_channel_plan_2g RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = { {{}, 0}, /* 0x06, RT_CHANNEL_DOMAIN_2G_NULL */ }; -static struct rt_channel_plan_5g RTW_ChannelPlan5G[RT_CHANNEL_DOMAIN_5G_MAX ] = { - {{},0 },/* 0x00, RT_CHANNEL_DOMAIN_5G_NULL */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,100 ,104 ,108 ,112 ,116 ,120 ,124 ,128 ,132 ,136 ,140 },19 },/* 0x01, RT_CHANNEL_DOMAIN_5G_ETSI1 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,100 ,104 ,108 ,112 ,116 ,120 ,124 ,128 ,132 ,136 ,140 ,149 ,153 ,157 ,161 ,165 },24 },/* 0x02, RT_CHANNEL_DOMAIN_5G_ETSI2 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,100 ,104 ,108 ,112 ,116 ,120 ,124 ,128 ,132 ,149 ,153 ,157 ,161 ,165 },22 },/* 0x03, RT_CHANNEL_DOMAIN_5G_ETSI3 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,100 ,104 ,108 ,112 ,116 ,120 ,124 ,128 ,132 ,136 ,140 ,149 ,153 ,157 ,161 ,165 },24 },/* 0x04, RT_CHANNEL_DOMAIN_5G_FCC1 */ - {{36 ,40 ,44 ,48 ,149 ,153 ,157 ,161 ,165 },9 },/* 0x05, RT_CHANNEL_DOMAIN_5G_FCC2 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,149 ,153 ,157 ,161 ,165 },13 },/* 0x06, RT_CHANNEL_DOMAIN_5G_FCC3 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,149 ,153 ,157 ,161 },12 },/* 0x07, RT_CHANNEL_DOMAIN_5G_FCC4 */ - {{149 ,153 ,157 ,161 ,165 },5 },/* 0x08, RT_CHANNEL_DOMAIN_5G_FCC5 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 },8 },/* 0x09, RT_CHANNEL_DOMAIN_5G_FCC6 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,100 ,104 ,108 ,112 ,116 ,136 ,140 ,149 ,153 ,157 ,161 ,165 },20 },/* 0x0A, RT_CHANNEL_DOMAIN_5G_FCC7_IC1 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,100 ,104 ,108 ,112 ,116 ,120 ,124 ,149 ,153 ,157 ,161 ,165 },20 },/* 0x0B, RT_CHANNEL_DOMAIN_5G_KCC1 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,100 ,104 ,108 ,112 ,116 ,120 ,124 ,128 ,132 ,136 ,140 },19 },/* 0x0C, RT_CHANNEL_DOMAIN_5G_MKK1 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 },8 },/* 0x0D, RT_CHANNEL_DOMAIN_5G_MKK2 */ - {{100 ,104 ,108 ,112 ,116 ,120 ,124 ,128 ,132 ,136 ,140 },11 },/* 0x0E, RT_CHANNEL_DOMAIN_5G_MKK3 */ - {{56 ,60 ,64 ,100 ,104 ,108 ,112 ,116 ,136 ,140 ,149 ,153 ,157 ,161 ,165 },15 },/* 0x0F, RT_CHANNEL_DOMAIN_5G_NCC1 */ - {{56 ,60 ,64 ,149 ,153 ,157 ,161 ,165 },8 },/* 0x10, RT_CHANNEL_DOMAIN_5G_NCC2 */ - {{149 ,153 ,157 ,161 ,165 },5 },/* 0x11, RT_CHANNEL_DOMAIN_5G_NCC3 */ - {{36 ,40 ,44 ,48 },4 },/* 0x12, RT_CHANNEL_DOMAIN_5G_ETSI4 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,100 ,104 ,108 ,112 ,116 ,136 ,140 ,149 ,153 ,157 ,161 ,165 },20 },/* 0x13, RT_CHANNEL_DOMAIN_5G_ETSI5 */ - {{149 ,153 ,157 ,161 },4 },/* 0x14, RT_CHANNEL_DOMAIN_5G_FCC8 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 },8 },/* 0x15, RT_CHANNEL_DOMAIN_5G_ETSI6 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,149 ,153 ,157 ,161 ,165 },13 },/* 0x16, RT_CHANNEL_DOMAIN_5G_ETSI7 */ - {{36 ,40 ,44 ,48 ,149 ,153 ,157 ,161 ,165 },9 },/* 0x17, RT_CHANNEL_DOMAIN_5G_ETSI8 */ - {{100 ,104 ,108 ,112 ,116 ,120 ,124 ,128 ,132 ,136 ,140 },11 },/* 0x18, RT_CHANNEL_DOMAIN_5G_ETSI9 */ - {{149 ,153 ,157 ,161 ,165 },5 },/* 0x19, RT_CHANNEL_DOMAIN_5G_ETSI10 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,132 ,136 ,140 ,149 ,153 ,157 ,161 ,165 },16 },/* 0x1A, RT_CHANNEL_DOMAIN_5G_ETSI11 */ - {{52 ,56 ,60 ,64 ,100 ,104 ,108 ,112 ,116 ,132 ,136 ,140 ,149 ,153 ,157 ,161 ,165 },17 },/* 0x1B, RT_CHANNEL_DOMAIN_5G_NCC4 */ - {{149 ,153 ,157 ,161 },4 },/* 0x1C, RT_CHANNEL_DOMAIN_5G_ETSI12 */ - {{36 ,40 ,44 ,48 ,100 ,104 ,108 ,112 ,116 ,132 ,136 ,140 ,149 ,153 ,157 ,161 ,165 },17 },/* 0x1D, RT_CHANNEL_DOMAIN_5G_FCC9 */ - {{36 ,40 ,44 ,48 ,100 ,104 ,108 ,112 ,116 ,132 ,136 ,140 },12 },/* 0x1E, RT_CHANNEL_DOMAIN_5G_ETSI13 */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,100 ,104 ,108 ,112 ,116 ,132 ,136 ,140 ,149 ,153 ,157 ,161 },20 },/* 0x1F, RT_CHANNEL_DOMAIN_5G_FCC10 */ - -/* Driver self defined for old channel plan Compatible , Remember to modify if have new channel plan definition ===== */ - {{36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,100 ,104 ,108 ,112 ,116 ,132 ,136 ,140 ,149 ,153 ,157 ,161 ,165 },21 },/* 0x20, RT_CHANNEL_DOMAIN_5G_FCC */ - {{36 ,40 ,44 ,48 },4 },/* 0x21, RT_CHANNEL_DOMAIN_5G_JAPAN_NO_DFS */ - {{36 ,40 ,44 ,48 ,149 ,153 ,157 ,161 },8 },/* 0x22, RT_CHANNEL_DOMAIN_5G_FCC4_NO_DFS */ -}; -static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX ] = {/* 0x00 ~ 0x1F , Old Define ===== */ {0x02 ,0x20 },/* 0x00, RT_CHANNEL_DOMAIN_FCC */
@@ -393,8 +353,8 @@ static void init_channel_list(struct adapter *padapter, struct rt_channel_info *static u8 init_channel_set (struct adapter *padapter,u8 ChannelPlan,struct rt_channel_info *channel_set) {u8 index, chanset_size =0 ; -u8 b5GBand = false, b2_4GBand = false; -u8 Index2G =0 , Index5G =0 ; +u8 b2_4GBand = false; +u8 Index2G =0 ;memset (channel_set,0 ,sizeof (struct rt_channel_info )*MAX_CHANNEL_NUM );
@@ -433,20 +393,6 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_c } } -if (b5GBand) { -for (index =0 ; index < RTW_ChannelPlan5G[Index5G].Len; index++) { -if (RTW_ChannelPlan5G[Index5G].Channel[index] <=48 - || RTW_ChannelPlan5G[Index5G].Channel[index] >=149 ) { - channel_set[chanset_size].ChannelNum = RTW_ChannelPlan5G[Index5G].Channel[index]; -if (RT_CHANNEL_DOMAIN_WORLD_WIDE_5G == ChannelPlan)/* passive scan for all 5G channels */ - channel_set[chanset_size].ScanType =SCAN_PASSIVE ; -else - channel_set[chanset_size].ScanType =SCAN_ACTIVE ; - chanset_size++; - } - } - } -return chanset_size; }
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h +0 -5
@@ -248,11 +248,6 @@ struct rt_channel_plan_2g {unsigned char Len; }; -struct rt_channel_plan_5g { -unsigned char Channel[MAX_CHANNEL_NUM_5G ]; -unsigned char Len; -}; -struct rt_channel_plan_map {unsigned char Index2G;unsigned char Index5G;
drivers/staging/rtl8723bs/include/rtw_rf.h +6 -9
@@ -21,16 +21,13 @@#define RTL8711_RF_MAX_SENS 6#define RTL8711_RF_DEF_SENS 4 -/* */ -/* We now define the following channels as the max channels in each channel plan. */ -/* 2G, total 14 chnls */ -/* {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14} */ -/* 5G, total 24 chnls */ -/* {36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, -* 124, 128, 132, 136, 140, 149, 153, 157, 161, 165} */ +/* +* We now define the following channels as the max channels in each channel plan. +* 2G, total 14 chnls +* {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14} +*/ #define MAX_CHANNEL_NUM_2G 14 -#define MAX_CHANNEL_NUM_5G 24 -#define MAX_CHANNEL_NUM 38/* 14+24 */ +#define MAX_CHANNEL_NUM 14#define NUM_REGULATORYS 1
Signature · 1 line
2.20.1
PATCH 7/18 staging: rtl8723bs: remove all branchings between 2.4Ghz and 5Ghz band types
In reply to Fabio Aiutoremove all code branchings tied to dual band support. The device works only on 2.4Ghz band so there's no need to check which band we are on. Removed all code branches that would be valid only for 5Ghz for it's dead code. Removed enums, table fields indexing by band type, function arguments passing current band type and all other thing related to telling us which band we are on.
--- .../staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 4 +- .../staging/rtl8723bs/hal/HalBtc8723b2Ant.c | 5 +- drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 1 - .../staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 17 +- .../staging/rtl8723bs/hal/HalHWImg8723B_RF.c | 518 +++++++------ .../staging/rtl8723bs/hal/HalPhyRf_8723B.c | 2 +- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 - .../staging/rtl8723bs/hal/hal_com_phycfg.c | 720 +++++------------- drivers/staging/rtl8723bs/hal/odm.c | 8 - drivers/staging/rtl8723bs/hal/odm.h | 11 - .../rtl8723bs/hal/odm_RegConfig8723B.c | 5 +- .../rtl8723bs/hal/odm_RegConfig8723B.h | 2 - drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 1 - .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 6 +- .../rtl8723bs/include/hal_com_phycfg.h | 10 +- drivers/staging/rtl8723bs/include/hal_data.h | 34 +- drivers/staging/rtl8723bs/include/hal_phy.h | 7 - 17 files changed, 488 insertions(+), 867 deletions(-)
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c +1 -3
@@ -2222,7 +2222,6 @@ void EXhalbtc8723b1ant_DisplayCoexInfo(struct btc_coexist *pBtCoexist)bool bRoam = false;bool bScan = false;bool bLink = false; -bool bWifiUnder5G = false;bool bWifiUnderBMode = false;bool bBtHsOn = false;bool bWifiBusy = false;
@@ -2344,7 +2343,6 @@ void EXhalbtc8723b1ant_DisplayCoexInfo(struct btc_coexist *pBtCoexist) );CL_PRINTF (cliBuf); - pBtCoexist->fBtcGet (pBtCoexist,BTC_GET_BL_WIFI_UNDER_5G , &bWifiUnder5G); pBtCoexist->fBtcGet (pBtCoexist,BTC_GET_U4_WIFI_BW , &wifiBw); pBtCoexist->fBtcGet (pBtCoexist,BTC_GET_BL_WIFI_BUSY , &bWifiBusy); pBtCoexist->fBtcGet(
@@ -2358,7 +2356,7 @@ void EXhalbtc8723b1ant_DisplayCoexInfo(struct btc_coexist *pBtCoexist) cliBuf,BT_TMP_BUF_SIZE ,"\r\n %-35s = %s / %s/ %s/ AP =%d/ %s " ,"Wifi status" , - (bWifiUnder5G ?"5G" :"2.4G" ), + ("2.4G" ), ((bWifiUnderBMode) ?"11b" : ((wifiBw ==BTC_WIFI_BW_LEGACY ) ?"11bg" : (((wifiBw ==BTC_WIFI_BW_HT40 ) ?"HT40" :"HT20" )))), ((!bWifiBusy) ?"idle" : ((wifiTrafficDir ==BTC_WIFI_TRAFFIC_TX ) ?"uplink" :"downlink" )), pCoexSta->nScanAPNum,
drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c +2 -3
@@ -2431,7 +2431,7 @@ void EXhalbtc8723b2ant_DisplayCoexInfo(struct btc_coexist *pBtCoexist)u8 *cliBuf = pBtCoexist->cliBuf;u8 u1Tmp[4 ], i, btInfoExt, psTdmaCase =0 ;u32 u4Tmp[4 ]; -bool bRoam = false, bScan = false, bLink = false, bWifiUnder5G = false; +bool bRoam = false, bScan = false, bLink = false;bool bBtHsOn = false, bWifiBusy = false;s32 wifiRssi =0 , btHsRssi =0 ;u32 wifiBw, wifiTrafficDir, faOfdm, faCck;
@@ -2522,7 +2522,6 @@ void EXhalbtc8723b2ant_DisplayCoexInfo(struct btc_coexist *pBtCoexist) );CL_PRINTF (cliBuf); - pBtCoexist->fBtcGet (pBtCoexist,BTC_GET_BL_WIFI_UNDER_5G , &bWifiUnder5G); pBtCoexist->fBtcGet (pBtCoexist,BTC_GET_U4_WIFI_BW , &wifiBw); pBtCoexist->fBtcGet (pBtCoexist,BTC_GET_BL_WIFI_BUSY , &bWifiBusy); pBtCoexist->fBtcGet (pBtCoexist,BTC_GET_U4_WIFI_TRAFFIC_DIRECTION , &wifiTrafficDir);
@@ -2530,7 +2529,7 @@ void EXhalbtc8723b2ant_DisplayCoexInfo(struct btc_coexist *pBtCoexist) cliBuf,BT_TMP_BUF_SIZE ,"\r\n %-35s = %s / %s/ %s " ,"Wifi status" , \ - (bWifiUnder5G ?"5G" :"2.4G" ), + ("2.4G" ), ((BTC_WIFI_BW_LEGACY == wifiBw) ?"Legacy" : (((BTC_WIFI_BW_HT40 == wifiBw) ?"HT40" :"HT20" ))), ((!bWifiBusy) ?"idle" : ((BTC_WIFI_TRAFFIC_TX == wifiTrafficDir) ?"uplink" :"downlink" )) );
drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h +0 -1
@@ -142,7 +142,6 @@ enum {BTC_GET_BL_WIFI_LINK ,BTC_GET_BL_WIFI_ROAM ,BTC_GET_BL_WIFI_4_WAY_PROGRESS , -BTC_GET_BL_WIFI_UNDER_5G ,BTC_GET_BL_WIFI_AP_MODE_ENABLE ,BTC_GET_BL_WIFI_ENABLE_ENCRYPTION , BTC_GET_BL_WIFI_UNDER_B_MODE,
drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c +8 -9
@@ -543,12 +543,12 @@ void ODM_ReadAndConfig_MP_8723B_PHY_REG(struct dm_odm_t *pDM_Odm)******************************************************************************/ static u32 Array_MP_8723B_PHY_REG_PG[] = { -0 ,0 ,0 ,0x00000e08 ,0x0000ff00 ,0x00003800 , -0 ,0 ,0 ,0x0000086c ,0xffffff00 ,0x32343600 , -0 ,0 ,0 ,0x00000e00 ,0xffffffff ,0x40424444 , -0 ,0 ,0 ,0x00000e04 ,0xffffffff ,0x28323638 , -0 ,0 ,0 ,0x00000e10 ,0xffffffff ,0x38404244 , -0 ,0 ,0 ,0x00000e14 ,0xffffffff ,0x26303436 +0 ,0 ,0x00000e08 ,0x0000ff00 ,0x00003800 , +0 ,0 ,0x0000086c ,0xffffff00 ,0x32343600 , +0 ,0 ,0x00000e00 ,0xffffffff ,0x40424444 , +0 ,0 ,0x00000e04 ,0xffffffff ,0x28323638 , +0 ,0 ,0x00000e10 ,0xffffffff ,0x38404244 , +0 ,0 ,0x00000e14 ,0xffffffff ,0x26303436 };void ODM_ReadAndConfig_MP_8723B_PHY_REG_PG (struct dm_odm_t *pDM_Odm)
@@ -559,14 +559,13 @@ void ODM_ReadAndConfig_MP_8723B_PHY_REG_PG(struct dm_odm_t *pDM_Odm) pDM_Odm->PhyRegPgVersion =1 ; pDM_Odm->PhyRegPgValueType =PHY_REG_PG_EXACT_VALUE ; -for (i =0 ; i <ARRAY_SIZE (Array_MP_8723B_PHY_REG_PG); i +=6 ) { +for (i =0 ; i <ARRAY_SIZE (Array_MP_8723B_PHY_REG_PG); i +=5 ) {u32 v1 = Array[i];u32 v2 = Array[i+1 ];u32 v3 = Array[i+2 ];u32 v4 = Array[i+3 ];u32 v5 = Array[i+4 ]; -u32 v6 = Array[i+5 ]; -odm_ConfigBB_PHY_REG_PG_8723B (pDM_Odm, v1, v2, v3, v4, v5, v6); +odm_ConfigBB_PHY_REG_PG_8723B (pDM_Odm, v1, v2, v3, v4, v5); } }
drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c +258 -260
535 lines not on this page · raw message
drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c +1 -1
@@ -69,7 +69,7 @@ static void setIqkMatrix_8723B( ele_D = (OFDMSwingTable_New[OFDM_index] &0xFFC00000 )>>22 ;/* new element A = element D x X */ -if ((IqkResult_X !=0 ) && (*(pDM_Odm->pBandType) ==ODM_BAND_2_4G )) { +if (IqkResult_X !=0 ) {if ((IqkResult_X &0x00000200 ) !=0 )/* consider minus */ IqkResult_X = IqkResult_X |0xFFFFFC00 ; ele_A = ((IqkResult_X * ele_D)>>8 )&0x000003FF ;
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0 -4
@@ -368,10 +368,6 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf) *pu8 = false;break ; -case BTC_GET_BL_WIFI_UNDER_5G : - *pu8 = pHalData->CurrentBandType ==1 ; -break ; -case BTC_GET_BL_WIFI_AP_MODE_ENABLE : *pu8 =check_fwstate (&padapter->mlmepriv,WIFI_AP_STATE );break ;
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +210 -510
965 lines not on this page · raw message
drivers/staging/rtl8723bs/hal/odm.c +0 -8
@@ -972,10 +972,6 @@ void ODM_CmnInfoHook(struct dm_odm_t *pDM_Odm, enum odm_cmninfo_e CmnInfo, void pDM_Odm->pwirelessmode = pValue;break ; -case ODM_CMNINFO_BAND : - pDM_Odm->pBandType = pValue; -break ; -case ODM_CMNINFO_SEC_CHNL_OFFSET : pDM_Odm->pSecChOffset = pValue;break ;
@@ -1183,10 +1179,6 @@ void ODM_CmnInfoUpdate(struct dm_odm_t *pDM_Odm, u32 CmnInfo, u64 Value) pDM_Odm->WirelessMode = (u8 )Value;break ; -case ODM_CMNINFO_BAND : - pDM_Odm->BandType = (u8 )Value; -break ; -case ODM_CMNINFO_SEC_CHNL_OFFSET : pDM_Odm->SecChOffset = (u8 )Value;break ;
drivers/staging/rtl8723bs/hal/odm.h +0 -11
@@ -315,7 +315,6 @@ enum odm_cmninfo_e {ODM_CMNINFO_TX_UNI ,ODM_CMNINFO_RX_UNI ,ODM_CMNINFO_WM_MODE ,/* ODM_WIRELESS_MODE_E */ -ODM_CMNINFO_BAND ,/* ODM_BAND_TYPE_E */ ODM_CMNINFO_SEC_CHNL_OFFSET ,/* ODM_SEC_CHNL_OFFSET_E */ ODM_CMNINFO_SEC_MODE ,/* ODM_SECURITY_E */ ODM_CMNINFO_BW, /* ODM_BW_E */
@@ -459,14 +458,6 @@ enum { /* tag_Wireless_Mode_Definition */ ODM_WM_AUTO = BIT5, }; -/* ODM_CMNINFO_BAND */ -enum {/* tag_Band_Type_Definition */ -ODM_BAND_2_4G =0 , -ODM_BAND_5G , -ODM_BAND_ON_BOTH , -ODM_BANDMAX -}; -/* ODM_CMNINFO_BW */ enum {/* tag_Bandwidth_Definition */ ODM_BW20M =0 ,
@@ -788,8 +779,6 @@ struct dm_odm_t { /* DM_Out_Source_Dynamic_Mechanism_Structure */u64 *pNumRxBytesUnicast;/* Wireless mode B/G/A/N = BIT0/BIT1/BIT2/BIT3 */ u8 *pwirelessmode;/* ODM_WIRELESS_MODE_E */ -/* Frequence band 2.4G/5G = 0/1 */ -u8 *pBandType;/* Secondary channel offset don't_care/below/above = 0/1/2 */ u8 *pSecChOffset;/* Security mode Open/WEP/AES/TKIP = 0/1/2/3 */
drivers/staging/rtl8723bs/hal/odm_RegConfig8723B.c +1 -4
@@ -117,7 +117,6 @@ void odm_ConfigBB_AGC_8723B( void odm_ConfigBB_PHY_REG_PG_8723B( struct dm_odm_t *pDM_Odm, - u32 Band, u32 RfPath, u32 TxNum, u32 Addr,
@@ -128,7 +127,7 @@ void odm_ConfigBB_PHY_REG_PG_8723B(if (Addr ==0xfe || Addr ==0xffe )msleep (50 );else { -PHY_StoreTxPowerByRate (pDM_Odm->Adapter, Band, RfPath, TxNum, Addr, Bitmask, Data); +PHY_StoreTxPowerByRate (pDM_Odm->Adapter, RfPath, TxNum, Addr, Bitmask, Data); } }
@@ -162,7 +161,6 @@ void odm_ConfigBB_PHY_8723B( void odm_ConfigBB_TXPWR_LMT_8723B( struct dm_odm_t *pDM_Odm, u8 *Regulation, - u8 *Band, u8 *Bandwidth, u8 *RateSection, u8 *RfPath,
@@ -173,7 +171,6 @@ void odm_ConfigBB_TXPWR_LMT_8723B( PHY_SetTxPowerLimit( pDM_Odm->Adapter, Regulation, - Band, Bandwidth, RateSection, RfPath,
drivers/staging/rtl8723bs/hal/odm_RegConfig8723B.h +0 -2
@@ -25,7 +25,6 @@ void odm_ConfigBB_AGC_8723B(struct dm_odm_t *pDM_Odm, ); void odm_ConfigBB_PHY_REG_PG_8723B(struct dm_odm_t *pDM_Odm, - u32 Band, u32 RfPath, u32 TxNum, u32 Addr,
@@ -41,7 +40,6 @@ void odm_ConfigBB_PHY_8723B(struct dm_odm_t *pDM_Odm, void odm_ConfigBB_TXPWR_LMT_8723B(struct dm_odm_t *pDM_Odm, u8 *Regulation, - u8 *Band, u8 *Bandwidth, u8 *RateSection, u8 *RfPath,
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +0 -1
@@ -109,7 +109,6 @@ static void Update_ODM_ComInfo_8723b(struct adapter *Adapter)ODM_CmnInfoHook (pDM_Odm,ODM_CMNINFO_CHNL , &(pHalData->CurrentChannel));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_BAND , &(pHalData->CurrentBandType));ODM_CmnInfoHook (pDM_Odm,ODM_CMNINFO_FORCED_IGI_LB , &(pHalData->u1ForcedIgiLb));ODM_CmnInfoHook (pDM_Odm,ODM_CMNINFO_FORCED_RATE , &(pHalData->ForcedDataRate));
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +2 -4
@@ -546,15 +546,13 @@ u8 PHY_GetTxPowerIndex( {struct hal_com_data *pHalData =GET_HAL_DATA (padapter);s8 txPower =0 , powerDiffByRate =0 , limit =0 ; -bool bIn24G = false; - txPower = (s8 )PHY_GetTxPowerIndexBase (padapter, RFPath, Rate, BandWidth, Channel, &bIn24G); - powerDiffByRate =PHY_GetTxPowerByRate (padapter,BAND_ON_2_4G ,ODM_RF_PATH_A ,RF_1TX , Rate); + txPower = (s8 )PHY_GetTxPowerIndexBase (padapter, RFPath, Rate, BandWidth, Channel); + powerDiffByRate =PHY_GetTxPowerByRate (padapter,ODM_RF_PATH_A ,RF_1TX , Rate); limit = phy_get_tx_pwr_lmt( padapter, padapter->registrypriv.RegPwrTblSel, - (u8)(!bIn24G), pHalData->CurrentChannelBW, RFPath, Rate,
drivers/staging/rtl8723bs/include/hal_com_phycfg.h +2 -8
@@ -73,7 +73,6 @@ struct bb_register_def {u8 PHY_GetTxPowerByRateBase (struct adapter *Adapter, -u8 Band,u8 RfPath,u8 TxNum, enum rate_section RateSection
@@ -113,7 +112,6 @@ u8 RateSections8 PHY_GetTxPowerByRate (struct adapter *padapter, -u8 Band,u8 RFPath,u8 TxNum, u8 RateIndex
@@ -122,7 +120,6 @@ u8 RateIndex void PHY_SetTxPowerByRate( struct adapter *padapter, -u8 Band, u8 RFPath, u8 TxNum, u8 Rate,
@@ -154,7 +151,6 @@ struct adapter *padapter void PHY_StoreTxPowerByRate( struct adapter *padapter, -u32 Band, u32 RfPath, u32 TxNum, u32 RegAddr,
@@ -173,12 +169,11 @@ struct adapter *padapter,u8 RFPath, u8 Rate, enum channel_width BandWidth, -u8 Channel, - bool *bIn24G +u8 Channel );s8 phy_get_tx_pwr_lmt (struct adapter *adapter,u32 RegPwrTblSel, -enum band_type Band,enum channel_width Bandwidth, +enum channel_width Bandwidth,u8 RfPath,u8 DataRate, u8 Channel
@@ -188,7 +183,6 @@ voidPHY_SetTxPowerLimit ( struct adapter *Adapter, u8 *Regulation, -u8 *Band, u8 *Bandwidth, u8 *RateSection, u8 *RfPath,
drivers/staging/rtl8723bs/include/hal_data.h +3 -31
@@ -59,8 +59,6 @@ enum rt_ampdu_burst {#define MAX_5G_BANDWIDTH_NUM 4#define MAX_BASE_NUM_IN_PHY_REG_PG_2_4G 10/* CCK:1, OFDM:1, HT:4, VHT:4 */ -#define MAX_BASE_NUM_IN_PHY_REG_PG_5G 9/* OFDM:1, HT:4, VHT:4 */ -/* duplicate code, will move to ODM ######### */ /* define IQK_MAC_REG_NUM 4 */
@@ -182,8 +180,6 @@ struct hal_com_data {/* current WIFI_PHY values */ enum wireless_mode CurrentWirelessMode;enum channel_width CurrentChannelBW; -enum band_type CurrentBandType;/* 0:2.4G, 1:5G */ -enum band_type BandSet;u8 CurrentChannel;u8 CurrentCenterFrequencyIndex1;u8 nCur40MhzPrimeSC;/* Control channel sub-carrier */
@@ -236,13 +232,6 @@ struct hal_com_data {s8 OFDM_24G_Diff[MAX_RF_PATH ][MAX_TX_COUNT ];s8 BW20_24G_Diff[MAX_RF_PATH ][MAX_TX_COUNT ];s8 BW40_24G_Diff[MAX_RF_PATH ][MAX_TX_COUNT ]; -/* 3 [5G] */ -u8 Index5G_BW40_Base[MAX_RF_PATH ][CHANNEL_MAX_NUMBER ]; -u8 Index5G_BW80_Base[MAX_RF_PATH ][CHANNEL_MAX_NUMBER_5G_80M ]; -s8 OFDM_5G_Diff[MAX_RF_PATH ][MAX_TX_COUNT ]; -s8 BW20_5G_Diff[MAX_RF_PATH ][MAX_TX_COUNT ]; -s8 BW40_5G_Diff[MAX_RF_PATH ][MAX_TX_COUNT ]; -s8 BW80_5G_Diff[MAX_RF_PATH ][MAX_TX_COUNT ];u8 Regulation2_4G;u8 Regulation5G;
@@ -253,15 +242,13 @@ struct hal_com_data {/* TX power by rate table at most 4RF path. */ /* The register is */ /* VHT TX power by rate off setArray = */ -/* Band:-2G&5G = 0 / 1 */ /* RF: at most 4*4 = ABCD = 0/1/2/3 */ /* CCK = 0 OFDM = 1/2 HT-MCS 0-15 =3/4/56 VHT =7/8/9/10/11 */ u8 TxPwrByRateTable;u8 TxPwrByRateBand; -s8 TxPwrByRateOffset[TX_PWR_BY_RATE_NUM_BAND ] - [TX_PWR_BY_RATE_NUM_RF ] - [TX_PWR_BY_RATE_NUM_RF ] - [TX_PWR_BY_RATE_NUM_RATE ]; +s8 TxPwrByRateOffset[TX_PWR_BY_RATE_NUM_RF ] + [TX_PWR_BY_RATE_NUM_RF ] + [TX_PWR_BY_RATE_NUM_RATE ];/* */ /* 2 Power Limit Table */
@@ -278,21 +265,10 @@ struct hal_com_data { [CHANNEL_MAX_NUMBER_2G ] [MAX_RF_PATH_NUM ]; -/* Power Limit Table for 5G */ -s8 TxPwrLimit_5G[MAX_REGULATION_NUM ] - [MAX_5G_BANDWIDTH_NUM ] - [MAX_RATE_SECTION_NUM ] - [CHANNEL_MAX_NUMBER_5G ] - [MAX_RF_PATH_NUM ]; - -/* Store the original power by rate value of the base of each rate section of rf path A & B */ u8 TxPwrByRateBase2_4G[TX_PWR_BY_RATE_NUM_RF ] [TX_PWR_BY_RATE_NUM_RF ] [MAX_BASE_NUM_IN_PHY_REG_PG_2_4G ]; -u8 TxPwrByRateBase5G[TX_PWR_BY_RATE_NUM_RF ] - [TX_PWR_BY_RATE_NUM_RF ] - [MAX_BASE_NUM_IN_PHY_REG_PG_5G ];/* For power group */ u8 PwrGroupHT20[RF_PATH_MAX_92C_88E ][CHANNEL_MAX_NUMBER ];
@@ -319,13 +295,9 @@ struct hal_com_data {u32 AntennaRxPath;/* Antenna path Rx */ u8 PAType_2G; -u8 PAType_5G;u8 LNAType_2G; -u8 LNAType_5G;u8 ExternalPA_2G;u8 ExternalLNA_2G; -u8 ExternalPA_5G; -u8 ExternalLNA_5G;u8 TypeGLNA;u8 TypeGPA;u8 TypeALNA;
drivers/staging/rtl8723bs/include/hal_phy.h +0 -7
@@ -17,13 +17,6 @@/*--------------------------Define Parameters-------------------------------*/ -enum band_type { -BAND_ON_2_4G =0 , -BAND_ON_5G , -BAND_ON_BOTH , -BANDMAX -}; -enum {RF_TYPE_MIN =0 ,/* 0 */ RF_8225 =1 ,/* 1 11b/g RF for verification only */
Signature · 1 line
2.20.1
PATCH 8/18 staging: rtl8723bs: beautify prototypes in include/hal_com_phycfg.h
In reply to Fabio Aiutobeautify function prototypes in incldue/hal_com_phycfg.h in order to ease grep searches.
--- .../rtl8723bs/include/hal_com_phycfg.h | 188 +++++------------- 1 file changed, 48 insertions(+), 140 deletions(-)
drivers/staging/rtl8723bs/include/hal_com_phycfg.h +48 -140
@@ -70,147 +70,55 @@ struct bb_register_def { }; -u8 -PHY_GetTxPowerByRateBase ( -struct adapter *Adapter, -u8 RfPath, -u8 TxNum, -enum rate_section RateSection - ); - -u8 -PHY_GetRateSectionIndexOfTxPowerByRate ( -struct adapter *padapter, -u32 RegAddr, -u32 BitMask - ); - -void -PHY_GetRateValuesOfTxPowerByRate ( -struct adapter *padapter, -u32 RegAddr, -u32 BitMask, -u32 Value, -u8 *RateIndex, -s8 *PwrByRateVal, -u8 *RateNum - ); - -u8 -PHY_GetRateIndexOfTxPowerByRate ( -u8 Rate - ); - -void -PHY_SetTxPowerIndexByRateSection ( -struct adapter *padapter, -u8 RFPath, -u8 Channel, -u8 RateSection - ); - -s8 -PHY_GetTxPowerByRate ( -struct adapter *padapter, -u8 RFPath, -u8 TxNum, -u8 RateIndex - ); - -void -PHY_SetTxPowerByRate ( -struct adapter *padapter, -u8 RFPath, -u8 TxNum, -u8 Rate, -s8 Value - ); - -void -PHY_SetTxPowerLevelByPath ( -struct adapter *Adapter, -u8 channel, -u8 path - ); - -void -PHY_SetTxPowerIndexByRateArray ( -struct adapter *padapter, -u8 RFPath, -enum channel_width BandWidth, -u8 Channel, -u8 *Rates, -u8 RateArraySize - ); - -void -PHY_InitTxPowerByRate ( -struct adapter *padapter - ); - -void -PHY_StoreTxPowerByRate ( -struct adapter *padapter, -u32 RfPath, -u32 TxNum, -u32 RegAddr, -u32 BitMask, -u32 Data - ); - -void -PHY_TxPowerByRateConfiguration ( -struct adapter *padapter - ); - -u8 -PHY_GetTxPowerIndexBase ( -struct adapter *padapter, -u8 RFPath, -u8 Rate, -enum channel_width BandWidth, -u8 Channel - ); +u8 PHY_GetTxPowerByRateBase (struct adapter *Adapter,u8 RfPath,u8 TxNum, +enum rate_section RateSection); + +u8 PHY_GetRateSectionIndexOfTxPowerByRate (struct adapter *padapter,u32 RegAddr, +u32 BitMask); + +void PHY_GetRateValuesOfTxPowerByRate (struct adapter *padapter,u32 RegAddr, +u32 BitMask,u32 Value,u8 *RateIndex, +s8 *PwrByRateVal,u8 *RateNum); + +u8 PHY_GetRateIndexOfTxPowerByRate (u8 Rate); + +void PHY_SetTxPowerIndexByRateSection (struct adapter *padapter,u8 RFPath,u8 Channel, +u8 RateSection); + +s8 PHY_GetTxPowerByRate (struct adapter *padapter,u8 RFPath,u8 TxNum,u8 RateIndex); + +void PHY_SetTxPowerByRate (struct adapter *padapter,u8 RFPath,u8 TxNum,u8 Rate, +s8 Value); + +void PHY_SetTxPowerLevelByPath (struct adapter *Adapter,u8 channel,u8 path); + +void PHY_SetTxPowerIndexByRateArray (struct adapter *padapter,u8 RFPath, +enum channel_width BandWidth,u8 Channel, +u8 *Rates,u8 RateArraySize); + +void PHY_InitTxPowerByRate (struct adapter *padapter); + +void PHY_StoreTxPowerByRate (struct adapter *padapter,u32 RfPath,u32 TxNum, +u32 RegAddr,u32 BitMask,u32 Data); + +void PHY_TxPowerByRateConfiguration (struct adapter *padapter); + +u8 PHY_GetTxPowerIndexBase (struct adapter *padapter,u8 RFPath,u8 Rate, +enum channel_width BandWidth,u8 Channel);s8 phy_get_tx_pwr_lmt (struct adapter *adapter,u32 RegPwrTblSel, -enum channel_width Bandwidth, -u8 RfPath, -u8 DataRate, -u8 Channel - ); - -void -PHY_SetTxPowerLimit ( -struct adapter *Adapter, -u8 *Regulation, -u8 *Bandwidth, -u8 *RateSection, -u8 *RfPath, -u8 *Channel, -u8 *PowerLimit - ); - -void -PHY_ConvertTxPowerLimitToPowerIndex ( -struct adapter *Adapter - ); - -void -PHY_InitTxPowerLimit ( -struct adapter *Adapter - ); - -s8 -PHY_GetTxPowerTrackingOffset ( -struct adapter *padapter, -u8 Rate, -u8 RFPath - ); - -void -Hal_ChannelPlanToRegulation ( -struct adapter *Adapter, -u16 ChannelPlan - ); +enum channel_width Bandwidth,u8 RfPath,u8 DataRate, +u8 Channel); + +void PHY_SetTxPowerLimit (struct adapter *Adapter,u8 *Regulation,u8 *Bandwidth, +u8 *RateSection,u8 *RfPath,u8 *Channel,u8 *PowerLimit); + +void PHY_ConvertTxPowerLimitToPowerIndex (struct adapter *Adapter); + +void PHY_InitTxPowerLimit (struct adapter *Adapter); + +s8 PHY_GetTxPowerTrackingOffset (struct adapter *padapter,u8 Rate,u8 RFPath); + +void Hal_ChannelPlanToRegulation (struct adapter *Adapter,u16 ChannelPlan);#endif /* __HAL_COMMON_H__ */
Signature · 1 line
2.20.1
PATCH 9/18 staging: rtl8723bs: remove 5Ghz code related to channel plan definition
In reply to Fabio Aiutoremove 5Ghz code related to channel plan definition.
--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 214 ++++++++---------- .../staging/rtl8723bs/hal/hal_com_phycfg.c | 34 --- drivers/staging/rtl8723bs/include/hal_data.h | 6 +- .../staging/rtl8723bs/include/rtw_mlme_ext.h | 47 +--- .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 - .../staging/rtl8723bs/os_dep/ioctl_linux.c | 1 - 6 files changed, 97 insertions(+), 207 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +94 -120
@@ -81,93 +81,93 @@ static struct rt_channel_plan_2g RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = {static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX ] = {/* 0x00 ~ 0x1F , Old Define ===== */ - {0x02 ,0x20 },/* 0x00, RT_CHANNEL_DOMAIN_FCC */ - {0x02 ,0x0A },/* 0x01, RT_CHANNEL_DOMAIN_IC */ - {0x01 ,0x01 },/* 0x02, RT_CHANNEL_DOMAIN_ETSI */ - {0x01 ,0x00 },/* 0x03, RT_CHANNEL_DOMAIN_SPAIN */ - {0x01 ,0x00 },/* 0x04, RT_CHANNEL_DOMAIN_FRANCE */ - {0x03 ,0x00 },/* 0x05, RT_CHANNEL_DOMAIN_MKK */ - {0x03 ,0x00 },/* 0x06, RT_CHANNEL_DOMAIN_MKK1 */ - {0x01 ,0x09 },/* 0x07, RT_CHANNEL_DOMAIN_ISRAEL */ - {0x03 ,0x09 },/* 0x08, RT_CHANNEL_DOMAIN_TELEC */ - {0x03 ,0x00 },/* 0x09, RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN */ - {0x00 ,0x00 },/* 0x0A, RT_CHANNEL_DOMAIN_WORLD_WIDE_13 */ - {0x02 ,0x0F },/* 0x0B, RT_CHANNEL_DOMAIN_TAIWAN */ - {0x01 ,0x08 },/* 0x0C, RT_CHANNEL_DOMAIN_CHINA */ - {0x02 ,0x06 },/* 0x0D, RT_CHANNEL_DOMAIN_SINGAPORE_INDIA_MEXICO */ - {0x02 ,0x0B },/* 0x0E, RT_CHANNEL_DOMAIN_KOREA */ - {0x02 ,0x09 },/* 0x0F, RT_CHANNEL_DOMAIN_TURKEY */ - {0x01 ,0x01 },/* 0x10, RT_CHANNEL_DOMAIN_JAPAN */ - {0x02 ,0x05 },/* 0x11, RT_CHANNEL_DOMAIN_FCC_NO_DFS */ - {0x01 ,0x21 },/* 0x12, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */ - {0x00 ,0x04 },/* 0x13, RT_CHANNEL_DOMAIN_WORLD_WIDE_5G */ - {0x02 ,0x10 },/* 0x14, RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS */ - {0x00 ,0x21 },/* 0x15, RT_CHANNEL_DOMAIN_ETSI_NO_DFS */ - {0x00 ,0x22 },/* 0x16, RT_CHANNEL_DOMAIN_KOREA_NO_DFS */ - {0x03 ,0x21 },/* 0x17, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */ - {0x06 ,0x08 },/* 0x18, RT_CHANNEL_DOMAIN_PAKISTAN_NO_DFS */ - {0x02 ,0x08 },/* 0x19, RT_CHANNEL_DOMAIN_TAIWAN2_NO_DFS */ - {0x00 ,0x00 },/* 0x1A, */ - {0x00 ,0x00 },/* 0x1B, */ - {0x00 ,0x00 },/* 0x1C, */ - {0x00 ,0x00 },/* 0x1D, */ - {0x00 ,0x00 },/* 0x1E, */ - {0x06 ,0x04 },/* 0x1F, RT_CHANNEL_DOMAIN_WORLD_WIDE_ONLY_5G */ + {0x02 },/* 0x00, RT_CHANNEL_DOMAIN_FCC */ + {0x02 },/* 0x01, RT_CHANNEL_DOMAIN_IC */ + {0x01 },/* 0x02, RT_CHANNEL_DOMAIN_ETSI */ + {0x01 },/* 0x03, RT_CHANNEL_DOMAIN_SPAIN */ + {0x01 },/* 0x04, RT_CHANNEL_DOMAIN_FRANCE */ + {0x03 },/* 0x05, RT_CHANNEL_DOMAIN_MKK */ + {0x03 },/* 0x06, RT_CHANNEL_DOMAIN_MKK1 */ + {0x01 },/* 0x07, RT_CHANNEL_DOMAIN_ISRAEL */ + {0x03 },/* 0x08, RT_CHANNEL_DOMAIN_TELEC */ + {0x03 },/* 0x09, RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN */ + {0x00 },/* 0x0A, RT_CHANNEL_DOMAIN_WORLD_WIDE_13 */ + {0x02 },/* 0x0B, RT_CHANNEL_DOMAIN_TAIWAN */ + {0x01 },/* 0x0C, RT_CHANNEL_DOMAIN_CHINA */ + {0x02 },/* 0x0D, RT_CHANNEL_DOMAIN_SINGAPORE_INDIA_MEXICO */ + {0x02 },/* 0x0E, RT_CHANNEL_DOMAIN_KOREA */ + {0x02 },/* 0x0F, RT_CHANNEL_DOMAIN_TURKEY */ + {0x01 },/* 0x10, RT_CHANNEL_DOMAIN_JAPAN */ + {0x02 },/* 0x11, RT_CHANNEL_DOMAIN_FCC_NO_DFS */ + {0x01 },/* 0x12, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */ + {0x00 },/* 0x13, RT_CHANNEL_DOMAIN_WORLD_WIDE_5G */ + {0x02 },/* 0x14, RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS */ + {0x00 },/* 0x15, RT_CHANNEL_DOMAIN_ETSI_NO_DFS */ + {0x00 },/* 0x16, RT_CHANNEL_DOMAIN_KOREA_NO_DFS */ + {0x03 },/* 0x17, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */ + {0x06 },/* 0x18, RT_CHANNEL_DOMAIN_PAKISTAN_NO_DFS */ + {0x02 },/* 0x19, RT_CHANNEL_DOMAIN_TAIWAN2_NO_DFS */ + {0x00 },/* 0x1A, */ + {0x00 },/* 0x1B, */ + {0x00 },/* 0x1C, */ + {0x00 },/* 0x1D, */ + {0x00 },/* 0x1E, */ + {0x06 },/* 0x1F, RT_CHANNEL_DOMAIN_WORLD_WIDE_ONLY_5G */ /* 0x20 ~ 0x7F , New Define ===== */ - {0x00 ,0x00 },/* 0x20, RT_CHANNEL_DOMAIN_WORLD_NULL */ - {0x01 ,0x00 },/* 0x21, RT_CHANNEL_DOMAIN_ETSI1_NULL */ - {0x02 ,0x00 },/* 0x22, RT_CHANNEL_DOMAIN_FCC1_NULL */ - {0x03 ,0x00 },/* 0x23, RT_CHANNEL_DOMAIN_MKK1_NULL */ - {0x04 ,0x00 },/* 0x24, RT_CHANNEL_DOMAIN_ETSI2_NULL */ - {0x02 ,0x04 },/* 0x25, RT_CHANNEL_DOMAIN_FCC1_FCC1 */ - {0x00 ,0x01 },/* 0x26, RT_CHANNEL_DOMAIN_WORLD_ETSI1 */ - {0x03 ,0x0C },/* 0x27, RT_CHANNEL_DOMAIN_MKK1_MKK1 */ - {0x00 ,0x0B },/* 0x28, RT_CHANNEL_DOMAIN_WORLD_KCC1 */ - {0x00 ,0x05 },/* 0x29, RT_CHANNEL_DOMAIN_WORLD_FCC2 */ - {0x00 ,0x00 },/* 0x2A, */ - {0x00 ,0x00 },/* 0x2B, */ - {0x00 ,0x00 },/* 0x2C, */ - {0x00 ,0x00 },/* 0x2D, */ - {0x00 ,0x00 },/* 0x2E, */ - {0x00 ,0x00 },/* 0x2F, */ - {0x00 ,0x06 },/* 0x30, RT_CHANNEL_DOMAIN_WORLD_FCC3 */ - {0x00 ,0x07 },/* 0x31, RT_CHANNEL_DOMAIN_WORLD_FCC4 */ - {0x00 ,0x08 },/* 0x32, RT_CHANNEL_DOMAIN_WORLD_FCC5 */ - {0x00 ,0x09 },/* 0x33, RT_CHANNEL_DOMAIN_WORLD_FCC6 */ - {0x02 ,0x0A },/* 0x34, RT_CHANNEL_DOMAIN_FCC1_FCC7 */ - {0x00 ,0x02 },/* 0x35, RT_CHANNEL_DOMAIN_WORLD_ETSI2 */ - {0x00 ,0x03 },/* 0x36, RT_CHANNEL_DOMAIN_WORLD_ETSI3 */ - {0x03 ,0x0D },/* 0x37, RT_CHANNEL_DOMAIN_MKK1_MKK2 */ - {0x03 ,0x0E },/* 0x38, RT_CHANNEL_DOMAIN_MKK1_MKK3 */ - {0x02 ,0x0F },/* 0x39, RT_CHANNEL_DOMAIN_FCC1_NCC1 */ - {0x00 ,0x00 },/* 0x3A, */ - {0x00 ,0x00 },/* 0x3B, */ - {0x00 ,0x00 },/* 0x3C, */ - {0x00 ,0x00 },/* 0x3D, */ - {0x00 ,0x00 },/* 0x3E, */ - {0x00 ,0x00 },/* 0x3F, */ - {0x02 ,0x10 },/* 0x40, RT_CHANNEL_DOMAIN_FCC1_NCC2 */ - {0x05 ,0x00 },/* 0x41, RT_CHANNEL_DOMAIN_GLOBAL_NULL */ - {0x01 ,0x12 },/* 0x42, RT_CHANNEL_DOMAIN_ETSI1_ETSI4 */ - {0x02 ,0x05 },/* 0x43, RT_CHANNEL_DOMAIN_FCC1_FCC2 */ - {0x02 ,0x11 },/* 0x44, RT_CHANNEL_DOMAIN_FCC1_NCC3 */ - {0x00 ,0x13 },/* 0x45, RT_CHANNEL_DOMAIN_WORLD_ETSI5 */ - {0x02 ,0x14 },/* 0x46, RT_CHANNEL_DOMAIN_FCC1_FCC8 */ - {0x00 ,0x15 },/* 0x47, RT_CHANNEL_DOMAIN_WORLD_ETSI6 */ - {0x00 ,0x16 },/* 0x48, RT_CHANNEL_DOMAIN_WORLD_ETSI7 */ - {0x00 ,0x17 },/* 0x49, RT_CHANNEL_DOMAIN_WORLD_ETSI8 */ - {0x00 ,0x18 },/* 0x50, RT_CHANNEL_DOMAIN_WORLD_ETSI9 */ - {0x00 ,0x19 },/* 0x51, RT_CHANNEL_DOMAIN_WORLD_ETSI10 */ - {0x00 ,0x1A },/* 0x52, RT_CHANNEL_DOMAIN_WORLD_ETSI11 */ - {0x02 ,0x1B },/* 0x53, RT_CHANNEL_DOMAIN_FCC1_NCC4 */ - {0x00 ,0x1C },/* 0x54, RT_CHANNEL_DOMAIN_WORLD_ETSI12 */ - {0x02 ,0x1D },/* 0x55, RT_CHANNEL_DOMAIN_FCC1_FCC9 */ - {0x00 ,0x1E },/* 0x56, RT_CHANNEL_DOMAIN_WORLD_ETSI13 */ - {0x02 ,0x1F },/* 0x57, RT_CHANNEL_DOMAIN_FCC1_FCC10 */ + {0x00 },/* 0x20, RT_CHANNEL_DOMAIN_WORLD_NULL */ + {0x01 },/* 0x21, RT_CHANNEL_DOMAIN_ETSI1_NULL */ + {0x02 },/* 0x22, RT_CHANNEL_DOMAIN_FCC1_NULL */ + {0x03 },/* 0x23, RT_CHANNEL_DOMAIN_MKK1_NULL */ + {0x04 },/* 0x24, RT_CHANNEL_DOMAIN_ETSI2_NULL */ + {0x02 },/* 0x25, RT_CHANNEL_DOMAIN_FCC1_FCC1 */ + {0x00 },/* 0x26, RT_CHANNEL_DOMAIN_WORLD_ETSI1 */ + {0x03 },/* 0x27, RT_CHANNEL_DOMAIN_MKK1_MKK1 */ + {0x00 },/* 0x28, RT_CHANNEL_DOMAIN_WORLD_KCC1 */ + {0x00 },/* 0x29, RT_CHANNEL_DOMAIN_WORLD_FCC2 */ + {0x00 },/* 0x2A, */ + {0x00 },/* 0x2B, */ + {0x00 },/* 0x2C, */ + {0x00 },/* 0x2D, */ + {0x00 },/* 0x2E, */ + {0x00 },/* 0x2F, */ + {0x00 },/* 0x30, RT_CHANNEL_DOMAIN_WORLD_FCC3 */ + {0x00 },/* 0x31, RT_CHANNEL_DOMAIN_WORLD_FCC4 */ + {0x00 },/* 0x32, RT_CHANNEL_DOMAIN_WORLD_FCC5 */ + {0x00 },/* 0x33, RT_CHANNEL_DOMAIN_WORLD_FCC6 */ + {0x02 },/* 0x34, RT_CHANNEL_DOMAIN_FCC1_FCC7 */ + {0x00 },/* 0x35, RT_CHANNEL_DOMAIN_WORLD_ETSI2 */ + {0x00 },/* 0x36, RT_CHANNEL_DOMAIN_WORLD_ETSI3 */ + {0x03 },/* 0x37, RT_CHANNEL_DOMAIN_MKK1_MKK2 */ + {0x03 },/* 0x38, RT_CHANNEL_DOMAIN_MKK1_MKK3 */ + {0x02 },/* 0x39, RT_CHANNEL_DOMAIN_FCC1_NCC1 */ + {0x00 },/* 0x3A, */ + {0x00 },/* 0x3B, */ + {0x00 },/* 0x3C, */ + {0x00 },/* 0x3D, */ + {0x00 },/* 0x3E, */ + {0x00 },/* 0x3F, */ + {0x02 },/* 0x40, RT_CHANNEL_DOMAIN_FCC1_NCC2 */ + {0x05 },/* 0x41, RT_CHANNEL_DOMAIN_GLOBAL_NULL */ + {0x01 },/* 0x42, RT_CHANNEL_DOMAIN_ETSI1_ETSI4 */ + {0x02 },/* 0x43, RT_CHANNEL_DOMAIN_FCC1_FCC2 */ + {0x02 },/* 0x44, RT_CHANNEL_DOMAIN_FCC1_NCC3 */ + {0x00 },/* 0x45, RT_CHANNEL_DOMAIN_WORLD_ETSI5 */ + {0x02 },/* 0x46, RT_CHANNEL_DOMAIN_FCC1_FCC8 */ + {0x00 },/* 0x47, RT_CHANNEL_DOMAIN_WORLD_ETSI6 */ + {0x00 },/* 0x48, RT_CHANNEL_DOMAIN_WORLD_ETSI7 */ + {0x00 },/* 0x49, RT_CHANNEL_DOMAIN_WORLD_ETSI8 */ + {0x00 },/* 0x50, RT_CHANNEL_DOMAIN_WORLD_ETSI9 */ + {0x00 },/* 0x51, RT_CHANNEL_DOMAIN_WORLD_ETSI10 */ + {0x00 },/* 0x52, RT_CHANNEL_DOMAIN_WORLD_ETSI11 */ + {0x02 },/* 0x53, RT_CHANNEL_DOMAIN_FCC1_NCC4 */ + {0x00 },/* 0x54, RT_CHANNEL_DOMAIN_WORLD_ETSI12 */ + {0x02 },/* 0x55, RT_CHANNEL_DOMAIN_FCC1_FCC9 */ + {0x00 },/* 0x56, RT_CHANNEL_DOMAIN_WORLD_ETSI13 */ + {0x02 },/* 0x57, RT_CHANNEL_DOMAIN_FCC1_FCC10 */ };/* use the combination for max channel numbers */ -static struct rt_channel_plan_map RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03 ,0x02 }; +static struct rt_channel_plan_map RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03 };/* Search the @param ch in given @param ch_set * @ch_set: the given channel set
@@ -189,23 +189,6 @@ int rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch)return i; } -/* Check the @param ch is fit with setband setting of @param adapter -* @adapter: the given adapter -* @ch: the given channel number -* -* return true when check valid, false not valid -*/ -bool rtw_mlme_band_check (struct adapter *adapter,const u32 ch) -{ -if (adapter->setband ==GHZ24_50 /* 2.4G and 5G */ - || (adapter->setband ==GHZ_24 && ch <35 )/* 2.4G only */ - || (adapter->setband ==GHZ_50 && ch >35 )/* 5G only */ - ) { -return true; - } -return false; -} -/**************************************************************************** Following are the initialization functions for WiFi MLME
@@ -380,7 +363,6 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_celse if ((channel_set[chanset_size].ChannelNum >=12 && channel_set[chanset_size].ChannelNum <=14 )) channel_set[chanset_size].ScanType =SCAN_PASSIVE ; }else if (RT_CHANNEL_DOMAIN_WORLD_WIDE_13 == ChannelPlan || -RT_CHANNEL_DOMAIN_WORLD_WIDE_5G == ChannelPlan ||RT_CHANNEL_DOMAIN_2G_WORLD == Index2G) {/* channel 12~13, passive scan */ if (channel_set[chanset_size].ChannelNum <=11 ) channel_set[chanset_size].ScanType =SCAN_ACTIVE ;
@@ -4434,10 +4416,6 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssidwhile ((i <MAX_CHANNEL_NUM ) && (chplan_new[i].ChannelNum !=0 )) {if (chplan_new[i].ChannelNum == channel) {if (chplan_new[i].ScanType ==SCAN_PASSIVE ) { -/* 5G Bnad 2, 3 (DFS) doesn't change to active scan */ -if (channel >=52 && channel <=144 ) -break ; - chplan_new[i].ScanType =SCAN_ACTIVE ; }break ;
@@ -5557,7 +5535,6 @@ static int rtw_scan_ch_decision(struct adapter *padapter, struct rtw_ieee80211_c set_idx =rtw_ch_set_search_ch (pmlmeext->channel_set, in[i].hw_value);if (in[i].hw_value && !(in[i].flags &RTW_IEEE80211_CHAN_DISABLED ) && set_idx >=0 - &&rtw_mlme_band_check (padapter, in[i].hw_value) ) {if (j >= out_num) { netdev_dbg(padapter->pnetdev,
@@ -5581,23 +5558,20 @@ static int rtw_scan_ch_decision(struct adapter *padapter, struct rtw_ieee80211_cif (j ==0 ) {for (i =0 ; i < pmlmeext->max_chan_nums; i++) { -if (rtw_mlme_band_check (padapter, pmlmeext->channel_set[i].ChannelNum)) { - -if (j >= out_num) { -netdev_dbg (padapter->pnetdev, -FUNC_ADPT_FMT " out_num:%u not enough\n" , -FUNC_ADPT_ARG (padapter), - out_num); -break ; - } +if (j >= out_num) { +netdev_dbg (padapter->pnetdev, +FUNC_ADPT_FMT " out_num:%u not enough\n" , +FUNC_ADPT_ARG (padapter), + out_num); +break ; + } - out[j].hw_value = pmlmeext->channel_set[i].ChannelNum; + out[j].hw_value = pmlmeext->channel_set[i].ChannelNum; -if (pmlmeext->channel_set[i].ScanType ==SCAN_PASSIVE ) - out[j].flags |=RTW_IEEE80211_CHAN_PASSIVE_SCAN ; +if (pmlmeext->channel_set[i].ScanType ==SCAN_PASSIVE ) + out[j].flags |=RTW_IEEE80211_CHAN_PASSIVE_SCAN ; - j++; - } + j++; } }
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0 -34
@@ -1564,139 +1564,105 @@ void Hal_ChannelPlanToRegulation(struct adapter *Adapter, u16 ChannelPlan)break ;case RT_CHANNEL_DOMAIN_FCC1_FCC1 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_WORLD_ETSI1 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_ETSI ;break ;case RT_CHANNEL_DOMAIN_MKK1_MKK1 : pHalData->Regulation2_4G =TXPWR_LMT_MKK ; - pHalData->Regulation5G =TXPWR_LMT_MKK ;break ;case RT_CHANNEL_DOMAIN_WORLD_KCC1 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_MKK ;break ;case RT_CHANNEL_DOMAIN_WORLD_FCC2 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_WORLD_FCC3 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_WORLD_FCC4 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_WORLD_FCC5 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_WORLD_FCC6 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_FCC1_FCC7 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_WORLD_ETSI2 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_WORLD_ETSI3 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_MKK1_MKK2 : pHalData->Regulation2_4G =TXPWR_LMT_MKK ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_MKK1_MKK3 : pHalData->Regulation2_4G =TXPWR_LMT_MKK ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_FCC1_NCC1 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_FCC1_NCC2 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_GLOBAL_NULL : pHalData->Regulation2_4G =TXPWR_LMT_WW ; - pHalData->Regulation5G =TXPWR_LMT_WW ;break ;case RT_CHANNEL_DOMAIN_ETSI1_ETSI4 : pHalData->Regulation2_4G =TXPWR_LMT_ETSI ; - pHalData->Regulation5G =TXPWR_LMT_ETSI ;break ;case RT_CHANNEL_DOMAIN_FCC1_FCC2 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_FCC1_NCC3 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_WORLD_ETSI5 : pHalData->Regulation2_4G =TXPWR_LMT_ETSI ; - pHalData->Regulation5G =TXPWR_LMT_ETSI ;break ;case RT_CHANNEL_DOMAIN_FCC1_FCC8 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_WORLD_ETSI6 : pHalData->Regulation2_4G =TXPWR_LMT_ETSI ; - pHalData->Regulation5G =TXPWR_LMT_ETSI ;break ;case RT_CHANNEL_DOMAIN_WORLD_ETSI7 : pHalData->Regulation2_4G =TXPWR_LMT_ETSI ; - pHalData->Regulation5G =TXPWR_LMT_ETSI ;break ;case RT_CHANNEL_DOMAIN_WORLD_ETSI8 : pHalData->Regulation2_4G =TXPWR_LMT_ETSI ; - pHalData->Regulation5G =TXPWR_LMT_ETSI ;break ;case RT_CHANNEL_DOMAIN_WORLD_ETSI9 : pHalData->Regulation2_4G =TXPWR_LMT_ETSI ; - pHalData->Regulation5G =TXPWR_LMT_ETSI ;break ;case RT_CHANNEL_DOMAIN_WORLD_ETSI10 : pHalData->Regulation2_4G =TXPWR_LMT_ETSI ; - pHalData->Regulation5G =TXPWR_LMT_ETSI ;break ;case RT_CHANNEL_DOMAIN_WORLD_ETSI11 : pHalData->Regulation2_4G =TXPWR_LMT_ETSI ; - pHalData->Regulation5G =TXPWR_LMT_ETSI ;break ;case RT_CHANNEL_DOMAIN_FCC1_NCC4 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_WORLD_ETSI12 : pHalData->Regulation2_4G =TXPWR_LMT_ETSI ; - pHalData->Regulation5G =TXPWR_LMT_ETSI ;break ;case RT_CHANNEL_DOMAIN_FCC1_FCC9 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_WORLD_ETSI13 : pHalData->Regulation2_4G =TXPWR_LMT_ETSI ; - pHalData->Regulation5G =TXPWR_LMT_ETSI ;break ;case RT_CHANNEL_DOMAIN_FCC1_FCC10 : pHalData->Regulation2_4G =TXPWR_LMT_FCC ; - pHalData->Regulation5G =TXPWR_LMT_FCC ;break ;case RT_CHANNEL_DOMAIN_REALTEK_DEFINE :/* Realtek Reserve */ pHalData->Regulation2_4G =TXPWR_LMT_WW ; - pHalData->Regulation5G =TXPWR_LMT_WW ;break ;default :break ;
drivers/staging/rtl8723bs/include/hal_data.h +1 -5
@@ -46,17 +46,14 @@ enum rt_ampdu_burst { RT_AMPDU_BURST_8723B = 7, }; -#define CHANNEL_MAX_NUMBER (14 + 24 + 21)/* 14 is the max channel number */ +#define CHANNEL_MAX_NUMBER (14)/* 14 is the max channel number */ #define CHANNEL_MAX_NUMBER_2G 14 -#define CHANNEL_MAX_NUMBER_5G 54/* Please refer to "phy_GetChnlGroup8812A" and "Hal_ReadTxPowerInfo8812A" */ -#define CHANNEL_MAX_NUMBER_5G_80M 7#define MAX_PG_GROUP 13/* Tx Power Limit Table Size */ #define MAX_REGULATION_NUM 4#define MAX_2_4G_BANDWIDTH_NUM 4#define MAX_RATE_SECTION_NUM 10 -#define MAX_5G_BANDWIDTH_NUM 4#define MAX_BASE_NUM_IN_PHY_REG_PG_2_4G 10/* CCK:1, OFDM:1, HT:4, VHT:4 */
@@ -234,7 +231,6 @@ struct hal_com_data {s8 BW40_24G_Diff[MAX_RF_PATH ][MAX_TX_COUNT ];u8 Regulation2_4G; -u8 Regulation5G;u8 TxPwrInPercentage;
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h +2 -45
76 lines not on this page · raw message
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +0 -2
@@ -77,7 +77,6 @@ static struct ieee80211_rate rtw_rates[] = {#define RTW_G_RATES_NUM 12#define RTW_2G_CHANNELS_NUM 14 -#define RTW_5G_CHANNELS_NUM 37static struct ieee80211_channel rtw_2ghz_channels[] = {CHAN2G (1 ,2412 ,0 ),
@@ -1270,7 +1269,6 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter)/* report network only if the current channel set contains the channel to which this network belongs */ if (rtw_ch_set_search_ch (padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >=0 - &&rtw_mlme_band_check (padapter, pnetwork->network.Configuration.DSConfig) == true && true ==rtw_validate_ssid (&(pnetwork->network.Ssid)) ) {
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0 -1
@@ -1303,7 +1303,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,/* report network only if the current channel set contains the channel to which this network belongs */ if (rtw_ch_set_search_ch (padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >=0 - &&rtw_mlme_band_check (padapter, pnetwork->network.Configuration.DSConfig) == true && true ==rtw_validate_ssid (&(pnetwork->network.Ssid))) { ev =translate_scan (padapter, a, pnetwork, ev, stop);
Signature · 1 line
2.20.1
PATCH 10/18 staging: rtl8723bs: remove some unused 5Ghz macro definitions
In reply to Fabio Aiutoremove some unused 5Ghz macro definitions. Fix
comments accordingly.
--- drivers/staging/rtl8723bs/hal/odm.h | 1 - drivers/staging/rtl8723bs/include/Hal8192CPhyReg.h | 2 -- drivers/staging/rtl8723bs/include/hal_com_reg.h | 1 - drivers/staging/rtl8723bs/include/hal_pg.h | 2 -- 4 files changed, 6 deletions(-)
drivers/staging/rtl8723bs/hal/odm.h +0 -1
@@ -628,7 +628,6 @@ struct fat_t { /* _FAST_ANTENNA_TRAINNING_ */u32 MinMaxRSSI;u8 idx_AntDiv_counter_2G;u8 idx_AntDiv_counter_5G; -u32 AntDiv_2G_5G;u32 CCK_counter_main;u32 CCK_counter_aux;u32 OFDM_counter_main;
drivers/staging/rtl8723bs/include/Hal8192CPhyReg.h +0 -2
@@ -558,7 +558,6 @@#define b3WireRFPowerDown 0x1/* Useless now */ /* define bHWSISelect 0x8 */ -#define b5GPAPEPolarity 0x40000000#define b2GPAPEPolarity 0x80000000#define bRFSW_TxDefaultAnt 0x3#define bRFSW_TxOptionAnt 0x30
@@ -577,7 +576,6 @@#define bRFSI_ANTSW 0x100#define bRFSI_ANTSWB 0x200#define bRFSI_PAPE 0x400 -#define bRFSI_PAPE5G 0x800#define bBandSelect 0x1#define bHTSIG2_GI 0x80#define bHTSIG2_Smoothing 0x01
drivers/staging/rtl8723bs/include/hal_com_reg.h +0 -1
@@ -717,7 +717,6 @@ Default: 00b./* BW_OPMODE bits (Offset 0x603, 8bit) */ /* */ #define BW_OPMODE_20MHZ BIT2 -#define BW_OPMODE_5G BIT1/* */ /* CAM Config Setting (offset 0x680, 1 byte) */
drivers/staging/rtl8723bs/include/hal_pg.h +0 -2
@@ -16,10 +16,8 @@/* For VHT series TX power by rate table. */ /* VHT TX power by rate off setArray = */ -/* Band:-2G&5G = 0 / 1 */ /* RF: at most 4*4 = ABCD = 0/1/2/3 */ /* CCK = 0 OFDM = 1/2 HT-MCS 0-15 =3/4/56 VHT =7/8/9/10/11 */ -#define TX_PWR_BY_RATE_NUM_BAND 2#define TX_PWR_BY_RATE_NUM_RF 4#define TX_PWR_BY_RATE_NUM_RATE 84#define MAX_RF_PATH_NUM 2
Signature · 1 line
2.20.1
PATCH 11/18 staging: rtl8723bs: remove 5Ghz code related to RF power calibration
In reply to Fabio Aiutoremove 5Ghz code related to RF calibration. Remove table arrays, variables and macros related to RF power tracking.
--- .../staging/rtl8723bs/hal/HalHWImg8723B_RF.c | 77 ------------------- .../staging/rtl8723bs/hal/HalPhyRf_8723B.c | 17 +--- drivers/staging/rtl8723bs/hal/odm.c | 8 -- drivers/staging/rtl8723bs/hal/odm.h | 14 +--- 4 files changed, 2 insertions(+), 114 deletions(-)
drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c +0 -77
@@ -282,62 +282,6 @@ void ODM_ReadAndConfig_MP_8723B_RadioA(struct dm_odm_t *pDM_Odm)* TxPowerTrack_SDIO.TXT ******************************************************************************/ -static u8 gDeltaSwingTableIdx_MP_5GB_N_TxPowerTrack_SDIO_8723B[][DELTA_SWINGIDX_SIZE ] = { - { -0 ,1 ,1 ,2 ,2 ,3 ,4 ,5 ,5 ,6 ,6 ,7 ,7 ,8 ,8 ,9 , -9 ,10 ,11 ,12 ,12 ,13 ,13 ,14 ,14 ,14 ,14 ,14 ,14 ,14 - }, - { -0 ,1 ,2 ,3 ,3 ,4 ,5 ,6 ,6 ,7 ,7 ,8 ,8 ,9 ,9 ,10 , -10 ,11 ,11 ,12 ,12 ,13 ,13 ,14 ,14 ,14 ,14 ,14 ,14 ,14 - }, - { -0 ,1 ,2 ,3 ,3 ,4 ,5 ,6 ,6 ,7 ,7 ,8 ,8 ,9 ,9 ,10 , -10 ,11 ,11 ,12 ,12 ,13 ,13 ,14 ,14 ,14 ,14 ,14 ,14 ,14 - }, -}; -static u8 gDeltaSwingTableIdx_MP_5GB_P_TxPowerTrack_SDIO_8723B[][DELTA_SWINGIDX_SIZE ] = { - { -0 ,1 ,2 ,3 ,3 ,4 ,5 ,6 ,6 ,7 ,8 ,9 ,9 ,10 ,11 ,12 , -12 ,13 ,14 ,15 ,15 ,16 ,16 ,17 ,17 ,18 ,19 ,20 ,20 ,20 - }, - { -0 ,1 ,2 ,3 ,3 ,4 ,5 ,6 ,6 ,7 ,8 ,9 ,9 ,10 ,11 ,12 , -12 ,13 ,14 ,15 ,15 ,16 ,17 ,18 ,18 ,19 ,19 ,20 ,20 ,20 - }, - { -0 ,1 ,2 ,3 ,3 ,4 ,5 ,6 ,6 ,7 ,8 ,9 ,9 ,10 ,11 ,12 , -12 ,13 ,14 ,15 ,15 ,16 ,17 ,18 ,18 ,19 ,20 ,21 ,21 ,21 - }, -}; -static u8 gDeltaSwingTableIdx_MP_5GA_N_TxPowerTrack_SDIO_8723B[][DELTA_SWINGIDX_SIZE ] = { - { -0 ,1 ,2 ,3 ,3 ,4 ,4 ,5 ,5 ,6 ,7 ,8 ,8 ,9 ,9 ,10 , -10 ,11 ,11 ,12 ,12 ,13 ,13 ,14 ,14 ,14 ,14 ,14 ,14 ,14 - }, - { -0 ,1 ,2 ,3 ,3 ,4 ,5 ,6 ,6 ,6 ,7 ,7 ,8 ,8 ,9 ,10 , -11 ,11 ,12 ,13 ,13 ,14 ,15 ,16 ,16 ,16 ,16 ,16 ,16 ,16 - }, - { -0 ,1 ,2 ,3 ,3 ,4 ,5 ,6 ,6 ,7 ,8 ,9 ,9 ,10 ,10 ,11 , -11 ,12 ,13 ,14 ,14 ,15 ,15 ,16 ,16 ,16 ,16 ,16 ,16 ,16 - }, -}; -static u8 gDeltaSwingTableIdx_MP_5GA_P_TxPowerTrack_SDIO_8723B[][DELTA_SWINGIDX_SIZE ] = { - { -0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , -0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 - }, - { -0 ,1 ,2 ,3 ,3 ,4 ,5 ,6 ,6 ,7 ,8 ,9 ,9 ,10 ,11 ,12 , -12 ,13 ,14 ,15 ,15 ,16 ,17 ,18 ,18 ,19 ,20 ,21 ,21 ,21 - }, - { -0 ,1 ,2 ,3 ,3 ,4 ,5 ,6 ,6 ,7 ,8 ,9 ,9 ,10 ,11 ,12 , -12 ,13 ,14 ,15 ,15 ,16 ,17 ,18 ,18 ,19 ,20 ,21 ,21 ,21 - }, -};static u8 gDeltaSwingTableIdx_MP_2GB_N_TxPowerTrack_SDIO_8723B[] = {0 ,0 ,1 ,2 ,2 ,2 ,3 ,3 ,3 ,4 ,5 ,5 ,6 ,6 ,6 ,6 ,7 ,7 ,7 ,8 ,8 ,9 ,9 ,10 ,10 ,11 ,12 ,13 ,14 ,15
@@ -417,27 +361,6 @@ void ODM_ReadAndConfig_MP_8723B_TxPowerTrack_SDIO(struct dm_odm_t *pDM_Odm) gDeltaSwingTableIdx_MP_2GCCKB_N_TxPowerTrack_SDIO_8723B,DELTA_SWINGIDX_SIZE ); - -memcpy ( - pRFCalibrateInfo->DeltaSwingTableIdx_5GA_P, - gDeltaSwingTableIdx_MP_5GA_P_TxPowerTrack_SDIO_8723B, -DELTA_SWINGIDX_SIZE *3 - ); -memcpy ( - pRFCalibrateInfo->DeltaSwingTableIdx_5GA_N, - gDeltaSwingTableIdx_MP_5GA_N_TxPowerTrack_SDIO_8723B, -DELTA_SWINGIDX_SIZE *3 - ); -memcpy ( - pRFCalibrateInfo->DeltaSwingTableIdx_5GB_P, - gDeltaSwingTableIdx_MP_5GB_P_TxPowerTrack_SDIO_8723B, -DELTA_SWINGIDX_SIZE *3 - ); -memcpy ( - pRFCalibrateInfo->DeltaSwingTableIdx_5GB_N, - gDeltaSwingTableIdx_MP_5GB_N_TxPowerTrack_SDIO_8723B, -DELTA_SWINGIDX_SIZE *3 - ); }/******************************************************************************
drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c +1 -16
@@ -347,22 +347,7 @@ static void GetDeltaSwingTable_8723B( *TemperatureUP_B = pRFCalibrateInfo->DeltaSwingTableIdx_2GB_P; *TemperatureDOWN_B = pRFCalibrateInfo->DeltaSwingTableIdx_2GB_N; } - }/*else if (36 <= channel && channel <= 64) { -*TemperatureUP_A = pRFCalibrateInfo->DeltaSwingTableIdx_5GA_P[0]; -*TemperatureDOWN_A = pRFCalibrateInfo->DeltaSwingTableIdx_5GA_N[0]; -*TemperatureUP_B = pRFCalibrateInfo->DeltaSwingTableIdx_5GB_P[0]; -*TemperatureDOWN_B = pRFCalibrateInfo->DeltaSwingTableIdx_5GB_N[0]; -} else if (100 <= channel && channel <= 140) { -*TemperatureUP_A = pRFCalibrateInfo->DeltaSwingTableIdx_5GA_P[1]; -*TemperatureDOWN_A = pRFCalibrateInfo->DeltaSwingTableIdx_5GA_N[1]; -*TemperatureUP_B = pRFCalibrateInfo->DeltaSwingTableIdx_5GB_P[1]; -*TemperatureDOWN_B = pRFCalibrateInfo->DeltaSwingTableIdx_5GB_N[1]; -} else if (149 <= channel && channel <= 173) { -*TemperatureUP_A = pRFCalibrateInfo->DeltaSwingTableIdx_5GA_P[2]; -*TemperatureDOWN_A = pRFCalibrateInfo->DeltaSwingTableIdx_5GA_N[2]; -*TemperatureUP_B = pRFCalibrateInfo->DeltaSwingTableIdx_5GB_P[2]; -*TemperatureDOWN_B = pRFCalibrateInfo->DeltaSwingTableIdx_5GB_N[2]; -}*/ else { + }else { *TemperatureUP_A = (u8 *)DeltaSwingTableIdx_2GA_P_8188E; *TemperatureDOWN_A = (u8 *)DeltaSwingTableIdx_2GA_N_8188E; *TemperatureUP_B = (u8 *)DeltaSwingTableIdx_2GA_P_8188E;
drivers/staging/rtl8723bs/hal/odm.c +0 -8
@@ -896,18 +896,10 @@ void ODM_CmnInfoInit(struct dm_odm_t *pDM_Odm, enum odm_cmninfo_e CmnInfo, u32 V pDM_Odm->ExtLNA = (u8 )Value;break ; -case ODM_CMNINFO_5G_EXT_LNA : - pDM_Odm->ExtLNA5G = (u8 )Value; -break ; -case ODM_CMNINFO_EXT_PA : pDM_Odm->ExtPA = (u8 )Value;break ; -case ODM_CMNINFO_5G_EXT_PA : - pDM_Odm->ExtPA5G = (u8 )Value; -break ; -case ODM_CMNINFO_GPA : pDM_Odm->TypeGPA = (enum odm_type_gpa_e )Value;break ;
drivers/staging/rtl8723bs/hal/odm.h +1 -13
@@ -151,7 +151,6 @@ struct swat_t { /* _SW_Antenna_Switch_ */bool ANTB_ON ;/* To indicate Ant B is on or not */ bool Pre_Aux_FailDetec;bool RSSI_AntDect_bResult; -u8 Ant5G;u8 Ant2G;s32 RSSI_sum_A;
@@ -295,9 +294,7 @@ enum odm_cmninfo_e {ODM_CMNINFO_BOARD_TYPE ,/* ODM_BOARD_TYPE_E */ ODM_CMNINFO_PACKAGE_TYPE ,ODM_CMNINFO_EXT_LNA ,/* true */ -ODM_CMNINFO_5G_EXT_LNA ,ODM_CMNINFO_EXT_PA , -ODM_CMNINFO_5G_EXT_PA ,ODM_CMNINFO_GPA ,ODM_CMNINFO_APA , ODM_CMNINFO_GLNA,
@@ -514,7 +511,6 @@ struct odm_rf_cal_t { /* ODM_RF_Calibration_Structure */bool bTXPowerTracking;u8 TxPowerTrackControl;/* for mp mode, turn off txpwrtracking as default */ u8 TM_Trigger; -u8 InternalPA5G[2 ];/* pathA / pathB */ u8 ThermalMeter[2 ];/* ThermalMeter, index 0 for RFIC0, and 1 for RFIC1 */ u8 ThermalValue;
@@ -549,7 +545,7 @@ struct odm_rf_cal_t { /* ODM_RF_Calibration_Structure */bool bIQKInProgress;u8 Delta_IQK;u8 Delta_LCK; -s8 BBSwingDiff2G, BBSwingDiff5G;/* Unit: dB */ +s8 BBSwingDiff2G;/* Unit: dB */ u8 DeltaSwingTableIdx_2GCCKA_P[DELTA_SWINGIDX_SIZE ];u8 DeltaSwingTableIdx_2GCCKA_N[DELTA_SWINGIDX_SIZE ];u8 DeltaSwingTableIdx_2GCCKB_P[DELTA_SWINGIDX_SIZE ];
@@ -558,10 +554,6 @@ struct odm_rf_cal_t { /* ODM_RF_Calibration_Structure */u8 DeltaSwingTableIdx_2GA_N[DELTA_SWINGIDX_SIZE ];u8 DeltaSwingTableIdx_2GB_P[DELTA_SWINGIDX_SIZE ];u8 DeltaSwingTableIdx_2GB_N[DELTA_SWINGIDX_SIZE ]; -u8 DeltaSwingTableIdx_5GA_P[BAND_NUM ][DELTA_SWINGIDX_SIZE ]; -u8 DeltaSwingTableIdx_5GA_N[BAND_NUM ][DELTA_SWINGIDX_SIZE ]; -u8 DeltaSwingTableIdx_5GB_P[BAND_NUM ][DELTA_SWINGIDX_SIZE ]; -u8 DeltaSwingTableIdx_5GB_N[BAND_NUM ][DELTA_SWINGIDX_SIZE ];u8 DeltaSwingTableIdx_2GA_P_8188E[DELTA_SWINGIDX_SIZE ];u8 DeltaSwingTableIdx_2GA_N_8188E[DELTA_SWINGIDX_SIZE ];
@@ -627,7 +619,6 @@ struct fat_t { /* _FAST_ANTENNA_TRAINNING_ */bool bBecomeLinked;u32 MinMaxRSSI;u8 idx_AntDiv_counter_2G; -u8 idx_AntDiv_counter_5G;u32 CCK_counter_main;u32 CCK_counter_aux;u32 OFDM_counter_main;
@@ -746,10 +737,8 @@ struct dm_odm_t { /* DM_Out_Source_Dynamic_Mechanism_Structure */u8 TypeAPA;/* with external LNA NO/Yes = 0/1 */ u8 ExtLNA; -u8 ExtLNA5G;/* with external PA NO/Yes = 0/1 */ u8 ExtPA; -u8 ExtPA5G;/* with external TRSW NO/Yes = 0/1 */ u8 ExtTRSW;u8 PatchID;/* Customer ID */
@@ -1046,7 +1035,6 @@ enum ODM_BB_Config_Type {CONFIG_BB_PHY_REG ,CONFIG_BB_AGC_TAB ,CONFIG_BB_AGC_TAB_2G , -CONFIG_BB_AGC_TAB_5G ,CONFIG_BB_PHY_REG_PG ,CONFIG_BB_PHY_REG_MP , CONFIG_BB_AGC_TAB_DIFF,
Signature · 1 line
2.20.1
PATCH 12/18 staging: rtl8723bs: remove VHT dead code
In reply to Fabio Aiutoremove VHT dead code, as the device doesn't support VHT (which is a 802.11ac capability).
--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 1 - drivers/staging/rtl8723bs/hal/hal_com.c | 241 ----------- .../staging/rtl8723bs/hal/hal_com_phycfg.c | 383 +----------------- drivers/staging/rtl8723bs/include/hal_com.h | 62 +-- .../rtl8723bs/include/hal_com_phycfg.h | 4 - drivers/staging/rtl8723bs/include/ieee80211.h | 45 -- .../staging/rtl8723bs/include/rtl8723b_xmit.h | 21 - drivers/staging/rtl8723bs/include/rtw_ht.h | 4 - 8 files changed, 9 insertions(+), 752 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -1
@@ -46,7 +46,6 @@ static struct action_handler OnAction_tbl[] = { {RTW_WLAN_CATEGORY_UNPROTECTED_WNM, "ACTION_UNPROTECTED_WNM", &DoReserved}, {RTW_WLAN_CATEGORY_SELF_PROTECTED, "ACTION_SELF_PROTECTED", &DoReserved}, {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &DoReserved}, - {RTW_WLAN_CATEGORY_VHT, "ACTION_VHT", &DoReserved}, {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &DoReserved}, };
drivers/staging/rtl8723bs/hal/hal_com.c +0 -241
253 lines not on this page · raw message
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +8 -375
470 lines not on this page · raw message
drivers/staging/rtl8723bs/include/hal_com.h +1 -61
74 lines not on this page · raw message
drivers/staging/rtl8723bs/include/hal_com_phycfg.h +0 -4
@@ -19,10 +19,6 @@ enum rate_section {HT_MCS8_MCS15 ,HT_MCS16_MCS23 , HT_MCS24_MCS31, -VHT_1SSMCS0_1SSMCS9 , -VHT_2SSMCS0_2SSMCS9 , -VHT_3SSMCS0_3SSMCS9 , - VHT_4SSMCS0_4SSMCS9, }; enum {
drivers/staging/rtl8723bs/include/ieee80211.h +0 -45
73 lines not on this page · raw message
drivers/staging/rtl8723bs/include/rtl8723b_xmit.h +0 -21
@@ -402,27 +402,6 @@ struct txdesc_8723b {#define DESC8723B_RATEMCS13 0x19#define DESC8723B_RATEMCS14 0x1a#define DESC8723B_RATEMCS15 0x1b -#define DESC8723B_RATEVHTSS1MCS0 0x2c -#define DESC8723B_RATEVHTSS1MCS1 0x2d -#define DESC8723B_RATEVHTSS1MCS2 0x2e -#define DESC8723B_RATEVHTSS1MCS3 0x2f -#define DESC8723B_RATEVHTSS1MCS4 0x30 -#define DESC8723B_RATEVHTSS1MCS5 0x31 -#define DESC8723B_RATEVHTSS1MCS6 0x32 -#define DESC8723B_RATEVHTSS1MCS7 0x33 -#define DESC8723B_RATEVHTSS1MCS8 0x34 -#define DESC8723B_RATEVHTSS1MCS9 0x35 -#define DESC8723B_RATEVHTSS2MCS0 0x36 -#define DESC8723B_RATEVHTSS2MCS1 0x37 -#define DESC8723B_RATEVHTSS2MCS2 0x38 -#define DESC8723B_RATEVHTSS2MCS3 0x39 -#define DESC8723B_RATEVHTSS2MCS4 0x3a -#define DESC8723B_RATEVHTSS2MCS5 0x3b -#define DESC8723B_RATEVHTSS2MCS6 0x3c -#define DESC8723B_RATEVHTSS2MCS7 0x3d -#define DESC8723B_RATEVHTSS2MCS8 0x3e -#define DESC8723B_RATEVHTSS2MCS9 0x3f -#define RX_HAL_IS_CCK_RATE_8723B (pDesc)\ (GET_RX_STATUS_DESC_RX_RATE_8723B(pDesc) == DESC8723B_RATE1M ||\
drivers/staging/rtl8723bs/include/rtw_ht.h +0 -4
@@ -42,10 +42,6 @@ enum {HT_AGG_SIZE_16K =1 ,HT_AGG_SIZE_32K =2 , HT_AGG_SIZE_64K = 3, -VHT_AGG_SIZE_128K =4 , -VHT_AGG_SIZE_256K =5 , -VHT_AGG_SIZE_512K =6 , - VHT_AGG_SIZE_1024K = 7, }; enum {
Signature · 1 line
2.20.1
PATCH 13/18 staging: rtl8723bs: remove unused ODM_CMNINFO_BOARD_TYPE enum item
In reply to Fabio Aiutoremove ODM_CMNINFO_BOARD_TYPE enum item, fix comments accordingly (given that 5GHz code isn't supported).
--- drivers/staging/rtl8723bs/hal/odm.c | 4 ---- drivers/staging/rtl8723bs/hal/odm.h | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-)
drivers/staging/rtl8723bs/hal/odm.c +0 -4
@@ -884,10 +884,6 @@ void ODM_CmnInfoInit(struct dm_odm_t *pDM_Odm, enum odm_cmninfo_e CmnInfo, u32 V pDM_Odm->AntDivType = (u8 )Value;break ; -case ODM_CMNINFO_BOARD_TYPE : - pDM_Odm->BoardType = (u8 )Value; -break ; -case ODM_CMNINFO_PACKAGE_TYPE : pDM_Odm->PackageType = (u8 )Value;break ;
drivers/staging/rtl8723bs/hal/odm.h +1 -4
@@ -291,7 +291,6 @@ enum odm_cmninfo_e {ODM_CMNINFO_FAB_VER ,/* ODM_FAB_E */ ODM_CMNINFO_RF_TYPE ,/* ODM_RF_PATH_E or ODM_RF_TYPE_E? */ ODM_CMNINFO_RFE_TYPE , -ODM_CMNINFO_BOARD_TYPE ,/* ODM_BOARD_TYPE_E */ ODM_CMNINFO_PACKAGE_TYPE ,ODM_CMNINFO_EXT_LNA ,/* true */ ODM_CMNINFO_EXT_PA,
@@ -461,9 +460,7 @@ enum { /* tag_Bandwidth_Definition */ ODM_BW40M = 1, }; -/* ODM_CMNINFO_BOARD_TYPE */ -/* For non-AC-series IC , ODM_BOARD_5G_EXT_PA and ODM_BOARD_5G_EXT_LNA are ignored */ -/* For AC-series IC, external PA & LNA can be indivisuallly added on 2.4G and/or 5G */ +/* For AC-series IC, external PA & LNA can be individually added on 2.4G */ enum odm_type_gpa_e {/* tag_ODM_TYPE_GPA_Definition */ TYPE_GPA0 =0 ,
Signature · 1 line
2.20.1
PATCH 14/18 staging: rtl8723bs: fix macro value for 2.4Ghz only device
In reply to Fabio Aiutofix IQK_Matrix_Settings_NUM macro value to 14 which is the max channel number value allowed in a 2.4Ghz device.
--- drivers/staging/rtl8723bs/hal/odm.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/rtl8723bs/hal/odm.h +1 -4
@@ -195,10 +195,7 @@ struct odm_rate_adaptive {#define AVG_THERMAL_NUM 8#define IQK_Matrix_REG_NUM 8 -#define IQK_Matrix_Settings_NUM (14 + 24 + 21)/* Channels_2_4G_NUM -* + Channels_5G_20M_NUM -* + Channels_5G -*/ +#define IQK_Matrix_Settings_NUM 14/* Channels_2_4G_NUM */ #define DM_Type_ByFW 0#define DM_Type_ByDriver 1
Signature · 1 line
2.20.1
PATCH 15/18 staging: rtl8723bs: remove register initializations tied to 802.11ac standard
In reply to Fabio Aiutoremove register initializations tied to 802.11ac standard which is not supported by the device.
It's a dangerous operation, relying only on comments, but tested on a Lenovo Ideapad MIIX 300-10IBY tablet seems to work.
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 12 ------------ 1 file changed, 12 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -12
@@ -1718,24 +1718,12 @@ void _InitBurstPktLen_8723BS(struct adapter *Adapter)struct hal_com_data *pHalData =GET_HAL_DATA (Adapter);rtw_write8 (Adapter,0x4c7 ,rtw_read8 (Adapter,0x4c7 )|BIT (7 ));/* enable single pkt ampdu */ -rtw_write8 (Adapter,REG_RX_PKT_LIMIT_8723B ,0x18 );/* for VHT packet length 11K */ rtw_write8 (Adapter,REG_MAX_AGGR_NUM_8723B ,0x1F );rtw_write8 (Adapter,REG_PIFS_8723B ,0x00 );rtw_write8 (Adapter,REG_FWHW_TXQ_CTRL_8723B ,rtw_read8 (Adapter,REG_FWHW_TXQ_CTRL )&(~BIT (7 )));if (pHalData->AMPDUBurstMode)rtw_write8 (Adapter,REG_AMPDU_BURST_MODE_8723B ,0x5F );rtw_write8 (Adapter,REG_AMPDU_MAX_TIME_8723B ,0x70 ); - -/* ARFB table 9 for 11ac 5G 2SS */ -rtw_write32 (Adapter,REG_ARFR0_8723B ,0x00000010 ); -if (IS_NORMAL_CHIP (pHalData->VersionID)) -rtw_write32 (Adapter,REG_ARFR0_8723B +4 ,0xfffff000 ); -else -rtw_write32 (Adapter,REG_ARFR0_8723B +4 ,0x3e0ff000 ); - -/* ARFB table 10 for 11ac 5G 1SS */ -rtw_write32 (Adapter,REG_ARFR1_8723B ,0x00000010 ); -rtw_write32 (Adapter,REG_ARFR1_8723B +4 ,0x003ff000 ); }static void ResumeTxBeacon (struct adapter *padapter)
Signature · 1 line
2.20.1
PATCH 16/18 staging: rtl8723bs: remove obsolete 5Ghz comments
In reply to Fabio Aiutoremove obsolete 5Ghz comments.
--- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 -- drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 4 ---- 2 files changed, 6 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +0 -2
@@ -202,8 +202,6 @@ rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {static int rtw_ieee80211_channel_to_frequency (int chan,int band) { -/* see 802.11 17.3.8.3.2 and Annex J -* there are overlapping channel numbers in 5GHz and 2GHz bands */ if (band ==NL80211_BAND_2GHZ ) {if (chan ==14 )return 2484 ;
drivers/staging/rtl8723bs/os_dep/wifi_regd.c +0 -4
@@ -44,10 +44,6 @@ static const struct ieee80211_regdomain rtw_regdom_rd = {static int rtw_ieee80211_channel_to_frequency (int chan,int band) { -/* see 802.11 17.3.8.3.2 and Annex J -* there are overlapping channel numbers in 5GHz and 2GHz bands -*/ -/* NL80211_BAND_2GHZ */ if (chan ==14 )return 2484 ;
Signature · 1 line
2.20.1
PATCH 17/18 staging: rtl8723bs: fix check allowing 5Ghz settings
In reply to Fabio Aiutofix check allowing 5Ghz settings, only disabled and 2.4Ghz enabled states are allowed. Fix comment accordingly.
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +3 -4
@@ -2572,10 +2572,9 @@ static int rtw_dbg_port(struct net_device *dev,case 0x12 :/* set rx_stbc */ {struct registry_priv *pregpriv = &padapter->registrypriv; -/* 0: disable, bit(0):enable 2.4g, bit(1):enable 5g, 0x3: enable both 2.4g and 5g */ -/* default is set to enable 2.4GHZ for IOT issue with bufflao's AP at 5GHZ */ -if (extra_arg ==0 || extra_arg ==1 || - extra_arg ==2 || extra_arg ==3 ) +/* 0: disable, bit(0):enable 2.4g */ +/* default is set to enable 2.4GHZ */ +if (extra_arg ==0 || extra_arg ==1 ) pregpriv->rx_stbc = extra_arg; }break ;
Signature · 1 line
2.20.1
PATCH 18/18 staging: rtl8723bs: remove item from TODO list
In reply to Fabio Aiutoremove item related to 5Ghz code deletion from
driver's TODO list.
--- drivers/staging/rtl8723bs/TODO | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/rtl8723bs/TODO +0 -2
@@ -1,6 +1,4 @@ TODO: -- find and remove remaining code valid only for 5 GHz. Most of the obvious - ones have been removed, but things like channel > 14 still exist. - find and remove any code for other chips that is left over - convert any remaining unusual variable types - find codes that can use %pM and %Nph formatting
Signature · 1 line
2.20.1
Re: [PATCH 01/18] staging: rtl8723bs: remove all 5Ghz network types
In reply to Fabio AiutoHi,
Thank you for your work in this.
Quoted 28 lines · Fabio Aiuto
remove all 5Ghz network types. rtl8723bs works on
802.11bgn standards and on 2.4Ghz band.So remove all code related to 802.11a and 802.11ac standards, which the device doesn't support.
Signed-off-by Fabio Aiuto <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_ap.c | 10 +--- .../staging/rtl8723bs/core/rtw_ieee80211.c | 22 ++------ drivers/staging/rtl8723bs/core/rtw_mlme.c | 10 ---- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 55 ------------------- .../staging/rtl8723bs/core/rtw_wlan_util.c | 14 +---- drivers/staging/rtl8723bs/hal/odm.c | 30 ---------- drivers/staging/rtl8723bs/hal/odm.h | 3 - .../rtl8723bs/hal/odm_EdcaTurboCheck.c | 4 +- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 5 -- drivers/staging/rtl8723bs/include/hal_phy.h | 3 - drivers/staging/rtl8723bs/include/ieee80211.h | 22 +------- drivers/staging/rtl8723bs/include/wifi.h | 1 - drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +- 13 files changed, 14 insertions(+), 167 deletions(-)drivers/staging/rtl8723bs/core/rtw_ap.c +0
-0
drivers/staging/rtl8723bs/core/rtw_ap.c void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level) · line 344
Quoted 2 lines
drivers/staging/rtl8723bs/core/rtw_ap.c +0
-0@@ -343,10 +343,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)if (pcur_network->Configuration.DSConfig >14 ) {
This if sounds like it is checking for a channel-nr greater then 14, so maybe this entire block should go away ?
drivers/staging/rtl8723bs/core/rtw_ap.c void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level) · line 346
Quoted 6 lines
drivers/staging/rtl8723bs/core/rtw_ap.c +1
-4if (tx_ra_bitmap &0xffff000 ) - sta_band |=WIRELESS_11_5N ; - -if (tx_ra_bitmap &0xff0 ) - sta_band |=WIRELESS_11A ; + sta_band |=WIRELESS_INVALID ;
You are replacing 2 if-s with 1 here, so you should also or the 2 masks being checked for togehter, iow there now should be one if like this:
if (tx_ra_bitmap & (0xffff000 | 0xff0)) sta_band |= WIRELESS_INVALID;
Which can be simplified to:
if (tx_ra_bitmap & 0xffffff0) sta_band |= WIRELESS_INVALID;
The rest of the patch looks ok (from a quick scan).
Regards,
Hans
Quoted 432 lines
drivers/staging/rtl8723bs/core/rtw_ap.c +1
-4}else {if (tx_ra_bitmap &0xffff000 ) sta_band |=WIRELESS_11_24N ;@@ -412,7 +409,7 @@ void update_bmc_sta(struct adapter *padapter) }else if (network_type ==WIRELESS_INVALID ) {/* error handling */ if (pcur_network->Configuration.DSConfig >14 ) - network_type =WIRELESS_11A ; + network_type =WIRELESS_INVALID ;else network_type =WIRELESS_11B ; }@@ -1115,9 +1112,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)case WIRELESS_11BG_24N : pbss_network->NetworkTypeInUse = Ndis802_11OFDM24;break ; -case WIRELESS_11A : - pbss_network->NetworkTypeInUse = Ndis802_11OFDM5; -break ;default : pbss_network->NetworkTypeInUse = Ndis802_11OFDM24;break ;drivers/staging/rtl8723bs/core/rtw_ieee80211.c +4
-18@@ -96,10 +96,7 @@ bool rtw_is_cckratesonly_included(u8 *rate)int rtw_check_network_type (unsigned char *rate,int ratelen,int channel) {if (channel >14 ) { -if (rtw_is_cckrates_included (rate)) -return WIRELESS_INVALID ; -else -return WIRELESS_11A ; +return WIRELESS_INVALID ; }else {/* could be pure B, pure G, or B/G */ if (rtw_is_cckratesonly_included (rate))return WIRELESS_11B ;@@ -266,10 +263,6 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode)break ;case WIRELESS_11G : -case WIRELESS_11A : -case WIRELESS_11_5N : -case WIRELESS_11A_5N :/* Todo: no basic rate for ofdm ? */ -case WIRELESS_11_5AC :memcpy (SupportedRates,WIFI_OFDMRATES ,IEEE80211_NUM_OFDM_RATESLEN );break ;@@ -327,14 +320,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) ie =rtw_set_ie (ie,WLAN_EID_SSID , pdev_network->Ssid.SsidLength, pdev_network->Ssid.Ssid, &sz);/* supported rates */ -if (pregistrypriv->wireless_mode ==WIRELESS_11ABGN ) { -if (pdev_network->Configuration.DSConfig >14 ) - wireless_mode =WIRELESS_11A_5N ; -else - wireless_mode =WIRELESS_11BG_24N ; - }else { - wireless_mode = pregistrypriv->wireless_mode; - } + wireless_mode = pregistrypriv->wireless_mode;rtw_set_supported_rate (pdev_network->SupportedRates, wireless_mode);@@ -359,8 +345,8 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) }/* HT Cap. */ -if (((pregistrypriv->wireless_mode&WIRELESS_11_5N ) || (pregistrypriv->wireless_mode&WIRELESS_11_24N )) - && (pregistrypriv->ht_enable == true)) { +if ((pregistrypriv->wireless_mode &WIRELESS_11_24N ) && + (pregistrypriv->ht_enable == true)) {/* todo: */ }drivers/staging/rtl8723bs/core/rtw_mlme.c +0
-10@@ -2184,16 +2184,6 @@ void rtw_update_registrypriv_dev_network(struct adapter *adapter)case WIRELESS_11BG_24N : pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24);break ; -case WIRELESS_11A : -case WIRELESS_11A_5N : - pdev_network->NetworkTypeInUse = (Ndis802_11OFDM5); -break ; -case WIRELESS_11ABGN : -if (pregistrypriv->channel >14 ) - pdev_network->NetworkTypeInUse = (Ndis802_11OFDM5); -else - pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24); -break ;default :/* TODO */ break ;drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0
-55@@ -4478,61 +4478,6 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid } } -if (pregistrypriv->wireless_mode &WIRELESS_11A ) { -do { -if ((i ==MAX_CHANNEL_NUM ) || - (chplan_sta[i].ChannelNum ==0 )) -break ; - -if ((j == chplan_ap.Len) || (chplan_ap.Channel[j] ==0 )) -break ; - -if (chplan_sta[i].ChannelNum == chplan_ap.Channel[j]) { - chplan_new[k].ChannelNum = chplan_ap.Channel[j]; - chplan_new[k].ScanType =SCAN_ACTIVE ; - i++; - j++; - k++; - }else if (chplan_sta[i].ChannelNum < chplan_ap.Channel[j]) { - chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum; -/* chplan_new[k].ScanType = chplan_sta[i].ScanType; */ - chplan_new[k].ScanType =SCAN_PASSIVE ; - i++; - k++; - }else if (chplan_sta[i].ChannelNum > chplan_ap.Channel[j]) { - chplan_new[k].ChannelNum = chplan_ap.Channel[j]; - chplan_new[k].ScanType =SCAN_ACTIVE ; - j++; - k++; - } - }while (1 ); - -/* change AP not support channel to Passive scan */ -while ((i <MAX_CHANNEL_NUM ) && (chplan_sta[i].ChannelNum !=0 )) { - chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum; -/* chplan_new[k].ScanType = chplan_sta[i].ScanType; */ - chplan_new[k].ScanType =SCAN_PASSIVE ; - i++; - k++; - } - -/* add channel AP supported */ -while ((j < chplan_ap.Len) && (chplan_ap.Channel[j] !=0 )) { - chplan_new[k].ChannelNum = chplan_ap.Channel[j]; - chplan_new[k].ScanType =SCAN_ACTIVE ; - j++; - k++; - } - }else { -/* keep original STA 5G channel plan */ -while ((i <MAX_CHANNEL_NUM ) && (chplan_sta[i].ChannelNum !=0 )) { - chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum; - chplan_new[k].ScanType = chplan_sta[i].ScanType; - i++; - k++; - } - } - pmlmeext->update_channel_plan_by_ap_done =1 ; }drivers/staging/rtl8723bs/core/rtw_wlan_util.c +3
-11@@ -55,9 +55,6 @@ u8 networktype_to_raid_ex(struct adapter *adapter, struct sta_info *psta)if (cur_rf_type ==RF_1T1R ) { rf_type =RF_1T1R ; - }else if (IsSupportedVHT (psta->wireless_mode)) { -if (psta->ra_mask &0xffc00000 ) - rf_type =RF_2T2R ; }else if (IsSupportedHT (psta->wireless_mode)) {if (psta->ra_mask &0xfff00000 ) rf_type =RF_2T2R ;@@ -67,7 +64,6 @@ u8 networktype_to_raid_ex(struct adapter *adapter, struct sta_info *psta)case WIRELESS_11B : raid =RATEID_IDX_B ;break ; -case WIRELESS_11A :case WIRELESS_11G : raid =RATEID_IDX_G ;break ;@@ -75,8 +71,6 @@ u8 networktype_to_raid_ex(struct adapter *adapter, struct sta_info *psta) raid =RATEID_IDX_BG ;break ;case WIRELESS_11_24N : -case WIRELESS_11_5N : -case WIRELESS_11A_5N :case WIRELESS_11G_24N :if (rf_type ==RF_2T2R ) raid =RATEID_IDX_GN_N2SS ;@@ -827,7 +821,7 @@ void WMMOnAssocRsp(struct adapter *padapter)AIFS = aSifsTime + (2 * pmlmeinfo->slotTime); -if (pmlmeext->cur_wireless_mode & (WIRELESS_11G |WIRELESS_11A )) { +if (pmlmeext->cur_wireless_mode &WIRELESS_11G ) { ECWMin =4 ; ECWMax =10 ; }else if (pmlmeext->cur_wireless_mode &WIRELESS_11B ) {@@ -1623,7 +1617,7 @@ void update_capinfo(struct adapter *Adapter, u16 updateCap) pmlmeinfo->slotTime =NON_SHORT_SLOT_TIME ; }else {/* Filen: See 802.11-2007 p.90 */ -if (pmlmeext->cur_wireless_mode & (WIRELESS_11_24N |WIRELESS_11A |WIRELESS_11_5N |WIRELESS_11AC )) { +if (pmlmeext->cur_wireless_mode & (WIRELESS_11_24N )) { pmlmeinfo->slotTime =SHORT_SLOT_TIME ; }else if (pmlmeext->cur_wireless_mode & (WIRELESS_11G )) {if ((updateCap & cShortSlotTime)/* && (!(pMgntInfo->pHTInfo->RT2RT_HT_Mode & RT_HT_CAP_USE_LONG_PREAMBLE)) */ )@@ -1653,9 +1647,7 @@ void update_wireless_mode(struct adapter *padapter)if ((pmlmeinfo->HT_info_enable) && (pmlmeinfo->HT_caps_enable)) pmlmeinfo->HT_enable =1 ; -if (pmlmeinfo->VHT_enable) - network_type =WIRELESS_11AC ; -else if (pmlmeinfo->HT_enable) +if (pmlmeinfo->HT_enable) network_type =WIRELESS_11_24N ;if (rtw_is_cckratesonly_included (rate))drivers/staging/rtl8723bs/hal/odm.c +0
-30@@ -377,7 +377,6 @@ u32 ODM_Get_Rate_Bitmap(break ;case (ODM_WM_G ): -case (ODM_WM_A ):if (rssi_level ==DM_RATR_STA_HIGH ) rate_bitmap =0x00000f00 ;else @@ -396,7 +395,6 @@ u32 ODM_Get_Rate_Bitmap(case (ODM_WM_B |ODM_WM_G |ODM_WM_N24G ):case (ODM_WM_B |ODM_WM_N24G ):case (ODM_WM_G |ODM_WM_N24G ): -case (ODM_WM_A |ODM_WM_N5G ):if (pDM_Odm->RFType ==ODM_1T2R || pDM_Odm->RFType ==ODM_1T1R ) {if (rssi_level ==DM_RATR_STA_HIGH ) rate_bitmap =0x000f0000 ;@@ -422,34 +420,6 @@ u32 ODM_Get_Rate_Bitmap( }break ; -case (ODM_WM_AC |ODM_WM_G ): -if (rssi_level ==1 ) - rate_bitmap =0xfc3f0000 ; -else if (rssi_level ==2 ) - rate_bitmap =0xfffff000 ; -else - rate_bitmap =0xffffffff ; -break ; - -case (ODM_WM_AC |ODM_WM_A ): - -if (pDM_Odm->RFType ==RF_1T1R ) { -if (rssi_level ==1 )/* add by Gary for ac-series */ - rate_bitmap =0x003f8000 ; -else if (rssi_level ==2 ) - rate_bitmap =0x003ff000 ; -else - rate_bitmap =0x003ff010 ; - }else { -if (rssi_level ==1 )/* add by Gary for ac-series */ - rate_bitmap =0xfe3f8000 ;/* VHT 2SS MCS3~9 */ -else if (rssi_level ==2 ) - rate_bitmap =0xfffff000 ;/* VHT 2SS MCS0~9 */ -else - rate_bitmap =0xfffff010 ;/* All */ - } -break ; -default :if (pDM_Odm->RFType ==RF_1T2R ) rate_bitmap =0x000fffff ;drivers/staging/rtl8723bs/hal/odm.h +0
-3@@ -455,11 +455,8 @@ enum { /* tag_Wireless_Mode_Definition */ODM_WM_UNKNOWN =0x0 ,ODM_WM_B =BIT0 ,ODM_WM_G =BIT1 , -ODM_WM_A =BIT2 ,ODM_WM_N24G =BIT3 , -ODM_WM_N5G =BIT4 , ODM_WM_AUTO = BIT5, - ODM_WM_AC = BIT6, };/* ODM_CMNINFO_BAND */ drivers/staging/rtl8723bs/hal/odm_EdcaTurboCheck.c +1
-3@@ -124,12 +124,10 @@ void odm_EdcaTurboCheckCE(void *pDM_VOID) }else if ((iot_peer ==HT_IOT_PEER_CISCO ) && ((wirelessmode ==ODM_WM_G ) || (wirelessmode == (ODM_WM_B |ODM_WM_G )) || - (wirelessmode ==ODM_WM_A ) || (wirelessmode ==ODM_WM_B ))) {EDCA_BE_DL = edca_setting_DL_GMode[iot_peer]; }else if ((iot_peer ==HT_IOT_PEER_AIRGO ) && - ((wirelessmode ==ODM_WM_G ) || - (wirelessmode ==ODM_WM_A ))) { + (wirelessmode ==ODM_WM_G )) {EDCA_BE_DL =0xa630 ; }else if (iot_peer ==HT_IOT_PEER_MARVELL ) {EDCA_BE_DL = edca_setting_DL[iot_peer];drivers/staging/rtl8723bs/hal/sdio_halinit.c +0
-5@@ -512,8 +512,6 @@ static void _InitOperationMode(struct adapter *padapter)case WIRELESS_MODE_B : regBwOpMode =BW_OPMODE_20MHZ ;break ; -case WIRELESS_MODE_A : -break ;case WIRELESS_MODE_G : regBwOpMode =BW_OPMODE_20MHZ ;break ;@@ -525,9 +523,6 @@ static void _InitOperationMode(struct adapter *padapter)/* CCK rate will be filtered out only when associated AP does not support it. */ regBwOpMode =BW_OPMODE_20MHZ ;break ; -case WIRELESS_MODE_N_5G : - regBwOpMode =BW_OPMODE_5G ; -break ;default :/* for MacOSX compiler warning. */ break ;drivers/staging/rtl8723bs/include/hal_phy.h +0
-3@@ -51,13 +51,10 @@ enum rf_path {enum wireless_mode {WIRELESS_MODE_UNKNOWN =0x00 , -WIRELESS_MODE_A =0x01 ,WIRELESS_MODE_B =0x02 ,WIRELESS_MODE_G =0x04 ,WIRELESS_MODE_AUTO =0x08 ,WIRELESS_MODE_N_24G =0x10 , -WIRELESS_MODE_N_5G =0x20 , -WIRELESS_MODE_AC_5G =0x40 ,WIRELESS_MODE_AC_24G =0x80 ,WIRELESS_MODE_AC_ONLY =0x100 , };drivers/staging/rtl8723bs/include/ieee80211.h +3
-19@@ -144,33 +144,20 @@ enum network_type {/* Sub-Element */ WIRELESS_11B =BIT (0 ),/* tx: cck only , rx: cck only, hw: cck */ WIRELESS_11G =BIT (1 ),/* tx: ofdm only, rx: ofdm & cck, hw: cck & ofdm */ -WIRELESS_11A =BIT (2 ),/* tx: ofdm only, rx: ofdm only, hw: ofdm only */ WIRELESS_11_24N =BIT (3 ),/* tx: MCS only, rx: MCS & cck, hw: MCS & cck */ -WIRELESS_11_5N =BIT (4 ),/* tx: MCS only, rx: MCS & ofdm, hw: ofdm only */ WIRELESS_AUTO =BIT (5 ), -WIRELESS_11AC =BIT (6 ),/* Combination */ /* Type for current wireless mode */ WIRELESS_11BG = (WIRELESS_11B |WIRELESS_11G ),/* tx: cck & ofdm, rx: cck & ofdm & MCS, hw: cck & ofdm */ WIRELESS_11G_24N = (WIRELESS_11G |WIRELESS_11_24N ),/* tx: ofdm & MCS, rx: ofdm & cck & MCS, hw: cck & ofdm */ -WIRELESS_11A_5N = (WIRELESS_11A |WIRELESS_11_5N ),/* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */ WIRELESS_11B_24N = (WIRELESS_11B |WIRELESS_11_24N ),/* tx: ofdm & cck & MCS, rx: ofdm & cck & MCS, hw: ofdm & cck */ WIRELESS_11BG_24N = (WIRELESS_11B|WIRELESS_11G|WIRELESS_11_24N), /* tx: ofdm & cck & MCS, rx: ofdm & cck & MCS, hw: ofdm & cck */ -WIRELESS_11_24AC = (WIRELESS_11G |WIRELESS_11AC ), -WIRELESS_11_5AC = (WIRELESS_11A |WIRELESS_11AC ), - - -/* Type for registry default wireless mode */ -WIRELESS_11AGN = (WIRELESS_11A |WIRELESS_11G |WIRELESS_11_24N |WIRELESS_11_5N ),/* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */ -WIRELESS_11ABGN = (WIRELESS_11A |WIRELESS_11B |WIRELESS_11G |WIRELESS_11_24N |WIRELESS_11_5N ), -WIRELESS_MODE_24G = (WIRELESS_11B |WIRELESS_11G |WIRELESS_11_24N |WIRELESS_11AC ), - WIRELESS_MODE_MAX = (WIRELESS_11A|WIRELESS_11B|WIRELESS_11G|WIRELESS_11_24N|WIRELESS_11_5N|WIRELESS_11AC), };#define SUPPORTED_24G_NETTYPE_MSK (WIRELESS_11B | WIRELESS_11G | WIRELESS_11_24N) -#define IsLegacyOnly (NetType) ((NetType) == ((NetType) & (WIRELESS_11BG|WIRELESS_11A))) +#define IsLegacyOnly (NetType) ((NetType) == ((NetType) & (WIRELESS_11BG)))#define IsSupported24G (NetType) ((NetType) & SUPPORTED_24G_NETTYPE_MSK ? true : false)@@ -182,11 +169,8 @@ enum network_type {#define IsSupportedRxHT (NetType) IsEnableHWOFDM(NetType)#define IsSupportedTxCCK (NetType) (((NetType) & (WIRELESS_11B)) ? true : false) -#define IsSupportedTxOFDM (NetType) (((NetType) & (WIRELESS_11G|WIRELESS_11A)) ? true : false) -#define IsSupportedHT (NetType) (((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N)) ? true : false) - -#define IsSupportedVHT (NetType) (((NetType) & (WIRELESS_11AC)) ? true : false) - +#define IsSupportedTxOFDM (NetType) (((NetType) & (WIRELESS_11G) ? true : false) +#define IsSupportedHT (NetType) (((NetType) & (WIRELESS_11_24N)) ? true : false)struct ieee_param {u32 cmd;drivers/staging/rtl8723bs/include/wifi.h +0
-1@@ -336,7 +336,6 @@ static inline int IsFrameTypeCtrl(unsigned char *pframe)#define _PRE_ALLOCICVHDR_ 5#define _PRE_ALLOCMICHDR_ 6 -#define _SIFSTIME_ ((priv->pmib->dot11BssType.net_work_type&WIRELESS_11A)?16:10)#define _ACKCTSLNG_ 14/* 14 bytes long, including crclng */ #define _CRCLNG_ 4drivers/staging/rtl8723bs/os_dep/os_intfs.c +1
-1@@ -22,7 +22,7 @@ static int rtw_lbkmode;/* RTL8712_AIR_TRX; */static int rtw_network_mode = Ndis802_11IBSS;/* Ndis802_11Infrastructure;infra, ad-hoc, auto */ /* struct ndis_802_11_ssid ssid; */ static int rtw_channel =1 ;/* ad-hoc support requirement */ -static int rtw_wireless_mode =WIRELESS_MODE_MAX ; +static int rtw_wireless_mode =WIRELESS_11BG_24N ;static int rtw_vrtl_carrier_sense =AUTO_VCS ;static int rtw_vcs_type =RTS_CTS ;/* */ static int rtw_rts_thresh =2347 ;/* */
Re: [PATCH 12/18] staging: rtl8723bs: remove VHT dead code
In reply to Fabio AiutoHi,
Quoted 330 lines · Fabio Aiuto
remove VHT dead code, as the device doesn't support VHT (which is a 802.11ac capability).
Signed-off-by Fabio Aiuto <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 1 - drivers/staging/rtl8723bs/hal/hal_com.c | 241 ----------- .../staging/rtl8723bs/hal/hal_com_phycfg.c | 383 +----------------- drivers/staging/rtl8723bs/include/hal_com.h | 62 +-- .../rtl8723bs/include/hal_com_phycfg.h | 4 - drivers/staging/rtl8723bs/include/ieee80211.h | 45 -- .../staging/rtl8723bs/include/rtl8723b_xmit.h | 21 - drivers/staging/rtl8723bs/include/rtw_ht.h | 4 - 8 files changed, 9 insertions(+), 752 deletions(-)drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0
-1@@ -46,7 +46,6 @@ static struct action_handler OnAction_tbl[] = { {RTW_WLAN_CATEGORY_UNPROTECTED_WNM, "ACTION_UNPROTECTED_WNM", &DoReserved}, {RTW_WLAN_CATEGORY_SELF_PROTECTED, "ACTION_SELF_PROTECTED", &DoReserved}, {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &DoReserved}, - {RTW_WLAN_CATEGORY_VHT, "ACTION_VHT", &DoReserved}, {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &DoReserved}, };drivers/staging/rtl8723bs/hal/hal_com.c +0
-241@@ -295,126 +295,6 @@ u8 MRateToHwRate(u8 rate)case MGN_MCS31 : ret =DESC_RATEMCS31 ;break ; -case MGN_VHT1SS_MCS0 : - ret =DESC_RATEVHTSS1MCS0 ; -break ; -case MGN_VHT1SS_MCS1 : - ret =DESC_RATEVHTSS1MCS1 ; -break ; -case MGN_VHT1SS_MCS2 : - ret =DESC_RATEVHTSS1MCS2 ; -break ; -case MGN_VHT1SS_MCS3 : - ret =DESC_RATEVHTSS1MCS3 ; -break ; -case MGN_VHT1SS_MCS4 : - ret =DESC_RATEVHTSS1MCS4 ; -break ; -case MGN_VHT1SS_MCS5 : - ret =DESC_RATEVHTSS1MCS5 ; -break ; -case MGN_VHT1SS_MCS6 : - ret =DESC_RATEVHTSS1MCS6 ; -break ; -case MGN_VHT1SS_MCS7 : - ret =DESC_RATEVHTSS1MCS7 ; -break ; -case MGN_VHT1SS_MCS8 : - ret =DESC_RATEVHTSS1MCS8 ; -break ; -case MGN_VHT1SS_MCS9 : - ret =DESC_RATEVHTSS1MCS9 ; -break ; -case MGN_VHT2SS_MCS0 : - ret =DESC_RATEVHTSS2MCS0 ; -break ; -case MGN_VHT2SS_MCS1 : - ret =DESC_RATEVHTSS2MCS1 ; -break ; -case MGN_VHT2SS_MCS2 : - ret =DESC_RATEVHTSS2MCS2 ; -break ; -case MGN_VHT2SS_MCS3 : - ret =DESC_RATEVHTSS2MCS3 ; -break ; -case MGN_VHT2SS_MCS4 : - ret =DESC_RATEVHTSS2MCS4 ; -break ; -case MGN_VHT2SS_MCS5 : - ret =DESC_RATEVHTSS2MCS5 ; -break ; -case MGN_VHT2SS_MCS6 : - ret =DESC_RATEVHTSS2MCS6 ; -break ; -case MGN_VHT2SS_MCS7 : - ret =DESC_RATEVHTSS2MCS7 ; -break ; -case MGN_VHT2SS_MCS8 : - ret =DESC_RATEVHTSS2MCS8 ; -break ; -case MGN_VHT2SS_MCS9 : - ret =DESC_RATEVHTSS2MCS9 ; -break ; -case MGN_VHT3SS_MCS0 : - ret =DESC_RATEVHTSS3MCS0 ; -break ; -case MGN_VHT3SS_MCS1 : - ret =DESC_RATEVHTSS3MCS1 ; -break ; -case MGN_VHT3SS_MCS2 : - ret =DESC_RATEVHTSS3MCS2 ; -break ; -case MGN_VHT3SS_MCS3 : - ret =DESC_RATEVHTSS3MCS3 ; -break ; -case MGN_VHT3SS_MCS4 : - ret =DESC_RATEVHTSS3MCS4 ; -break ; -case MGN_VHT3SS_MCS5 : - ret =DESC_RATEVHTSS3MCS5 ; -break ; -case MGN_VHT3SS_MCS6 : - ret =DESC_RATEVHTSS3MCS6 ; -break ; -case MGN_VHT3SS_MCS7 : - ret =DESC_RATEVHTSS3MCS7 ; -break ; -case MGN_VHT3SS_MCS8 : - ret =DESC_RATEVHTSS3MCS8 ; -break ; -case MGN_VHT3SS_MCS9 : - ret =DESC_RATEVHTSS3MCS9 ; -break ; -case MGN_VHT4SS_MCS0 : - ret =DESC_RATEVHTSS4MCS0 ; -break ; -case MGN_VHT4SS_MCS1 : - ret =DESC_RATEVHTSS4MCS1 ; -break ; -case MGN_VHT4SS_MCS2 : - ret =DESC_RATEVHTSS4MCS2 ; -break ; -case MGN_VHT4SS_MCS3 : - ret =DESC_RATEVHTSS4MCS3 ; -break ; -case MGN_VHT4SS_MCS4 : - ret =DESC_RATEVHTSS4MCS4 ; -break ; -case MGN_VHT4SS_MCS5 : - ret =DESC_RATEVHTSS4MCS5 ; -break ; -case MGN_VHT4SS_MCS6 : - ret =DESC_RATEVHTSS4MCS6 ; -break ; -case MGN_VHT4SS_MCS7 : - ret =DESC_RATEVHTSS4MCS7 ; -break ; -case MGN_VHT4SS_MCS8 : - ret =DESC_RATEVHTSS4MCS8 ; -break ; -case MGN_VHT4SS_MCS9 : - ret =DESC_RATEVHTSS4MCS9 ; -break ;default :break ; }@@ -559,127 +439,6 @@ u8 HwRateToMRate(u8 rate)case DESC_RATEMCS31 : ret_rate =MGN_MCS31 ;break ; -case DESC_RATEVHTSS1MCS0 : - ret_rate =MGN_VHT1SS_MCS0 ; -break ; -case DESC_RATEVHTSS1MCS1 : - ret_rate =MGN_VHT1SS_MCS1 ; -break ; -case DESC_RATEVHTSS1MCS2 : - ret_rate =MGN_VHT1SS_MCS2 ; -break ; -case DESC_RATEVHTSS1MCS3 : - ret_rate =MGN_VHT1SS_MCS3 ; -break ; -case DESC_RATEVHTSS1MCS4 : - ret_rate =MGN_VHT1SS_MCS4 ; -break ; -case DESC_RATEVHTSS1MCS5 : - ret_rate =MGN_VHT1SS_MCS5 ; -break ; -case DESC_RATEVHTSS1MCS6 : - ret_rate =MGN_VHT1SS_MCS6 ; -break ; -case DESC_RATEVHTSS1MCS7 : - ret_rate =MGN_VHT1SS_MCS7 ; -break ; -case DESC_RATEVHTSS1MCS8 : - ret_rate =MGN_VHT1SS_MCS8 ; -break ; -case DESC_RATEVHTSS1MCS9 : - ret_rate =MGN_VHT1SS_MCS9 ; -break ; -case DESC_RATEVHTSS2MCS0 : - ret_rate =MGN_VHT2SS_MCS0 ; -break ; -case DESC_RATEVHTSS2MCS1 : - ret_rate =MGN_VHT2SS_MCS1 ; -break ; -case DESC_RATEVHTSS2MCS2 : - ret_rate =MGN_VHT2SS_MCS2 ; -break ; -case DESC_RATEVHTSS2MCS3 : - ret_rate =MGN_VHT2SS_MCS3 ; -break ; -case DESC_RATEVHTSS2MCS4 : - ret_rate =MGN_VHT2SS_MCS4 ; -break ; -case DESC_RATEVHTSS2MCS5 : - ret_rate =MGN_VHT2SS_MCS5 ; -break ; -case DESC_RATEVHTSS2MCS6 : - ret_rate =MGN_VHT2SS_MCS6 ; -break ; -case DESC_RATEVHTSS2MCS7 : - ret_rate =MGN_VHT2SS_MCS7 ; -break ; -case DESC_RATEVHTSS2MCS8 : - ret_rate =MGN_VHT2SS_MCS8 ; -break ; -case DESC_RATEVHTSS2MCS9 : - ret_rate =MGN_VHT2SS_MCS9 ; -break ; -case DESC_RATEVHTSS3MCS0 : - ret_rate =MGN_VHT3SS_MCS0 ; -break ; -case DESC_RATEVHTSS3MCS1 : - ret_rate =MGN_VHT3SS_MCS1 ; -break ; -case DESC_RATEVHTSS3MCS2 : - ret_rate =MGN_VHT3SS_MCS2 ; -break ; -case DESC_RATEVHTSS3MCS3 : - ret_rate =MGN_VHT3SS_MCS3 ; -break ; -case DESC_RATEVHTSS3MCS4 : - ret_rate =MGN_VHT3SS_MCS4 ; -break ; -case DESC_RATEVHTSS3MCS5 : - ret_rate =MGN_VHT3SS_MCS5 ; -break ; -case DESC_RATEVHTSS3MCS6 : - ret_rate =MGN_VHT3SS_MCS6 ; -break ; -case DESC_RATEVHTSS3MCS7 : - ret_rate =MGN_VHT3SS_MCS7 ; -break ; -case DESC_RATEVHTSS3MCS8 : - ret_rate =MGN_VHT3SS_MCS8 ; -break ; -case DESC_RATEVHTSS3MCS9 : - ret_rate =MGN_VHT3SS_MCS9 ; -break ; -case DESC_RATEVHTSS4MCS0 : - ret_rate =MGN_VHT4SS_MCS0 ; -break ; -case DESC_RATEVHTSS4MCS1 : - ret_rate =MGN_VHT4SS_MCS1 ; -break ; -case DESC_RATEVHTSS4MCS2 : - ret_rate =MGN_VHT4SS_MCS2 ; -break ; -case DESC_RATEVHTSS4MCS3 : - ret_rate =MGN_VHT4SS_MCS3 ; -break ; -case DESC_RATEVHTSS4MCS4 : - ret_rate =MGN_VHT4SS_MCS4 ; -break ; -case DESC_RATEVHTSS4MCS5 : - ret_rate =MGN_VHT4SS_MCS5 ; -break ; -case DESC_RATEVHTSS4MCS6 : - ret_rate =MGN_VHT4SS_MCS6 ; -break ; -case DESC_RATEVHTSS4MCS7 : - ret_rate =MGN_VHT4SS_MCS7 ; -break ; -case DESC_RATEVHTSS4MCS8 : - ret_rate =MGN_VHT4SS_MCS8 ; -break ; -case DESC_RATEVHTSS4MCS9 : - ret_rate =MGN_VHT4SS_MCS9 ; -break ; -default :break ; }drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-24@@ -39,18 +39,6 @@ u8 PHY_GetTxPowerByRateBase(struct adapter *Adapter, u8 RfPath,case HT_MCS24_MCS31 : value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][5 ];break ; -case VHT_1SSMCS0_1SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][6 ]; -break ; -case VHT_2SSMCS0_2SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][7 ]; -break ; -case VHT_3SSMCS0_3SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][8 ]; -break ; -case VHT_4SSMCS0_4SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][9 ]; -break ;default :break ; }@@ -91,18 +79,6 @@ phy_SetTxPowerByRateBase(case HT_MCS24_MCS31 : pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][5 ] = Value;break ; -case VHT_1SSMCS0_1SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][6 ] = Value; -break ; -case VHT_2SSMCS0_2SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][7 ] = Value; -break ; -case VHT_3SSMCS0_3SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][8 ] = Value; -break ; -case VHT_4SSMCS0_4SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][9 ] = Value; -break ;default :break ; }@@ -131,14 +107,6 @@ struct adapter *padapter base =PHY_GetTxPowerByRate (padapter, path,RF_3TX ,MGN_MCS23 );
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c struct adapter *padapter · line 141
Quoted 10 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-8phy_SetTxPowerByRateBase (padapter, path,HT_MCS16_MCS23 ,RF_3TX , base); - base =PHY_GetTxPowerByRate (padapter, path,RF_1TX ,MGN_VHT1SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_1SSMCS0_1SSMCS9 ,RF_1TX , base); - - base =PHY_GetTxPowerByRate (padapter, path,RF_2TX ,MGN_VHT2SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_2SSMCS0_2SSMCS9 ,RF_2TX , base); - - base =PHY_GetTxPowerByRate (padapter, path,RF_3TX ,MGN_VHT3SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_3SSMCS0_3SSMCS9 ,RF_3TX , base);
You are removing a bunch of register writes from a block here, while keeping others, so this does not seem like it is just dead-code removal it feels like you are actually making a functional change.
Perhaps this entire block can never be executed ?
Or maybe the VHT name used here is misleading and this is also relevant for 2.4 GHZ 40Mhz use ? Did you test with an access point configured to use 40 MHz channels
and then checked that you were actually using a 40MHz channel ? Note these are
quite rare AFAIK because 40 MHz tends to cause even more collosion issues in the already quite full 2.4G spectrum, still if possible you should test this and make sure that it does not regress (with out specifically testing this we might not note regressions for a long time because of 40MHz usage being rare).
Quoted 122 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-108} }@@ -442,81 +410,6 @@ PHY_GetRateValuesOfTxPowerByRate( *RateNum =4 ;break ; -case 0xC3C : -case 0xE3C : -case 0x183C : -case 0x1a3C : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS0 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS1 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS2 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS3 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xC40 : -case 0xE40 : -case 0x1840 : -case 0x1a40 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS4 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS5 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS6 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS7 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xC44 : -case 0xE44 : -case 0x1844 : -case 0x1a44 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS8 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS9 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS0 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS1 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xC48 : -case 0xE48 : -case 0x1848 : -case 0x1a48 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS2 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS3 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS4 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS5 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xC4C : -case 0xE4C : -case 0x184C : -case 0x1a4C : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS6 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS7 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS8 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS9 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; -case 0xCD8 :case 0xED8 :case 0x18D8 :@@ -547,49 +440,6 @@ PHY_GetRateValuesOfTxPowerByRate( *RateNum =4 ;break ; -case 0xCE0 : -case 0xEE0 : -case 0x18E0 : -case 0x1aE0 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS0 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS1 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS2 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS3 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xCE4 : -case 0xEE4 : -case 0x18E4 : -case 0x1aE4 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS4 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS5 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS6 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS7 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xCE8 : -case 0xEE8 : -case 0x18E8 :
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c PHY_GetRateValuesOfTxPowerByRate( · line 592
Quoted 10 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-10-case 0x1aE8 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS8 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS9 ); -for (i =0 ; i <2 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; -
Here only 2 rates are set, so this feels like it is a 40MHz case, are you sure this can be removed (maybe it is 40MHz channel use at 5GHz ?
The rest of the patch looks ok.
Regards,
Hans
Quoted 525 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +8
-225default :break ; }@@ -617,10 +467,6 @@ static void PHY_StoreTxPowerByRateNew(return ;for (i =0 ; i < rateNum; ++i) { -if (rateIndex[i] ==PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS0 ) || - rateIndex[i] ==PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS1 )) - TxNum =RF_2TX ; - pHalData->TxPwrByRateOffset[RfPath][TxNum][rateIndex[i]] = PwrByRateVal[i]; } }@@ -691,18 +537,6 @@ struct adapter *padapteru8 mcs16_23Rates[8 ] = {MGN_MCS16 ,MGN_MCS17 ,MGN_MCS18 ,MGN_MCS19 ,MGN_MCS20 ,MGN_MCS21 ,MGN_MCS22 ,MGN_MCS23 }; -u8 vht1ssRates[10 ] = { -MGN_VHT1SS_MCS0 ,MGN_VHT1SS_MCS1 ,MGN_VHT1SS_MCS2 ,MGN_VHT1SS_MCS3 ,MGN_VHT1SS_MCS4 , -MGN_VHT1SS_MCS5 ,MGN_VHT1SS_MCS6 ,MGN_VHT1SS_MCS7 ,MGN_VHT1SS_MCS8 ,MGN_VHT1SS_MCS9 - }; -u8 vht2ssRates[10 ] = { -MGN_VHT2SS_MCS0 ,MGN_VHT2SS_MCS1 ,MGN_VHT2SS_MCS2 ,MGN_VHT2SS_MCS3 ,MGN_VHT2SS_MCS4 , -MGN_VHT2SS_MCS5 ,MGN_VHT2SS_MCS6 ,MGN_VHT2SS_MCS7 ,MGN_VHT2SS_MCS8 ,MGN_VHT2SS_MCS9 - }; -u8 vht3ssRates[10 ] = { -MGN_VHT3SS_MCS0 ,MGN_VHT3SS_MCS1 ,MGN_VHT3SS_MCS2 ,MGN_VHT3SS_MCS3 ,MGN_VHT3SS_MCS4 , -MGN_VHT3SS_MCS5 ,MGN_VHT3SS_MCS6 ,MGN_VHT3SS_MCS7 ,MGN_VHT3SS_MCS8 ,MGN_VHT3SS_MCS9 - };for (path =ODM_RF_PATH_A ; path <=ODM_RF_PATH_D ; ++path) {for (txNum =RF_1TX ; txNum <RF_MAX_TX_NUM ; ++txNum) {@@ -740,27 +574,6 @@ struct adapter *padapter value =PHY_GetTxPowerByRate (padapter, path, txNum, mcs16_23Rates[i]);PHY_SetTxPowerByRate (padapter, path, txNum, mcs16_23Rates[i], value - base); } - -/* VHT 1SS */ - base =PHY_GetTxPowerByRate (padapter, path, txNum,MGN_VHT1SS_MCS7 ); -for (i =0 ; i <sizeof (vht1ssRates); ++i) { - value =PHY_GetTxPowerByRate (padapter, path, txNum, vht1ssRates[i]); -PHY_SetTxPowerByRate (padapter, path, txNum, vht1ssRates[i], value - base); - } - -/* VHT 2SS */ - base =PHY_GetTxPowerByRate (padapter, path, txNum,MGN_VHT2SS_MCS7 ); -for (i =0 ; i <sizeof (vht2ssRates); ++i) { - value =PHY_GetTxPowerByRate (padapter, path, txNum, vht2ssRates[i]); -PHY_SetTxPowerByRate (padapter, path, txNum, vht2ssRates[i], value - base); - } - -/* VHT 3SS */ - base =PHY_GetTxPowerByRate (padapter, path, txNum,MGN_VHT3SS_MCS7 ); -for (i =0 ; i <sizeof (vht3ssRates); ++i) { - value =PHY_GetTxPowerByRate (padapter, path, txNum, vht3ssRates[i]); -PHY_SetTxPowerByRate (padapter, path, txNum, vht3ssRates[i], value - base); - } } } }@@ -823,38 +636,6 @@ void PHY_SetTxPowerIndexByRateSection( Channel, htRates4T, ARRAY_SIZE(htRates4T)); - }else if (RateSection ==VHT_1SSMCS0_1SSMCS9 ) { -u8 vhtRates1T[] = {MGN_VHT1SS_MCS0 ,MGN_VHT1SS_MCS1 ,MGN_VHT1SS_MCS2 ,MGN_VHT1SS_MCS3 ,MGN_VHT1SS_MCS4 , -MGN_VHT1SS_MCS5 ,MGN_VHT1SS_MCS6 ,MGN_VHT1SS_MCS7 ,MGN_VHT1SS_MCS8 ,MGN_VHT1SS_MCS9 }; -PHY_SetTxPowerIndexByRateArray (padapter, RFPath, - pHalData->CurrentChannelBW, - Channel, vhtRates1T, -ARRAY_SIZE (vhtRates1T)); - - }else if (RateSection ==VHT_2SSMCS0_2SSMCS9 ) { -u8 vhtRates2T[] = {MGN_VHT2SS_MCS0 ,MGN_VHT2SS_MCS1 ,MGN_VHT2SS_MCS2 ,MGN_VHT2SS_MCS3 ,MGN_VHT2SS_MCS4 , -MGN_VHT2SS_MCS5 ,MGN_VHT2SS_MCS6 ,MGN_VHT2SS_MCS7 ,MGN_VHT2SS_MCS8 ,MGN_VHT2SS_MCS9 }; - -PHY_SetTxPowerIndexByRateArray (padapter, RFPath, - pHalData->CurrentChannelBW, - Channel, vhtRates2T, -ARRAY_SIZE (vhtRates2T)); - }else if (RateSection ==VHT_3SSMCS0_3SSMCS9 ) { -u8 vhtRates3T[] = {MGN_VHT3SS_MCS0 ,MGN_VHT3SS_MCS1 ,MGN_VHT3SS_MCS2 ,MGN_VHT3SS_MCS3 ,MGN_VHT3SS_MCS4 , -MGN_VHT3SS_MCS5 ,MGN_VHT3SS_MCS6 ,MGN_VHT3SS_MCS7 ,MGN_VHT3SS_MCS8 ,MGN_VHT3SS_MCS9 }; - -PHY_SetTxPowerIndexByRateArray (padapter, RFPath, - pHalData->CurrentChannelBW, - Channel, vhtRates3T, -ARRAY_SIZE (vhtRates3T)); - }else if (RateSection ==VHT_4SSMCS0_4SSMCS9 ) { -u8 vhtRates4T[] = {MGN_VHT4SS_MCS0 ,MGN_VHT4SS_MCS1 ,MGN_VHT4SS_MCS2 ,MGN_VHT4SS_MCS3 ,MGN_VHT4SS_MCS4 , -MGN_VHT4SS_MCS5 ,MGN_VHT4SS_MCS6 ,MGN_VHT4SS_MCS7 ,MGN_VHT4SS_MCS8 ,MGN_VHT4SS_MCS9 }; - -PHY_SetTxPowerIndexByRateArray (padapter, RFPath, - pHalData->CurrentChannelBW, - Channel, vhtRates4T, -ARRAY_SIZE (vhtRates4T)); } }@@ -883,23 +664,23 @@ u8 PHY_GetTxPowerIndexBase( txPower += pHalData->OFDM_24G_Diff[RFPath][TX_1S ];if (BandWidth ==CHANNEL_WIDTH_20 ) {/* BW20-1S, BW20-2S */ -if ((MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT1SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW20_24G_Diff[RFPath][TX_1S ]; -if ((MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT2SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW20_24G_Diff[RFPath][TX_2S ]; -if ((MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT3SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW20_24G_Diff[RFPath][TX_3S ]; -if ((MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT4SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW20_24G_Diff[RFPath][TX_4S ]; }else if (BandWidth ==CHANNEL_WIDTH_40 ) {/* BW40-1S, BW40-2S */ -if ((MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT1SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW40_24G_Diff[RFPath][TX_1S ]; -if ((MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT2SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW40_24G_Diff[RFPath][TX_2S ]; -if ((MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT3SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW40_24G_Diff[RFPath][TX_3S ]; -if ((MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT4SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW40_24G_Diff[RFPath][TX_4S ]; }@@ -1060,126 +841,6 @@ u8 PHY_GetRateIndexOfTxPowerByRate(u8 Rate)case MGN_MCS31 : index =43 ;break ; -case MGN_VHT1SS_MCS0 : - index =44 ; -break ; -case MGN_VHT1SS_MCS1 : - index =45 ; -break ; -case MGN_VHT1SS_MCS2 : - index =46 ; -break ; -case MGN_VHT1SS_MCS3 : - index =47 ; -break ; -case MGN_VHT1SS_MCS4 : - index =48 ; -break ; -case MGN_VHT1SS_MCS5 : - index =49 ; -break ; -case MGN_VHT1SS_MCS6 : - index =50 ; -break ; -case MGN_VHT1SS_MCS7 : - index =51 ; -break ; -case MGN_VHT1SS_MCS8 : - index =52 ; -break ; -case MGN_VHT1SS_MCS9 : - index =53 ; -break ; -case MGN_VHT2SS_MCS0 : - index =54 ; -break ; -case MGN_VHT2SS_MCS1 : - index =55 ; -break ; -case MGN_VHT2SS_MCS2 : - index =56 ; -break ; -case MGN_VHT2SS_MCS3 : - index =57 ; -break ; -case MGN_VHT2SS_MCS4 : - index =58 ; -break ; -case MGN_VHT2SS_MCS5 : - index =59 ; -break ; -case MGN_VHT2SS_MCS6 : - index =60 ; -break ; -case MGN_VHT2SS_MCS7 : - index =61 ; -break ; -case MGN_VHT2SS_MCS8 : - index =62 ; -break ; -case MGN_VHT2SS_MCS9 : - index =63 ; -break ; -case MGN_VHT3SS_MCS0 : - index =64 ; -break ; -case MGN_VHT3SS_MCS1 : - index =65 ; -break ; -case MGN_VHT3SS_MCS2 : - index =66 ; -break ; -case MGN_VHT3SS_MCS3 : - index =67 ; -break ; -case MGN_VHT3SS_MCS4 : - index =68 ; -break ; -case MGN_VHT3SS_MCS5 : - index =69 ; -break ; -case MGN_VHT3SS_MCS6 : - index =70 ; -break ; -case MGN_VHT3SS_MCS7 : - index =71 ; -break ; -case MGN_VHT3SS_MCS8 : - index =72 ; -break ; -case MGN_VHT3SS_MCS9 : - index =73 ; -break ; -case MGN_VHT4SS_MCS0 : - index =74 ; -break ; -case MGN_VHT4SS_MCS1 : - index =75 ; -break ; -case MGN_VHT4SS_MCS2 : - index =76 ; -break ; -case MGN_VHT4SS_MCS3 : - index =77 ; -break ; -case MGN_VHT4SS_MCS4 : - index =78 ; -break ; -case MGN_VHT4SS_MCS5 : - index =79 ; -break ; -case MGN_VHT4SS_MCS6 : - index =80 ; -break ; -case MGN_VHT4SS_MCS7 : - index =81 ; -break ; -case MGN_VHT4SS_MCS8 : - index =82 ; -break ; -case MGN_VHT4SS_MCS9 : - index =83 ; -break ;default :break ; }@@ -1319,26 +980,6 @@ static s16 get_rate_sctn_idx(const u8 rate)case MGN_MCS24 :case MGN_MCS25 :case MGN_MCS26 :case MGN_MCS27 :case MGN_MCS28 :case MGN_MCS29 :case MGN_MCS30 :case MGN_MCS31 :return 5 ; -case MGN_VHT1SS_MCS0 :case MGN_VHT1SS_MCS1 :case MGN_VHT1SS_MCS2 : -case MGN_VHT1SS_MCS3 :case MGN_VHT1SS_MCS4 :case MGN_VHT1SS_MCS5 : -case MGN_VHT1SS_MCS6 :case MGN_VHT1SS_MCS7 :case MGN_VHT1SS_MCS8 : -case MGN_VHT1SS_MCS9 : -return 6 ; -case MGN_VHT2SS_MCS0 :case MGN_VHT2SS_MCS1 :case MGN_VHT2SS_MCS2 : -case MGN_VHT2SS_MCS3 :case MGN_VHT2SS_MCS4 :case MGN_VHT2SS_MCS5 : -case MGN_VHT2SS_MCS6 :case MGN_VHT2SS_MCS7 :case MGN_VHT2SS_MCS8 : -case MGN_VHT2SS_MCS9 : -return 7 ; -case MGN_VHT3SS_MCS0 :case MGN_VHT3SS_MCS1 :case MGN_VHT3SS_MCS2 : -case MGN_VHT3SS_MCS3 :case MGN_VHT3SS_MCS4 :case MGN_VHT3SS_MCS5 : -case MGN_VHT3SS_MCS6 :case MGN_VHT3SS_MCS7 :case MGN_VHT3SS_MCS8 : -case MGN_VHT3SS_MCS9 : -return 8 ; -case MGN_VHT4SS_MCS0 :case MGN_VHT4SS_MCS1 :case MGN_VHT4SS_MCS2 : -case MGN_VHT4SS_MCS3 :case MGN_VHT4SS_MCS4 :case MGN_VHT4SS_MCS5 : -case MGN_VHT4SS_MCS6 :case MGN_VHT4SS_MCS7 :case MGN_VHT4SS_MCS8 : -case MGN_VHT4SS_MCS9 : -return 9 ;default :return -1 ; }@@ -1510,14 +1151,6 @@ void PHY_SetTxPowerLimit( rateSection =4 ; else if (eqNByte(RateSection, (u8 *)("HT"), 2) && eqNByte(RfPath, (u8 *)("4T"), 2)) rateSection = 5; - else if (eqNByte(RateSection, (u8 *)("VHT"), 3) && eqNByte(RfPath, (u8 *)("1T"), 2)) - rateSection = 6; - else if (eqNByte(RateSection, (u8 *)("VHT"), 3) && eqNByte(RfPath, (u8 *)("2T"), 2)) - rateSection = 7; - else if (eqNByte(RateSection, (u8 *)("VHT"), 3) && eqNByte(RfPath, (u8 *)("3T"), 2)) - rateSection = 8; - else if (eqNByte(RateSection, (u8 *)("VHT"), 3) && eqNByte(RfPath, (u8 *)("4T"), 2)) - rateSection = 9; else return;drivers/staging/rtl8723bs/include/hal_com.h +1
-61@@ -69,46 +69,6 @@#define DESC_RATEMCS29 0x29#define DESC_RATEMCS30 0x2A#define DESC_RATEMCS31 0x2B -#define DESC_RATEVHTSS1MCS0 0x2C -#define DESC_RATEVHTSS1MCS1 0x2D -#define DESC_RATEVHTSS1MCS2 0x2E -#define DESC_RATEVHTSS1MCS3 0x2F -#define DESC_RATEVHTSS1MCS4 0x30 -#define DESC_RATEVHTSS1MCS5 0x31 -#define DESC_RATEVHTSS1MCS6 0x32 -#define DESC_RATEVHTSS1MCS7 0x33 -#define DESC_RATEVHTSS1MCS8 0x34 -#define DESC_RATEVHTSS1MCS9 0x35 -#define DESC_RATEVHTSS2MCS0 0x36 -#define DESC_RATEVHTSS2MCS1 0x37 -#define DESC_RATEVHTSS2MCS2 0x38 -#define DESC_RATEVHTSS2MCS3 0x39 -#define DESC_RATEVHTSS2MCS4 0x3A -#define DESC_RATEVHTSS2MCS5 0x3B -#define DESC_RATEVHTSS2MCS6 0x3C -#define DESC_RATEVHTSS2MCS7 0x3D -#define DESC_RATEVHTSS2MCS8 0x3E -#define DESC_RATEVHTSS2MCS9 0x3F -#define DESC_RATEVHTSS3MCS0 0x40 -#define DESC_RATEVHTSS3MCS1 0x41 -#define DESC_RATEVHTSS3MCS2 0x42 -#define DESC_RATEVHTSS3MCS3 0x43 -#define DESC_RATEVHTSS3MCS4 0x44 -#define DESC_RATEVHTSS3MCS5 0x45 -#define DESC_RATEVHTSS3MCS6 0x46 -#define DESC_RATEVHTSS3MCS7 0x47 -#define DESC_RATEVHTSS3MCS8 0x48 -#define DESC_RATEVHTSS3MCS9 0x49 -#define DESC_RATEVHTSS4MCS0 0x4A -#define DESC_RATEVHTSS4MCS1 0x4B -#define DESC_RATEVHTSS4MCS2 0x4C -#define DESC_RATEVHTSS4MCS3 0x4D -#define DESC_RATEVHTSS4MCS4 0x4E -#define DESC_RATEVHTSS4MCS5 0x4F -#define DESC_RATEVHTSS4MCS6 0x50 -#define DESC_RATEVHTSS4MCS7 0x51 -#define DESC_RATEVHTSS4MCS8 0x52 -#define DESC_RATEVHTSS4MCS9 0x53#define HDATA_RATE (rate)\ (rate == DESC_RATE1M) ? "CCK_1M" : \@@ -138,27 +98,7 @@ (rate ==DESC_RATEMCS12 ) ?"MCS12" : \ (rate ==DESC_RATEMCS13 ) ?"MCS13" : \ (rate ==DESC_RATEMCS14 ) ?"MCS14" : \ -(rate ==DESC_RATEMCS15 ) ?"MCS15" : \ -(rate ==DESC_RATEVHTSS1MCS0 ) ?"VHTSS1MCS0" : \ -(rate ==DESC_RATEVHTSS1MCS1 ) ?"VHTSS1MCS1" : \ -(rate ==DESC_RATEVHTSS1MCS2 ) ?"VHTSS1MCS2" : \ -(rate ==DESC_RATEVHTSS1MCS3 ) ?"VHTSS1MCS3" : \ -(rate ==DESC_RATEVHTSS1MCS4 ) ?"VHTSS1MCS4" : \ -(rate ==DESC_RATEVHTSS1MCS5 ) ?"VHTSS1MCS5" : \ -(rate ==DESC_RATEVHTSS1MCS6 ) ?"VHTSS1MCS6" : \ -(rate ==DESC_RATEVHTSS1MCS7 ) ?"VHTSS1MCS7" : \ -(rate ==DESC_RATEVHTSS1MCS8 ) ?"VHTSS1MCS8" : \ -(rate ==DESC_RATEVHTSS1MCS9 ) ?"VHTSS1MCS9" : \ -(rate ==DESC_RATEVHTSS2MCS0 ) ?"VHTSS2MCS0" : \ -(rate ==DESC_RATEVHTSS2MCS1 ) ?"VHTSS2MCS1" : \ -(rate ==DESC_RATEVHTSS2MCS2 ) ?"VHTSS2MCS2" : \ -(rate ==DESC_RATEVHTSS2MCS3 ) ?"VHTSS2MCS3" : \ -(rate ==DESC_RATEVHTSS2MCS4 ) ?"VHTSS2MCS4" : \ -(rate ==DESC_RATEVHTSS2MCS5 ) ?"VHTSS2MCS5" : \ -(rate ==DESC_RATEVHTSS2MCS6 ) ?"VHTSS2MCS6" : \ -(rate ==DESC_RATEVHTSS2MCS7 ) ?"VHTSS2MCS7" : \ -(rate ==DESC_RATEVHTSS2MCS8 ) ?"VHTSS2MCS8" : \ -(rate ==DESC_RATEVHTSS2MCS9 ) ?"VHTSS2MCS9" :"UNKNOWN" +(rate ==DESC_RATEMCS15 ) ?"MCS15" :"UNKNOWN" enum{drivers/staging/rtl8723bs/include/hal_com_phycfg.h +0
-4@@ -19,10 +19,6 @@ enum rate_section {HT_MCS8_MCS15 ,HT_MCS16_MCS23 , HT_MCS24_MCS31, -VHT_1SSMCS0_1SSMCS9 , -VHT_2SSMCS0_2SSMCS9 , -VHT_3SSMCS0_3SSMCS9 , - VHT_4SSMCS0_4SSMCS9, }; enum {drivers/staging/rtl8723bs/include/ieee80211.h +0
-45@@ -60,7 +60,6 @@ enum {#define WLAN_STA_HT BIT(11)#define WLAN_STA_WPS BIT(12)#define WLAN_STA_MAYBE_WPS BIT(13) -#define WLAN_STA_VHT BIT(14)#define WLAN_STA_NONERP BIT(31)#define IEEE_CMD_SET_WPA_PARAM 1@@ -135,8 +134,6 @@ enum {RATEID_IDX_BG =6 ,RATEID_IDX_G =7 , RATEID_IDX_B = 8, -RATEID_IDX_VHT_2SS =9 , - RATEID_IDX_VHT_1SS = 10, }; enum network_type {@@ -424,51 +421,10 @@ enum {MGN_MCS29 ,MGN_MCS30 ,MGN_MCS31 , -MGN_VHT1SS_MCS0 , -MGN_VHT1SS_MCS1 , -MGN_VHT1SS_MCS2 , -MGN_VHT1SS_MCS3 , -MGN_VHT1SS_MCS4 , -MGN_VHT1SS_MCS5 , -MGN_VHT1SS_MCS6 , -MGN_VHT1SS_MCS7 , -MGN_VHT1SS_MCS8 , -MGN_VHT1SS_MCS9 , -MGN_VHT2SS_MCS0 , -MGN_VHT2SS_MCS1 , -MGN_VHT2SS_MCS2 , -MGN_VHT2SS_MCS3 , -MGN_VHT2SS_MCS4 , -MGN_VHT2SS_MCS5 , -MGN_VHT2SS_MCS6 , -MGN_VHT2SS_MCS7 , -MGN_VHT2SS_MCS8 , -MGN_VHT2SS_MCS9 , -MGN_VHT3SS_MCS0 , -MGN_VHT3SS_MCS1 , -MGN_VHT3SS_MCS2 , -MGN_VHT3SS_MCS3 , -MGN_VHT3SS_MCS4 , -MGN_VHT3SS_MCS5 , -MGN_VHT3SS_MCS6 , -MGN_VHT3SS_MCS7 , -MGN_VHT3SS_MCS8 , -MGN_VHT3SS_MCS9 , -MGN_VHT4SS_MCS0 , -MGN_VHT4SS_MCS1 , -MGN_VHT4SS_MCS2 , -MGN_VHT4SS_MCS3 , -MGN_VHT4SS_MCS4 , -MGN_VHT4SS_MCS5 , -MGN_VHT4SS_MCS6 , -MGN_VHT4SS_MCS7 , -MGN_VHT4SS_MCS8 , -MGN_VHT4SS_MCS9 , MGN_UNKNOWN };#define IS_HT_RATE (_rate) (_rate >= MGN_MCS0 && _rate <= MGN_MCS31) -#define IS_VHT_RATE (_rate) (_rate >= MGN_VHT1SS_MCS0 && _rate <= MGN_VHT4SS_MCS9)#define IS_CCK_RATE (_rate) (MGN_1M == _rate || _rate == MGN_2M || _rate == MGN_5_5M || _rate == MGN_11M)#define IS_OFDM_RATE (_rate) (MGN_6M <= _rate && _rate <= MGN_54M && _rate != MGN_11M)@@ -625,7 +581,6 @@ enum {RTW_WLAN_CATEGORY_TDLS =12 ,RTW_WLAN_CATEGORY_SELF_PROTECTED =15 ,/* add for CONFIG_IEEE80211W, none 11w also can use */ RTW_WLAN_CATEGORY_WMM =17 , -RTW_WLAN_CATEGORY_VHT =21 , RTW_WLAN_CATEGORY_P2P = 0x7f,/* P2P action frames */ };drivers/staging/rtl8723bs/include/rtl8723b_xmit.h +0
-21@@ -402,27 +402,6 @@ struct txdesc_8723b {#define DESC8723B_RATEMCS13 0x19#define DESC8723B_RATEMCS14 0x1a#define DESC8723B_RATEMCS15 0x1b -#define DESC8723B_RATEVHTSS1MCS0 0x2c -#define DESC8723B_RATEVHTSS1MCS1 0x2d -#define DESC8723B_RATEVHTSS1MCS2 0x2e -#define DESC8723B_RATEVHTSS1MCS3 0x2f -#define DESC8723B_RATEVHTSS1MCS4 0x30 -#define DESC8723B_RATEVHTSS1MCS5 0x31 -#define DESC8723B_RATEVHTSS1MCS6 0x32 -#define DESC8723B_RATEVHTSS1MCS7 0x33 -#define DESC8723B_RATEVHTSS1MCS8 0x34 -#define DESC8723B_RATEVHTSS1MCS9 0x35 -#define DESC8723B_RATEVHTSS2MCS0 0x36 -#define DESC8723B_RATEVHTSS2MCS1 0x37 -#define DESC8723B_RATEVHTSS2MCS2 0x38 -#define DESC8723B_RATEVHTSS2MCS3 0x39 -#define DESC8723B_RATEVHTSS2MCS4 0x3a -#define DESC8723B_RATEVHTSS2MCS5 0x3b -#define DESC8723B_RATEVHTSS2MCS6 0x3c -#define DESC8723B_RATEVHTSS2MCS7 0x3d -#define DESC8723B_RATEVHTSS2MCS8 0x3e -#define DESC8723B_RATEVHTSS2MCS9 0x3f -#define RX_HAL_IS_CCK_RATE_8723B (pDesc)\ (GET_RX_STATUS_DESC_RX_RATE_8723B(pDesc) == DESC8723B_RATE1M ||\drivers/staging/rtl8723bs/include/rtw_ht.h +0
-4@@ -42,10 +42,6 @@ enum {HT_AGG_SIZE_16K =1 ,HT_AGG_SIZE_32K =2 , HT_AGG_SIZE_64K = 3, -VHT_AGG_SIZE_128K =4 , -VHT_AGG_SIZE_256K =5 , -VHT_AGG_SIZE_512K =6 , - VHT_AGG_SIZE_1024K = 7, }; enum {
Re: [PATCH 15/18] staging: rtl8723bs: remove register initializations tied to 802.11ac standard
In reply to Fabio AiutoHi,
Quoted 7 lines · Fabio Aiuto
remove register initializations tied to 802.11ac standard which is not supported by the device.
It's a dangerous operation, relying only on comments, but tested on a Lenovo Ideapad MIIX 300-10IBY tablet seems to work.
Signed-off-by Fabio Aiuto <[email protected]>
TBH I think this patch should be dropped from the series, you are dropping a bunch of register writes which likely are actually doing something, so this is not just dead code removal.
Regards,
Hans
Quoted 34 lines
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 12 ------------ 1 file changed, 12 deletions(-)drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0
-12@@ -1718,24 +1718,12 @@ void _InitBurstPktLen_8723BS(struct adapter *Adapter)struct hal_com_data *pHalData =GET_HAL_DATA (Adapter);rtw_write8 (Adapter,0x4c7 ,rtw_read8 (Adapter,0x4c7 )|BIT (7 ));/* enable single pkt ampdu */ -rtw_write8 (Adapter,REG_RX_PKT_LIMIT_8723B ,0x18 );/* for VHT packet length 11K */ rtw_write8 (Adapter,REG_MAX_AGGR_NUM_8723B ,0x1F );rtw_write8 (Adapter,REG_PIFS_8723B ,0x00 );rtw_write8 (Adapter,REG_FWHW_TXQ_CTRL_8723B ,rtw_read8 (Adapter,REG_FWHW_TXQ_CTRL )&(~BIT (7 )));if (pHalData->AMPDUBurstMode)rtw_write8 (Adapter,REG_AMPDU_BURST_MODE_8723B ,0x5F );rtw_write8 (Adapter,REG_AMPDU_MAX_TIME_8723B ,0x70 ); - -/* ARFB table 9 for 11ac 5G 2SS */ -rtw_write32 (Adapter,REG_ARFR0_8723B ,0x00000010 ); -if (IS_NORMAL_CHIP (pHalData->VersionID)) -rtw_write32 (Adapter,REG_ARFR0_8723B +4 ,0xfffff000 ); -else -rtw_write32 (Adapter,REG_ARFR0_8723B +4 ,0x3e0ff000 ); - -/* ARFB table 10 for 11ac 5G 1SS */ -rtw_write32 (Adapter,REG_ARFR1_8723B ,0x00000010 ); -rtw_write32 (Adapter,REG_ARFR1_8723B +4 ,0x003ff000 ); }static void ResumeTxBeacon (struct adapter *padapter)
Hi Fabio,
Quoted 11 lines · Fabio Aiuto
This patch series removes all occurences of 5Ghz code over the driver as required from driver's TODO list:
- find and remove remaining code valid only for 5 GHz. most of the obvious one have been removed, but things like channel > 14 still exist.
rtl8723bs work on 2.4Ghz band and supports 802.11bgn standards. So all code related to 802.11a/ac standard is removed, as well as code related to channel numbers above 14.
Quoted 8 lines
VHT code is deleted as well, for it's related to 802.11ac.
Comments are fixed accordingly and many unused variables are deleted.
Every single patch of this series has been tested on a Lenovo Ideapad MIIX 300-10IBY except for the last one, for obvious reason (it deletes just the TODO item).
Thank you for your work on this. I've replied to 3 of the patches with some comments. The rest of the series looks ok to me (based on a quick scan of the patches).
Regards,
Hans
Quoted 76 lines
So:
Tested-by Fabio Auto <[email protected]>Fabio Aiuto (18):
staging: rtl8723bs: remove all 5Ghz network types
staging: rtl8723bs: remove code related to unsupported channel
bandwidth
staging: rtl8723bs: remove unused enum items related to channel
bonding
staging: rtl8723bs: rename enum items related to channel bonding
staging: rtl8723bs: remove 5Ghz field in structregistry_priv
staging: rtl8723bs: remove structrt_channel_plan_5g
staging: rtl8723bs: remove all branchings between 2.4Ghz and 5Ghz band
types
staging: rtl8723bs: beautify prototypes ininclude/hal_com_phycfg.h
staging: rtl8723bs: remove 5Ghz code related to channel plan
definition
staging: rtl8723bs: remove some unused 5Ghz macro definitions
staging: rtl8723bs: remove 5Ghz code related to RF power calibration
staging: rtl8723bs: remove VHT dead code
staging: rtl8723bs: remove unusedODM_CMNINFO_BOARD_TYPEenum item
staging: rtl8723bs: fix macro value for 2.4Ghz only device
staging: rtl8723bs: remove register initializations tied to 802.11ac
standard
staging: rtl8723bs: remove obsolete 5Ghz comments
staging: rtl8723bs: fix check allowing 5Ghz settings
staging: rtl8723bs: remove item from TODO listdrivers/staging/rtl8723bs/TODO | 2 - drivers/staging/rtl8723bs/core/rtw_ap.c | 10 +- .../staging/rtl8723bs/core/rtw_ieee80211.c | 22 +- drivers/staging/rtl8723bs/core/rtw_mlme.c | 10 - drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 328 ++--- .../staging/rtl8723bs/core/rtw_wlan_util.c | 29 +- drivers/staging/rtl8723bs/core/rtw_xmit.c | 5 +- .../staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 4 +- .../staging/rtl8723bs/hal/HalBtc8723b2Ant.c | 5 +- drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 1 - .../staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 17 +- .../staging/rtl8723bs/hal/HalHWImg8723B_RF.c | 595 ++++----- .../staging/rtl8723bs/hal/HalPhyRf_8723B.c | 19 +- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 - drivers/staging/rtl8723bs/hal/hal_com.c | 241 ---- .../staging/rtl8723bs/hal/hal_com_phycfg.c | 1059 +++-------------- drivers/staging/rtl8723bs/hal/odm.c | 50 - drivers/staging/rtl8723bs/hal/odm.h | 42 +- drivers/staging/rtl8723bs/hal/odm_DIG.c | 2 - .../rtl8723bs/hal/odm_EdcaTurboCheck.c | 4 +- .../rtl8723bs/hal/odm_RegConfig8723B.c | 5 +- .../rtl8723bs/hal/odm_RegConfig8723B.h | 2 - drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 1 - .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 53 +- .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 43 +- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 5 - .../rtl8723bs/include/Hal8192CPhyReg.h | 2 - drivers/staging/rtl8723bs/include/drv_types.h | 10 +- drivers/staging/rtl8723bs/include/hal_com.h | 62 +- .../rtl8723bs/include/hal_com_phycfg.h | 198 +-- .../staging/rtl8723bs/include/hal_com_reg.h | 1 - drivers/staging/rtl8723bs/include/hal_data.h | 40 +- drivers/staging/rtl8723bs/include/hal_pg.h | 2 - drivers/staging/rtl8723bs/include/hal_phy.h | 10 - drivers/staging/rtl8723bs/include/ieee80211.h | 67 +- .../staging/rtl8723bs/include/rtl8723b_xmit.h | 21 - drivers/staging/rtl8723bs/include/rtw_ht.h | 4 - .../staging/rtl8723bs/include/rtw_mlme_ext.h | 52 +- drivers/staging/rtl8723bs/include/rtw_rf.h | 33 +- drivers/staging/rtl8723bs/include/wifi.h | 1 - .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 - .../staging/rtl8723bs/os_dep/ioctl_linux.c | 8 +- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 13 +- drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 4 - 44 files changed, 640 insertions(+), 2450 deletions(-)
Re: [PATCH 01/18] staging: rtl8723bs: remove all 5Ghz network types
In reply to Hans de GoedeHi Hans,
thank you for your reviews,
Quoted 50 lines · Hans de Goede
Hi,
Thank you for your work in this.
Quoted 28 lines · Fabio Aiuto
remove all 5Ghz network types. rtl8723bs works on
802.11bgn standards and on 2.4Ghz band.So remove all code related to 802.11a and 802.11ac standards, which the device doesn't support.
Signed-off-by Fabio Aiuto <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_ap.c | 10 +--- .../staging/rtl8723bs/core/rtw_ieee80211.c | 22 ++------ drivers/staging/rtl8723bs/core/rtw_mlme.c | 10 ---- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 55 ------------------- .../staging/rtl8723bs/core/rtw_wlan_util.c | 14 +---- drivers/staging/rtl8723bs/hal/odm.c | 30 ---------- drivers/staging/rtl8723bs/hal/odm.h | 3 - .../rtl8723bs/hal/odm_EdcaTurboCheck.c | 4 +- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 5 -- drivers/staging/rtl8723bs/include/hal_phy.h | 3 - drivers/staging/rtl8723bs/include/ieee80211.h | 22 +------- drivers/staging/rtl8723bs/include/wifi.h | 1 - drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +- 13 files changed, 14 insertions(+), 167 deletions(-)drivers/staging/rtl8723bs/core/rtw_ap.c +0
-0drivers/staging/rtl8723bs/core/rtw_ap.c void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level) · line 344
Quoted 2 lines
drivers/staging/rtl8723bs/core/rtw_ap.c +0
-0@@ -343,10 +343,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)if (pcur_network->Configuration.DSConfig >14 ) {This if sounds like it is checking for a channel-nr greater then 14, so maybe this entire block should go away ?
drivers/staging/rtl8723bs/core/rtw_ap.c void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level) · line 346
Quoted 6 lines
drivers/staging/rtl8723bs/core/rtw_ap.c +1
-4if (tx_ra_bitmap &0xffff000 ) - sta_band |=WIRELESS_11_5N ; - -if (tx_ra_bitmap &0xff0 ) - sta_band |=WIRELESS_11A ; + sta_band |=WIRELESS_INVALID ;You are replacing 2 if-s with 1 here, so you should also or the 2 masks being checked for togehter, iow there now should be one if like this:
Quoted 7 lines
if (tx_ra_bitmap & (0xffff000 | 0xff0)) sta_band |= WIRELESS_INVALID;Which can be simplified to:
if (tx_ra_bitmap & 0xffffff0) sta_band |= WIRELESS_INVALID;
The idea was to just set unconditionally sta_band to WIRELESS_INVALID for we are on a channel > 14, so by definition in an invalid wireless network, no need to check further.
Quoted 442 lines
The rest of the patch looks ok (from a quick scan).
Regards,
Hans
Quoted 432 lines
drivers/staging/rtl8723bs/core/rtw_ap.c +1
-4}else {if (tx_ra_bitmap &0xffff000 ) sta_band |=WIRELESS_11_24N ;@@ -412,7 +409,7 @@ void update_bmc_sta(struct adapter *padapter) }else if (network_type ==WIRELESS_INVALID ) {/* error handling */ if (pcur_network->Configuration.DSConfig >14 ) - network_type =WIRELESS_11A ; + network_type =WIRELESS_INVALID ;else network_type =WIRELESS_11B ; }@@ -1115,9 +1112,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)case WIRELESS_11BG_24N : pbss_network->NetworkTypeInUse = Ndis802_11OFDM24;break ; -case WIRELESS_11A : - pbss_network->NetworkTypeInUse = Ndis802_11OFDM5; -break ;default : pbss_network->NetworkTypeInUse = Ndis802_11OFDM24;break ;drivers/staging/rtl8723bs/core/rtw_ieee80211.c +4
-18@@ -96,10 +96,7 @@ bool rtw_is_cckratesonly_included(u8 *rate)int rtw_check_network_type (unsigned char *rate,int ratelen,int channel) {if (channel >14 ) { -if (rtw_is_cckrates_included (rate)) -return WIRELESS_INVALID ; -else -return WIRELESS_11A ; +return WIRELESS_INVALID ; }else {/* could be pure B, pure G, or B/G */ if (rtw_is_cckratesonly_included (rate))return WIRELESS_11B ;@@ -266,10 +263,6 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode)break ;case WIRELESS_11G : -case WIRELESS_11A : -case WIRELESS_11_5N : -case WIRELESS_11A_5N :/* Todo: no basic rate for ofdm ? */ -case WIRELESS_11_5AC :memcpy (SupportedRates,WIFI_OFDMRATES ,IEEE80211_NUM_OFDM_RATESLEN );break ;@@ -327,14 +320,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) ie =rtw_set_ie (ie,WLAN_EID_SSID , pdev_network->Ssid.SsidLength, pdev_network->Ssid.Ssid, &sz);/* supported rates */ -if (pregistrypriv->wireless_mode ==WIRELESS_11ABGN ) { -if (pdev_network->Configuration.DSConfig >14 ) - wireless_mode =WIRELESS_11A_5N ; -else - wireless_mode =WIRELESS_11BG_24N ; - }else { - wireless_mode = pregistrypriv->wireless_mode; - } + wireless_mode = pregistrypriv->wireless_mode;rtw_set_supported_rate (pdev_network->SupportedRates, wireless_mode);@@ -359,8 +345,8 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) }/* HT Cap. */ -if (((pregistrypriv->wireless_mode&WIRELESS_11_5N ) || (pregistrypriv->wireless_mode&WIRELESS_11_24N )) - && (pregistrypriv->ht_enable == true)) { +if ((pregistrypriv->wireless_mode &WIRELESS_11_24N ) && + (pregistrypriv->ht_enable == true)) {/* todo: */ }drivers/staging/rtl8723bs/core/rtw_mlme.c +0
-10@@ -2184,16 +2184,6 @@ void rtw_update_registrypriv_dev_network(struct adapter *adapter)case WIRELESS_11BG_24N : pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24);break ; -case WIRELESS_11A : -case WIRELESS_11A_5N : - pdev_network->NetworkTypeInUse = (Ndis802_11OFDM5); -break ; -case WIRELESS_11ABGN : -if (pregistrypriv->channel >14 ) - pdev_network->NetworkTypeInUse = (Ndis802_11OFDM5); -else - pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24); -break ;default :/* TODO */ break ;drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0
-55@@ -4478,61 +4478,6 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid } } -if (pregistrypriv->wireless_mode &WIRELESS_11A ) { -do { -if ((i ==MAX_CHANNEL_NUM ) || - (chplan_sta[i].ChannelNum ==0 )) -break ; - -if ((j == chplan_ap.Len) || (chplan_ap.Channel[j] ==0 )) -break ; - -if (chplan_sta[i].ChannelNum == chplan_ap.Channel[j]) { - chplan_new[k].ChannelNum = chplan_ap.Channel[j]; - chplan_new[k].ScanType =SCAN_ACTIVE ; - i++; - j++; - k++; - }else if (chplan_sta[i].ChannelNum < chplan_ap.Channel[j]) { - chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum; -/* chplan_new[k].ScanType = chplan_sta[i].ScanType; */ - chplan_new[k].ScanType =SCAN_PASSIVE ; - i++; - k++; - }else if (chplan_sta[i].ChannelNum > chplan_ap.Channel[j]) { - chplan_new[k].ChannelNum = chplan_ap.Channel[j]; - chplan_new[k].ScanType =SCAN_ACTIVE ; - j++; - k++; - } - }while (1 ); - -/* change AP not support channel to Passive scan */ -while ((i <MAX_CHANNEL_NUM ) && (chplan_sta[i].ChannelNum !=0 )) { - chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum; -/* chplan_new[k].ScanType = chplan_sta[i].ScanType; */ - chplan_new[k].ScanType =SCAN_PASSIVE ; - i++; - k++; - } - -/* add channel AP supported */ -while ((j < chplan_ap.Len) && (chplan_ap.Channel[j] !=0 )) { - chplan_new[k].ChannelNum = chplan_ap.Channel[j]; - chplan_new[k].ScanType =SCAN_ACTIVE ; - j++; - k++; - } - }else { -/* keep original STA 5G channel plan */ -while ((i <MAX_CHANNEL_NUM ) && (chplan_sta[i].ChannelNum !=0 )) { - chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum; - chplan_new[k].ScanType = chplan_sta[i].ScanType; - i++; - k++; - } - } - pmlmeext->update_channel_plan_by_ap_done =1 ; }drivers/staging/rtl8723bs/core/rtw_wlan_util.c +3
-11@@ -55,9 +55,6 @@ u8 networktype_to_raid_ex(struct adapter *adapter, struct sta_info *psta)if (cur_rf_type ==RF_1T1R ) { rf_type =RF_1T1R ; - }else if (IsSupportedVHT (psta->wireless_mode)) { -if (psta->ra_mask &0xffc00000 ) - rf_type =RF_2T2R ; }else if (IsSupportedHT (psta->wireless_mode)) {if (psta->ra_mask &0xfff00000 ) rf_type =RF_2T2R ;@@ -67,7 +64,6 @@ u8 networktype_to_raid_ex(struct adapter *adapter, struct sta_info *psta)case WIRELESS_11B : raid =RATEID_IDX_B ;break ; -case WIRELESS_11A :case WIRELESS_11G : raid =RATEID_IDX_G ;break ;@@ -75,8 +71,6 @@ u8 networktype_to_raid_ex(struct adapter *adapter, struct sta_info *psta) raid =RATEID_IDX_BG ;break ;case WIRELESS_11_24N : -case WIRELESS_11_5N : -case WIRELESS_11A_5N :case WIRELESS_11G_24N :if (rf_type ==RF_2T2R ) raid =RATEID_IDX_GN_N2SS ;@@ -827,7 +821,7 @@ void WMMOnAssocRsp(struct adapter *padapter)AIFS = aSifsTime + (2 * pmlmeinfo->slotTime); -if (pmlmeext->cur_wireless_mode & (WIRELESS_11G |WIRELESS_11A )) { +if (pmlmeext->cur_wireless_mode &WIRELESS_11G ) { ECWMin =4 ; ECWMax =10 ; }else if (pmlmeext->cur_wireless_mode &WIRELESS_11B ) {@@ -1623,7 +1617,7 @@ void update_capinfo(struct adapter *Adapter, u16 updateCap) pmlmeinfo->slotTime =NON_SHORT_SLOT_TIME ; }else {/* Filen: See 802.11-2007 p.90 */ -if (pmlmeext->cur_wireless_mode & (WIRELESS_11_24N |WIRELESS_11A |WIRELESS_11_5N |WIRELESS_11AC )) { +if (pmlmeext->cur_wireless_mode & (WIRELESS_11_24N )) { pmlmeinfo->slotTime =SHORT_SLOT_TIME ; }else if (pmlmeext->cur_wireless_mode & (WIRELESS_11G )) {if ((updateCap & cShortSlotTime)/* && (!(pMgntInfo->pHTInfo->RT2RT_HT_Mode & RT_HT_CAP_USE_LONG_PREAMBLE)) */ )@@ -1653,9 +1647,7 @@ void update_wireless_mode(struct adapter *padapter)if ((pmlmeinfo->HT_info_enable) && (pmlmeinfo->HT_caps_enable)) pmlmeinfo->HT_enable =1 ; -if (pmlmeinfo->VHT_enable) - network_type =WIRELESS_11AC ; -else if (pmlmeinfo->HT_enable) +if (pmlmeinfo->HT_enable) network_type =WIRELESS_11_24N ;if (rtw_is_cckratesonly_included (rate))drivers/staging/rtl8723bs/hal/odm.c +0
-30@@ -377,7 +377,6 @@ u32 ODM_Get_Rate_Bitmap(break ;case (ODM_WM_G ): -case (ODM_WM_A ):if (rssi_level ==DM_RATR_STA_HIGH ) rate_bitmap =0x00000f00 ;else @@ -396,7 +395,6 @@ u32 ODM_Get_Rate_Bitmap(case (ODM_WM_B |ODM_WM_G |ODM_WM_N24G ):case (ODM_WM_B |ODM_WM_N24G ):case (ODM_WM_G |ODM_WM_N24G ): -case (ODM_WM_A |ODM_WM_N5G ):if (pDM_Odm->RFType ==ODM_1T2R || pDM_Odm->RFType ==ODM_1T1R ) {if (rssi_level ==DM_RATR_STA_HIGH ) rate_bitmap =0x000f0000 ;@@ -422,34 +420,6 @@ u32 ODM_Get_Rate_Bitmap( }break ; -case (ODM_WM_AC |ODM_WM_G ): -if (rssi_level ==1 ) - rate_bitmap =0xfc3f0000 ; -else if (rssi_level ==2 ) - rate_bitmap =0xfffff000 ; -else - rate_bitmap =0xffffffff ; -break ; - -case (ODM_WM_AC |ODM_WM_A ): - -if (pDM_Odm->RFType ==RF_1T1R ) { -if (rssi_level ==1 )/* add by Gary for ac-series */ - rate_bitmap =0x003f8000 ; -else if (rssi_level ==2 ) - rate_bitmap =0x003ff000 ; -else - rate_bitmap =0x003ff010 ; - }else { -if (rssi_level ==1 )/* add by Gary for ac-series */ - rate_bitmap =0xfe3f8000 ;/* VHT 2SS MCS3~9 */ -else if (rssi_level ==2 ) - rate_bitmap =0xfffff000 ;/* VHT 2SS MCS0~9 */ -else - rate_bitmap =0xfffff010 ;/* All */ - } -break ; -default :if (pDM_Odm->RFType ==RF_1T2R ) rate_bitmap =0x000fffff ;drivers/staging/rtl8723bs/hal/odm.h +0
-3@@ -455,11 +455,8 @@ enum { /* tag_Wireless_Mode_Definition */ODM_WM_UNKNOWN =0x0 ,ODM_WM_B =BIT0 ,ODM_WM_G =BIT1 , -ODM_WM_A =BIT2 ,ODM_WM_N24G =BIT3 , -ODM_WM_N5G =BIT4 , ODM_WM_AUTO = BIT5, - ODM_WM_AC = BIT6, };/* ODM_CMNINFO_BAND */ drivers/staging/rtl8723bs/hal/odm_EdcaTurboCheck.c +1
-3@@ -124,12 +124,10 @@ void odm_EdcaTurboCheckCE(void *pDM_VOID) }else if ((iot_peer ==HT_IOT_PEER_CISCO ) && ((wirelessmode ==ODM_WM_G ) || (wirelessmode == (ODM_WM_B |ODM_WM_G )) || - (wirelessmode ==ODM_WM_A ) || (wirelessmode ==ODM_WM_B ))) {EDCA_BE_DL = edca_setting_DL_GMode[iot_peer]; }else if ((iot_peer ==HT_IOT_PEER_AIRGO ) && - ((wirelessmode ==ODM_WM_G ) || - (wirelessmode ==ODM_WM_A ))) { + (wirelessmode ==ODM_WM_G )) {EDCA_BE_DL =0xa630 ; }else if (iot_peer ==HT_IOT_PEER_MARVELL ) {EDCA_BE_DL = edca_setting_DL[iot_peer];drivers/staging/rtl8723bs/hal/sdio_halinit.c +0
-5@@ -512,8 +512,6 @@ static void _InitOperationMode(struct adapter *padapter)case WIRELESS_MODE_B : regBwOpMode =BW_OPMODE_20MHZ ;break ; -case WIRELESS_MODE_A : -break ;case WIRELESS_MODE_G : regBwOpMode =BW_OPMODE_20MHZ ;break ;@@ -525,9 +523,6 @@ static void _InitOperationMode(struct adapter *padapter)/* CCK rate will be filtered out only when associated AP does not support it. */ regBwOpMode =BW_OPMODE_20MHZ ;break ; -case WIRELESS_MODE_N_5G : - regBwOpMode =BW_OPMODE_5G ; -break ;default :/* for MacOSX compiler warning. */ break ;drivers/staging/rtl8723bs/include/hal_phy.h +0
-3@@ -51,13 +51,10 @@ enum rf_path {enum wireless_mode {WIRELESS_MODE_UNKNOWN =0x00 , -WIRELESS_MODE_A =0x01 ,WIRELESS_MODE_B =0x02 ,WIRELESS_MODE_G =0x04 ,WIRELESS_MODE_AUTO =0x08 ,WIRELESS_MODE_N_24G =0x10 , -WIRELESS_MODE_N_5G =0x20 , -WIRELESS_MODE_AC_5G =0x40 ,WIRELESS_MODE_AC_24G =0x80 ,WIRELESS_MODE_AC_ONLY =0x100 , };drivers/staging/rtl8723bs/include/ieee80211.h +3
-19@@ -144,33 +144,20 @@ enum network_type {/* Sub-Element */ WIRELESS_11B =BIT (0 ),/* tx: cck only , rx: cck only, hw: cck */ WIRELESS_11G =BIT (1 ),/* tx: ofdm only, rx: ofdm & cck, hw: cck & ofdm */ -WIRELESS_11A =BIT (2 ),/* tx: ofdm only, rx: ofdm only, hw: ofdm only */ WIRELESS_11_24N =BIT (3 ),/* tx: MCS only, rx: MCS & cck, hw: MCS & cck */ -WIRELESS_11_5N =BIT (4 ),/* tx: MCS only, rx: MCS & ofdm, hw: ofdm only */ WIRELESS_AUTO =BIT (5 ), -WIRELESS_11AC =BIT (6 ),/* Combination */ /* Type for current wireless mode */ WIRELESS_11BG = (WIRELESS_11B |WIRELESS_11G ),/* tx: cck & ofdm, rx: cck & ofdm & MCS, hw: cck & ofdm */ WIRELESS_11G_24N = (WIRELESS_11G |WIRELESS_11_24N ),/* tx: ofdm & MCS, rx: ofdm & cck & MCS, hw: cck & ofdm */ -WIRELESS_11A_5N = (WIRELESS_11A |WIRELESS_11_5N ),/* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */ WIRELESS_11B_24N = (WIRELESS_11B |WIRELESS_11_24N ),/* tx: ofdm & cck & MCS, rx: ofdm & cck & MCS, hw: ofdm & cck */ WIRELESS_11BG_24N = (WIRELESS_11B|WIRELESS_11G|WIRELESS_11_24N), /* tx: ofdm & cck & MCS, rx: ofdm & cck & MCS, hw: ofdm & cck */ -WIRELESS_11_24AC = (WIRELESS_11G |WIRELESS_11AC ), -WIRELESS_11_5AC = (WIRELESS_11A |WIRELESS_11AC ), - - -/* Type for registry default wireless mode */ -WIRELESS_11AGN = (WIRELESS_11A |WIRELESS_11G |WIRELESS_11_24N |WIRELESS_11_5N ),/* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */ -WIRELESS_11ABGN = (WIRELESS_11A |WIRELESS_11B |WIRELESS_11G |WIRELESS_11_24N |WIRELESS_11_5N ), -WIRELESS_MODE_24G = (WIRELESS_11B |WIRELESS_11G |WIRELESS_11_24N |WIRELESS_11AC ), - WIRELESS_MODE_MAX = (WIRELESS_11A|WIRELESS_11B|WIRELESS_11G|WIRELESS_11_24N|WIRELESS_11_5N|WIRELESS_11AC), };#define SUPPORTED_24G_NETTYPE_MSK (WIRELESS_11B | WIRELESS_11G | WIRELESS_11_24N) -#define IsLegacyOnly (NetType) ((NetType) == ((NetType) & (WIRELESS_11BG|WIRELESS_11A))) +#define IsLegacyOnly (NetType) ((NetType) == ((NetType) & (WIRELESS_11BG)))#define IsSupported24G (NetType) ((NetType) & SUPPORTED_24G_NETTYPE_MSK ? true : false)@@ -182,11 +169,8 @@ enum network_type {#define IsSupportedRxHT (NetType) IsEnableHWOFDM(NetType)#define IsSupportedTxCCK (NetType) (((NetType) & (WIRELESS_11B)) ? true : false) -#define IsSupportedTxOFDM (NetType) (((NetType) & (WIRELESS_11G|WIRELESS_11A)) ? true : false) -#define IsSupportedHT (NetType) (((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N)) ? true : false) - -#define IsSupportedVHT (NetType) (((NetType) & (WIRELESS_11AC)) ? true : false) - +#define IsSupportedTxOFDM (NetType) (((NetType) & (WIRELESS_11G) ? true : false) +#define IsSupportedHT (NetType) (((NetType) & (WIRELESS_11_24N)) ? true : false)struct ieee_param {u32 cmd;drivers/staging/rtl8723bs/include/wifi.h +0
-1@@ -336,7 +336,6 @@ static inline int IsFrameTypeCtrl(unsigned char *pframe)#define _PRE_ALLOCICVHDR_ 5#define _PRE_ALLOCMICHDR_ 6 -#define _SIFSTIME_ ((priv->pmib->dot11BssType.net_work_type&WIRELESS_11A)?16:10)#define _ACKCTSLNG_ 14/* 14 bytes long, including crclng */ #define _CRCLNG_ 4drivers/staging/rtl8723bs/os_dep/os_intfs.c +1
-1@@ -22,7 +22,7 @@ static int rtw_lbkmode;/* RTL8712_AIR_TRX; */static int rtw_network_mode = Ndis802_11IBSS;/* Ndis802_11Infrastructure;infra, ad-hoc, auto */ /* struct ndis_802_11_ssid ssid; */ static int rtw_channel =1 ;/* ad-hoc support requirement */ -static int rtw_wireless_mode =WIRELESS_MODE_MAX ; +static int rtw_wireless_mode =WIRELESS_11BG_24N ;static int rtw_vrtl_carrier_sense =AUTO_VCS ;static int rtw_vcs_type =RTS_CTS ;/* */ static int rtw_rts_thresh =2347 ;/* */
Re: [PATCH 12/18] staging: rtl8723bs: remove VHT dead code
In reply to Hans de GoedeQuoted 335 lines · Hans de Goede
Hi,
Quoted 332 lines · Fabio Aiuto
remove VHT dead code, as the device doesn't support VHT (which is a 802.11ac capability).
Signed-off-by Fabio Aiuto <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 1 - drivers/staging/rtl8723bs/hal/hal_com.c | 241 ----------- .../staging/rtl8723bs/hal/hal_com_phycfg.c | 383 +----------------- drivers/staging/rtl8723bs/include/hal_com.h | 62 +-- .../rtl8723bs/include/hal_com_phycfg.h | 4 - drivers/staging/rtl8723bs/include/ieee80211.h | 45 -- .../staging/rtl8723bs/include/rtl8723b_xmit.h | 21 - drivers/staging/rtl8723bs/include/rtw_ht.h | 4 - 8 files changed, 9 insertions(+), 752 deletions(-)drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0
-1@@ -46,7 +46,6 @@ static struct action_handler OnAction_tbl[] = { {RTW_WLAN_CATEGORY_UNPROTECTED_WNM, "ACTION_UNPROTECTED_WNM", &DoReserved}, {RTW_WLAN_CATEGORY_SELF_PROTECTED, "ACTION_SELF_PROTECTED", &DoReserved}, {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &DoReserved}, - {RTW_WLAN_CATEGORY_VHT, "ACTION_VHT", &DoReserved}, {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &DoReserved}, };drivers/staging/rtl8723bs/hal/hal_com.c +0
-241@@ -295,126 +295,6 @@ u8 MRateToHwRate(u8 rate)case MGN_MCS31 : ret =DESC_RATEMCS31 ;break ; -case MGN_VHT1SS_MCS0 : - ret =DESC_RATEVHTSS1MCS0 ; -break ; -case MGN_VHT1SS_MCS1 : - ret =DESC_RATEVHTSS1MCS1 ; -break ; -case MGN_VHT1SS_MCS2 : - ret =DESC_RATEVHTSS1MCS2 ; -break ; -case MGN_VHT1SS_MCS3 : - ret =DESC_RATEVHTSS1MCS3 ; -break ; -case MGN_VHT1SS_MCS4 : - ret =DESC_RATEVHTSS1MCS4 ; -break ; -case MGN_VHT1SS_MCS5 : - ret =DESC_RATEVHTSS1MCS5 ; -break ; -case MGN_VHT1SS_MCS6 : - ret =DESC_RATEVHTSS1MCS6 ; -break ; -case MGN_VHT1SS_MCS7 : - ret =DESC_RATEVHTSS1MCS7 ; -break ; -case MGN_VHT1SS_MCS8 : - ret =DESC_RATEVHTSS1MCS8 ; -break ; -case MGN_VHT1SS_MCS9 : - ret =DESC_RATEVHTSS1MCS9 ; -break ; -case MGN_VHT2SS_MCS0 : - ret =DESC_RATEVHTSS2MCS0 ; -break ; -case MGN_VHT2SS_MCS1 : - ret =DESC_RATEVHTSS2MCS1 ; -break ; -case MGN_VHT2SS_MCS2 : - ret =DESC_RATEVHTSS2MCS2 ; -break ; -case MGN_VHT2SS_MCS3 : - ret =DESC_RATEVHTSS2MCS3 ; -break ; -case MGN_VHT2SS_MCS4 : - ret =DESC_RATEVHTSS2MCS4 ; -break ; -case MGN_VHT2SS_MCS5 : - ret =DESC_RATEVHTSS2MCS5 ; -break ; -case MGN_VHT2SS_MCS6 : - ret =DESC_RATEVHTSS2MCS6 ; -break ; -case MGN_VHT2SS_MCS7 : - ret =DESC_RATEVHTSS2MCS7 ; -break ; -case MGN_VHT2SS_MCS8 : - ret =DESC_RATEVHTSS2MCS8 ; -break ; -case MGN_VHT2SS_MCS9 : - ret =DESC_RATEVHTSS2MCS9 ; -break ; -case MGN_VHT3SS_MCS0 : - ret =DESC_RATEVHTSS3MCS0 ; -break ; -case MGN_VHT3SS_MCS1 : - ret =DESC_RATEVHTSS3MCS1 ; -break ; -case MGN_VHT3SS_MCS2 : - ret =DESC_RATEVHTSS3MCS2 ; -break ; -case MGN_VHT3SS_MCS3 : - ret =DESC_RATEVHTSS3MCS3 ; -break ; -case MGN_VHT3SS_MCS4 : - ret =DESC_RATEVHTSS3MCS4 ; -break ; -case MGN_VHT3SS_MCS5 : - ret =DESC_RATEVHTSS3MCS5 ; -break ; -case MGN_VHT3SS_MCS6 : - ret =DESC_RATEVHTSS3MCS6 ; -break ; -case MGN_VHT3SS_MCS7 : - ret =DESC_RATEVHTSS3MCS7 ; -break ; -case MGN_VHT3SS_MCS8 : - ret =DESC_RATEVHTSS3MCS8 ; -break ; -case MGN_VHT3SS_MCS9 : - ret =DESC_RATEVHTSS3MCS9 ; -break ; -case MGN_VHT4SS_MCS0 : - ret =DESC_RATEVHTSS4MCS0 ; -break ; -case MGN_VHT4SS_MCS1 : - ret =DESC_RATEVHTSS4MCS1 ; -break ; -case MGN_VHT4SS_MCS2 : - ret =DESC_RATEVHTSS4MCS2 ; -break ; -case MGN_VHT4SS_MCS3 : - ret =DESC_RATEVHTSS4MCS3 ; -break ; -case MGN_VHT4SS_MCS4 : - ret =DESC_RATEVHTSS4MCS4 ; -break ; -case MGN_VHT4SS_MCS5 : - ret =DESC_RATEVHTSS4MCS5 ; -break ; -case MGN_VHT4SS_MCS6 : - ret =DESC_RATEVHTSS4MCS6 ; -break ; -case MGN_VHT4SS_MCS7 : - ret =DESC_RATEVHTSS4MCS7 ; -break ; -case MGN_VHT4SS_MCS8 : - ret =DESC_RATEVHTSS4MCS8 ; -break ; -case MGN_VHT4SS_MCS9 : - ret =DESC_RATEVHTSS4MCS9 ; -break ;default :break ; }@@ -559,127 +439,6 @@ u8 HwRateToMRate(u8 rate)case DESC_RATEMCS31 : ret_rate =MGN_MCS31 ;break ; -case DESC_RATEVHTSS1MCS0 : - ret_rate =MGN_VHT1SS_MCS0 ; -break ; -case DESC_RATEVHTSS1MCS1 : - ret_rate =MGN_VHT1SS_MCS1 ; -break ; -case DESC_RATEVHTSS1MCS2 : - ret_rate =MGN_VHT1SS_MCS2 ; -break ; -case DESC_RATEVHTSS1MCS3 : - ret_rate =MGN_VHT1SS_MCS3 ; -break ; -case DESC_RATEVHTSS1MCS4 : - ret_rate =MGN_VHT1SS_MCS4 ; -break ; -case DESC_RATEVHTSS1MCS5 : - ret_rate =MGN_VHT1SS_MCS5 ; -break ; -case DESC_RATEVHTSS1MCS6 : - ret_rate =MGN_VHT1SS_MCS6 ; -break ; -case DESC_RATEVHTSS1MCS7 : - ret_rate =MGN_VHT1SS_MCS7 ; -break ; -case DESC_RATEVHTSS1MCS8 : - ret_rate =MGN_VHT1SS_MCS8 ; -break ; -case DESC_RATEVHTSS1MCS9 : - ret_rate =MGN_VHT1SS_MCS9 ; -break ; -case DESC_RATEVHTSS2MCS0 : - ret_rate =MGN_VHT2SS_MCS0 ; -break ; -case DESC_RATEVHTSS2MCS1 : - ret_rate =MGN_VHT2SS_MCS1 ; -break ; -case DESC_RATEVHTSS2MCS2 : - ret_rate =MGN_VHT2SS_MCS2 ; -break ; -case DESC_RATEVHTSS2MCS3 : - ret_rate =MGN_VHT2SS_MCS3 ; -break ; -case DESC_RATEVHTSS2MCS4 : - ret_rate =MGN_VHT2SS_MCS4 ; -break ; -case DESC_RATEVHTSS2MCS5 : - ret_rate =MGN_VHT2SS_MCS5 ; -break ; -case DESC_RATEVHTSS2MCS6 : - ret_rate =MGN_VHT2SS_MCS6 ; -break ; -case DESC_RATEVHTSS2MCS7 : - ret_rate =MGN_VHT2SS_MCS7 ; -break ; -case DESC_RATEVHTSS2MCS8 : - ret_rate =MGN_VHT2SS_MCS8 ; -break ; -case DESC_RATEVHTSS2MCS9 : - ret_rate =MGN_VHT2SS_MCS9 ; -break ; -case DESC_RATEVHTSS3MCS0 : - ret_rate =MGN_VHT3SS_MCS0 ; -break ; -case DESC_RATEVHTSS3MCS1 : - ret_rate =MGN_VHT3SS_MCS1 ; -break ; -case DESC_RATEVHTSS3MCS2 : - ret_rate =MGN_VHT3SS_MCS2 ; -break ; -case DESC_RATEVHTSS3MCS3 : - ret_rate =MGN_VHT3SS_MCS3 ; -break ; -case DESC_RATEVHTSS3MCS4 : - ret_rate =MGN_VHT3SS_MCS4 ; -break ; -case DESC_RATEVHTSS3MCS5 : - ret_rate =MGN_VHT3SS_MCS5 ; -break ; -case DESC_RATEVHTSS3MCS6 : - ret_rate =MGN_VHT3SS_MCS6 ; -break ; -case DESC_RATEVHTSS3MCS7 : - ret_rate =MGN_VHT3SS_MCS7 ; -break ; -case DESC_RATEVHTSS3MCS8 : - ret_rate =MGN_VHT3SS_MCS8 ; -break ; -case DESC_RATEVHTSS3MCS9 : - ret_rate =MGN_VHT3SS_MCS9 ; -break ; -case DESC_RATEVHTSS4MCS0 : - ret_rate =MGN_VHT4SS_MCS0 ; -break ; -case DESC_RATEVHTSS4MCS1 : - ret_rate =MGN_VHT4SS_MCS1 ; -break ; -case DESC_RATEVHTSS4MCS2 : - ret_rate =MGN_VHT4SS_MCS2 ; -break ; -case DESC_RATEVHTSS4MCS3 : - ret_rate =MGN_VHT4SS_MCS3 ; -break ; -case DESC_RATEVHTSS4MCS4 : - ret_rate =MGN_VHT4SS_MCS4 ; -break ; -case DESC_RATEVHTSS4MCS5 : - ret_rate =MGN_VHT4SS_MCS5 ; -break ; -case DESC_RATEVHTSS4MCS6 : - ret_rate =MGN_VHT4SS_MCS6 ; -break ; -case DESC_RATEVHTSS4MCS7 : - ret_rate =MGN_VHT4SS_MCS7 ; -break ; -case DESC_RATEVHTSS4MCS8 : - ret_rate =MGN_VHT4SS_MCS8 ; -break ; -case DESC_RATEVHTSS4MCS9 : - ret_rate =MGN_VHT4SS_MCS9 ; -break ; -default :break ; }drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-24@@ -39,18 +39,6 @@ u8 PHY_GetTxPowerByRateBase(struct adapter *Adapter, u8 RfPath,case HT_MCS24_MCS31 : value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][5 ];break ; -case VHT_1SSMCS0_1SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][6 ]; -break ; -case VHT_2SSMCS0_2SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][7 ]; -break ; -case VHT_3SSMCS0_3SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][8 ]; -break ; -case VHT_4SSMCS0_4SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][9 ]; -break ;default :break ; }@@ -91,18 +79,6 @@ phy_SetTxPowerByRateBase(case HT_MCS24_MCS31 : pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][5 ] = Value;break ; -case VHT_1SSMCS0_1SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][6 ] = Value; -break ; -case VHT_2SSMCS0_2SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][7 ] = Value; -break ; -case VHT_3SSMCS0_3SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][8 ] = Value; -break ; -case VHT_4SSMCS0_4SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][9 ] = Value; -break ;default :break ; }@@ -131,14 +107,6 @@ struct adapter *padapter base =PHY_GetTxPowerByRate (padapter, path,RF_3TX ,MGN_MCS23 );phy_SetTxPowerByRateBase (padapter, path,HT_MCS16_MCS23 ,RF_3TX , base);
Quoted 12 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c struct adapter *padapter · line 141
Quoted 8 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-8- base =PHY_GetTxPowerByRate (padapter, path,RF_1TX ,MGN_VHT1SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_1SSMCS0_1SSMCS9 ,RF_1TX , base); - - base =PHY_GetTxPowerByRate (padapter, path,RF_2TX ,MGN_VHT2SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_2SSMCS0_2SSMCS9 ,RF_2TX , base); - - base =PHY_GetTxPowerByRate (padapter, path,RF_3TX ,MGN_VHT3SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_3SSMCS0_3SSMCS9 ,RF_3TX , base);You are removing a bunch of register writes from a block here, while keeping others, so this does not seem like it is just dead-code removal it feels like you are actually making a functional change.
You are right, I will fix the changelog in next v2.
Quoted 2 lines
Perhaps this entire block can never be executed ?
It think it's executed during hal initialization
Quoted 9 lines
Or maybe the VHT name used here is misleading and this is also relevant for 2.4 GHZ 40Mhz use ? Did you test with an access point configured to use 40 MHz channels
and then checked that you were actually using a 40MHz channel ? Note these are
quite rare AFAIK because 40 MHz tends to cause even more collosion issues in the already quite full 2.4G spectrum, still if possible you should test this and make sure that it does not regress (with out specifically testing this we might not note regressions for a long time because of 40MHz usage being rare).
The MCS section involved is from 0 to 9 in a set of up to 4 spatial streams, but rtl8723bs works only with 0-7 and 32 MCS rates in both 20 and 40 Mhz and multiple spatial streams are not supported.
So setting something like VHT_{1,2,3}SSMCS0_{1,2,3}SSMCS9 in our case does something odd.
Nonetheless testing with a 40 Mhz channel would be great, but with a bit of shame I admit that I don't know how to set my phone hotspot to work on a 40 Mhz bandwidth... (It' the only thing I have).
Maybe some could help me...
thank you
Quoted 139 lines
Quoted 125 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-108} }@@ -442,81 +410,6 @@ PHY_GetRateValuesOfTxPowerByRate( *RateNum =4 ;break ; -case 0xC3C : -case 0xE3C : -case 0x183C : -case 0x1a3C : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS0 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS1 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS2 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS3 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xC40 : -case 0xE40 : -case 0x1840 : -case 0x1a40 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS4 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS5 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS6 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS7 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xC44 : -case 0xE44 : -case 0x1844 : -case 0x1a44 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS8 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS9 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS0 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS1 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xC48 : -case 0xE48 : -case 0x1848 : -case 0x1a48 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS2 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS3 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS4 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS5 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xC4C : -case 0xE4C : -case 0x184C : -case 0x1a4C : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS6 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS7 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS8 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS9 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; -case 0xCD8 :case 0xED8 :case 0x18D8 :@@ -547,49 +440,6 @@ PHY_GetRateValuesOfTxPowerByRate( *RateNum =4 ;break ; -case 0xCE0 : -case 0xEE0 : -case 0x18E0 : -case 0x1aE0 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS0 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS1 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS2 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS3 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xCE4 : -case 0xEE4 : -case 0x18E4 : -case 0x1aE4 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS4 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS5 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS6 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS7 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xCE8 : -case 0xEE8 : -case 0x18E8 :drivers/staging/rtl8723bs/hal/hal_com_phycfg.c PHY_GetRateValuesOfTxPowerByRate( · line 592
Quoted 10 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-10-case 0x1aE8 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS8 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS9 ); -for (i =0 ; i <2 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; -Here only 2 rates are set, so this feels like it is a 40MHz case, are you sure this can be removed (maybe it is 40MHz channel use at 5GHz ?
Quoted 5 lines
The rest of the patch looks ok.
Regards,
Hans
same as above, MCS indexes invlolved seems not to be supported...
Quoted 527 lines
Quoted 527 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +8
-225default :break ; }@@ -617,10 +467,6 @@ static void PHY_StoreTxPowerByRateNew(return ;for (i =0 ; i < rateNum; ++i) { -if (rateIndex[i] ==PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS0 ) || - rateIndex[i] ==PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS1 )) - TxNum =RF_2TX ; - pHalData->TxPwrByRateOffset[RfPath][TxNum][rateIndex[i]] = PwrByRateVal[i]; } }@@ -691,18 +537,6 @@ struct adapter *padapteru8 mcs16_23Rates[8 ] = {MGN_MCS16 ,MGN_MCS17 ,MGN_MCS18 ,MGN_MCS19 ,MGN_MCS20 ,MGN_MCS21 ,MGN_MCS22 ,MGN_MCS23 }; -u8 vht1ssRates[10 ] = { -MGN_VHT1SS_MCS0 ,MGN_VHT1SS_MCS1 ,MGN_VHT1SS_MCS2 ,MGN_VHT1SS_MCS3 ,MGN_VHT1SS_MCS4 , -MGN_VHT1SS_MCS5 ,MGN_VHT1SS_MCS6 ,MGN_VHT1SS_MCS7 ,MGN_VHT1SS_MCS8 ,MGN_VHT1SS_MCS9 - }; -u8 vht2ssRates[10 ] = { -MGN_VHT2SS_MCS0 ,MGN_VHT2SS_MCS1 ,MGN_VHT2SS_MCS2 ,MGN_VHT2SS_MCS3 ,MGN_VHT2SS_MCS4 , -MGN_VHT2SS_MCS5 ,MGN_VHT2SS_MCS6 ,MGN_VHT2SS_MCS7 ,MGN_VHT2SS_MCS8 ,MGN_VHT2SS_MCS9 - }; -u8 vht3ssRates[10 ] = { -MGN_VHT3SS_MCS0 ,MGN_VHT3SS_MCS1 ,MGN_VHT3SS_MCS2 ,MGN_VHT3SS_MCS3 ,MGN_VHT3SS_MCS4 , -MGN_VHT3SS_MCS5 ,MGN_VHT3SS_MCS6 ,MGN_VHT3SS_MCS7 ,MGN_VHT3SS_MCS8 ,MGN_VHT3SS_MCS9 - };for (path =ODM_RF_PATH_A ; path <=ODM_RF_PATH_D ; ++path) {for (txNum =RF_1TX ; txNum <RF_MAX_TX_NUM ; ++txNum) {@@ -740,27 +574,6 @@ struct adapter *padapter value =PHY_GetTxPowerByRate (padapter, path, txNum, mcs16_23Rates[i]);PHY_SetTxPowerByRate (padapter, path, txNum, mcs16_23Rates[i], value - base); } - -/* VHT 1SS */ - base =PHY_GetTxPowerByRate (padapter, path, txNum,MGN_VHT1SS_MCS7 ); -for (i =0 ; i <sizeof (vht1ssRates); ++i) { - value =PHY_GetTxPowerByRate (padapter, path, txNum, vht1ssRates[i]); -PHY_SetTxPowerByRate (padapter, path, txNum, vht1ssRates[i], value - base); - } - -/* VHT 2SS */ - base =PHY_GetTxPowerByRate (padapter, path, txNum,MGN_VHT2SS_MCS7 ); -for (i =0 ; i <sizeof (vht2ssRates); ++i) { - value =PHY_GetTxPowerByRate (padapter, path, txNum, vht2ssRates[i]); -PHY_SetTxPowerByRate (padapter, path, txNum, vht2ssRates[i], value - base); - } - -/* VHT 3SS */ - base =PHY_GetTxPowerByRate (padapter, path, txNum,MGN_VHT3SS_MCS7 ); -for (i =0 ; i <sizeof (vht3ssRates); ++i) { - value =PHY_GetTxPowerByRate (padapter, path, txNum, vht3ssRates[i]); -PHY_SetTxPowerByRate (padapter, path, txNum, vht3ssRates[i], value - base); - } } } }@@ -823,38 +636,6 @@ void PHY_SetTxPowerIndexByRateSection( Channel, htRates4T, ARRAY_SIZE(htRates4T)); - }else if (RateSection ==VHT_1SSMCS0_1SSMCS9 ) { -u8 vhtRates1T[] = {MGN_VHT1SS_MCS0 ,MGN_VHT1SS_MCS1 ,MGN_VHT1SS_MCS2 ,MGN_VHT1SS_MCS3 ,MGN_VHT1SS_MCS4 , -MGN_VHT1SS_MCS5 ,MGN_VHT1SS_MCS6 ,MGN_VHT1SS_MCS7 ,MGN_VHT1SS_MCS8 ,MGN_VHT1SS_MCS9 }; -PHY_SetTxPowerIndexByRateArray (padapter, RFPath, - pHalData->CurrentChannelBW, - Channel, vhtRates1T, -ARRAY_SIZE (vhtRates1T)); - - }else if (RateSection ==VHT_2SSMCS0_2SSMCS9 ) { -u8 vhtRates2T[] = {MGN_VHT2SS_MCS0 ,MGN_VHT2SS_MCS1 ,MGN_VHT2SS_MCS2 ,MGN_VHT2SS_MCS3 ,MGN_VHT2SS_MCS4 , -MGN_VHT2SS_MCS5 ,MGN_VHT2SS_MCS6 ,MGN_VHT2SS_MCS7 ,MGN_VHT2SS_MCS8 ,MGN_VHT2SS_MCS9 }; - -PHY_SetTxPowerIndexByRateArray (padapter, RFPath, - pHalData->CurrentChannelBW, - Channel, vhtRates2T, -ARRAY_SIZE (vhtRates2T)); - }else if (RateSection ==VHT_3SSMCS0_3SSMCS9 ) { -u8 vhtRates3T[] = {MGN_VHT3SS_MCS0 ,MGN_VHT3SS_MCS1 ,MGN_VHT3SS_MCS2 ,MGN_VHT3SS_MCS3 ,MGN_VHT3SS_MCS4 , -MGN_VHT3SS_MCS5 ,MGN_VHT3SS_MCS6 ,MGN_VHT3SS_MCS7 ,MGN_VHT3SS_MCS8 ,MGN_VHT3SS_MCS9 }; - -PHY_SetTxPowerIndexByRateArray (padapter, RFPath, - pHalData->CurrentChannelBW, - Channel, vhtRates3T, -ARRAY_SIZE (vhtRates3T)); - }else if (RateSection ==VHT_4SSMCS0_4SSMCS9 ) { -u8 vhtRates4T[] = {MGN_VHT4SS_MCS0 ,MGN_VHT4SS_MCS1 ,MGN_VHT4SS_MCS2 ,MGN_VHT4SS_MCS3 ,MGN_VHT4SS_MCS4 , -MGN_VHT4SS_MCS5 ,MGN_VHT4SS_MCS6 ,MGN_VHT4SS_MCS7 ,MGN_VHT4SS_MCS8 ,MGN_VHT4SS_MCS9 }; - -PHY_SetTxPowerIndexByRateArray (padapter, RFPath, - pHalData->CurrentChannelBW, - Channel, vhtRates4T, -ARRAY_SIZE (vhtRates4T)); } }@@ -883,23 +664,23 @@ u8 PHY_GetTxPowerIndexBase( txPower += pHalData->OFDM_24G_Diff[RFPath][TX_1S ];if (BandWidth ==CHANNEL_WIDTH_20 ) {/* BW20-1S, BW20-2S */ -if ((MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT1SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW20_24G_Diff[RFPath][TX_1S ]; -if ((MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT2SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW20_24G_Diff[RFPath][TX_2S ]; -if ((MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT3SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW20_24G_Diff[RFPath][TX_3S ]; -if ((MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT4SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW20_24G_Diff[RFPath][TX_4S ]; }else if (BandWidth ==CHANNEL_WIDTH_40 ) {/* BW40-1S, BW40-2S */ -if ((MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT1SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW40_24G_Diff[RFPath][TX_1S ]; -if ((MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT2SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW40_24G_Diff[RFPath][TX_2S ]; -if ((MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT3SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW40_24G_Diff[RFPath][TX_3S ]; -if ((MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT4SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW40_24G_Diff[RFPath][TX_4S ]; }@@ -1060,126 +841,6 @@ u8 PHY_GetRateIndexOfTxPowerByRate(u8 Rate)case MGN_MCS31 : index =43 ;break ; -case MGN_VHT1SS_MCS0 : - index =44 ; -break ; -case MGN_VHT1SS_MCS1 : - index =45 ; -break ; -case MGN_VHT1SS_MCS2 : - index =46 ; -break ; -case MGN_VHT1SS_MCS3 : - index =47 ; -break ; -case MGN_VHT1SS_MCS4 : - index =48 ; -break ; -case MGN_VHT1SS_MCS5 : - index =49 ; -break ; -case MGN_VHT1SS_MCS6 : - index =50 ; -break ; -case MGN_VHT1SS_MCS7 : - index =51 ; -break ; -case MGN_VHT1SS_MCS8 : - index =52 ; -break ; -case MGN_VHT1SS_MCS9 : - index =53 ; -break ; -case MGN_VHT2SS_MCS0 : - index =54 ; -break ; -case MGN_VHT2SS_MCS1 : - index =55 ; -break ; -case MGN_VHT2SS_MCS2 : - index =56 ; -break ; -case MGN_VHT2SS_MCS3 : - index =57 ; -break ; -case MGN_VHT2SS_MCS4 : - index =58 ; -break ; -case MGN_VHT2SS_MCS5 : - index =59 ; -break ; -case MGN_VHT2SS_MCS6 : - index =60 ; -break ; -case MGN_VHT2SS_MCS7 : - index =61 ; -break ; -case MGN_VHT2SS_MCS8 : - index =62 ; -break ; -case MGN_VHT2SS_MCS9 : - index =63 ; -break ; -case MGN_VHT3SS_MCS0 : - index =64 ; -break ; -case MGN_VHT3SS_MCS1 : - index =65 ; -break ; -case MGN_VHT3SS_MCS2 : - index =66 ; -break ; -case MGN_VHT3SS_MCS3 : - index =67 ; -break ; -case MGN_VHT3SS_MCS4 : - index =68 ; -break ; -case MGN_VHT3SS_MCS5 : - index =69 ; -break ; -case MGN_VHT3SS_MCS6 : - index =70 ; -break ; -case MGN_VHT3SS_MCS7 : - index =71 ; -break ; -case MGN_VHT3SS_MCS8 : - index =72 ; -break ; -case MGN_VHT3SS_MCS9 : - index =73 ; -break ; -case MGN_VHT4SS_MCS0 : - index =74 ; -break ; -case MGN_VHT4SS_MCS1 : - index =75 ; -break ; -case MGN_VHT4SS_MCS2 : - index =76 ; -break ; -case MGN_VHT4SS_MCS3 : - index =77 ; -break ; -case MGN_VHT4SS_MCS4 : - index =78 ; -break ; -case MGN_VHT4SS_MCS5 : - index =79 ; -break ; -case MGN_VHT4SS_MCS6 : - index =80 ; -break ; -case MGN_VHT4SS_MCS7 : - index =81 ; -break ; -case MGN_VHT4SS_MCS8 : - index =82 ; -break ; -case MGN_VHT4SS_MCS9 : - index =83 ; -break ;default :break ; }@@ -1319,26 +980,6 @@ static s16 get_rate_sctn_idx(const u8 rate)case MGN_MCS24 :case MGN_MCS25 :case MGN_MCS26 :case MGN_MCS27 :case MGN_MCS28 :case MGN_MCS29 :case MGN_MCS30 :case MGN_MCS31 :return 5 ; -case MGN_VHT1SS_MCS0 :case MGN_VHT1SS_MCS1 :case MGN_VHT1SS_MCS2 : -case MGN_VHT1SS_MCS3 :case MGN_VHT1SS_MCS4 :case MGN_VHT1SS_MCS5 : -case MGN_VHT1SS_MCS6 :case MGN_VHT1SS_MCS7 :case MGN_VHT1SS_MCS8 : -case MGN_VHT1SS_MCS9 : -return 6 ; -case MGN_VHT2SS_MCS0 :case MGN_VHT2SS_MCS1 :case MGN_VHT2SS_MCS2 : -case MGN_VHT2SS_MCS3 :case MGN_VHT2SS_MCS4 :case MGN_VHT2SS_MCS5 : -case MGN_VHT2SS_MCS6 :case MGN_VHT2SS_MCS7 :case MGN_VHT2SS_MCS8 : -case MGN_VHT2SS_MCS9 : -return 7 ; -case MGN_VHT3SS_MCS0 :case MGN_VHT3SS_MCS1 :case MGN_VHT3SS_MCS2 : -case MGN_VHT3SS_MCS3 :case MGN_VHT3SS_MCS4 :case MGN_VHT3SS_MCS5 : -case MGN_VHT3SS_MCS6 :case MGN_VHT3SS_MCS7 :case MGN_VHT3SS_MCS8 : -case MGN_VHT3SS_MCS9 : -return 8 ; -case MGN_VHT4SS_MCS0 :case MGN_VHT4SS_MCS1 :case MGN_VHT4SS_MCS2 : -case MGN_VHT4SS_MCS3 :case MGN_VHT4SS_MCS4 :case MGN_VHT4SS_MCS5 : -case MGN_VHT4SS_MCS6 :case MGN_VHT4SS_MCS7 :case MGN_VHT4SS_MCS8 : -case MGN_VHT4SS_MCS9 : -return 9 ;default :return -1 ; }@@ -1510,14 +1151,6 @@ void PHY_SetTxPowerLimit( rateSection =4 ; else if (eqNByte(RateSection, (u8 *)("HT"), 2) && eqNByte(RfPath, (u8 *)("4T"), 2)) rateSection = 5; - else if (eqNByte(RateSection, (u8 *)("VHT"), 3) && eqNByte(RfPath, (u8 *)("1T"), 2)) - rateSection = 6; - else if (eqNByte(RateSection, (u8 *)("VHT"), 3) && eqNByte(RfPath, (u8 *)("2T"), 2)) - rateSection = 7; - else if (eqNByte(RateSection, (u8 *)("VHT"), 3) && eqNByte(RfPath, (u8 *)("3T"), 2)) - rateSection = 8; - else if (eqNByte(RateSection, (u8 *)("VHT"), 3) && eqNByte(RfPath, (u8 *)("4T"), 2)) - rateSection = 9; else return;drivers/staging/rtl8723bs/include/hal_com.h +1
-61@@ -69,46 +69,6 @@#define DESC_RATEMCS29 0x29#define DESC_RATEMCS30 0x2A#define DESC_RATEMCS31 0x2B -#define DESC_RATEVHTSS1MCS0 0x2C -#define DESC_RATEVHTSS1MCS1 0x2D -#define DESC_RATEVHTSS1MCS2 0x2E -#define DESC_RATEVHTSS1MCS3 0x2F -#define DESC_RATEVHTSS1MCS4 0x30 -#define DESC_RATEVHTSS1MCS5 0x31 -#define DESC_RATEVHTSS1MCS6 0x32 -#define DESC_RATEVHTSS1MCS7 0x33 -#define DESC_RATEVHTSS1MCS8 0x34 -#define DESC_RATEVHTSS1MCS9 0x35 -#define DESC_RATEVHTSS2MCS0 0x36 -#define DESC_RATEVHTSS2MCS1 0x37 -#define DESC_RATEVHTSS2MCS2 0x38 -#define DESC_RATEVHTSS2MCS3 0x39 -#define DESC_RATEVHTSS2MCS4 0x3A -#define DESC_RATEVHTSS2MCS5 0x3B -#define DESC_RATEVHTSS2MCS6 0x3C -#define DESC_RATEVHTSS2MCS7 0x3D -#define DESC_RATEVHTSS2MCS8 0x3E -#define DESC_RATEVHTSS2MCS9 0x3F -#define DESC_RATEVHTSS3MCS0 0x40 -#define DESC_RATEVHTSS3MCS1 0x41 -#define DESC_RATEVHTSS3MCS2 0x42 -#define DESC_RATEVHTSS3MCS3 0x43 -#define DESC_RATEVHTSS3MCS4 0x44 -#define DESC_RATEVHTSS3MCS5 0x45 -#define DESC_RATEVHTSS3MCS6 0x46 -#define DESC_RATEVHTSS3MCS7 0x47 -#define DESC_RATEVHTSS3MCS8 0x48 -#define DESC_RATEVHTSS3MCS9 0x49 -#define DESC_RATEVHTSS4MCS0 0x4A -#define DESC_RATEVHTSS4MCS1 0x4B -#define DESC_RATEVHTSS4MCS2 0x4C -#define DESC_RATEVHTSS4MCS3 0x4D -#define DESC_RATEVHTSS4MCS4 0x4E -#define DESC_RATEVHTSS4MCS5 0x4F -#define DESC_RATEVHTSS4MCS6 0x50 -#define DESC_RATEVHTSS4MCS7 0x51 -#define DESC_RATEVHTSS4MCS8 0x52 -#define DESC_RATEVHTSS4MCS9 0x53#define HDATA_RATE (rate)\ (rate == DESC_RATE1M) ? "CCK_1M" : \@@ -138,27 +98,7 @@ (rate ==DESC_RATEMCS12 ) ?"MCS12" : \ (rate ==DESC_RATEMCS13 ) ?"MCS13" : \ (rate ==DESC_RATEMCS14 ) ?"MCS14" : \ -(rate ==DESC_RATEMCS15 ) ?"MCS15" : \ -(rate ==DESC_RATEVHTSS1MCS0 ) ?"VHTSS1MCS0" : \ -(rate ==DESC_RATEVHTSS1MCS1 ) ?"VHTSS1MCS1" : \ -(rate ==DESC_RATEVHTSS1MCS2 ) ?"VHTSS1MCS2" : \ -(rate ==DESC_RATEVHTSS1MCS3 ) ?"VHTSS1MCS3" : \ -(rate ==DESC_RATEVHTSS1MCS4 ) ?"VHTSS1MCS4" : \ -(rate ==DESC_RATEVHTSS1MCS5 ) ?"VHTSS1MCS5" : \ -(rate ==DESC_RATEVHTSS1MCS6 ) ?"VHTSS1MCS6" : \ -(rate ==DESC_RATEVHTSS1MCS7 ) ?"VHTSS1MCS7" : \ -(rate ==DESC_RATEVHTSS1MCS8 ) ?"VHTSS1MCS8" : \ -(rate ==DESC_RATEVHTSS1MCS9 ) ?"VHTSS1MCS9" : \ -(rate ==DESC_RATEVHTSS2MCS0 ) ?"VHTSS2MCS0" : \ -(rate ==DESC_RATEVHTSS2MCS1 ) ?"VHTSS2MCS1" : \ -(rate ==DESC_RATEVHTSS2MCS2 ) ?"VHTSS2MCS2" : \ -(rate ==DESC_RATEVHTSS2MCS3 ) ?"VHTSS2MCS3" : \ -(rate ==DESC_RATEVHTSS2MCS4 ) ?"VHTSS2MCS4" : \ -(rate ==DESC_RATEVHTSS2MCS5 ) ?"VHTSS2MCS5" : \ -(rate ==DESC_RATEVHTSS2MCS6 ) ?"VHTSS2MCS6" : \ -(rate ==DESC_RATEVHTSS2MCS7 ) ?"VHTSS2MCS7" : \ -(rate ==DESC_RATEVHTSS2MCS8 ) ?"VHTSS2MCS8" : \ -(rate ==DESC_RATEVHTSS2MCS9 ) ?"VHTSS2MCS9" :"UNKNOWN" +(rate ==DESC_RATEMCS15 ) ?"MCS15" :"UNKNOWN" enum{drivers/staging/rtl8723bs/include/hal_com_phycfg.h +0
-4@@ -19,10 +19,6 @@ enum rate_section {HT_MCS8_MCS15 ,HT_MCS16_MCS23 , HT_MCS24_MCS31, -VHT_1SSMCS0_1SSMCS9 , -VHT_2SSMCS0_2SSMCS9 , -VHT_3SSMCS0_3SSMCS9 , - VHT_4SSMCS0_4SSMCS9, }; enum {drivers/staging/rtl8723bs/include/ieee80211.h +0
-45@@ -60,7 +60,6 @@ enum {#define WLAN_STA_HT BIT(11)#define WLAN_STA_WPS BIT(12)#define WLAN_STA_MAYBE_WPS BIT(13) -#define WLAN_STA_VHT BIT(14)#define WLAN_STA_NONERP BIT(31)#define IEEE_CMD_SET_WPA_PARAM 1@@ -135,8 +134,6 @@ enum {RATEID_IDX_BG =6 ,RATEID_IDX_G =7 , RATEID_IDX_B = 8, -RATEID_IDX_VHT_2SS =9 , - RATEID_IDX_VHT_1SS = 10, }; enum network_type {@@ -424,51 +421,10 @@ enum {MGN_MCS29 ,MGN_MCS30 ,MGN_MCS31 , -MGN_VHT1SS_MCS0 , -MGN_VHT1SS_MCS1 , -MGN_VHT1SS_MCS2 , -MGN_VHT1SS_MCS3 , -MGN_VHT1SS_MCS4 , -MGN_VHT1SS_MCS5 , -MGN_VHT1SS_MCS6 , -MGN_VHT1SS_MCS7 , -MGN_VHT1SS_MCS8 , -MGN_VHT1SS_MCS9 , -MGN_VHT2SS_MCS0 , -MGN_VHT2SS_MCS1 , -MGN_VHT2SS_MCS2 , -MGN_VHT2SS_MCS3 , -MGN_VHT2SS_MCS4 , -MGN_VHT2SS_MCS5 , -MGN_VHT2SS_MCS6 , -MGN_VHT2SS_MCS7 , -MGN_VHT2SS_MCS8 , -MGN_VHT2SS_MCS9 , -MGN_VHT3SS_MCS0 , -MGN_VHT3SS_MCS1 , -MGN_VHT3SS_MCS2 , -MGN_VHT3SS_MCS3 , -MGN_VHT3SS_MCS4 , -MGN_VHT3SS_MCS5 , -MGN_VHT3SS_MCS6 , -MGN_VHT3SS_MCS7 , -MGN_VHT3SS_MCS8 , -MGN_VHT3SS_MCS9 , -MGN_VHT4SS_MCS0 , -MGN_VHT4SS_MCS1 , -MGN_VHT4SS_MCS2 , -MGN_VHT4SS_MCS3 , -MGN_VHT4SS_MCS4 , -MGN_VHT4SS_MCS5 , -MGN_VHT4SS_MCS6 , -MGN_VHT4SS_MCS7 , -MGN_VHT4SS_MCS8 , -MGN_VHT4SS_MCS9 , MGN_UNKNOWN };#define IS_HT_RATE (_rate) (_rate >= MGN_MCS0 && _rate <= MGN_MCS31) -#define IS_VHT_RATE (_rate) (_rate >= MGN_VHT1SS_MCS0 && _rate <= MGN_VHT4SS_MCS9)#define IS_CCK_RATE (_rate) (MGN_1M == _rate || _rate == MGN_2M || _rate == MGN_5_5M || _rate == MGN_11M)#define IS_OFDM_RATE (_rate) (MGN_6M <= _rate && _rate <= MGN_54M && _rate != MGN_11M)@@ -625,7 +581,6 @@ enum {RTW_WLAN_CATEGORY_TDLS =12 ,RTW_WLAN_CATEGORY_SELF_PROTECTED =15 ,/* add for CONFIG_IEEE80211W, none 11w also can use */ RTW_WLAN_CATEGORY_WMM =17 , -RTW_WLAN_CATEGORY_VHT =21 , RTW_WLAN_CATEGORY_P2P = 0x7f,/* P2P action frames */ };drivers/staging/rtl8723bs/include/rtl8723b_xmit.h +0
-21@@ -402,27 +402,6 @@ struct txdesc_8723b {#define DESC8723B_RATEMCS13 0x19#define DESC8723B_RATEMCS14 0x1a#define DESC8723B_RATEMCS15 0x1b -#define DESC8723B_RATEVHTSS1MCS0 0x2c -#define DESC8723B_RATEVHTSS1MCS1 0x2d -#define DESC8723B_RATEVHTSS1MCS2 0x2e -#define DESC8723B_RATEVHTSS1MCS3 0x2f -#define DESC8723B_RATEVHTSS1MCS4 0x30 -#define DESC8723B_RATEVHTSS1MCS5 0x31 -#define DESC8723B_RATEVHTSS1MCS6 0x32 -#define DESC8723B_RATEVHTSS1MCS7 0x33 -#define DESC8723B_RATEVHTSS1MCS8 0x34 -#define DESC8723B_RATEVHTSS1MCS9 0x35 -#define DESC8723B_RATEVHTSS2MCS0 0x36 -#define DESC8723B_RATEVHTSS2MCS1 0x37 -#define DESC8723B_RATEVHTSS2MCS2 0x38 -#define DESC8723B_RATEVHTSS2MCS3 0x39 -#define DESC8723B_RATEVHTSS2MCS4 0x3a -#define DESC8723B_RATEVHTSS2MCS5 0x3b -#define DESC8723B_RATEVHTSS2MCS6 0x3c -#define DESC8723B_RATEVHTSS2MCS7 0x3d -#define DESC8723B_RATEVHTSS2MCS8 0x3e -#define DESC8723B_RATEVHTSS2MCS9 0x3f -#define RX_HAL_IS_CCK_RATE_8723B (pDesc)\ (GET_RX_STATUS_DESC_RX_RATE_8723B(pDesc) == DESC8723B_RATE1M ||\drivers/staging/rtl8723bs/include/rtw_ht.h +0
-4@@ -42,10 +42,6 @@ enum {HT_AGG_SIZE_16K =1 ,HT_AGG_SIZE_32K =2 , HT_AGG_SIZE_64K = 3, -VHT_AGG_SIZE_128K =4 , -VHT_AGG_SIZE_256K =5 , -VHT_AGG_SIZE_512K =6 , - VHT_AGG_SIZE_1024K = 7, };
Quoted 3 lines
drivers/staging/rtl8723bs/include/rtw_ht.h enum { · line 47
Quoted 2 lines
drivers/staging/rtl8723bs/include/rtw_ht.h +0
-0enum {
thank you,
fabio
Re: [PATCH 15/18] staging: rtl8723bs: remove register initializations tied to 802.11ac standard
In reply to Hans de GoedeHello Hans,
Quoted 52 lines · Hans de Goede
Hi,
Quoted 7 lines · Fabio Aiuto
remove register initializations tied to 802.11ac standard which is not supported by the device.
It's a dangerous operation, relying only on comments, but tested on a Lenovo Ideapad MIIX 300-10IBY tablet seems to work.
Signed-off-by Fabio Aiuto <[email protected]>TBH I think this patch should be dropped from the series, you are dropping a bunch of register writes which likely are actually doing something, so this is not just dead code removal.
Regards,
Hans
Quoted 32 lines
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 12 ------------ 1 file changed, 12 deletions(-)drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0
-12@@ -1718,24 +1718,12 @@ void _InitBurstPktLen_8723BS(struct adapter *Adapter)struct hal_com_data *pHalData =GET_HAL_DATA (Adapter);rtw_write8 (Adapter,0x4c7 ,rtw_read8 (Adapter,0x4c7 )|BIT (7 ));/* enable single pkt ampdu */ -rtw_write8 (Adapter,REG_RX_PKT_LIMIT_8723B ,0x18 );/* for VHT packet length 11K */ rtw_write8 (Adapter,REG_MAX_AGGR_NUM_8723B ,0x1F );rtw_write8 (Adapter,REG_PIFS_8723B ,0x00 );rtw_write8 (Adapter,REG_FWHW_TXQ_CTRL_8723B ,rtw_read8 (Adapter,REG_FWHW_TXQ_CTRL )&(~BIT (7 )));if (pHalData->AMPDUBurstMode)rtw_write8 (Adapter,REG_AMPDU_BURST_MODE_8723B ,0x5F );rtw_write8 (Adapter,REG_AMPDU_MAX_TIME_8723B ,0x70 ); - -/* ARFB table 9 for 11ac 5G 2SS */ -rtw_write32 (Adapter,REG_ARFR0_8723B ,0x00000010 ); -if (IS_NORMAL_CHIP (pHalData->VersionID)) -rtw_write32 (Adapter,REG_ARFR0_8723B +4 ,0xfffff000 ); -else -rtw_write32 (Adapter,REG_ARFR0_8723B +4 ,0x3e0ff000 ); - -/* ARFB table 10 for 11ac 5G 1SS */ -rtw_write32 (Adapter,REG_ARFR1_8723B ,0x00000010 ); -rtw_write32 (Adapter,REG_ARFR1_8723B +4 ,0x003ff000 ); }
Quoted 3 lines
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c void _InitBurstPktLen_8723BS(struct adapter *Adapter) · line 1729
Quoted 2 lines
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0
-0static void ResumeTxBeacon (struct adapter *padapter)
ok, I will drop it in next v2.
Thank you for review,
fabio
Re: [PATCH 12/18] staging: rtl8723bs: remove VHT dead code
In reply to Fabio AiutoHi,
Quoted 366 lines · Fabio Aiuto
Quoted 335 lines · Hans de Goede
Hi,
Quoted 332 lines · Fabio Aiuto
remove VHT dead code, as the device doesn't support VHT (which is a 802.11ac capability).
Signed-off-by Fabio Aiuto <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 1 - drivers/staging/rtl8723bs/hal/hal_com.c | 241 ----------- .../staging/rtl8723bs/hal/hal_com_phycfg.c | 383 +----------------- drivers/staging/rtl8723bs/include/hal_com.h | 62 +-- .../rtl8723bs/include/hal_com_phycfg.h | 4 - drivers/staging/rtl8723bs/include/ieee80211.h | 45 -- .../staging/rtl8723bs/include/rtl8723b_xmit.h | 21 - drivers/staging/rtl8723bs/include/rtw_ht.h | 4 - 8 files changed, 9 insertions(+), 752 deletions(-)drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0
-1@@ -46,7 +46,6 @@ static struct action_handler OnAction_tbl[] = { {RTW_WLAN_CATEGORY_UNPROTECTED_WNM, "ACTION_UNPROTECTED_WNM", &DoReserved}, {RTW_WLAN_CATEGORY_SELF_PROTECTED, "ACTION_SELF_PROTECTED", &DoReserved}, {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &DoReserved}, - {RTW_WLAN_CATEGORY_VHT, "ACTION_VHT", &DoReserved}, {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &DoReserved}, };drivers/staging/rtl8723bs/hal/hal_com.c +0
-241@@ -295,126 +295,6 @@ u8 MRateToHwRate(u8 rate)case MGN_MCS31 : ret =DESC_RATEMCS31 ;break ; -case MGN_VHT1SS_MCS0 : - ret =DESC_RATEVHTSS1MCS0 ; -break ; -case MGN_VHT1SS_MCS1 : - ret =DESC_RATEVHTSS1MCS1 ; -break ; -case MGN_VHT1SS_MCS2 : - ret =DESC_RATEVHTSS1MCS2 ; -break ; -case MGN_VHT1SS_MCS3 : - ret =DESC_RATEVHTSS1MCS3 ; -break ; -case MGN_VHT1SS_MCS4 : - ret =DESC_RATEVHTSS1MCS4 ; -break ; -case MGN_VHT1SS_MCS5 : - ret =DESC_RATEVHTSS1MCS5 ; -break ; -case MGN_VHT1SS_MCS6 : - ret =DESC_RATEVHTSS1MCS6 ; -break ; -case MGN_VHT1SS_MCS7 : - ret =DESC_RATEVHTSS1MCS7 ; -break ; -case MGN_VHT1SS_MCS8 : - ret =DESC_RATEVHTSS1MCS8 ; -break ; -case MGN_VHT1SS_MCS9 : - ret =DESC_RATEVHTSS1MCS9 ; -break ; -case MGN_VHT2SS_MCS0 : - ret =DESC_RATEVHTSS2MCS0 ; -break ; -case MGN_VHT2SS_MCS1 : - ret =DESC_RATEVHTSS2MCS1 ; -break ; -case MGN_VHT2SS_MCS2 : - ret =DESC_RATEVHTSS2MCS2 ; -break ; -case MGN_VHT2SS_MCS3 : - ret =DESC_RATEVHTSS2MCS3 ; -break ; -case MGN_VHT2SS_MCS4 : - ret =DESC_RATEVHTSS2MCS4 ; -break ; -case MGN_VHT2SS_MCS5 : - ret =DESC_RATEVHTSS2MCS5 ; -break ; -case MGN_VHT2SS_MCS6 : - ret =DESC_RATEVHTSS2MCS6 ; -break ; -case MGN_VHT2SS_MCS7 : - ret =DESC_RATEVHTSS2MCS7 ; -break ; -case MGN_VHT2SS_MCS8 : - ret =DESC_RATEVHTSS2MCS8 ; -break ; -case MGN_VHT2SS_MCS9 : - ret =DESC_RATEVHTSS2MCS9 ; -break ; -case MGN_VHT3SS_MCS0 : - ret =DESC_RATEVHTSS3MCS0 ; -break ; -case MGN_VHT3SS_MCS1 : - ret =DESC_RATEVHTSS3MCS1 ; -break ; -case MGN_VHT3SS_MCS2 : - ret =DESC_RATEVHTSS3MCS2 ; -break ; -case MGN_VHT3SS_MCS3 : - ret =DESC_RATEVHTSS3MCS3 ; -break ; -case MGN_VHT3SS_MCS4 : - ret =DESC_RATEVHTSS3MCS4 ; -break ; -case MGN_VHT3SS_MCS5 : - ret =DESC_RATEVHTSS3MCS5 ; -break ; -case MGN_VHT3SS_MCS6 : - ret =DESC_RATEVHTSS3MCS6 ; -break ; -case MGN_VHT3SS_MCS7 : - ret =DESC_RATEVHTSS3MCS7 ; -break ; -case MGN_VHT3SS_MCS8 : - ret =DESC_RATEVHTSS3MCS8 ; -break ; -case MGN_VHT3SS_MCS9 : - ret =DESC_RATEVHTSS3MCS9 ; -break ; -case MGN_VHT4SS_MCS0 : - ret =DESC_RATEVHTSS4MCS0 ; -break ; -case MGN_VHT4SS_MCS1 : - ret =DESC_RATEVHTSS4MCS1 ; -break ; -case MGN_VHT4SS_MCS2 : - ret =DESC_RATEVHTSS4MCS2 ; -break ; -case MGN_VHT4SS_MCS3 : - ret =DESC_RATEVHTSS4MCS3 ; -break ; -case MGN_VHT4SS_MCS4 : - ret =DESC_RATEVHTSS4MCS4 ; -break ; -case MGN_VHT4SS_MCS5 : - ret =DESC_RATEVHTSS4MCS5 ; -break ; -case MGN_VHT4SS_MCS6 : - ret =DESC_RATEVHTSS4MCS6 ; -break ; -case MGN_VHT4SS_MCS7 : - ret =DESC_RATEVHTSS4MCS7 ; -break ; -case MGN_VHT4SS_MCS8 : - ret =DESC_RATEVHTSS4MCS8 ; -break ; -case MGN_VHT4SS_MCS9 : - ret =DESC_RATEVHTSS4MCS9 ; -break ;default :break ; }@@ -559,127 +439,6 @@ u8 HwRateToMRate(u8 rate)case DESC_RATEMCS31 : ret_rate =MGN_MCS31 ;break ; -case DESC_RATEVHTSS1MCS0 : - ret_rate =MGN_VHT1SS_MCS0 ; -break ; -case DESC_RATEVHTSS1MCS1 : - ret_rate =MGN_VHT1SS_MCS1 ; -break ; -case DESC_RATEVHTSS1MCS2 : - ret_rate =MGN_VHT1SS_MCS2 ; -break ; -case DESC_RATEVHTSS1MCS3 : - ret_rate =MGN_VHT1SS_MCS3 ; -break ; -case DESC_RATEVHTSS1MCS4 : - ret_rate =MGN_VHT1SS_MCS4 ; -break ; -case DESC_RATEVHTSS1MCS5 : - ret_rate =MGN_VHT1SS_MCS5 ; -break ; -case DESC_RATEVHTSS1MCS6 : - ret_rate =MGN_VHT1SS_MCS6 ; -break ; -case DESC_RATEVHTSS1MCS7 : - ret_rate =MGN_VHT1SS_MCS7 ; -break ; -case DESC_RATEVHTSS1MCS8 : - ret_rate =MGN_VHT1SS_MCS8 ; -break ; -case DESC_RATEVHTSS1MCS9 : - ret_rate =MGN_VHT1SS_MCS9 ; -break ; -case DESC_RATEVHTSS2MCS0 : - ret_rate =MGN_VHT2SS_MCS0 ; -break ; -case DESC_RATEVHTSS2MCS1 : - ret_rate =MGN_VHT2SS_MCS1 ; -break ; -case DESC_RATEVHTSS2MCS2 : - ret_rate =MGN_VHT2SS_MCS2 ; -break ; -case DESC_RATEVHTSS2MCS3 : - ret_rate =MGN_VHT2SS_MCS3 ; -break ; -case DESC_RATEVHTSS2MCS4 : - ret_rate =MGN_VHT2SS_MCS4 ; -break ; -case DESC_RATEVHTSS2MCS5 : - ret_rate =MGN_VHT2SS_MCS5 ; -break ; -case DESC_RATEVHTSS2MCS6 : - ret_rate =MGN_VHT2SS_MCS6 ; -break ; -case DESC_RATEVHTSS2MCS7 : - ret_rate =MGN_VHT2SS_MCS7 ; -break ; -case DESC_RATEVHTSS2MCS8 : - ret_rate =MGN_VHT2SS_MCS8 ; -break ; -case DESC_RATEVHTSS2MCS9 : - ret_rate =MGN_VHT2SS_MCS9 ; -break ; -case DESC_RATEVHTSS3MCS0 : - ret_rate =MGN_VHT3SS_MCS0 ; -break ; -case DESC_RATEVHTSS3MCS1 : - ret_rate =MGN_VHT3SS_MCS1 ; -break ; -case DESC_RATEVHTSS3MCS2 : - ret_rate =MGN_VHT3SS_MCS2 ; -break ; -case DESC_RATEVHTSS3MCS3 : - ret_rate =MGN_VHT3SS_MCS3 ; -break ; -case DESC_RATEVHTSS3MCS4 : - ret_rate =MGN_VHT3SS_MCS4 ; -break ; -case DESC_RATEVHTSS3MCS5 : - ret_rate =MGN_VHT3SS_MCS5 ; -break ; -case DESC_RATEVHTSS3MCS6 : - ret_rate =MGN_VHT3SS_MCS6 ; -break ; -case DESC_RATEVHTSS3MCS7 : - ret_rate =MGN_VHT3SS_MCS7 ; -break ; -case DESC_RATEVHTSS3MCS8 : - ret_rate =MGN_VHT3SS_MCS8 ; -break ; -case DESC_RATEVHTSS3MCS9 : - ret_rate =MGN_VHT3SS_MCS9 ; -break ; -case DESC_RATEVHTSS4MCS0 : - ret_rate =MGN_VHT4SS_MCS0 ; -break ; -case DESC_RATEVHTSS4MCS1 : - ret_rate =MGN_VHT4SS_MCS1 ; -break ; -case DESC_RATEVHTSS4MCS2 : - ret_rate =MGN_VHT4SS_MCS2 ; -break ; -case DESC_RATEVHTSS4MCS3 : - ret_rate =MGN_VHT4SS_MCS3 ; -break ; -case DESC_RATEVHTSS4MCS4 : - ret_rate =MGN_VHT4SS_MCS4 ; -break ; -case DESC_RATEVHTSS4MCS5 : - ret_rate =MGN_VHT4SS_MCS5 ; -break ; -case DESC_RATEVHTSS4MCS6 : - ret_rate =MGN_VHT4SS_MCS6 ; -break ; -case DESC_RATEVHTSS4MCS7 : - ret_rate =MGN_VHT4SS_MCS7 ; -break ; -case DESC_RATEVHTSS4MCS8 : - ret_rate =MGN_VHT4SS_MCS8 ; -break ; -case DESC_RATEVHTSS4MCS9 : - ret_rate =MGN_VHT4SS_MCS9 ; -break ; -default :break ; }drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-24@@ -39,18 +39,6 @@ u8 PHY_GetTxPowerByRateBase(struct adapter *Adapter, u8 RfPath,case HT_MCS24_MCS31 : value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][5 ];break ; -case VHT_1SSMCS0_1SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][6 ]; -break ; -case VHT_2SSMCS0_2SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][7 ]; -break ; -case VHT_3SSMCS0_3SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][8 ]; -break ; -case VHT_4SSMCS0_4SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][9 ]; -break ;default :break ; }@@ -91,18 +79,6 @@ phy_SetTxPowerByRateBase(case HT_MCS24_MCS31 : pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][5 ] = Value;break ; -case VHT_1SSMCS0_1SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][6 ] = Value; -break ; -case VHT_2SSMCS0_2SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][7 ] = Value; -break ; -case VHT_3SSMCS0_3SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][8 ] = Value; -break ; -case VHT_4SSMCS0_4SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][9 ] = Value; -break ;default :break ; }@@ -131,14 +107,6 @@ struct adapter *padapter base =PHY_GetTxPowerByRate (padapter, path,RF_3TX ,MGN_MCS23 );phy_SetTxPowerByRateBase (padapter, path,HT_MCS16_MCS23 ,RF_3TX , base);Quoted 12 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c struct adapter *padapter · line 141
Quoted 8 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-8- base =PHY_GetTxPowerByRate (padapter, path,RF_1TX ,MGN_VHT1SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_1SSMCS0_1SSMCS9 ,RF_1TX , base); - - base =PHY_GetTxPowerByRate (padapter, path,RF_2TX ,MGN_VHT2SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_2SSMCS0_2SSMCS9 ,RF_2TX , base); - - base =PHY_GetTxPowerByRate (padapter, path,RF_3TX ,MGN_VHT3SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_3SSMCS0_3SSMCS9 ,RF_3TX , base);You are removing a bunch of register writes from a block here, while keeping others, so this does not seem like it is just dead-code removal it feels like you are actually making a functional change.
You are right, I will fix the changelog in next v2.
Quoted 2 lines
Perhaps this entire block can never be executed ?
It think it's executed during hal initialization
Quoted 9 lines
Or maybe the VHT name used here is misleading and this is also relevant for 2.4 GHZ 40Mhz use ? Did you test with an access point configured to use 40 MHz channels
and then checked that you were actually using a 40MHz channel ? Note these are
quite rare AFAIK because 40 MHz tends to cause even more collosion issues in the already quite full 2.4G spectrum, still if possible you should test this and make sure that it does not regress (with out specifically testing this we might not note regressions for a long time because of 40MHz usage being rare).
Quoted 6 lines
The MCS section involved is from 0 to 9 in a set of up to 4 spatial streams, but rtl8723bs works only with 0-7 and 32 MCS rates in both 20 and 40 Mhz and multiple spatial streams are not supported.
So setting something like VHT_{1,2,3}SSMCS0_{1,2,3}SSMCS9 in our case does something odd.
Right, but since we don't know what it is actually doing, it would be best IMHO to just leave this as is. Esp. when the changes cannot be tested with 40MHZ channel width.
Regards,
Hans
Hello Hans,
Quoted 23 lines · Hans de Goede
Hi Fabio,
Quoted 11 lines · Fabio Aiuto
This patch series removes all occurences of 5Ghz code over the driver as required from driver's TODO list:
- find and remove remaining code valid only for 5 GHz. most of the obvious one have been removed, but things like channel > 14 still exist.
rtl8723bs work on 2.4Ghz band and supports 802.11bgn standards. So all code related to 802.11a/ac standard is removed, as well as code related to channel numbers above 14.
Quoted 8 lines
VHT code is deleted as well, for it's related to 802.11ac.
Comments are fixed accordingly and many unused variables are deleted.
Every single patch of this series has been tested on a Lenovo Ideapad MIIX 300-10IBY except for the last one, for obvious reason (it deletes just the TODO item).
Quoted 7 lines
Thank you for your work on this. I've replied to 3 of the patches with some comments. The rest of the series looks ok to me (based on a quick scan of the patches).
Regards,
Hans
thank you, will improve what you pointed out
as soon as I figure out how to do it. See replies
to you reviews.
thank you,
fabio
Quoted 80 lines
Quoted 79 lines
So:
Tested-by Fabio Auto <[email protected]>Fabio Aiuto (18):
staging: rtl8723bs: remove all 5Ghz network types
staging: rtl8723bs: remove code related to unsupported channel
bandwidth
staging: rtl8723bs: remove unused enum items related to channel
bonding
staging: rtl8723bs: rename enum items related to channel bonding
staging: rtl8723bs: remove 5Ghz field in structregistry_priv
staging: rtl8723bs: remove structrt_channel_plan_5g
staging: rtl8723bs: remove all branchings between 2.4Ghz and 5Ghz band
types
staging: rtl8723bs: beautify prototypes ininclude/hal_com_phycfg.h
staging: rtl8723bs: remove 5Ghz code related to channel plan
definition
staging: rtl8723bs: remove some unused 5Ghz macro definitions
staging: rtl8723bs: remove 5Ghz code related to RF power calibration
staging: rtl8723bs: remove VHT dead code
staging: rtl8723bs: remove unusedODM_CMNINFO_BOARD_TYPEenum item
staging: rtl8723bs: fix macro value for 2.4Ghz only device
staging: rtl8723bs: remove register initializations tied to 802.11ac
standard
staging: rtl8723bs: remove obsolete 5Ghz comments
staging: rtl8723bs: fix check allowing 5Ghz settings
staging: rtl8723bs: remove item from TODO listdrivers/staging/rtl8723bs/TODO | 2 - drivers/staging/rtl8723bs/core/rtw_ap.c | 10 +- .../staging/rtl8723bs/core/rtw_ieee80211.c | 22 +- drivers/staging/rtl8723bs/core/rtw_mlme.c | 10 - drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 328 ++--- .../staging/rtl8723bs/core/rtw_wlan_util.c | 29 +- drivers/staging/rtl8723bs/core/rtw_xmit.c | 5 +- .../staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 4 +- .../staging/rtl8723bs/hal/HalBtc8723b2Ant.c | 5 +- drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 1 - .../staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 17 +- .../staging/rtl8723bs/hal/HalHWImg8723B_RF.c | 595 ++++----- .../staging/rtl8723bs/hal/HalPhyRf_8723B.c | 19 +- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 - drivers/staging/rtl8723bs/hal/hal_com.c | 241 ---- .../staging/rtl8723bs/hal/hal_com_phycfg.c | 1059 +++-------------- drivers/staging/rtl8723bs/hal/odm.c | 50 - drivers/staging/rtl8723bs/hal/odm.h | 42 +- drivers/staging/rtl8723bs/hal/odm_DIG.c | 2 - .../rtl8723bs/hal/odm_EdcaTurboCheck.c | 4 +- .../rtl8723bs/hal/odm_RegConfig8723B.c | 5 +- .../rtl8723bs/hal/odm_RegConfig8723B.h | 2 - drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 1 - .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 53 +- .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 43 +- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 5 - .../rtl8723bs/include/Hal8192CPhyReg.h | 2 - drivers/staging/rtl8723bs/include/drv_types.h | 10 +- drivers/staging/rtl8723bs/include/hal_com.h | 62 +- .../rtl8723bs/include/hal_com_phycfg.h | 198 +-- .../staging/rtl8723bs/include/hal_com_reg.h | 1 - drivers/staging/rtl8723bs/include/hal_data.h | 40 +- drivers/staging/rtl8723bs/include/hal_pg.h | 2 - drivers/staging/rtl8723bs/include/hal_phy.h | 10 - drivers/staging/rtl8723bs/include/ieee80211.h | 67 +- .../staging/rtl8723bs/include/rtl8723b_xmit.h | 21 - drivers/staging/rtl8723bs/include/rtw_ht.h | 4 - .../staging/rtl8723bs/include/rtw_mlme_ext.h | 52 +- drivers/staging/rtl8723bs/include/rtw_rf.h | 33 +- drivers/staging/rtl8723bs/include/wifi.h | 1 - .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 - .../staging/rtl8723bs/os_dep/ioctl_linux.c | 8 +- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 13 +- drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 4 - 44 files changed, 640 insertions(+), 2450 deletions(-)
Re: [PATCH 12/18] staging: rtl8723bs: remove VHT dead code
In reply to Hans de GoedeOn Mon, Jun 21, 2021 at 02:45:37PM +0200, Hans de Goede wrote:
Hello Hans,
Quoted 376 lines
Hi,
Quoted 366 lines · Fabio Aiuto
Quoted 335 lines · Hans de Goede
Hi,
Quoted 332 lines · Fabio Aiuto
remove VHT dead code, as the device doesn't support VHT (which is a 802.11ac capability).
Signed-off-by Fabio Aiuto <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 1 - drivers/staging/rtl8723bs/hal/hal_com.c | 241 ----------- .../staging/rtl8723bs/hal/hal_com_phycfg.c | 383 +----------------- drivers/staging/rtl8723bs/include/hal_com.h | 62 +-- .../rtl8723bs/include/hal_com_phycfg.h | 4 - drivers/staging/rtl8723bs/include/ieee80211.h | 45 -- .../staging/rtl8723bs/include/rtl8723b_xmit.h | 21 - drivers/staging/rtl8723bs/include/rtw_ht.h | 4 - 8 files changed, 9 insertions(+), 752 deletions(-)drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0
-1@@ -46,7 +46,6 @@ static struct action_handler OnAction_tbl[] = { {RTW_WLAN_CATEGORY_UNPROTECTED_WNM, "ACTION_UNPROTECTED_WNM", &DoReserved}, {RTW_WLAN_CATEGORY_SELF_PROTECTED, "ACTION_SELF_PROTECTED", &DoReserved}, {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &DoReserved}, - {RTW_WLAN_CATEGORY_VHT, "ACTION_VHT", &DoReserved}, {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &DoReserved}, };drivers/staging/rtl8723bs/hal/hal_com.c +0
-241@@ -295,126 +295,6 @@ u8 MRateToHwRate(u8 rate)case MGN_MCS31 : ret =DESC_RATEMCS31 ;break ; -case MGN_VHT1SS_MCS0 : - ret =DESC_RATEVHTSS1MCS0 ; -break ; -case MGN_VHT1SS_MCS1 : - ret =DESC_RATEVHTSS1MCS1 ; -break ; -case MGN_VHT1SS_MCS2 : - ret =DESC_RATEVHTSS1MCS2 ; -break ; -case MGN_VHT1SS_MCS3 : - ret =DESC_RATEVHTSS1MCS3 ; -break ; -case MGN_VHT1SS_MCS4 : - ret =DESC_RATEVHTSS1MCS4 ; -break ; -case MGN_VHT1SS_MCS5 : - ret =DESC_RATEVHTSS1MCS5 ; -break ; -case MGN_VHT1SS_MCS6 : - ret =DESC_RATEVHTSS1MCS6 ; -break ; -case MGN_VHT1SS_MCS7 : - ret =DESC_RATEVHTSS1MCS7 ; -break ; -case MGN_VHT1SS_MCS8 : - ret =DESC_RATEVHTSS1MCS8 ; -break ; -case MGN_VHT1SS_MCS9 : - ret =DESC_RATEVHTSS1MCS9 ; -break ; -case MGN_VHT2SS_MCS0 : - ret =DESC_RATEVHTSS2MCS0 ; -break ; -case MGN_VHT2SS_MCS1 : - ret =DESC_RATEVHTSS2MCS1 ; -break ; -case MGN_VHT2SS_MCS2 : - ret =DESC_RATEVHTSS2MCS2 ; -break ; -case MGN_VHT2SS_MCS3 : - ret =DESC_RATEVHTSS2MCS3 ; -break ; -case MGN_VHT2SS_MCS4 : - ret =DESC_RATEVHTSS2MCS4 ; -break ; -case MGN_VHT2SS_MCS5 : - ret =DESC_RATEVHTSS2MCS5 ; -break ; -case MGN_VHT2SS_MCS6 : - ret =DESC_RATEVHTSS2MCS6 ; -break ; -case MGN_VHT2SS_MCS7 : - ret =DESC_RATEVHTSS2MCS7 ; -break ; -case MGN_VHT2SS_MCS8 : - ret =DESC_RATEVHTSS2MCS8 ; -break ; -case MGN_VHT2SS_MCS9 : - ret =DESC_RATEVHTSS2MCS9 ; -break ; -case MGN_VHT3SS_MCS0 : - ret =DESC_RATEVHTSS3MCS0 ; -break ; -case MGN_VHT3SS_MCS1 : - ret =DESC_RATEVHTSS3MCS1 ; -break ; -case MGN_VHT3SS_MCS2 : - ret =DESC_RATEVHTSS3MCS2 ; -break ; -case MGN_VHT3SS_MCS3 : - ret =DESC_RATEVHTSS3MCS3 ; -break ; -case MGN_VHT3SS_MCS4 : - ret =DESC_RATEVHTSS3MCS4 ; -break ; -case MGN_VHT3SS_MCS5 : - ret =DESC_RATEVHTSS3MCS5 ; -break ; -case MGN_VHT3SS_MCS6 : - ret =DESC_RATEVHTSS3MCS6 ; -break ; -case MGN_VHT3SS_MCS7 : - ret =DESC_RATEVHTSS3MCS7 ; -break ; -case MGN_VHT3SS_MCS8 : - ret =DESC_RATEVHTSS3MCS8 ; -break ; -case MGN_VHT3SS_MCS9 : - ret =DESC_RATEVHTSS3MCS9 ; -break ; -case MGN_VHT4SS_MCS0 : - ret =DESC_RATEVHTSS4MCS0 ; -break ; -case MGN_VHT4SS_MCS1 : - ret =DESC_RATEVHTSS4MCS1 ; -break ; -case MGN_VHT4SS_MCS2 : - ret =DESC_RATEVHTSS4MCS2 ; -break ; -case MGN_VHT4SS_MCS3 : - ret =DESC_RATEVHTSS4MCS3 ; -break ; -case MGN_VHT4SS_MCS4 : - ret =DESC_RATEVHTSS4MCS4 ; -break ; -case MGN_VHT4SS_MCS5 : - ret =DESC_RATEVHTSS4MCS5 ; -break ; -case MGN_VHT4SS_MCS6 : - ret =DESC_RATEVHTSS4MCS6 ; -break ; -case MGN_VHT4SS_MCS7 : - ret =DESC_RATEVHTSS4MCS7 ; -break ; -case MGN_VHT4SS_MCS8 : - ret =DESC_RATEVHTSS4MCS8 ; -break ; -case MGN_VHT4SS_MCS9 : - ret =DESC_RATEVHTSS4MCS9 ; -break ;default :break ; }@@ -559,127 +439,6 @@ u8 HwRateToMRate(u8 rate)case DESC_RATEMCS31 : ret_rate =MGN_MCS31 ;break ; -case DESC_RATEVHTSS1MCS0 : - ret_rate =MGN_VHT1SS_MCS0 ; -break ; -case DESC_RATEVHTSS1MCS1 : - ret_rate =MGN_VHT1SS_MCS1 ; -break ; -case DESC_RATEVHTSS1MCS2 : - ret_rate =MGN_VHT1SS_MCS2 ; -break ; -case DESC_RATEVHTSS1MCS3 : - ret_rate =MGN_VHT1SS_MCS3 ; -break ; -case DESC_RATEVHTSS1MCS4 : - ret_rate =MGN_VHT1SS_MCS4 ; -break ; -case DESC_RATEVHTSS1MCS5 : - ret_rate =MGN_VHT1SS_MCS5 ; -break ; -case DESC_RATEVHTSS1MCS6 : - ret_rate =MGN_VHT1SS_MCS6 ; -break ; -case DESC_RATEVHTSS1MCS7 : - ret_rate =MGN_VHT1SS_MCS7 ; -break ; -case DESC_RATEVHTSS1MCS8 : - ret_rate =MGN_VHT1SS_MCS8 ; -break ; -case DESC_RATEVHTSS1MCS9 : - ret_rate =MGN_VHT1SS_MCS9 ; -break ; -case DESC_RATEVHTSS2MCS0 : - ret_rate =MGN_VHT2SS_MCS0 ; -break ; -case DESC_RATEVHTSS2MCS1 : - ret_rate =MGN_VHT2SS_MCS1 ; -break ; -case DESC_RATEVHTSS2MCS2 : - ret_rate =MGN_VHT2SS_MCS2 ; -break ; -case DESC_RATEVHTSS2MCS3 : - ret_rate =MGN_VHT2SS_MCS3 ; -break ; -case DESC_RATEVHTSS2MCS4 : - ret_rate =MGN_VHT2SS_MCS4 ; -break ; -case DESC_RATEVHTSS2MCS5 : - ret_rate =MGN_VHT2SS_MCS5 ; -break ; -case DESC_RATEVHTSS2MCS6 : - ret_rate =MGN_VHT2SS_MCS6 ; -break ; -case DESC_RATEVHTSS2MCS7 : - ret_rate =MGN_VHT2SS_MCS7 ; -break ; -case DESC_RATEVHTSS2MCS8 : - ret_rate =MGN_VHT2SS_MCS8 ; -break ; -case DESC_RATEVHTSS2MCS9 : - ret_rate =MGN_VHT2SS_MCS9 ; -break ; -case DESC_RATEVHTSS3MCS0 : - ret_rate =MGN_VHT3SS_MCS0 ; -break ; -case DESC_RATEVHTSS3MCS1 : - ret_rate =MGN_VHT3SS_MCS1 ; -break ; -case DESC_RATEVHTSS3MCS2 : - ret_rate =MGN_VHT3SS_MCS2 ; -break ; -case DESC_RATEVHTSS3MCS3 : - ret_rate =MGN_VHT3SS_MCS3 ; -break ; -case DESC_RATEVHTSS3MCS4 : - ret_rate =MGN_VHT3SS_MCS4 ; -break ; -case DESC_RATEVHTSS3MCS5 : - ret_rate =MGN_VHT3SS_MCS5 ; -break ; -case DESC_RATEVHTSS3MCS6 : - ret_rate =MGN_VHT3SS_MCS6 ; -break ; -case DESC_RATEVHTSS3MCS7 : - ret_rate =MGN_VHT3SS_MCS7 ; -break ; -case DESC_RATEVHTSS3MCS8 : - ret_rate =MGN_VHT3SS_MCS8 ; -break ; -case DESC_RATEVHTSS3MCS9 : - ret_rate =MGN_VHT3SS_MCS9 ; -break ; -case DESC_RATEVHTSS4MCS0 : - ret_rate =MGN_VHT4SS_MCS0 ; -break ; -case DESC_RATEVHTSS4MCS1 : - ret_rate =MGN_VHT4SS_MCS1 ; -break ; -case DESC_RATEVHTSS4MCS2 : - ret_rate =MGN_VHT4SS_MCS2 ; -break ; -case DESC_RATEVHTSS4MCS3 : - ret_rate =MGN_VHT4SS_MCS3 ; -break ; -case DESC_RATEVHTSS4MCS4 : - ret_rate =MGN_VHT4SS_MCS4 ; -break ; -case DESC_RATEVHTSS4MCS5 : - ret_rate =MGN_VHT4SS_MCS5 ; -break ; -case DESC_RATEVHTSS4MCS6 : - ret_rate =MGN_VHT4SS_MCS6 ; -break ; -case DESC_RATEVHTSS4MCS7 : - ret_rate =MGN_VHT4SS_MCS7 ; -break ; -case DESC_RATEVHTSS4MCS8 : - ret_rate =MGN_VHT4SS_MCS8 ; -break ; -case DESC_RATEVHTSS4MCS9 : - ret_rate =MGN_VHT4SS_MCS9 ; -break ; -default :break ; }drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-24@@ -39,18 +39,6 @@ u8 PHY_GetTxPowerByRateBase(struct adapter *Adapter, u8 RfPath,case HT_MCS24_MCS31 : value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][5 ];break ; -case VHT_1SSMCS0_1SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][6 ]; -break ; -case VHT_2SSMCS0_2SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][7 ]; -break ; -case VHT_3SSMCS0_3SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][8 ]; -break ; -case VHT_4SSMCS0_4SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][9 ]; -break ;default :break ; }@@ -91,18 +79,6 @@ phy_SetTxPowerByRateBase(case HT_MCS24_MCS31 : pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][5 ] = Value;break ; -case VHT_1SSMCS0_1SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][6 ] = Value; -break ; -case VHT_2SSMCS0_2SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][7 ] = Value; -break ; -case VHT_3SSMCS0_3SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][8 ] = Value; -break ; -case VHT_4SSMCS0_4SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][9 ] = Value; -break ;default :break ; }@@ -131,14 +107,6 @@ struct adapter *padapter base =PHY_GetTxPowerByRate (padapter, path,RF_3TX ,MGN_MCS23 );phy_SetTxPowerByRateBase (padapter, path,HT_MCS16_MCS23 ,RF_3TX , base);Quoted 12 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c struct adapter *padapter · line 141
Quoted 8 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-8- base =PHY_GetTxPowerByRate (padapter, path,RF_1TX ,MGN_VHT1SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_1SSMCS0_1SSMCS9 ,RF_1TX , base); - - base =PHY_GetTxPowerByRate (padapter, path,RF_2TX ,MGN_VHT2SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_2SSMCS0_2SSMCS9 ,RF_2TX , base); - - base =PHY_GetTxPowerByRate (padapter, path,RF_3TX ,MGN_VHT3SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_3SSMCS0_3SSMCS9 ,RF_3TX , base);You are removing a bunch of register writes from a block here, while keeping others, so this does not seem like it is just dead-code removal it feels like you are actually making a functional change.
You are right, I will fix the changelog in next v2.
Quoted 2 lines
Perhaps this entire block can never be executed ?
It think it's executed during hal initialization
Quoted 9 lines
Or maybe the VHT name used here is misleading and this is also relevant for 2.4 GHZ 40Mhz use ? Did you test with an access point configured to use 40 MHz channels
and then checked that you were actually using a 40MHz channel ? Note these are
quite rare AFAIK because 40 MHz tends to cause even more collosion issues in the already quite full 2.4G spectrum, still if possible you should test this and make sure that it does not regress (with out specifically testing this we might not note regressions for a long time because of 40MHz usage being rare).Quoted 6 lines
The MCS section involved is from 0 to 9 in a set of up to 4 spatial streams, but rtl8723bs works only with 0-7 and 32 MCS rates in both 20 and 40 Mhz and multiple spatial streams are not supported.
So setting something like VHT_{1,2,3}SSMCS0_{1,2,3}SSMCS9 in our case does something odd.
Quoted 8 lines
Right, but since we don't know what it is actually doing, it would be best IMHO to just leave this as is. Esp. when the changes cannot be tested with 40MHZ channel width.
Regards,
Hans
you are right, will drop this patch as well.
Thank you,
fabio.
Re: [PATCH 12/18] staging: rtl8723bs: remove VHT dead code
In reply to Hans de GoedeHello Hans,
Quoted 335 lines · Hans de Goede
Hi,
Quoted 332 lines · Fabio Aiuto
remove VHT dead code, as the device doesn't support VHT (which is a 802.11ac capability).
Signed-off-by Fabio Aiuto <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 1 - drivers/staging/rtl8723bs/hal/hal_com.c | 241 ----------- .../staging/rtl8723bs/hal/hal_com_phycfg.c | 383 +----------------- drivers/staging/rtl8723bs/include/hal_com.h | 62 +-- .../rtl8723bs/include/hal_com_phycfg.h | 4 - drivers/staging/rtl8723bs/include/ieee80211.h | 45 -- .../staging/rtl8723bs/include/rtl8723b_xmit.h | 21 - drivers/staging/rtl8723bs/include/rtw_ht.h | 4 - 8 files changed, 9 insertions(+), 752 deletions(-)drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0
-1@@ -46,7 +46,6 @@ static struct action_handler OnAction_tbl[] = { {RTW_WLAN_CATEGORY_UNPROTECTED_WNM, "ACTION_UNPROTECTED_WNM", &DoReserved}, {RTW_WLAN_CATEGORY_SELF_PROTECTED, "ACTION_SELF_PROTECTED", &DoReserved}, {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &DoReserved}, - {RTW_WLAN_CATEGORY_VHT, "ACTION_VHT", &DoReserved}, {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &DoReserved}, };drivers/staging/rtl8723bs/hal/hal_com.c +0
-241@@ -295,126 +295,6 @@ u8 MRateToHwRate(u8 rate)case MGN_MCS31 : ret =DESC_RATEMCS31 ;break ; -case MGN_VHT1SS_MCS0 : - ret =DESC_RATEVHTSS1MCS0 ; -break ; -case MGN_VHT1SS_MCS1 : - ret =DESC_RATEVHTSS1MCS1 ; -break ; -case MGN_VHT1SS_MCS2 : - ret =DESC_RATEVHTSS1MCS2 ; -break ; -case MGN_VHT1SS_MCS3 : - ret =DESC_RATEVHTSS1MCS3 ; -break ; -case MGN_VHT1SS_MCS4 : - ret =DESC_RATEVHTSS1MCS4 ; -break ; -case MGN_VHT1SS_MCS5 : - ret =DESC_RATEVHTSS1MCS5 ; -break ; -case MGN_VHT1SS_MCS6 : - ret =DESC_RATEVHTSS1MCS6 ; -break ; -case MGN_VHT1SS_MCS7 : - ret =DESC_RATEVHTSS1MCS7 ; -break ; -case MGN_VHT1SS_MCS8 : - ret =DESC_RATEVHTSS1MCS8 ; -break ; -case MGN_VHT1SS_MCS9 : - ret =DESC_RATEVHTSS1MCS9 ; -break ; -case MGN_VHT2SS_MCS0 : - ret =DESC_RATEVHTSS2MCS0 ; -break ; -case MGN_VHT2SS_MCS1 : - ret =DESC_RATEVHTSS2MCS1 ; -break ; -case MGN_VHT2SS_MCS2 : - ret =DESC_RATEVHTSS2MCS2 ; -break ; -case MGN_VHT2SS_MCS3 : - ret =DESC_RATEVHTSS2MCS3 ; -break ; -case MGN_VHT2SS_MCS4 : - ret =DESC_RATEVHTSS2MCS4 ; -break ; -case MGN_VHT2SS_MCS5 : - ret =DESC_RATEVHTSS2MCS5 ; -break ; -case MGN_VHT2SS_MCS6 : - ret =DESC_RATEVHTSS2MCS6 ; -break ; -case MGN_VHT2SS_MCS7 : - ret =DESC_RATEVHTSS2MCS7 ; -break ; -case MGN_VHT2SS_MCS8 : - ret =DESC_RATEVHTSS2MCS8 ; -break ; -case MGN_VHT2SS_MCS9 : - ret =DESC_RATEVHTSS2MCS9 ; -break ; -case MGN_VHT3SS_MCS0 : - ret =DESC_RATEVHTSS3MCS0 ; -break ; -case MGN_VHT3SS_MCS1 : - ret =DESC_RATEVHTSS3MCS1 ; -break ; -case MGN_VHT3SS_MCS2 : - ret =DESC_RATEVHTSS3MCS2 ; -break ; -case MGN_VHT3SS_MCS3 : - ret =DESC_RATEVHTSS3MCS3 ; -break ; -case MGN_VHT3SS_MCS4 : - ret =DESC_RATEVHTSS3MCS4 ; -break ; -case MGN_VHT3SS_MCS5 : - ret =DESC_RATEVHTSS3MCS5 ; -break ; -case MGN_VHT3SS_MCS6 : - ret =DESC_RATEVHTSS3MCS6 ; -break ; -case MGN_VHT3SS_MCS7 : - ret =DESC_RATEVHTSS3MCS7 ; -break ; -case MGN_VHT3SS_MCS8 : - ret =DESC_RATEVHTSS3MCS8 ; -break ; -case MGN_VHT3SS_MCS9 : - ret =DESC_RATEVHTSS3MCS9 ; -break ; -case MGN_VHT4SS_MCS0 : - ret =DESC_RATEVHTSS4MCS0 ; -break ; -case MGN_VHT4SS_MCS1 : - ret =DESC_RATEVHTSS4MCS1 ; -break ; -case MGN_VHT4SS_MCS2 : - ret =DESC_RATEVHTSS4MCS2 ; -break ; -case MGN_VHT4SS_MCS3 : - ret =DESC_RATEVHTSS4MCS3 ; -break ; -case MGN_VHT4SS_MCS4 : - ret =DESC_RATEVHTSS4MCS4 ; -break ; -case MGN_VHT4SS_MCS5 : - ret =DESC_RATEVHTSS4MCS5 ; -break ; -case MGN_VHT4SS_MCS6 : - ret =DESC_RATEVHTSS4MCS6 ; -break ; -case MGN_VHT4SS_MCS7 : - ret =DESC_RATEVHTSS4MCS7 ; -break ; -case MGN_VHT4SS_MCS8 : - ret =DESC_RATEVHTSS4MCS8 ; -break ; -case MGN_VHT4SS_MCS9 : - ret =DESC_RATEVHTSS4MCS9 ; -break ;default :break ; }@@ -559,127 +439,6 @@ u8 HwRateToMRate(u8 rate)case DESC_RATEMCS31 : ret_rate =MGN_MCS31 ;break ; -case DESC_RATEVHTSS1MCS0 : - ret_rate =MGN_VHT1SS_MCS0 ; -break ; -case DESC_RATEVHTSS1MCS1 : - ret_rate =MGN_VHT1SS_MCS1 ; -break ; -case DESC_RATEVHTSS1MCS2 : - ret_rate =MGN_VHT1SS_MCS2 ; -break ; -case DESC_RATEVHTSS1MCS3 : - ret_rate =MGN_VHT1SS_MCS3 ; -break ; -case DESC_RATEVHTSS1MCS4 : - ret_rate =MGN_VHT1SS_MCS4 ; -break ; -case DESC_RATEVHTSS1MCS5 : - ret_rate =MGN_VHT1SS_MCS5 ; -break ; -case DESC_RATEVHTSS1MCS6 : - ret_rate =MGN_VHT1SS_MCS6 ; -break ; -case DESC_RATEVHTSS1MCS7 : - ret_rate =MGN_VHT1SS_MCS7 ; -break ; -case DESC_RATEVHTSS1MCS8 : - ret_rate =MGN_VHT1SS_MCS8 ; -break ; -case DESC_RATEVHTSS1MCS9 : - ret_rate =MGN_VHT1SS_MCS9 ; -break ; -case DESC_RATEVHTSS2MCS0 : - ret_rate =MGN_VHT2SS_MCS0 ; -break ; -case DESC_RATEVHTSS2MCS1 : - ret_rate =MGN_VHT2SS_MCS1 ; -break ; -case DESC_RATEVHTSS2MCS2 : - ret_rate =MGN_VHT2SS_MCS2 ; -break ; -case DESC_RATEVHTSS2MCS3 : - ret_rate =MGN_VHT2SS_MCS3 ; -break ; -case DESC_RATEVHTSS2MCS4 : - ret_rate =MGN_VHT2SS_MCS4 ; -break ; -case DESC_RATEVHTSS2MCS5 : - ret_rate =MGN_VHT2SS_MCS5 ; -break ; -case DESC_RATEVHTSS2MCS6 : - ret_rate =MGN_VHT2SS_MCS6 ; -break ; -case DESC_RATEVHTSS2MCS7 : - ret_rate =MGN_VHT2SS_MCS7 ; -break ; -case DESC_RATEVHTSS2MCS8 : - ret_rate =MGN_VHT2SS_MCS8 ; -break ; -case DESC_RATEVHTSS2MCS9 : - ret_rate =MGN_VHT2SS_MCS9 ; -break ; -case DESC_RATEVHTSS3MCS0 : - ret_rate =MGN_VHT3SS_MCS0 ; -break ; -case DESC_RATEVHTSS3MCS1 : - ret_rate =MGN_VHT3SS_MCS1 ; -break ; -case DESC_RATEVHTSS3MCS2 : - ret_rate =MGN_VHT3SS_MCS2 ; -break ; -case DESC_RATEVHTSS3MCS3 : - ret_rate =MGN_VHT3SS_MCS3 ; -break ; -case DESC_RATEVHTSS3MCS4 : - ret_rate =MGN_VHT3SS_MCS4 ; -break ; -case DESC_RATEVHTSS3MCS5 : - ret_rate =MGN_VHT3SS_MCS5 ; -break ; -case DESC_RATEVHTSS3MCS6 : - ret_rate =MGN_VHT3SS_MCS6 ; -break ; -case DESC_RATEVHTSS3MCS7 : - ret_rate =MGN_VHT3SS_MCS7 ; -break ; -case DESC_RATEVHTSS3MCS8 : - ret_rate =MGN_VHT3SS_MCS8 ; -break ; -case DESC_RATEVHTSS3MCS9 : - ret_rate =MGN_VHT3SS_MCS9 ; -break ; -case DESC_RATEVHTSS4MCS0 : - ret_rate =MGN_VHT4SS_MCS0 ; -break ; -case DESC_RATEVHTSS4MCS1 : - ret_rate =MGN_VHT4SS_MCS1 ; -break ; -case DESC_RATEVHTSS4MCS2 : - ret_rate =MGN_VHT4SS_MCS2 ; -break ; -case DESC_RATEVHTSS4MCS3 : - ret_rate =MGN_VHT4SS_MCS3 ; -break ; -case DESC_RATEVHTSS4MCS4 : - ret_rate =MGN_VHT4SS_MCS4 ; -break ; -case DESC_RATEVHTSS4MCS5 : - ret_rate =MGN_VHT4SS_MCS5 ; -break ; -case DESC_RATEVHTSS4MCS6 : - ret_rate =MGN_VHT4SS_MCS6 ; -break ; -case DESC_RATEVHTSS4MCS7 : - ret_rate =MGN_VHT4SS_MCS7 ; -break ; -case DESC_RATEVHTSS4MCS8 : - ret_rate =MGN_VHT4SS_MCS8 ; -break ; -case DESC_RATEVHTSS4MCS9 : - ret_rate =MGN_VHT4SS_MCS9 ; -break ; -default :break ; }drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-24@@ -39,18 +39,6 @@ u8 PHY_GetTxPowerByRateBase(struct adapter *Adapter, u8 RfPath,case HT_MCS24_MCS31 : value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][5 ];break ; -case VHT_1SSMCS0_1SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][6 ]; -break ; -case VHT_2SSMCS0_2SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][7 ]; -break ; -case VHT_3SSMCS0_3SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][8 ]; -break ; -case VHT_4SSMCS0_4SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][9 ]; -break ;default :break ; }@@ -91,18 +79,6 @@ phy_SetTxPowerByRateBase(case HT_MCS24_MCS31 : pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][5 ] = Value;break ; -case VHT_1SSMCS0_1SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][6 ] = Value; -break ; -case VHT_2SSMCS0_2SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][7 ] = Value; -break ; -case VHT_3SSMCS0_3SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][8 ] = Value; -break ; -case VHT_4SSMCS0_4SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][9 ] = Value; -break ;default :break ; }@@ -131,14 +107,6 @@ struct adapter *padapter base =PHY_GetTxPowerByRate (padapter, path,RF_3TX ,MGN_MCS23 );phy_SetTxPowerByRateBase (padapter, path,HT_MCS16_MCS23 ,RF_3TX , base);
Quoted 12 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c struct adapter *padapter · line 141
Quoted 8 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-8- base =PHY_GetTxPowerByRate (padapter, path,RF_1TX ,MGN_VHT1SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_1SSMCS0_1SSMCS9 ,RF_1TX , base); - - base =PHY_GetTxPowerByRate (padapter, path,RF_2TX ,MGN_VHT2SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_2SSMCS0_2SSMCS9 ,RF_2TX , base); - - base =PHY_GetTxPowerByRate (padapter, path,RF_3TX ,MGN_VHT3SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_3SSMCS0_3SSMCS9 ,RF_3TX , base);You are removing a bunch of register writes from a block here, while keeping others, so this does not seem like it is just dead-code removal it feels like you are actually making a functional change.
I looked deeply at what I deed, and I just removed some functions updating tables in memory, no register write here. Tables are used to load Tx Power Limit. So removing these function calls according with the removal of the VHT enum items grants that wrong Power Limits will never be fetched.
Moreover I have been quite conservative, for I left untouched HT indexes above 7 which rtl8723bs doesn't support.
So IMO I think this patch is fine as is...
Quoted 2 lines
Perhaps this entire block can never be executed ?
the block is executed but there's no register write happening. Just updating of values which will never be fetched.
Quoted 680 lines
Or maybe the VHT name used here is misleading and this is also relevant for 2.4 GHZ 40Mhz use ? Did you test with an access point configured to use 40 MHz channels
and then checked that you were actually using a 40MHz channel ? Note these are
quite rare AFAIK because 40 MHz tends to cause even more collosion issues in the already quite full 2.4G spectrum, still if possible you should test this and make sure that it does not regress (with out specifically testing this we might not note regressions for a long time because of 40MHz usage being rare).Quoted 122 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-108} }@@ -442,81 +410,6 @@ PHY_GetRateValuesOfTxPowerByRate( *RateNum =4 ;break ; -case 0xC3C : -case 0xE3C : -case 0x183C : -case 0x1a3C : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS0 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS1 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS2 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS3 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xC40 : -case 0xE40 : -case 0x1840 : -case 0x1a40 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS4 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS5 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS6 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS7 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xC44 : -case 0xE44 : -case 0x1844 : -case 0x1a44 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS8 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT1SS_MCS9 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS0 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS1 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xC48 : -case 0xE48 : -case 0x1848 : -case 0x1a48 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS2 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS3 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS4 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS5 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xC4C : -case 0xE4C : -case 0x184C : -case 0x1a4C : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS6 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS7 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS8 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS9 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; -case 0xCD8 :case 0xED8 :case 0x18D8 :@@ -547,49 +440,6 @@ PHY_GetRateValuesOfTxPowerByRate( *RateNum =4 ;break ; -case 0xCE0 : -case 0xEE0 : -case 0x18E0 : -case 0x1aE0 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS0 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS1 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS2 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS3 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xCE4 : -case 0xEE4 : -case 0x18E4 : -case 0x1aE4 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS4 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS5 ); - RateIndex[2 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS6 ); - RateIndex[3 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS7 ); -for (i =0 ; i <4 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; - -case 0xCE8 : -case 0xEE8 : -case 0x18E8 :drivers/staging/rtl8723bs/hal/hal_com_phycfg.c PHY_GetRateValuesOfTxPowerByRate( · line 592
Quoted 10 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-10-case 0x1aE8 : - RateIndex[0 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS8 ); - RateIndex[1 ] =PHY_GetRateIndexOfTxPowerByRate (MGN_VHT3SS_MCS9 ); -for (i =0 ; i <2 ; ++i) { - PwrByRateVal[i] = (s8) ((((Value >> (i *8 +4 )) &0xF )) *10 + - ((Value >> (i *8 )) &0xF )); - } - *RateNum =4 ; -break ; -Here only 2 rates are set, so this feels like it is a 40MHz case, are you sure this can be removed (maybe it is 40MHz channel use at 5GHz ?
The rest of the patch looks ok.
Regards,
Hans
Quoted 523 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +8
-225default :break ; }@@ -617,10 +467,6 @@ static void PHY_StoreTxPowerByRateNew(return ;for (i =0 ; i < rateNum; ++i) { -if (rateIndex[i] ==PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS0 ) || - rateIndex[i] ==PHY_GetRateIndexOfTxPowerByRate (MGN_VHT2SS_MCS1 )) - TxNum =RF_2TX ; - pHalData->TxPwrByRateOffset[RfPath][TxNum][rateIndex[i]] = PwrByRateVal[i]; } }@@ -691,18 +537,6 @@ struct adapter *padapteru8 mcs16_23Rates[8 ] = {MGN_MCS16 ,MGN_MCS17 ,MGN_MCS18 ,MGN_MCS19 ,MGN_MCS20 ,MGN_MCS21 ,MGN_MCS22 ,MGN_MCS23 }; -u8 vht1ssRates[10 ] = { -MGN_VHT1SS_MCS0 ,MGN_VHT1SS_MCS1 ,MGN_VHT1SS_MCS2 ,MGN_VHT1SS_MCS3 ,MGN_VHT1SS_MCS4 , -MGN_VHT1SS_MCS5 ,MGN_VHT1SS_MCS6 ,MGN_VHT1SS_MCS7 ,MGN_VHT1SS_MCS8 ,MGN_VHT1SS_MCS9 - }; -u8 vht2ssRates[10 ] = { -MGN_VHT2SS_MCS0 ,MGN_VHT2SS_MCS1 ,MGN_VHT2SS_MCS2 ,MGN_VHT2SS_MCS3 ,MGN_VHT2SS_MCS4 , -MGN_VHT2SS_MCS5 ,MGN_VHT2SS_MCS6 ,MGN_VHT2SS_MCS7 ,MGN_VHT2SS_MCS8 ,MGN_VHT2SS_MCS9 - }; -u8 vht3ssRates[10 ] = { -MGN_VHT3SS_MCS0 ,MGN_VHT3SS_MCS1 ,MGN_VHT3SS_MCS2 ,MGN_VHT3SS_MCS3 ,MGN_VHT3SS_MCS4 , -MGN_VHT3SS_MCS5 ,MGN_VHT3SS_MCS6 ,MGN_VHT3SS_MCS7 ,MGN_VHT3SS_MCS8 ,MGN_VHT3SS_MCS9 - };for (path =ODM_RF_PATH_A ; path <=ODM_RF_PATH_D ; ++path) {for (txNum =RF_1TX ; txNum <RF_MAX_TX_NUM ; ++txNum) {@@ -740,27 +574,6 @@ struct adapter *padapter value =PHY_GetTxPowerByRate (padapter, path, txNum, mcs16_23Rates[i]);PHY_SetTxPowerByRate (padapter, path, txNum, mcs16_23Rates[i], value - base); } - -/* VHT 1SS */ - base =PHY_GetTxPowerByRate (padapter, path, txNum,MGN_VHT1SS_MCS7 ); -for (i =0 ; i <sizeof (vht1ssRates); ++i) { - value =PHY_GetTxPowerByRate (padapter, path, txNum, vht1ssRates[i]); -PHY_SetTxPowerByRate (padapter, path, txNum, vht1ssRates[i], value - base); - } - -/* VHT 2SS */ - base =PHY_GetTxPowerByRate (padapter, path, txNum,MGN_VHT2SS_MCS7 ); -for (i =0 ; i <sizeof (vht2ssRates); ++i) { - value =PHY_GetTxPowerByRate (padapter, path, txNum, vht2ssRates[i]); -PHY_SetTxPowerByRate (padapter, path, txNum, vht2ssRates[i], value - base); - } - -/* VHT 3SS */ - base =PHY_GetTxPowerByRate (padapter, path, txNum,MGN_VHT3SS_MCS7 ); -for (i =0 ; i <sizeof (vht3ssRates); ++i) { - value =PHY_GetTxPowerByRate (padapter, path, txNum, vht3ssRates[i]); -PHY_SetTxPowerByRate (padapter, path, txNum, vht3ssRates[i], value - base); - } } } }@@ -823,38 +636,6 @@ void PHY_SetTxPowerIndexByRateSection( Channel, htRates4T, ARRAY_SIZE(htRates4T)); - }else if (RateSection ==VHT_1SSMCS0_1SSMCS9 ) { -u8 vhtRates1T[] = {MGN_VHT1SS_MCS0 ,MGN_VHT1SS_MCS1 ,MGN_VHT1SS_MCS2 ,MGN_VHT1SS_MCS3 ,MGN_VHT1SS_MCS4 , -MGN_VHT1SS_MCS5 ,MGN_VHT1SS_MCS6 ,MGN_VHT1SS_MCS7 ,MGN_VHT1SS_MCS8 ,MGN_VHT1SS_MCS9 }; -PHY_SetTxPowerIndexByRateArray (padapter, RFPath, - pHalData->CurrentChannelBW, - Channel, vhtRates1T, -ARRAY_SIZE (vhtRates1T)); - - }else if (RateSection ==VHT_2SSMCS0_2SSMCS9 ) { -u8 vhtRates2T[] = {MGN_VHT2SS_MCS0 ,MGN_VHT2SS_MCS1 ,MGN_VHT2SS_MCS2 ,MGN_VHT2SS_MCS3 ,MGN_VHT2SS_MCS4 , -MGN_VHT2SS_MCS5 ,MGN_VHT2SS_MCS6 ,MGN_VHT2SS_MCS7 ,MGN_VHT2SS_MCS8 ,MGN_VHT2SS_MCS9 }; - -PHY_SetTxPowerIndexByRateArray (padapter, RFPath, - pHalData->CurrentChannelBW, - Channel, vhtRates2T, -ARRAY_SIZE (vhtRates2T)); - }else if (RateSection ==VHT_3SSMCS0_3SSMCS9 ) { -u8 vhtRates3T[] = {MGN_VHT3SS_MCS0 ,MGN_VHT3SS_MCS1 ,MGN_VHT3SS_MCS2 ,MGN_VHT3SS_MCS3 ,MGN_VHT3SS_MCS4 , -MGN_VHT3SS_MCS5 ,MGN_VHT3SS_MCS6 ,MGN_VHT3SS_MCS7 ,MGN_VHT3SS_MCS8 ,MGN_VHT3SS_MCS9 }; - -PHY_SetTxPowerIndexByRateArray (padapter, RFPath, - pHalData->CurrentChannelBW, - Channel, vhtRates3T, -ARRAY_SIZE (vhtRates3T)); - }else if (RateSection ==VHT_4SSMCS0_4SSMCS9 ) { -u8 vhtRates4T[] = {MGN_VHT4SS_MCS0 ,MGN_VHT4SS_MCS1 ,MGN_VHT4SS_MCS2 ,MGN_VHT4SS_MCS3 ,MGN_VHT4SS_MCS4 , -MGN_VHT4SS_MCS5 ,MGN_VHT4SS_MCS6 ,MGN_VHT4SS_MCS7 ,MGN_VHT4SS_MCS8 ,MGN_VHT4SS_MCS9 }; - -PHY_SetTxPowerIndexByRateArray (padapter, RFPath, - pHalData->CurrentChannelBW, - Channel, vhtRates4T, -ARRAY_SIZE (vhtRates4T)); } }@@ -883,23 +664,23 @@ u8 PHY_GetTxPowerIndexBase( txPower += pHalData->OFDM_24G_Diff[RFPath][TX_1S ];if (BandWidth ==CHANNEL_WIDTH_20 ) {/* BW20-1S, BW20-2S */ -if ((MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT1SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW20_24G_Diff[RFPath][TX_1S ]; -if ((MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT2SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW20_24G_Diff[RFPath][TX_2S ]; -if ((MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT3SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW20_24G_Diff[RFPath][TX_3S ]; -if ((MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT4SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW20_24G_Diff[RFPath][TX_4S ]; }else if (BandWidth ==CHANNEL_WIDTH_40 ) {/* BW40-1S, BW40-2S */ -if ((MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT1SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS0 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW40_24G_Diff[RFPath][TX_1S ]; -if ((MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT2SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS8 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW40_24G_Diff[RFPath][TX_2S ]; -if ((MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT3SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS16 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW40_24G_Diff[RFPath][TX_3S ]; -if ((MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) || (MGN_VHT4SS_MCS0 <= Rate && Rate <=MGN_VHT4SS_MCS9 )) +if (MGN_MCS24 <= Rate && Rate <=MGN_MCS31 ) txPower += pHalData->BW40_24G_Diff[RFPath][TX_4S ]; }@@ -1060,126 +841,6 @@ u8 PHY_GetRateIndexOfTxPowerByRate(u8 Rate)case MGN_MCS31 : index =43 ;break ; -case MGN_VHT1SS_MCS0 : - index =44 ; -break ; -case MGN_VHT1SS_MCS1 : - index =45 ; -break ; -case MGN_VHT1SS_MCS2 : - index =46 ; -break ; -case MGN_VHT1SS_MCS3 : - index =47 ; -break ; -case MGN_VHT1SS_MCS4 : - index =48 ; -break ; -case MGN_VHT1SS_MCS5 : - index =49 ; -break ; -case MGN_VHT1SS_MCS6 : - index =50 ; -break ; -case MGN_VHT1SS_MCS7 : - index =51 ; -break ; -case MGN_VHT1SS_MCS8 : - index =52 ; -break ; -case MGN_VHT1SS_MCS9 : - index =53 ; -break ; -case MGN_VHT2SS_MCS0 : - index =54 ; -break ; -case MGN_VHT2SS_MCS1 : - index =55 ; -break ; -case MGN_VHT2SS_MCS2 : - index =56 ; -break ; -case MGN_VHT2SS_MCS3 : - index =57 ; -break ; -case MGN_VHT2SS_MCS4 : - index =58 ; -break ; -case MGN_VHT2SS_MCS5 : - index =59 ; -break ; -case MGN_VHT2SS_MCS6 : - index =60 ; -break ; -case MGN_VHT2SS_MCS7 : - index =61 ; -break ; -case MGN_VHT2SS_MCS8 : - index =62 ; -break ; -case MGN_VHT2SS_MCS9 : - index =63 ; -break ; -case MGN_VHT3SS_MCS0 : - index =64 ; -break ; -case MGN_VHT3SS_MCS1 : - index =65 ; -break ; -case MGN_VHT3SS_MCS2 : - index =66 ; -break ; -case MGN_VHT3SS_MCS3 : - index =67 ; -break ; -case MGN_VHT3SS_MCS4 : - index =68 ; -break ; -case MGN_VHT3SS_MCS5 : - index =69 ; -break ; -case MGN_VHT3SS_MCS6 : - index =70 ; -break ; -case MGN_VHT3SS_MCS7 : - index =71 ; -break ; -case MGN_VHT3SS_MCS8 : - index =72 ; -break ; -case MGN_VHT3SS_MCS9 : - index =73 ; -break ; -case MGN_VHT4SS_MCS0 : - index =74 ; -break ; -case MGN_VHT4SS_MCS1 : - index =75 ; -break ; -case MGN_VHT4SS_MCS2 : - index =76 ; -break ; -case MGN_VHT4SS_MCS3 : - index =77 ; -break ; -case MGN_VHT4SS_MCS4 : - index =78 ; -break ; -case MGN_VHT4SS_MCS5 : - index =79 ; -break ; -case MGN_VHT4SS_MCS6 : - index =80 ; -break ; -case MGN_VHT4SS_MCS7 : - index =81 ; -break ; -case MGN_VHT4SS_MCS8 : - index =82 ; -break ; -case MGN_VHT4SS_MCS9 : - index =83 ; -break ;default :break ; }@@ -1319,26 +980,6 @@ static s16 get_rate_sctn_idx(const u8 rate)case MGN_MCS24 :case MGN_MCS25 :case MGN_MCS26 :case MGN_MCS27 :case MGN_MCS28 :case MGN_MCS29 :case MGN_MCS30 :case MGN_MCS31 :return 5 ; -case MGN_VHT1SS_MCS0 :case MGN_VHT1SS_MCS1 :case MGN_VHT1SS_MCS2 : -case MGN_VHT1SS_MCS3 :case MGN_VHT1SS_MCS4 :case MGN_VHT1SS_MCS5 : -case MGN_VHT1SS_MCS6 :case MGN_VHT1SS_MCS7 :case MGN_VHT1SS_MCS8 : -case MGN_VHT1SS_MCS9 : -return 6 ; -case MGN_VHT2SS_MCS0 :case MGN_VHT2SS_MCS1 :case MGN_VHT2SS_MCS2 : -case MGN_VHT2SS_MCS3 :case MGN_VHT2SS_MCS4 :case MGN_VHT2SS_MCS5 : -case MGN_VHT2SS_MCS6 :case MGN_VHT2SS_MCS7 :case MGN_VHT2SS_MCS8 : -case MGN_VHT2SS_MCS9 : -return 7 ; -case MGN_VHT3SS_MCS0 :case MGN_VHT3SS_MCS1 :case MGN_VHT3SS_MCS2 : -case MGN_VHT3SS_MCS3 :case MGN_VHT3SS_MCS4 :case MGN_VHT3SS_MCS5 : -case MGN_VHT3SS_MCS6 :case MGN_VHT3SS_MCS7 :case MGN_VHT3SS_MCS8 : -case MGN_VHT3SS_MCS9 : -return 8 ; -case MGN_VHT4SS_MCS0 :case MGN_VHT4SS_MCS1 :case MGN_VHT4SS_MCS2 : -case MGN_VHT4SS_MCS3 :case MGN_VHT4SS_MCS4 :case MGN_VHT4SS_MCS5 : -case MGN_VHT4SS_MCS6 :case MGN_VHT4SS_MCS7 :case MGN_VHT4SS_MCS8 : -case MGN_VHT4SS_MCS9 : -return 9 ;default :return -1 ; }@@ -1510,14 +1151,6 @@ void PHY_SetTxPowerLimit( rateSection =4 ; else if (eqNByte(RateSection, (u8 *)("HT"), 2) && eqNByte(RfPath, (u8 *)("4T"), 2)) rateSection = 5; - else if (eqNByte(RateSection, (u8 *)("VHT"), 3) && eqNByte(RfPath, (u8 *)("1T"), 2)) - rateSection = 6; - else if (eqNByte(RateSection, (u8 *)("VHT"), 3) && eqNByte(RfPath, (u8 *)("2T"), 2)) - rateSection = 7; - else if (eqNByte(RateSection, (u8 *)("VHT"), 3) && eqNByte(RfPath, (u8 *)("3T"), 2)) - rateSection = 8; - else if (eqNByte(RateSection, (u8 *)("VHT"), 3) && eqNByte(RfPath, (u8 *)("4T"), 2)) - rateSection = 9; else return;drivers/staging/rtl8723bs/include/hal_com.h +1
-61@@ -69,46 +69,6 @@#define DESC_RATEMCS29 0x29#define DESC_RATEMCS30 0x2A#define DESC_RATEMCS31 0x2B -#define DESC_RATEVHTSS1MCS0 0x2C -#define DESC_RATEVHTSS1MCS1 0x2D -#define DESC_RATEVHTSS1MCS2 0x2E -#define DESC_RATEVHTSS1MCS3 0x2F -#define DESC_RATEVHTSS1MCS4 0x30 -#define DESC_RATEVHTSS1MCS5 0x31 -#define DESC_RATEVHTSS1MCS6 0x32 -#define DESC_RATEVHTSS1MCS7 0x33 -#define DESC_RATEVHTSS1MCS8 0x34 -#define DESC_RATEVHTSS1MCS9 0x35 -#define DESC_RATEVHTSS2MCS0 0x36 -#define DESC_RATEVHTSS2MCS1 0x37 -#define DESC_RATEVHTSS2MCS2 0x38 -#define DESC_RATEVHTSS2MCS3 0x39 -#define DESC_RATEVHTSS2MCS4 0x3A -#define DESC_RATEVHTSS2MCS5 0x3B -#define DESC_RATEVHTSS2MCS6 0x3C -#define DESC_RATEVHTSS2MCS7 0x3D -#define DESC_RATEVHTSS2MCS8 0x3E -#define DESC_RATEVHTSS2MCS9 0x3F -#define DESC_RATEVHTSS3MCS0 0x40 -#define DESC_RATEVHTSS3MCS1 0x41 -#define DESC_RATEVHTSS3MCS2 0x42 -#define DESC_RATEVHTSS3MCS3 0x43 -#define DESC_RATEVHTSS3MCS4 0x44 -#define DESC_RATEVHTSS3MCS5 0x45 -#define DESC_RATEVHTSS3MCS6 0x46 -#define DESC_RATEVHTSS3MCS7 0x47 -#define DESC_RATEVHTSS3MCS8 0x48 -#define DESC_RATEVHTSS3MCS9 0x49 -#define DESC_RATEVHTSS4MCS0 0x4A -#define DESC_RATEVHTSS4MCS1 0x4B -#define DESC_RATEVHTSS4MCS2 0x4C -#define DESC_RATEVHTSS4MCS3 0x4D -#define DESC_RATEVHTSS4MCS4 0x4E -#define DESC_RATEVHTSS4MCS5 0x4F -#define DESC_RATEVHTSS4MCS6 0x50 -#define DESC_RATEVHTSS4MCS7 0x51 -#define DESC_RATEVHTSS4MCS8 0x52 -#define DESC_RATEVHTSS4MCS9 0x53#define HDATA_RATE (rate)\ (rate == DESC_RATE1M) ? "CCK_1M" : \@@ -138,27 +98,7 @@ (rate ==DESC_RATEMCS12 ) ?"MCS12" : \ (rate ==DESC_RATEMCS13 ) ?"MCS13" : \ (rate ==DESC_RATEMCS14 ) ?"MCS14" : \ -(rate ==DESC_RATEMCS15 ) ?"MCS15" : \ -(rate ==DESC_RATEVHTSS1MCS0 ) ?"VHTSS1MCS0" : \ -(rate ==DESC_RATEVHTSS1MCS1 ) ?"VHTSS1MCS1" : \ -(rate ==DESC_RATEVHTSS1MCS2 ) ?"VHTSS1MCS2" : \ -(rate ==DESC_RATEVHTSS1MCS3 ) ?"VHTSS1MCS3" : \ -(rate ==DESC_RATEVHTSS1MCS4 ) ?"VHTSS1MCS4" : \ -(rate ==DESC_RATEVHTSS1MCS5 ) ?"VHTSS1MCS5" : \ -(rate ==DESC_RATEVHTSS1MCS6 ) ?"VHTSS1MCS6" : \ -(rate ==DESC_RATEVHTSS1MCS7 ) ?"VHTSS1MCS7" : \ -(rate ==DESC_RATEVHTSS1MCS8 ) ?"VHTSS1MCS8" : \ -(rate ==DESC_RATEVHTSS1MCS9 ) ?"VHTSS1MCS9" : \ -(rate ==DESC_RATEVHTSS2MCS0 ) ?"VHTSS2MCS0" : \ -(rate ==DESC_RATEVHTSS2MCS1 ) ?"VHTSS2MCS1" : \ -(rate ==DESC_RATEVHTSS2MCS2 ) ?"VHTSS2MCS2" : \ -(rate ==DESC_RATEVHTSS2MCS3 ) ?"VHTSS2MCS3" : \ -(rate ==DESC_RATEVHTSS2MCS4 ) ?"VHTSS2MCS4" : \ -(rate ==DESC_RATEVHTSS2MCS5 ) ?"VHTSS2MCS5" : \ -(rate ==DESC_RATEVHTSS2MCS6 ) ?"VHTSS2MCS6" : \ -(rate ==DESC_RATEVHTSS2MCS7 ) ?"VHTSS2MCS7" : \ -(rate ==DESC_RATEVHTSS2MCS8 ) ?"VHTSS2MCS8" : \ -(rate ==DESC_RATEVHTSS2MCS9 ) ?"VHTSS2MCS9" :"UNKNOWN" +(rate ==DESC_RATEMCS15 ) ?"MCS15" :"UNKNOWN" enum{drivers/staging/rtl8723bs/include/hal_com_phycfg.h +0
-4@@ -19,10 +19,6 @@ enum rate_section {HT_MCS8_MCS15 ,HT_MCS16_MCS23 , HT_MCS24_MCS31, -VHT_1SSMCS0_1SSMCS9 , -VHT_2SSMCS0_2SSMCS9 , -VHT_3SSMCS0_3SSMCS9 , - VHT_4SSMCS0_4SSMCS9, }; enum {drivers/staging/rtl8723bs/include/ieee80211.h +0
-45@@ -60,7 +60,6 @@ enum {#define WLAN_STA_HT BIT(11)#define WLAN_STA_WPS BIT(12)#define WLAN_STA_MAYBE_WPS BIT(13) -#define WLAN_STA_VHT BIT(14)#define WLAN_STA_NONERP BIT(31)#define IEEE_CMD_SET_WPA_PARAM 1@@ -135,8 +134,6 @@ enum {RATEID_IDX_BG =6 ,RATEID_IDX_G =7 , RATEID_IDX_B = 8, -RATEID_IDX_VHT_2SS =9 , - RATEID_IDX_VHT_1SS = 10, }; enum network_type {@@ -424,51 +421,10 @@ enum {MGN_MCS29 ,MGN_MCS30 ,MGN_MCS31 , -MGN_VHT1SS_MCS0 , -MGN_VHT1SS_MCS1 , -MGN_VHT1SS_MCS2 , -MGN_VHT1SS_MCS3 , -MGN_VHT1SS_MCS4 , -MGN_VHT1SS_MCS5 , -MGN_VHT1SS_MCS6 , -MGN_VHT1SS_MCS7 , -MGN_VHT1SS_MCS8 , -MGN_VHT1SS_MCS9 , -MGN_VHT2SS_MCS0 , -MGN_VHT2SS_MCS1 , -MGN_VHT2SS_MCS2 , -MGN_VHT2SS_MCS3 , -MGN_VHT2SS_MCS4 , -MGN_VHT2SS_MCS5 , -MGN_VHT2SS_MCS6 , -MGN_VHT2SS_MCS7 , -MGN_VHT2SS_MCS8 , -MGN_VHT2SS_MCS9 , -MGN_VHT3SS_MCS0 , -MGN_VHT3SS_MCS1 , -MGN_VHT3SS_MCS2 , -MGN_VHT3SS_MCS3 , -MGN_VHT3SS_MCS4 , -MGN_VHT3SS_MCS5 , -MGN_VHT3SS_MCS6 , -MGN_VHT3SS_MCS7 , -MGN_VHT3SS_MCS8 , -MGN_VHT3SS_MCS9 , -MGN_VHT4SS_MCS0 , -MGN_VHT4SS_MCS1 , -MGN_VHT4SS_MCS2 , -MGN_VHT4SS_MCS3 , -MGN_VHT4SS_MCS4 , -MGN_VHT4SS_MCS5 , -MGN_VHT4SS_MCS6 , -MGN_VHT4SS_MCS7 , -MGN_VHT4SS_MCS8 , -MGN_VHT4SS_MCS9 , MGN_UNKNOWN };#define IS_HT_RATE (_rate) (_rate >= MGN_MCS0 && _rate <= MGN_MCS31) -#define IS_VHT_RATE (_rate) (_rate >= MGN_VHT1SS_MCS0 && _rate <= MGN_VHT4SS_MCS9)#define IS_CCK_RATE (_rate) (MGN_1M == _rate || _rate == MGN_2M || _rate == MGN_5_5M || _rate == MGN_11M)#define IS_OFDM_RATE (_rate) (MGN_6M <= _rate && _rate <= MGN_54M && _rate != MGN_11M)@@ -625,7 +581,6 @@ enum {RTW_WLAN_CATEGORY_TDLS =12 ,RTW_WLAN_CATEGORY_SELF_PROTECTED =15 ,/* add for CONFIG_IEEE80211W, none 11w also can use */ RTW_WLAN_CATEGORY_WMM =17 , -RTW_WLAN_CATEGORY_VHT =21 , RTW_WLAN_CATEGORY_P2P = 0x7f,/* P2P action frames */ };drivers/staging/rtl8723bs/include/rtl8723b_xmit.h +0
-21@@ -402,27 +402,6 @@ struct txdesc_8723b {#define DESC8723B_RATEMCS13 0x19#define DESC8723B_RATEMCS14 0x1a#define DESC8723B_RATEMCS15 0x1b -#define DESC8723B_RATEVHTSS1MCS0 0x2c -#define DESC8723B_RATEVHTSS1MCS1 0x2d -#define DESC8723B_RATEVHTSS1MCS2 0x2e -#define DESC8723B_RATEVHTSS1MCS3 0x2f -#define DESC8723B_RATEVHTSS1MCS4 0x30 -#define DESC8723B_RATEVHTSS1MCS5 0x31 -#define DESC8723B_RATEVHTSS1MCS6 0x32 -#define DESC8723B_RATEVHTSS1MCS7 0x33 -#define DESC8723B_RATEVHTSS1MCS8 0x34 -#define DESC8723B_RATEVHTSS1MCS9 0x35 -#define DESC8723B_RATEVHTSS2MCS0 0x36 -#define DESC8723B_RATEVHTSS2MCS1 0x37 -#define DESC8723B_RATEVHTSS2MCS2 0x38 -#define DESC8723B_RATEVHTSS2MCS3 0x39 -#define DESC8723B_RATEVHTSS2MCS4 0x3a -#define DESC8723B_RATEVHTSS2MCS5 0x3b -#define DESC8723B_RATEVHTSS2MCS6 0x3c -#define DESC8723B_RATEVHTSS2MCS7 0x3d -#define DESC8723B_RATEVHTSS2MCS8 0x3e -#define DESC8723B_RATEVHTSS2MCS9 0x3f -#define RX_HAL_IS_CCK_RATE_8723B (pDesc)\ (GET_RX_STATUS_DESC_RX_RATE_8723B(pDesc) == DESC8723B_RATE1M ||\drivers/staging/rtl8723bs/include/rtw_ht.h +0
-4@@ -42,10 +42,6 @@ enum {HT_AGG_SIZE_16K =1 ,HT_AGG_SIZE_32K =2 , HT_AGG_SIZE_64K = 3, -VHT_AGG_SIZE_128K =4 , -VHT_AGG_SIZE_256K =5 , -VHT_AGG_SIZE_512K =6 , - VHT_AGG_SIZE_1024K = 7, };
Quoted 3 lines
drivers/staging/rtl8723bs/include/rtw_ht.h enum { · line 47
Quoted 2 lines
drivers/staging/rtl8723bs/include/rtw_ht.h +0
-0enum {
thank you,
fabio
Re: [PATCH 12/18] staging: rtl8723bs: remove VHT dead code
Hi Fabio,
Quoted 356 lines · Fabio Aiuto
Hello Hans,
Quoted 335 lines · Hans de Goede
Hi,
Quoted 332 lines · Fabio Aiuto
remove VHT dead code, as the device doesn't support VHT (which is a 802.11ac capability).
Signed-off-by Fabio Aiuto <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 1 - drivers/staging/rtl8723bs/hal/hal_com.c | 241 ----------- .../staging/rtl8723bs/hal/hal_com_phycfg.c | 383 +----------------- drivers/staging/rtl8723bs/include/hal_com.h | 62 +-- .../rtl8723bs/include/hal_com_phycfg.h | 4 - drivers/staging/rtl8723bs/include/ieee80211.h | 45 -- .../staging/rtl8723bs/include/rtl8723b_xmit.h | 21 - drivers/staging/rtl8723bs/include/rtw_ht.h | 4 - 8 files changed, 9 insertions(+), 752 deletions(-)drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0
-1@@ -46,7 +46,6 @@ static struct action_handler OnAction_tbl[] = { {RTW_WLAN_CATEGORY_UNPROTECTED_WNM, "ACTION_UNPROTECTED_WNM", &DoReserved}, {RTW_WLAN_CATEGORY_SELF_PROTECTED, "ACTION_SELF_PROTECTED", &DoReserved}, {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &DoReserved}, - {RTW_WLAN_CATEGORY_VHT, "ACTION_VHT", &DoReserved}, {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &DoReserved}, };drivers/staging/rtl8723bs/hal/hal_com.c +0
-241@@ -295,126 +295,6 @@ u8 MRateToHwRate(u8 rate)case MGN_MCS31 : ret =DESC_RATEMCS31 ;break ; -case MGN_VHT1SS_MCS0 : - ret =DESC_RATEVHTSS1MCS0 ; -break ; -case MGN_VHT1SS_MCS1 : - ret =DESC_RATEVHTSS1MCS1 ; -break ; -case MGN_VHT1SS_MCS2 : - ret =DESC_RATEVHTSS1MCS2 ; -break ; -case MGN_VHT1SS_MCS3 : - ret =DESC_RATEVHTSS1MCS3 ; -break ; -case MGN_VHT1SS_MCS4 : - ret =DESC_RATEVHTSS1MCS4 ; -break ; -case MGN_VHT1SS_MCS5 : - ret =DESC_RATEVHTSS1MCS5 ; -break ; -case MGN_VHT1SS_MCS6 : - ret =DESC_RATEVHTSS1MCS6 ; -break ; -case MGN_VHT1SS_MCS7 : - ret =DESC_RATEVHTSS1MCS7 ; -break ; -case MGN_VHT1SS_MCS8 : - ret =DESC_RATEVHTSS1MCS8 ; -break ; -case MGN_VHT1SS_MCS9 : - ret =DESC_RATEVHTSS1MCS9 ; -break ; -case MGN_VHT2SS_MCS0 : - ret =DESC_RATEVHTSS2MCS0 ; -break ; -case MGN_VHT2SS_MCS1 : - ret =DESC_RATEVHTSS2MCS1 ; -break ; -case MGN_VHT2SS_MCS2 : - ret =DESC_RATEVHTSS2MCS2 ; -break ; -case MGN_VHT2SS_MCS3 : - ret =DESC_RATEVHTSS2MCS3 ; -break ; -case MGN_VHT2SS_MCS4 : - ret =DESC_RATEVHTSS2MCS4 ; -break ; -case MGN_VHT2SS_MCS5 : - ret =DESC_RATEVHTSS2MCS5 ; -break ; -case MGN_VHT2SS_MCS6 : - ret =DESC_RATEVHTSS2MCS6 ; -break ; -case MGN_VHT2SS_MCS7 : - ret =DESC_RATEVHTSS2MCS7 ; -break ; -case MGN_VHT2SS_MCS8 : - ret =DESC_RATEVHTSS2MCS8 ; -break ; -case MGN_VHT2SS_MCS9 : - ret =DESC_RATEVHTSS2MCS9 ; -break ; -case MGN_VHT3SS_MCS0 : - ret =DESC_RATEVHTSS3MCS0 ; -break ; -case MGN_VHT3SS_MCS1 : - ret =DESC_RATEVHTSS3MCS1 ; -break ; -case MGN_VHT3SS_MCS2 : - ret =DESC_RATEVHTSS3MCS2 ; -break ; -case MGN_VHT3SS_MCS3 : - ret =DESC_RATEVHTSS3MCS3 ; -break ; -case MGN_VHT3SS_MCS4 : - ret =DESC_RATEVHTSS3MCS4 ; -break ; -case MGN_VHT3SS_MCS5 : - ret =DESC_RATEVHTSS3MCS5 ; -break ; -case MGN_VHT3SS_MCS6 : - ret =DESC_RATEVHTSS3MCS6 ; -break ; -case MGN_VHT3SS_MCS7 : - ret =DESC_RATEVHTSS3MCS7 ; -break ; -case MGN_VHT3SS_MCS8 : - ret =DESC_RATEVHTSS3MCS8 ; -break ; -case MGN_VHT3SS_MCS9 : - ret =DESC_RATEVHTSS3MCS9 ; -break ; -case MGN_VHT4SS_MCS0 : - ret =DESC_RATEVHTSS4MCS0 ; -break ; -case MGN_VHT4SS_MCS1 : - ret =DESC_RATEVHTSS4MCS1 ; -break ; -case MGN_VHT4SS_MCS2 : - ret =DESC_RATEVHTSS4MCS2 ; -break ; -case MGN_VHT4SS_MCS3 : - ret =DESC_RATEVHTSS4MCS3 ; -break ; -case MGN_VHT4SS_MCS4 : - ret =DESC_RATEVHTSS4MCS4 ; -break ; -case MGN_VHT4SS_MCS5 : - ret =DESC_RATEVHTSS4MCS5 ; -break ; -case MGN_VHT4SS_MCS6 : - ret =DESC_RATEVHTSS4MCS6 ; -break ; -case MGN_VHT4SS_MCS7 : - ret =DESC_RATEVHTSS4MCS7 ; -break ; -case MGN_VHT4SS_MCS8 : - ret =DESC_RATEVHTSS4MCS8 ; -break ; -case MGN_VHT4SS_MCS9 : - ret =DESC_RATEVHTSS4MCS9 ; -break ;default :break ; }@@ -559,127 +439,6 @@ u8 HwRateToMRate(u8 rate)case DESC_RATEMCS31 : ret_rate =MGN_MCS31 ;break ; -case DESC_RATEVHTSS1MCS0 : - ret_rate =MGN_VHT1SS_MCS0 ; -break ; -case DESC_RATEVHTSS1MCS1 : - ret_rate =MGN_VHT1SS_MCS1 ; -break ; -case DESC_RATEVHTSS1MCS2 : - ret_rate =MGN_VHT1SS_MCS2 ; -break ; -case DESC_RATEVHTSS1MCS3 : - ret_rate =MGN_VHT1SS_MCS3 ; -break ; -case DESC_RATEVHTSS1MCS4 : - ret_rate =MGN_VHT1SS_MCS4 ; -break ; -case DESC_RATEVHTSS1MCS5 : - ret_rate =MGN_VHT1SS_MCS5 ; -break ; -case DESC_RATEVHTSS1MCS6 : - ret_rate =MGN_VHT1SS_MCS6 ; -break ; -case DESC_RATEVHTSS1MCS7 : - ret_rate =MGN_VHT1SS_MCS7 ; -break ; -case DESC_RATEVHTSS1MCS8 : - ret_rate =MGN_VHT1SS_MCS8 ; -break ; -case DESC_RATEVHTSS1MCS9 : - ret_rate =MGN_VHT1SS_MCS9 ; -break ; -case DESC_RATEVHTSS2MCS0 : - ret_rate =MGN_VHT2SS_MCS0 ; -break ; -case DESC_RATEVHTSS2MCS1 : - ret_rate =MGN_VHT2SS_MCS1 ; -break ; -case DESC_RATEVHTSS2MCS2 : - ret_rate =MGN_VHT2SS_MCS2 ; -break ; -case DESC_RATEVHTSS2MCS3 : - ret_rate =MGN_VHT2SS_MCS3 ; -break ; -case DESC_RATEVHTSS2MCS4 : - ret_rate =MGN_VHT2SS_MCS4 ; -break ; -case DESC_RATEVHTSS2MCS5 : - ret_rate =MGN_VHT2SS_MCS5 ; -break ; -case DESC_RATEVHTSS2MCS6 : - ret_rate =MGN_VHT2SS_MCS6 ; -break ; -case DESC_RATEVHTSS2MCS7 : - ret_rate =MGN_VHT2SS_MCS7 ; -break ; -case DESC_RATEVHTSS2MCS8 : - ret_rate =MGN_VHT2SS_MCS8 ; -break ; -case DESC_RATEVHTSS2MCS9 : - ret_rate =MGN_VHT2SS_MCS9 ; -break ; -case DESC_RATEVHTSS3MCS0 : - ret_rate =MGN_VHT3SS_MCS0 ; -break ; -case DESC_RATEVHTSS3MCS1 : - ret_rate =MGN_VHT3SS_MCS1 ; -break ; -case DESC_RATEVHTSS3MCS2 : - ret_rate =MGN_VHT3SS_MCS2 ; -break ; -case DESC_RATEVHTSS3MCS3 : - ret_rate =MGN_VHT3SS_MCS3 ; -break ; -case DESC_RATEVHTSS3MCS4 : - ret_rate =MGN_VHT3SS_MCS4 ; -break ; -case DESC_RATEVHTSS3MCS5 : - ret_rate =MGN_VHT3SS_MCS5 ; -break ; -case DESC_RATEVHTSS3MCS6 : - ret_rate =MGN_VHT3SS_MCS6 ; -break ; -case DESC_RATEVHTSS3MCS7 : - ret_rate =MGN_VHT3SS_MCS7 ; -break ; -case DESC_RATEVHTSS3MCS8 : - ret_rate =MGN_VHT3SS_MCS8 ; -break ; -case DESC_RATEVHTSS3MCS9 : - ret_rate =MGN_VHT3SS_MCS9 ; -break ; -case DESC_RATEVHTSS4MCS0 : - ret_rate =MGN_VHT4SS_MCS0 ; -break ; -case DESC_RATEVHTSS4MCS1 : - ret_rate =MGN_VHT4SS_MCS1 ; -break ; -case DESC_RATEVHTSS4MCS2 : - ret_rate =MGN_VHT4SS_MCS2 ; -break ; -case DESC_RATEVHTSS4MCS3 : - ret_rate =MGN_VHT4SS_MCS3 ; -break ; -case DESC_RATEVHTSS4MCS4 : - ret_rate =MGN_VHT4SS_MCS4 ; -break ; -case DESC_RATEVHTSS4MCS5 : - ret_rate =MGN_VHT4SS_MCS5 ; -break ; -case DESC_RATEVHTSS4MCS6 : - ret_rate =MGN_VHT4SS_MCS6 ; -break ; -case DESC_RATEVHTSS4MCS7 : - ret_rate =MGN_VHT4SS_MCS7 ; -break ; -case DESC_RATEVHTSS4MCS8 : - ret_rate =MGN_VHT4SS_MCS8 ; -break ; -case DESC_RATEVHTSS4MCS9 : - ret_rate =MGN_VHT4SS_MCS9 ; -break ; -default :break ; }drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-24@@ -39,18 +39,6 @@ u8 PHY_GetTxPowerByRateBase(struct adapter *Adapter, u8 RfPath,case HT_MCS24_MCS31 : value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][5 ];break ; -case VHT_1SSMCS0_1SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][6 ]; -break ; -case VHT_2SSMCS0_2SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][7 ]; -break ; -case VHT_3SSMCS0_3SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][8 ]; -break ; -case VHT_4SSMCS0_4SSMCS9 : - value = pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][9 ]; -break ;default :break ; }@@ -91,18 +79,6 @@ phy_SetTxPowerByRateBase(case HT_MCS24_MCS31 : pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][5 ] = Value;break ; -case VHT_1SSMCS0_1SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][6 ] = Value; -break ; -case VHT_2SSMCS0_2SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][7 ] = Value; -break ; -case VHT_3SSMCS0_3SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][8 ] = Value; -break ; -case VHT_4SSMCS0_4SSMCS9 : - pHalData->TxPwrByRateBase2_4G[RfPath][TxNum][9 ] = Value; -break ;default :break ; }@@ -131,14 +107,6 @@ struct adapter *padapter base =PHY_GetTxPowerByRate (padapter, path,RF_3TX ,MGN_MCS23 );phy_SetTxPowerByRateBase (padapter, path,HT_MCS16_MCS23 ,RF_3TX , base);Quoted 12 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c struct adapter *padapter · line 141
Quoted 8 lines
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +0
-8- base =PHY_GetTxPowerByRate (padapter, path,RF_1TX ,MGN_VHT1SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_1SSMCS0_1SSMCS9 ,RF_1TX , base); - - base =PHY_GetTxPowerByRate (padapter, path,RF_2TX ,MGN_VHT2SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_2SSMCS0_2SSMCS9 ,RF_2TX , base); - - base =PHY_GetTxPowerByRate (padapter, path,RF_3TX ,MGN_VHT3SS_MCS7 ); -phy_SetTxPowerByRateBase (padapter, path,VHT_3SSMCS0_3SSMCS9 ,RF_3TX , base);You are removing a bunch of register writes from a block here, while keeping others, so this does not seem like it is just dead-code removal it feels like you are actually making a functional change.
I looked deeply at what I deed, and I just removed some functions updating tables in memory, no register write here. Tables are used to load Tx Power Limit. So removing these function calls according with the removal of the VHT enum items grants that wrong Power Limits will never be fetched.
Quoted 8 lines
Moreover I have been quite conservative, for I left untouched HT indexes above 7 which rtl8723bs doesn't support.
So IMO I think this patch is fine as is...
Quoted 1 line
Perhaps this entire block can never be executed ?
the block is executed but there's no register write happening. Just updating of values which will never be fetched.
Ack, my bad I was under the impression that phy_SetTxPowerByRateBase() would actually do a register write, but I checked and it just updates some unused table values, so dropping this code is fine and you can keep this patch for v2 of the patch set.
Regards,
Hans
Re: [PATCH 12/18] staging: rtl8723bs: remove VHT dead code
On Tue, Jun 22, 2021 at 11:19:36AM +0200, Hans de Goede wrote:
Hi Hans,
Quoted 11 lines
Hi Fabio,
Quoted 8 lines
Moreover I have been quite conservative, for I left untouched HT indexes above 7 which rtl8723bs doesn't support.
So IMO I think this patch is fine as is...
Quoted 1 line
Perhaps this entire block can never be executed ?
the block is executed but there's no register write happening. Just updating of values which will never be fetched.
Quoted 9 lines
Ack, my bad I was under the impression that
phy_SetTxPowerByRateBase()would actually do a register write, but I checked and it just updates some unused table values, so dropping this code is fine and you can keep this patch for v2 of the patch set.Regards,
Hans
thank you, what do you think about what I replied about patch 1, shall I remove the '> 14 if block' or leave it as is? Do you think is necessary to keep the conditions inside the block and pack them?
I would leave as is but is my opinion...
regards,
fabio
Re: [PATCH 12/18] staging: rtl8723bs: remove VHT dead code
Hi Fabio,
Quoted 20 lines · Fabio Aiuto
On Tue, Jun 22, 2021 at 11:19:36AM +0200, Hans de Goede wrote:
Hi Hans,
Quoted 16 lines
Hi Fabio,
Quoted 8 lines
Moreover I have been quite conservative, for I left untouched HT indexes above 7 which rtl8723bs doesn't support.
So IMO I think this patch is fine as is...
Quoted 1 line
Perhaps this entire block can never be executed ?
the block is executed but there's no register write happening. Just updating of values which will never be fetched.
Ack, my bad I was under the impression that
phy_SetTxPowerByRateBase()would actually do a register write, but I checked and it just updates some unused table values, so dropping this code is fine and you can keep this patch for v2 of the patch set.
Quoted 6 lines
Quoted 4 lines
Regards,
Hans
thank you, what do you think about what I replied about patch 1,
I somehow did not receive your reply, so I've just read it on the archives.
Quoted 2 lines
shall
I remove the '> 14 if block' or leave it as is?
I think it would be best to keep the '> 14 if block' for now and remove all of them in a later patch-series (I assume there will be more of them).
Quoted 2 lines
Do you think is necessary
to keep the conditions inside the block and pack them?
You could also remove the condition and just set the band to WIRELESS_INVALID unconditionally as you suggest, that is fine.
But if you keep the condition, like you did in v1 of the patch, then you must pack the 2 masks together.
Regards,
Hans