staging: rtl8723bs: delete some dead code
cover staging: rtl8723bs: delete some dead code
Delete some unused functions and files.
Nam Cao (10):
staging: rtl8723bs: delete rtw_setdatarate_cmd
staging: rtl8723bs: delete function rtw_set_chplan_cmd
staging: rtl8723bs: remove rtw_change_ifname
staging: rtl8723bs: delete rtw_odm.c and rtw_odm.h
staging: rtl8723bs: remove odm_PauseDIG
staging: rtl8723bs: remove GetHexValueFromString
staging: rtl8723bs: remove hal_btcoex_SetManualControl
staging: rtl8723bs: remove rtw_hal_is_disable_sw_channel_plan
staging: rtl8723bs: remove IsHexDigit
staging: rtl8723bs: remove rtw_is_wps_ie
drivers/staging/rtl8723bs/Makefile | 1 - drivers/staging/rtl8723bs/core/rtw_cmd.c | 84 ------------- .../staging/rtl8723bs/core/rtw_ieee80211.c | 17 --- drivers/staging/rtl8723bs/core/rtw_odm.c | 116 ------------------ drivers/staging/rtl8723bs/hal/hal_btcoex.c | 5 - drivers/staging/rtl8723bs/hal/hal_com.c | 64 ---------- drivers/staging/rtl8723bs/hal/hal_intf.c | 5 - drivers/staging/rtl8723bs/hal/odm_DIG.c | 57 --------- drivers/staging/rtl8723bs/hal/odm_DIG.h | 2 - drivers/staging/rtl8723bs/include/drv_types.h | 3 - .../staging/rtl8723bs/include/hal_btcoex.h | 1 - drivers/staging/rtl8723bs/include/hal_com.h | 4 - drivers/staging/rtl8723bs/include/hal_intf.h | 2 - drivers/staging/rtl8723bs/include/ieee80211.h | 1 - drivers/staging/rtl8723bs/include/rtw_cmd.h | 3 - drivers/staging/rtl8723bs/include/rtw_odm.h | 24 ---- .../staging/rtl8723bs/os_dep/osdep_service.c | 50 -------- 17 files changed, 439 deletions(-) delete mode 100644 drivers/staging/rtl8723bs/core/rtw_odm.c delete mode 100644 drivers/staging/rtl8723bs/include/rtw_odm.h
Signature · 1 line
2.25.1
PATCH 1/10 staging: rtl8723bs: delete rtw_setdatarate_cmd
Remove function rtw_setdatarate_cmd because it is not used.
--- drivers/staging/rtl8723bs/core/rtw_cmd.c | 29 --------------------- drivers/staging/rtl8723bs/include/rtw_cmd.h | 1 - 2 files changed, 30 deletions(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -29
@@ -593,35 +593,6 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid,return res; } -u8 rtw_setdatarate_cmd (struct adapter *padapter,u8 *rateset) -{ -struct cmd_obj *ph2c; -struct setdatarate_parm *pbsetdataratepara; -struct cmd_priv *pcmdpriv = &padapter->cmdpriv; -u8 res = _SUCCESS; - - ph2c =rtw_zmalloc (sizeof (struct cmd_obj )); -if (!ph2c) { - res = _FAIL; - goto exit; - } - - pbsetdataratepara =rtw_zmalloc (sizeof (struct setdatarate_parm )); -if (!pbsetdataratepara) { -kfree (ph2c); - res = _FAIL; - goto exit; - } - -init_h2fwcmd_w_parm_no_rsp (ph2c, pbsetdataratepara,GEN_CMD_CODE (_SetDataRate)); - pbsetdataratepara->mac_id =5 ; -memcpy (pbsetdataratepara->datarates, rateset, NumRates); - - res =rtw_enqueue_cmd (pcmdpriv, ph2c); -exit: -return res; -} -void rtw_getbbrfreg_cmdrsp_callback (struct adapter *padapter,struct cmd_obj *pcmd) {/* rtw_free_cmd_obj(pcmd); */
drivers/staging/rtl8723bs/include/rtw_cmd.h +0 -1
@@ -591,7 +591,6 @@ extern u8 rtw_clearstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8extern u8 rtw_joinbss_cmd (struct adapter *padapter,struct wlan_network *pnetwork);u8 rtw_disassoc_cmd (struct adapter *padapter,u32 deauth_timeout_ms,bool enqueue);extern u8 rtw_setopmode_cmd (struct adapter *padapter,enum ndis_802_11_network_infrastructure networktype,bool enqueue); -extern u8 rtw_setdatarate_cmd (struct adapter *padapter,u8 *rateset);extern u8 rtw_setrfintfs_cmd (struct adapter *padapter,u8 mode);extern u8 rtw_gettssi_cmd (struct adapter *padapter,u8 offset,u8 *pval);
Signature · 1 line
2.25.1
PATCH 2/10 staging: rtl8723bs: delete function rtw_set_chplan_cmd
In reply to Nam CaoThe function rtw_set_chplan_cmd is not used. Remove it.
--- drivers/staging/rtl8723bs/core/rtw_cmd.c | 55 --------------------- drivers/staging/rtl8723bs/include/rtw_cmd.h | 2 - 2 files changed, 57 deletions(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -55
@@ -1111,61 +1111,6 @@ u8 rtw_dynamic_chk_wk_cmd(struct adapter *padapter)return res; } -u8 rtw_set_chplan_cmd (struct adapter *padapter,u8 chplan,u8 enqueue,u8 swconfig) -{ -struct cmd_obj *pcmdobj; -struct SetChannelPlan_param *setChannelPlan_param; -struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - -u8 res = _SUCCESS; - -/* check if allow software config */ -if (swconfig &&rtw_hal_is_disable_sw_channel_plan (padapter)) { - res = _FAIL; - goto exit; - } - -/* check input parameter */ -if (!rtw_is_channel_plan_valid (chplan)) { - res = _FAIL; - goto exit; - } - -/* prepare cmd parameter */ - setChannelPlan_param =rtw_zmalloc (sizeof (struct SetChannelPlan_param )); -if (!setChannelPlan_param) { - res = _FAIL; - goto exit; - } - setChannelPlan_param->channel_plan = chplan; - -if (enqueue) { -/* need enqueue, prepare cmd_obj and enqueue */ - pcmdobj =rtw_zmalloc (sizeof (struct cmd_obj )); -if (!pcmdobj) { -kfree (setChannelPlan_param); - res = _FAIL; - goto exit; - } - -init_h2fwcmd_w_parm_no_rsp (pcmdobj, setChannelPlan_param,GEN_CMD_CODE (_SetChannelPlan)); - res =rtw_enqueue_cmd (pcmdpriv, pcmdobj); - }else { -/* no need to enqueue, do the cmd hdl directly and free cmd parameter */ -if (set_chplan_hdl (padapter, (unsigned char *)setChannelPlan_param) !=H2C_SUCCESS ) - res = _FAIL; - -kfree (setChannelPlan_param); - } - -/* do something based on res... */ -if (res == _SUCCESS) - padapter->mlmepriv.ChannelPlan = chplan; - -exit: -return res; -} -static void collect_traffic_statistics (struct adapter *padapter) {struct dvobj_priv *pdvobjpriv =adapter_to_dvobj (padapter);
drivers/staging/rtl8723bs/include/rtw_cmd.h +0 -2
@@ -612,8 +612,6 @@ extern u8 rtw_ps_cmd(struct adapter *padapter);u8 rtw_chk_hi_queue_cmd (struct adapter *padapter); -extern u8 rtw_set_chplan_cmd (struct adapter *padapter,u8 chplan,u8 enqueue,u8 swconfig); -extern u8 rtw_c2h_packet_wk_cmd (struct adapter *padapter,u8 *pbuf,u16 length);extern u8 rtw_c2h_wk_cmd (struct adapter *padapter,u8 *c2h_evt);
Signature · 1 line
2.25.1
PATCH 3/10 staging: rtl8723bs: remove rtw_change_ifname
In reply to Nam CaoDelete function rtw_change_ifname because it is not used.
--- drivers/staging/rtl8723bs/include/drv_types.h | 2 - .../staging/rtl8723bs/os_dep/osdep_service.c | 50 ------------------- 2 files changed, 52 deletions(-)
drivers/staging/rtl8723bs/include/drv_types.h +0 -2
@@ -493,8 +493,6 @@ static inline u8 *myid(struct eeprom_priv *peepriv)#include <rtw_btcoex.h> -int rtw_change_ifname (struct adapter *padapter,const char *ifname); -extern char *rtw_initmac;extern int rtw_mc2u_disable;extern int rtw_ht_enable;
drivers/staging/rtl8723bs/os_dep/osdep_service.c +0 -50
56 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 4/10 staging: rtl8723bs: delete rtw_odm.c and rtw_odm.h
In reply to Nam CaoRemove rtw_odm.c and rtw_odm.h because the content of these files is not used.
--- drivers/staging/rtl8723bs/Makefile | 1 - drivers/staging/rtl8723bs/core/rtw_odm.c | 116 ------------------ drivers/staging/rtl8723bs/include/drv_types.h | 1 - drivers/staging/rtl8723bs/include/rtw_odm.h | 24 ---- 4 files changed, 142 deletions(-) delete mode 100644 drivers/staging/rtl8723bs/core/rtw_odm.c delete mode 100644 drivers/staging/rtl8723bs/include/rtw_odm.h
drivers/staging/rtl8723bs/Makefile +0 -1
@@ -10,7 +10,6 @@ r8723bs-y = \ core/rtw_ieee80211.o \ core/rtw_mlme.o \ core/rtw_mlme_ext.o \ - core/rtw_odm.o \ core/rtw_pwrctrl.o \ core/rtw_recv.o \ core/rtw_rf.o \
drivers/staging/rtl8723bs/core/rtw_odm.c deleted +0 -116
116 lines not on this page · raw message
drivers/staging/rtl8723bs/include/drv_types.h +0 -1
@@ -50,7 +50,6 @@#include <rtw_mlme_ext.h> #include <rtw_ap.h> #include <rtw_version.h> -#include <rtw_odm.h> #include "ioctl_cfg80211.h"
drivers/staging/rtl8723bs/include/rtw_odm.h deleted +0 -24
@@ -1,24 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/****************************************************************************** -* -* Copyright(c) 2013 Realtek Corporation. All rights reserved. -* -******************************************************************************/ -#ifndef __RTW_ODM_H__ -#define __RTW_ODM_H__ - -#include <drv_types.h> - -/* -* This file provides utilities/wrappers for rtw driver to use ODM -*/ - -void rtw_odm_dbg_level_msg (void *sel,struct adapter *adapter); -void rtw_odm_dbg_level_set (struct adapter *adapter,u32 level); - -void rtw_odm_ability_msg (void *sel,struct adapter *adapter); - -void rtw_odm_adaptivity_parm_set (struct adapter *adapter,s8 TH_L2H_ini,s8 TH_EDCCA_HL_diff, -s8 IGI_Base,bool ForceEDCCA,u8 AdapEn_RSSI,u8 IGI_LowerBound); -void rtw_odm_get_perpkt_rssi (void *sel,struct adapter *adapter); -#endif /* __RTW_ODM_H__ */
Signature · 1 line
2.25.1
PATCH 5/10 staging: rtl8723bs: remove odm_PauseDIG
In reply to Nam CaoRemove function odm_PauseDIG because it is not used.
--- drivers/staging/rtl8723bs/hal/odm_DIG.c | 57 ------------------------- drivers/staging/rtl8723bs/hal/odm_DIG.h | 2 - 2 files changed, 59 deletions(-)
drivers/staging/rtl8723bs/hal/odm_DIG.c +0 -57
@@ -309,63 +309,6 @@ void ODM_Write_DIG(void *pDM_VOID, u8 CurrentIGI) } -void odm_PauseDIG ( -void *pDM_VOID, -enum ODM_Pause_DIG_TYPE PauseType, -u8 IGIValue -) -{ -struct dm_odm_t *pDM_Odm = (struct dm_odm_t *)pDM_VOID; -struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable; -static bool bPaused; - -if ( - (pDM_Odm->SupportAbility &ODM_BB_ADAPTIVITY ) && - pDM_Odm->TxHangFlg == true - ) { -return ; - } - -if ( - !bPaused && (!(pDM_Odm->SupportAbility &ODM_BB_DIG ) || - !(pDM_Odm->SupportAbility &ODM_BB_FA_CNT )) - ){ -return ; - } - -switch (PauseType) { -/* 1 Pause DIG */ -case ODM_PAUSE_DIG : -/* 2 Disable DIG */ -ODM_CmnInfoUpdate (pDM_Odm,ODM_CMNINFO_ABILITY , pDM_Odm->SupportAbility & (~ODM_BB_DIG )); - -/* 2 Backup IGI value */ -if (!bPaused) { - pDM_DigTable->IGIBackup = pDM_DigTable->CurIGValue; - bPaused = true; - } - -/* 2 Write new IGI value */ -ODM_Write_DIG (pDM_Odm, IGIValue); -break ; - -/* 1 Resume DIG */ -case ODM_RESUME_DIG : -if (bPaused) { -/* 2 Write backup IGI value */ -ODM_Write_DIG (pDM_Odm, pDM_DigTable->IGIBackup); - bPaused = false; - -/* 2 Enable DIG */ -ODM_CmnInfoUpdate (pDM_Odm,ODM_CMNINFO_ABILITY , pDM_Odm->SupportAbility |ODM_BB_DIG ); - } -break ; - -default : -break ; - } -} -bool odm_DigAbort (void *pDM_VOID) {struct dm_odm_t *pDM_Odm = (struct dm_odm_t *)pDM_VOID;
drivers/staging/rtl8723bs/hal/odm_DIG.h +0 -2
@@ -141,8 +141,6 @@ void odm_Adaptivity(void *pDM_VOID, u8 IGI);void ODM_Write_DIG (void *pDM_VOID,u8 CurrentIGI); -void odm_PauseDIG (void *pDM_VOID,enum ODM_Pause_DIG_TYPE PauseType,u8 IGIValue); -void odm_DIGInit (void *pDM_VOID);void odm_DIG (void *pDM_VOID);
Signature · 1 line
2.25.1
PATCH 6/10 staging: rtl8723bs: remove GetHexValueFromString
In reply to Nam CaoRemove function GetHexValueFromString because it is not used.
--- drivers/staging/rtl8723bs/hal/hal_com.c | 45 --------------------- drivers/staging/rtl8723bs/include/hal_com.h | 2 - 2 files changed, 47 deletions(-)
drivers/staging/rtl8723bs/hal/hal_com.c +0 -45
@@ -894,51 +894,6 @@ u32 MapCharToHexDigit(char chTmp)return 0 ; } - - -/* Description: */ -/* Parse hex number from the string pucStr. */ -bool GetHexValueFromString (char *szStr,u32 *pu4bVal,u32 *pu4bMove) -{ -char *szScan = szStr; - -/* Check input parameter. */ -if (!szStr || !pu4bVal || !pu4bMove) -return false; - -/* Initialize output. */ - *pu4bMove =0 ; - *pu4bVal =0 ; - -/* Skip leading space. */ -while (*szScan !='\0' && (*szScan ==' ' || *szScan =='\t' )) { - szScan++; - (*pu4bMove)++; - } - -/* Skip leading '0x' or '0X'. */ -if (*szScan =='0' && (*(szScan+1 ) =='x' || *(szScan+1 ) =='X' )) { - szScan +=2 ; - (*pu4bMove) +=2 ; - } - -/* Check if szScan is now pointer to a character for hex digit, */ -/* if not, it means this is not a valid hex number. */ -if (!IsHexDigit (*szScan)) -return false; - -/* Parse each digit. */ -do { - (*pu4bVal) <<=4 ; - *pu4bVal +=MapCharToHexDigit (*szScan); - - szScan++; - (*pu4bMove)++; - }while (IsHexDigit (*szScan)); - -return true; -} -bool GetU1ByteIntegerFromStringInDecimal (char *Str,u8 *pInt) {u16 i =0 ;
drivers/staging/rtl8723bs/include/hal_com.h +0 -2
@@ -151,8 +151,6 @@ bool IsHexDigit(char chTmp);u32 MapCharToHexDigit (char chTmp); -bool GetHexValueFromString (char *szStr,u32 *pu4bVal,u32 *pu4bMove); -bool ParseQualifiedString (char *In,u32 *Start,char *Out,char LeftQualifier,char RightQualifier);
Signature · 1 line
2.25.1
PATCH 7/10 staging: rtl8723bs: remove hal_btcoex_SetManualControl
In reply to Nam CaoRemove function hal_btcoex_SetManualControl because it is not used.
--- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 5 ----- drivers/staging/rtl8723bs/include/hal_btcoex.h | 1 - 2 files changed, 6 deletions(-)
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0 -5
@@ -1283,11 +1283,6 @@ s32 hal_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter *padapter)return (s32 )GLBtCoexist.btInfo.bBtCtrlAggBufSize; } -void hal_btcoex_SetManualControl (struct adapter *padapter,u8 bmanual) -{ - GLBtCoexist.bManualControl = bmanual; -} -bool hal_btcoex_IsBtControlLps (struct adapter *padapter) {if (!hal_btcoex_IsBtExist (padapter))
drivers/staging/rtl8723bs/include/hal_btcoex.h +0 -1
@@ -45,7 +45,6 @@ void hal_btcoex_HaltNotify(struct adapter *padapter);void hal_btcoex_Handler (struct adapter *padapter);s32 hal_btcoex_IsBTCoexCtrlAMPDUSize (struct adapter *padapter); -void hal_btcoex_SetManualControl (struct adapter *padapter,u8 bmanual);bool hal_btcoex_IsBtControlLps (struct adapter *padapter);bool hal_btcoex_IsLpsOn (struct adapter *padapter);u8 hal_btcoex_RpwmVal (struct adapter *);
Signature · 1 line
2.25.1
PATCH 8/10 staging: rtl8723bs: remove rtw_hal_is_disable_sw_channel_plan
In reply to Nam CaoRemove function rtw_hal_is_disable_sw_channel_plan because it is not used.
--- drivers/staging/rtl8723bs/hal/hal_intf.c | 5 ----- drivers/staging/rtl8723bs/include/hal_intf.h | 2 -- 2 files changed, 7 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +0 -5
@@ -400,11 +400,6 @@ c2h_id_filter rtw_hal_c2h_id_filter_ccx(struct adapter *adapter)return adapter->HalFunc.c2h_id_filter_ccx; } -s32 rtw_hal_is_disable_sw_channel_plan (struct adapter *padapter) -{ -return GET_HAL_DATA (padapter)->bDisableSWChannelPlan; -} -s32 rtw_hal_macid_sleep (struct adapter *padapter,u32 macid) {u8 support;
drivers/staging/rtl8723bs/include/hal_intf.h +0 -2
@@ -353,8 +353,6 @@ bool rtw_hal_c2h_valid(struct adapter *adapter, u8 *buf);s32 rtw_hal_c2h_handler (struct adapter *adapter,u8 *c2h_evt);c2h_id_filter rtw_hal_c2h_id_filter_ccx (struct adapter *adapter); -s32 rtw_hal_is_disable_sw_channel_plan (struct adapter *padapter); -s32 rtw_hal_macid_sleep (struct adapter *padapter,u32 macid);s32 rtw_hal_macid_wakeup (struct adapter *padapter,u32 macid);
Signature · 1 line
2.25.1
PATCH 9/10 staging: rtl8723bs: remove IsHexDigit
In reply to Nam CaoRemove function IsHexDigit because it is not used.
--- drivers/staging/rtl8723bs/hal/hal_com.c | 19 ------------------- drivers/staging/rtl8723bs/include/hal_com.h | 2 -- 2 files changed, 21 deletions(-)
drivers/staging/rtl8723bs/hal/hal_com.c +0 -19
@@ -859,25 +859,6 @@ bool eqNByte(u8 *str1, u8 *str2, u32 num)return true; } -/* */ -/* Description: */ -/* Return true if chTmp is represent for hex digit and */ -/* false otherwise. */ -/* */ -/* */ -bool IsHexDigit (char chTmp) -{ -if ( - (chTmp >='0' && chTmp <='9' ) || - (chTmp >='a' && chTmp <='f' ) || - (chTmp >='A' && chTmp <='F' ) - ) -return true; -else -return false; -} - -/* */ /* Description: */ /* Translate a character to hex digit. */
drivers/staging/rtl8723bs/include/hal_com.h +0 -2
@@ -147,8 +147,6 @@ u8 GetHalDefVar(struct adapter *adapter, enum hal_def_variable variable,bool eqNByte (u8 *str1,u8 *str2,u32 num); -bool IsHexDigit (char chTmp); -u32 MapCharToHexDigit (char chTmp); bool ParseQualifiedString(char *In, u32 *Start, char *Out, char LeftQualifier,
Signature · 1 line
2.25.1
PATCH 10/10 staging: rtl8723bs: remove rtw_is_wps_ie
In reply to Nam CaoRemove function rtw_is_wps_ie because it is not used.
--- drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 17 ----------------- drivers/staging/rtl8723bs/include/ieee80211.h | 1 - 2 files changed, 18 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +0 -17
@@ -634,23 +634,6 @@ void rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie } } -u8 rtw_is_wps_ie (u8 *ie_ptr,uint *wps_ielen) -{ -u8 match = false; -u8 eid, wps_oui[4 ] = {0x0 ,0x50 ,0xf2 ,0x04 }; - -if (!ie_ptr) -return match; - - eid = ie_ptr[0 ]; - -if ((eid ==WLAN_EID_VENDOR_SPECIFIC ) && (!memcmp (&ie_ptr[2 ], wps_oui,4 ))) { - *wps_ielen = ie_ptr[1 ]+2 ; - match = true; - } -return match; -} -/** * rtw_get_wps_ie - Search WPS IE from a series of IEs * @in_ie: Address of IEs to search
drivers/staging/rtl8723bs/include/ieee80211.h +0 -1
@@ -746,7 +746,6 @@ int rtw_parse_wpa2_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwivoid rtw_get_sec_ie (u8 *in_ie,uint in_len,u8 *rsn_ie,u16 *rsn_len,u8 *wpa_ie,u16 *wpa_len); -u8 rtw_is_wps_ie (u8 *ie_ptr,uint *wps_ielen);u8 *rtw_get_wps_ie (u8 *in_ie,uint in_len,u8 *wps_ie,uint *wps_ielen);u8 *rtw_get_wps_attr (u8 *wps_ie,uint wps_ielen,u16 target_attr_id,u8 *buf_attr,u32 *len_attr);u8 *rtw_get_wps_attr_content (u8 *wps_ie,uint wps_ielen,u16 target_attr_id,u8 *buf_content,uint *len_content);
Signature · 1 line
2.25.1