staging: rtl8723bs: cleanup and style fixes
PATCH 1/1 staging: rtl8723bs: cleanup and style fixes
--- drivers/staging/rtl8723bs/TODO | 27 ++++++++++----- .../staging/rtl8723bs/core/rtw_ieee80211.c | 4 +-- .../staging/rtl8723bs/hal/HalPhyRf_8723B.c | 16 ++++----- drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 2 +- drivers/staging/rtl8723bs/hal/odm_HWConfig.h | 2 +- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 34 +++++++------------ drivers/staging/rtl8723bs/include/hal_phy.h | 5 --- drivers/staging/rtl8723bs/include/ieee80211.h | 2 +- .../staging/rtl8723bs/include/rtl8192c_recv.h | 33 ------------------ .../staging/rtl8723bs/include/rtl8723b_recv.h | 16 ++++++++- drivers/staging/rtl8723bs/include/rtw_ht.h | 1 - .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 19 +++++++---- 12 files changed, 70 insertions(+), 91 deletions(-) delete mode 100644 drivers/staging/rtl8723bs/include/rtl8192c_recv.h
drivers/staging/rtl8723bs/TODO +18 -9
@@ -1,10 +1,19 @@ TODO: -- Partial: remove remaining code for other chips that is left over. Unused - non-8723B AMPDU burst enum values and unused 8188E ODM fields have been - removed, but more legacy code remains. -- Partial: convert unusual variable types. The channel control APIs and rate - helpers now use kernel fixed-width types, but more legacy types remain. -- Partial checkpatch.pl fixes: several overlong callback and scan-list lines - have been wrapped, but many warnings remain and will require refactoring. -- Merge Realtek's bugfixes and new features into the driver. -- Switch to use MAC80211. +- Partial: remove remaining code for other chips that is left over. Removed + obsolete 8192C receive code, unused multi-chip constants, and an old 88C + firmware exception; more compatibility code remains. + +- Partial: convert unusual variable types. The rate-set length helper now uses + kernel fixed-width types; channel-control APIs and more legacy types remain. + +- Partial checkpatch.pl fixes: the scan callback and scan-list operations have + been wrapped and simplified, but many warnings remain and will require + refactoring. + +- Merge Realtek's bugfixes and new features into the driver. This needs a + specific upstream commit or feature target before it can be reviewed safely. + +- Switch to use MAC80211. This requires replacing the vendor-owned netdev, + cfg80211 operations, MLME, Ethernet TX/RX conversion, and TX completion + paths with mac80211 ownership; do not register a second wiphy/netdev until + the station-mode TX/RX path has been ported.
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +2 -2
@@ -278,9 +278,9 @@ void rtw_set_supported_rate(u8 *supported_rates, uint mode) } } -uint rtw_get_rateset_len (u8 *rateset) +u8 rtw_get_rateset_len (u8 *rateset) { -uint i; +u8 i;for (i =0 ; i <13 ; i++)if (rateset[i] ==0 )
drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c +7 -9
@@ -23,14 +23,12 @@/*---------------------------Define Local Constant---------------------------*/ -/* In the case that we fail to read TxPowerTrack.txt, we use the table for -* 88E as the default table. -*/ -static u8 DeltaSwingTableIdx_2GA_N_8188E[] = { +/* Default table used when TxPowerTrack.txt is unavailable. */ +static u8 DeltaSwingTableIdx_2GA_N[] = {0 ,0 ,0 ,2 ,2 ,3 ,3 ,4 ,4 ,4 ,4 ,5 ,5 ,6 ,6 ,7 ,7 ,7 ,7 ,8 ,8 ,9 ,9 ,10 ,10 ,10 ,11 ,11 ,11 ,11 }; -static u8 DeltaSwingTableIdx_2GA_P_8188E[] = { +static u8 DeltaSwingTableIdx_2GA_P[] = {0 ,0 ,0 ,0 ,1 ,1 ,2 ,2 ,3 ,3 ,4 ,4 ,4 ,4 ,4 ,4 ,4 ,4 ,5 ,5 ,7 ,7 ,8 ,8 ,8 ,9 ,9 ,9 ,9 ,9 };
@@ -313,10 +311,10 @@ static void GetDeltaSwingTable_8723B( *TemperatureDOWN_B = pRFCalibrateInfo->DeltaSwingTableIdx_2GB_N; } }else { - *TemperatureUP_A = (u8 *)DeltaSwingTableIdx_2GA_P_8188E; - *TemperatureDOWN_A = (u8 *)DeltaSwingTableIdx_2GA_N_8188E; - *TemperatureUP_B = (u8 *)DeltaSwingTableIdx_2GA_P_8188E; - *TemperatureDOWN_B = (u8 *)DeltaSwingTableIdx_2GA_N_8188E; + *TemperatureUP_A = DeltaSwingTableIdx_2GA_P; + *TemperatureDOWN_A = DeltaSwingTableIdx_2GA_N; + *TemperatureUP_B = DeltaSwingTableIdx_2GA_P; + *TemperatureDOWN_B = DeltaSwingTableIdx_2GA_N; } }
drivers/staging/rtl8723bs/hal/odm_HWConfig.c +1 -1
@@ -107,7 +107,7 @@ static void odm_rx_phy_status_parsing(struct dm_odm_t *dm_odm,bool is_cck_rate = false;u8 rf_rx_num =0 ;u8 lna_idx, vga_idx; -struct phy_status_rpt_8192cd_t *phy_sta_rpt = (struct phy_status_rpt_8192cd_t *)phy_status; +struct phy_status_rpt_8723b_t *phy_sta_rpt = (struct phy_status_rpt_8723b_t *)phy_status; is_cck_rate = pkt_info->data_rate <=DESC_RATE11M ; phy_info->rx_mimo_signal_quality[RF_PATH_A ] =-1 ;
drivers/staging/rtl8723bs/hal/odm_HWConfig.h +1 -1
@@ -20,7 +20,7 @@ struct phy_rx_agc_info_t {#endif }; -struct phy_status_rpt_8192cd_t { +struct phy_status_rpt_8723b_t {struct phy_rx_agc_info_t path_agc[2 ];u8 ch_corr[2 ];u8 cck_sig_qual_ofdm_pwdb_all;
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +13 -21
@@ -250,34 +250,27 @@ static s32 _FWFreeToGo(struct adapter *adapter, u32 min_cnt, u32 timeout_ms)return ret; } -#define IS_FW_81xxC (padapter) (((GET_HAL_DATA(padapter))->FirmwareSignature & 0xFFF0) == 0x88C0) -void rtl8723b_FirmwareSelfReset (struct adapter *padapter) { -struct hal_com_data *pHalData =GET_HAL_DATA (padapter);u8 val;u8 Delay =100 ; -if ( - !(IS_FW_81xxC (padapter) && ((pHalData->FirmwareVersion <0x21 ) || (pHalData->FirmwareVersion ==0x21 && pHalData->FirmwareSubVersion <0x01 ))) - ) {/* after 88C Fw v33.1 */ -/* 0x1cf = 0x20. Inform 8051 to reset. 2009.12.25. tynli_test */ -rtw_write8 (padapter,REG_HMETFR +3 ,0x20 ); +/* 0x1cf = 0x20. Inform 8051 to reset. 2009.12.25. tynli_test */ +rtw_write8 (padapter,REG_HMETFR +3 ,0x20 ); + val =rtw_read8 (padapter,REG_SYS_FUNC_EN +1 ); +while (val &BIT (2 )) { + Delay--; +if (Delay ==0 ) +break ; +udelay (50 ); val =rtw_read8 (padapter,REG_SYS_FUNC_EN +1 ); -while (val &BIT (2 )) { - Delay--; -if (Delay ==0 ) -break ; -udelay (50 ); - val =rtw_read8 (padapter,REG_SYS_FUNC_EN +1 ); - } + } -if (Delay ==0 ) { -/* force firmware reset */ - val =rtw_read8 (padapter,REG_SYS_FUNC_EN +1 ); -rtw_write8 (padapter,REG_SYS_FUNC_EN +1 , val & (~BIT (2 ))); - } +if (Delay ==0 ) { +/* force firmware reset */ + val =rtw_read8 (padapter,REG_SYS_FUNC_EN +1 ); +rtw_write8 (padapter,REG_SYS_FUNC_EN +1 , val & (~BIT (2 ))); } }
@@ -1903,7 +1896,6 @@ static void hw_var_set_opmode(struct adapter *padapter, u8 variable, u8 *val)rtw_write8 (padapter,REG_BCN_CTRL , (DIS_TSF_UDT |EN_BCN_FUNCTION |EN_TXBCN_RPT |DIS_BCNQ_SUB ));/* SW_BCN_SEL - Port0 */ -/* rtw_write8(Adapter, REG_DWBCN1_CTRL_8192E+2, rtw_read8(Adapter, REG_DWBCN1_CTRL_8192E+2) & ~BIT4); */ rtw_hal_set_hwreg (padapter,HW_VAR_DL_BCN_SEL ,NULL );/* select BCN on port 0 */
drivers/staging/rtl8723bs/include/hal_phy.h +0 -5
@@ -35,11 +35,6 @@ enum rf_path {#define TX_1S 0#define TX_2S 1 -#define TX_3S 2 -#define TX_4S 3 - -#define RF_PATH_MAX_92C_88E 2 -#define RF_PATH_MAX_90_8812 4/* Max RF number 90 support */ enum wireless_mode {WIRELESS_MODE_UNKNOWN =0x00 ,
drivers/staging/rtl8723bs/include/ieee80211.h +1 -1
@@ -722,7 +722,7 @@ u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id, u8for (ie = (void *)buf; (((u8 *)ie) - ((u8 *)buf) +1 ) < buf_len; \ ie = (void *)(((u8 *)ie) + *(((u8 *)ie) +1 ) +2 )) -uint rtw_get_rateset_len(u8 *rateset); +u8 rtw_get_rateset_len(u8 *rateset);struct registry_priv ;int rtw_generate_ie (struct registry_priv *pregistrypriv);
drivers/staging/rtl8723bs/include/rtl8192c_recv.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/****************************************************************************** -* -* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. -* -******************************************************************************/ -#ifndef _RTL8192C_RECV_H_ -#define _RTL8192C_RECV_H_ - -#define MAX_RECVBUF_SZ (10240) - -struct phy_stat { -unsigned int phydw0; - -unsigned int phydw1; - -unsigned int phydw2; - -unsigned int phydw3; - -unsigned int phydw4; - -unsigned int phydw5; - -unsigned int phydw6; - -unsigned int phydw7; -}; - -/* Rx smooth factor */ -#define Rx_Smooth_Factor (20) - -#endif
drivers/staging/rtl8723bs/include/rtl8723b_recv.h +15 -1
@@ -7,7 +7,21 @@#ifndef __RTL8723B_RECV_H__#define __RTL8723B_RECV_H__ -#include <rtl8192c_recv.h> +#define MAX_RECVBUF_SZ (10240) + +struct phy_stat { +unsigned int phydw0; +unsigned int phydw1; +unsigned int phydw2; +unsigned int phydw3; +unsigned int phydw4; +unsigned int phydw5; +unsigned int phydw6; +unsigned int phydw7; +}; + +/* Rx smooth factor */ +#define Rx_Smooth_Factor (20) struct rxreport_8723b {/* DWORD 0 */
drivers/staging/rtl8723bs/include/rtw_ht.h +0 -1
@@ -51,7 +51,6 @@ enum {RT_HT_CAP_USE_WOW =0x8 ,RT_HT_CAP_USE_SOFTAP =0x10 ,RT_HT_CAP_USE_92SE =0x20 , -RT_HT_CAP_USE_88C_92C =0x40 , RT_HT_CAP_USE_AP_CLIENT_MODE = 0x80, /* AP team request to reserve this bit, by Emily */ };
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +12 -7
@@ -1160,8 +1160,8 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct adapter *padapter, char *breturn ret; } -static int cfg80211_rtw_scan (struct wiphy *wiphy - ,struct cfg80211_scan_request *request) +static int cfg80211_rtw_scan (struct wiphy *wiphy, +struct cfg80211_scan_request *request) {struct net_device *ndev =wdev_to_ndev (request->wdev);int i;
@@ -1248,7 +1248,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy }/* parsing channels, n_channels */ -memset (ch,0 ,sizeof (struct rtw_ieee80211_channel ) *RTW_CHANNEL_SCAN_AMOUNT ); +memset (ch,0 ,sizeof (ch));for (i =0 ; i < request->n_channels && i <RTW_CHANNEL_SCAN_AMOUNT ; i++) { ch[i].hw_value = request->channels[i]->hw_value; ch[i].flags = request->channels[i]->flags;
@@ -1257,13 +1257,18 @@ static int cfg80211_rtw_scan(struct wiphy *wiphyspin_lock_bh (&pmlmepriv->lock);if (request->n_channels ==1 ) {for (i =1 ; i < survey_times_for_one_ch; i++) -memcpy (&ch[i], &ch[0 ],sizeof (struct rtw_ieee80211_channel )); - _status =rtw_sitesurvey_cmd (padapter, ssid,RTW_SSID_SCAN_AMOUNT , ch, survey_times_for_one_ch); +memcpy (&ch[i], &ch[0 ],sizeof (ch[0 ])); + _status =rtw_sitesurvey_cmd (padapter, ssid, +RTW_SSID_SCAN_AMOUNT , ch, + survey_times_for_one_ch); }else if (request->n_channels <=4 ) {for (j = request->n_channels -1 ; j >=0 ; j--)for (i =0 ; i < survey_times; i++) -memcpy (&ch[j * survey_times + i], &ch[j],sizeof (struct rtw_ieee80211_channel )); - _status =rtw_sitesurvey_cmd (padapter, ssid,RTW_SSID_SCAN_AMOUNT , ch, survey_times * request->n_channels); +memcpy (&ch[j * survey_times + i], &ch[j], +sizeof (ch[0 ])); + _status =rtw_sitesurvey_cmd (padapter, ssid, +RTW_SSID_SCAN_AMOUNT , ch, + survey_times * request->n_channels); }else { _status =rtw_sitesurvey_cmd (padapter, ssid,RTW_SSID_SCAN_AMOUNT ,NULL ,0 ); }
Signature · 1 line
2.55.0
PATCH 1/4 staging: rtl8723bs: update TODO list for completed cleanups
--- drivers/staging/rtl8723bs/TODO | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/TODO +9 -6
@@ -1,7 +1,10 @@ TODO: -- find and remove any code for other chips that is left over -- convert any remaining unusual variable types -- checkpatch.pl fixes - most of the remaining ones are lines too long. Many - of them will require refactoring -- merge Realtek's bugfixes and new features into the driver -- switch to use MAC80211 +- Partial: remove remaining code for other chips that is left over. Unused + non-8723B AMPDU burst enum values and unused 8188E ODM fields have been + removed, but more legacy code remains. +- Partial: convert unusual variable types. The channel control APIs and rate + helpers now use kernel fixed-width types, but more legacy types remain. +- Partial checkpatch.pl fixes: several overlong callback and scan-list lines + have been wrapped, but many warnings remain and will require refactoring. +- Merge Realtek's bugfixes and new features into the driver. +- Switch to use MAC80211.
Signature · 1 line
2.55.0
Greg KH
maintainerQuoted 7 lines · On Tue, Sep 08, 2026 at 10:10:31PM +0300, AJ39210 wrote:
--- drivers/staging/rtl8723bs/TODO | 27 ++++++++++----- .../staging/rtl8723bs/core/rtw_ieee80211.c | 4 +-- .../staging/rtl8723bs/hal/HalPhyRf_8723B.c | 16 ++++----- drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 2 +- drivers/staging/rtl8723bs/hal/odm_HWConfig.h | 2 +- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 34 +++++++------------
Quoted 9 lines
drivers/staging/rtl8723bs/include/hal_phy.h | 5 --- drivers/staging/rtl8723bs/include/ieee80211.h | 2 +- .../staging/rtl8723bs/include/rtl8192c_recv.h | 33 ------------------ .../staging/rtl8723bs/include/rtl8723b_recv.h | 16 ++++++++- drivers/staging/rtl8723bs/include/rtw_ht.h | 1 - .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 19 +++++++---- 12 files changed, 70 insertions(+), 91 deletions(-) delete mode 100644 drivers/staging/rtl8723bs/include/rtl8192c_recv.h
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- Your patch does not have a Signed-off-by: line. Please read the kernel file, Documentation/process/submitting-patches.rst and resend it after adding that line. Note, the line needs to be in the body of the email, before the patch, not at the bottom of the patch or in the email signature.
- You did not specify a description of why the patch is needed, or possibly, any description at all, in the email body. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what is needed in order to properly describe the change.
- You did not write a descriptive Subject: for the patch, allowing Greg, and everyone else, to know what this patch is all about. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what a proper
Subject: line should look like.
- It looks like you did not use your "real" name for the patch on either the Signed-off-by: line, or the From: line (both of which have to match). Please read the kernel file, Documentation/process/submitting-patches.rst for how to do this correctly.
If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
thanks,
greg k-h's patch email bot