staging: r8188eu: remove unused functions
cover staging: r8188eu: remove unused functions
This series removes unused functions from core/rtw_wlan_util.c.
Michael Straube (6):
staging: r8188eu: remove rtw_get_oper_bw()
staging: r8188eu: remove rtw_get_oper_choffset()
staging: r8188eu: remove get_bsstype()
staging: r8188eu: remove CAM_empty_entry()
staging: r8188eu: remove is_ap_in_wep()
staging: r8188eu: remove should_forbid_n_rate()
drivers/staging/r8188eu/core/rtw_wlan_util.c | 91 ------------------- .../staging/r8188eu/include/rtw_mlme_ext.h | 6 -- 2 files changed, 97 deletions(-)
Signature · 1 line
2.32.0
PATCH 1/6 staging: r8188eu: remove rtw_get_oper_bw()
Function rtw_get_oper_bw() is unused, remove it.
--- drivers/staging/r8188eu/core/rtw_wlan_util.c | 5 ----- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 1 - 2 files changed, 6 deletions(-)
drivers/staging/r8188eu/core/rtw_wlan_util.c +0 -5
@@ -304,11 +304,6 @@ inline void rtw_set_oper_ch(struct adapter *adapter, u8 ch) adapter->mlmeextpriv.oper_channel = ch; } -inline u8 rtw_get_oper_bw (struct adapter *adapter) -{ -return adapter->mlmeextpriv.oper_bwmode; -} -inline void rtw_set_oper_bw (struct adapter *adapter,u8 bw) { adapter->mlmeextpriv.oper_bwmode = bw;
drivers/staging/r8188eu/include/rtw_mlme_ext.h +0 -1
@@ -447,7 +447,6 @@ void Set_MSR(struct adapter *padapter, u8 type);u8 rtw_get_oper_ch (struct adapter *adapter);void rtw_set_oper_ch (struct adapter *adapter,u8 ch); -u8 rtw_get_oper_bw (struct adapter *adapter);void rtw_set_oper_bw (struct adapter *adapter,u8 bw);u8 rtw_get_oper_choffset (struct adapter *adapter);void rtw_set_oper_choffset (struct adapter *adapter,u8 offset);
Signature · 1 line
2.32.0
PATCH 2/6 staging: r8188eu: remove rtw_get_oper_choffset()
In reply to Michael StraubeFunction rtw_get_oper_choffset() is unused, remove it.
--- drivers/staging/r8188eu/core/rtw_wlan_util.c | 5 ----- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 1 - 2 files changed, 6 deletions(-)
drivers/staging/r8188eu/core/rtw_wlan_util.c +0 -5
@@ -309,11 +309,6 @@ inline void rtw_set_oper_bw(struct adapter *adapter, u8 bw) adapter->mlmeextpriv.oper_bwmode = bw; } -inline u8 rtw_get_oper_choffset (struct adapter *adapter) -{ -return adapter->mlmeextpriv.oper_ch_offset; -} -inline void rtw_set_oper_choffset (struct adapter *adapter,u8 offset) { adapter->mlmeextpriv.oper_ch_offset = offset;
drivers/staging/r8188eu/include/rtw_mlme_ext.h +0 -1
@@ -448,7 +448,6 @@ void Set_MSR(struct adapter *padapter, u8 type);u8 rtw_get_oper_ch (struct adapter *adapter);void rtw_set_oper_ch (struct adapter *adapter,u8 ch);void rtw_set_oper_bw (struct adapter *adapter,u8 bw); -u8 rtw_get_oper_choffset (struct adapter *adapter);void rtw_set_oper_choffset (struct adapter *adapter,u8 offset); void set_channel_bwmode(struct adapter *padapter, unsigned char channel,
Signature · 1 line
2.32.0
PATCH 3/6 staging: r8188eu: remove get_bsstype()
In reply to Michael StraubeFunction get_bsstype() is unused, remove it.
--- drivers/staging/r8188eu/core/rtw_wlan_util.c | 10 ---------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 1 - 2 files changed, 11 deletions(-)
drivers/staging/r8188eu/core/rtw_wlan_util.c +0 -10
@@ -363,16 +363,6 @@ void set_channel_bwmode(struct adapter *padapter, unsigned char channel, unsigneSetBWMode (padapter, bwmode, channel_offset); } -int get_bsstype (unsigned short capability) -{ -if (capability &BIT (0 )) -return WIFI_FW_AP_STATE ; -else if (capability &BIT (1 )) -return WIFI_FW_ADHOC_STATE ; -else -return 0 ; -} - __inlineu8 *get_my_bssid (struct wlan_bssid_ex *pnetwork) {return pnetwork->MacAddress;
drivers/staging/r8188eu/include/rtw_mlme_ext.h +0 -1
@@ -473,7 +473,6 @@ u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame,void update_network (struct wlan_bssid_ex *dst,struct wlan_bssid_ex *src,struct adapter *adapter,bool update_ie); -int get_bsstype (unsigned short capability);u8 *get_my_bssid (struct wlan_bssid_ex *pnetwork);u16 get_beacon_interval (struct wlan_bssid_ex *bss);
Signature · 1 line
2.32.0
PATCH 4/6 staging: r8188eu: remove CAM_empty_entry()
In reply to Michael StraubeFunction CAM_empty_entry() is unused, remove it.
--- drivers/staging/r8188eu/core/rtw_wlan_util.c | 5 ----- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 1 - 2 files changed, 6 deletions(-)
drivers/staging/r8188eu/core/rtw_wlan_util.c +0 -5
@@ -427,11 +427,6 @@ unsigned int decide_wait_for_beacon_timeout(unsigned int bcn_interval)return bcn_interval <<2 ; } -void CAM_empty_entry (struct adapter *Adapter,u8 ucIndex) -{ -rtw_hal_set_hwreg (Adapter,HW_VAR_CAM_EMPTY_ENTRY , (u8 *)(&ucIndex)); -} -void invalidate_cam_all (struct adapter *padapter) {rtw_hal_set_hwreg (padapter,HW_VAR_CAM_INVALID_ALL ,NULL );
drivers/staging/r8188eu/include/rtw_mlme_ext.h +0 -1
@@ -462,7 +462,6 @@ void write_cam(struct adapter *padapter, u8 entry, u16 ctrl, u8 *mac, u8 *key);void clear_cam_entry (struct adapter *padapter,u8 entry);void invalidate_cam_all (struct adapter *padapter); -void CAM_empty_entry (struct adapter * Adapter,u8 ucIndex);int allocate_fw_sta_entry (struct adapter *padapter);void flush_all_cam_entry (struct adapter *padapter);
Signature · 1 line
2.32.0
PATCH 5/6 staging: r8188eu: remove is_ap_in_wep()
In reply to Michael StraubeFunction is_ap_in_wep() is unused, remove it.
--- drivers/staging/r8188eu/core/rtw_wlan_util.c | 30 ------------------- .../staging/r8188eu/include/rtw_mlme_ext.h | 1 - 2 files changed, 31 deletions(-)
drivers/staging/r8188eu/core/rtw_wlan_util.c +0 -30
@@ -1134,36 +1134,6 @@ unsigned int should_forbid_n_rate(struct adapter *padapter) } } -unsigned int is_ap_in_wep (struct adapter *padapter) -{ -u32 i; -struct ndis_802_11_var_ie *pIE; -struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; -struct wlan_bssid_ex *cur_network = &pmlmeinfo->network; - -if (rtw_get_capability ((struct wlan_bssid_ex *)cur_network) &WLAN_CAPABILITY_PRIVACY ) { -for (i =sizeof (struct ndis_802_11_fixed_ie ); i < pmlmeinfo->network.IELength;) { - pIE = (struct ndis_802_11_var_ie *)(pmlmeinfo->network.IEs + i); - -switch (pIE->ElementID) { -case _VENDOR_SPECIFIC_IE_: -if (!memcmp (pIE->data,RTW_WPA_OUI ,4 )) -return false; -break ; -case _RSN_IE_2_: -return false; -default : -break ; - } - i += (pIE->Length +2 ); - } -return true; - }else { -return false; - } -} -int wifirate2_ratetbl_inx (unsigned char rate) {int inx =0 ;
drivers/staging/r8188eu/include/rtw_mlme_ext.h +0 -1
@@ -516,7 +516,6 @@ unsigned int receive_disconnect(struct adapter *padapter,unsigned char get_highest_rate_idx (u32 mask);int support_short_GI (struct adapter *padapter,struct HT_caps_element *caps);unsigned int is_ap_in_tkip (struct adapter *padapter); -unsigned int is_ap_in_wep (struct adapter *padapter);unsigned int should_forbid_n_rate (struct adapter *padapter);void report_join_res (struct adapter *padapter,int res);
Signature · 1 line
2.32.0
PATCH 6/6 staging: r8188eu: remove should_forbid_n_rate()
In reply to Michael StraubeFunction should_forbid_n_rate() is unused, remove it.
--- drivers/staging/r8188eu/core/rtw_wlan_util.c | 36 ------------------- .../staging/r8188eu/include/rtw_mlme_ext.h | 1 - 2 files changed, 37 deletions(-)
drivers/staging/r8188eu/core/rtw_wlan_util.c +0 -36
@@ -1098,42 +1098,6 @@ unsigned int is_ap_in_tkip(struct adapter *padapter) } } -unsigned int should_forbid_n_rate (struct adapter *padapter) -{ -u32 i; -struct ndis_802_11_var_ie *pIE; -struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -struct wlan_bssid_ex *cur_network = &pmlmepriv->cur_network.network; - -if (rtw_get_capability ((struct wlan_bssid_ex *)cur_network) &WLAN_CAPABILITY_PRIVACY ) { -for (i =sizeof (struct ndis_802_11_fixed_ie ); i < cur_network->IELength;) { - pIE = (struct ndis_802_11_var_ie *)(cur_network->IEs + i); - -switch (pIE->ElementID) { -case _VENDOR_SPECIFIC_IE_: -if (!memcmp (pIE->data,RTW_WPA_OUI ,4 ) && - ((!memcmp ((pIE->data +12 ),WPA_CIPHER_SUITE_CCMP ,4 )) || - (!memcmp ((pIE->data +16 ),WPA_CIPHER_SUITE_CCMP ,4 )))) -return false; -break ; -case _RSN_IE_2_: -if ((!memcmp ((pIE->data +8 ),RSN_CIPHER_SUITE_CCMP ,4 )) || - (!memcmp ((pIE->data +12 ),RSN_CIPHER_SUITE_CCMP ,4 ))) -return false; -break ; -default : -break ; - } - - i += (pIE->Length +2 ); - } - -return true; - }else { -return false; - } -} -int wifirate2_ratetbl_inx (unsigned char rate) {int inx =0 ;
drivers/staging/r8188eu/include/rtw_mlme_ext.h +0 -1
@@ -516,7 +516,6 @@ unsigned int receive_disconnect(struct adapter *padapter,unsigned char get_highest_rate_idx (u32 mask);int support_short_GI (struct adapter *padapter,struct HT_caps_element *caps);unsigned int is_ap_in_tkip (struct adapter *padapter); -unsigned int should_forbid_n_rate (struct adapter *padapter);void report_join_res (struct adapter *padapter,int res);void report_survey_event (struct adapter *padapter,struct recv_frame *precv_frame);
Signature · 1 line
2.32.0
Quoted 11 lines · Michael Straube
This series removes unused functions from
core/rtw_wlan_util.c.Michael Straube (6):
staging: r8188eu: removertw_get_oper_bw()
staging: r8188eu: removertw_get_oper_choffset()
staging: r8188eu: removeget_bsstype()
staging: r8188eu: removeCAM_empty_entry()
staging: r8188eu: removeis_ap_in_wep()
staging: r8188eu: removeshould_forbid_n_rate()
Quoted 7 lines
drivers/staging/r8188eu/core/rtw_wlan_util.c | 91 ------------------- .../staging/r8188eu/include/rtw_mlme_ext.h | 6 -- 2 files changed, 97 deletions(-)--
2.32.0
Dear Michael,
Looks good and builds/runs fine for me, many thanks.
Regards,
Phil