staging: rtl8723bs: remove unused 'ratelen' parameter from rtw_check_network_type()

The rtw_check_network_type() function takes a 'ratelen' parameter, but
does not use it in any way. Also remove the local variable in rtw_ap.c
created just to pass a value to this unused parameter.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com>
Link: https://patch.msgid.link/20260228130917.4123-1-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nikolay Kulikov 2026-02-28 16:09:06 +03:00 committed by Greg Kroah-Hartman
parent ebfef080cd
commit 3c7fe1b403
4 changed files with 5 additions and 10 deletions

View File

@ -367,7 +367,6 @@ void add_ratid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
void update_bmc_sta(struct adapter *padapter)
{
unsigned char network_type;
int support_rate_num = 0;
unsigned int tx_ra_bitmap = 0;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@ -391,9 +390,7 @@ void update_bmc_sta(struct adapter *padapter)
memset(&psta->sta_stats, 0, sizeof(struct stainfo_stats));
/* prepare for add_ratid */
support_rate_num = rtw_get_rateset_len((u8 *)&pcur_network->supported_rates);
network_type = rtw_check_network_type((u8 *)&pcur_network->supported_rates,
support_rate_num,
pcur_network->configuration.ds_config
);
if (is_supported_tx_cck(network_type)) {
@ -885,12 +882,10 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
WLAN_EID_EXT_SUPP_RATES,
&ie_len,
pbss_network->ie_length - _BEACON_IE_OFFSET_);
if (p) {
if (p)
memcpy(support_rate + support_rate_num, p + 2, ie_len);
support_rate_num += ie_len;
}
network_type = rtw_check_network_type(support_rate, support_rate_num, channel);
network_type = rtw_check_network_type(support_rate, channel);
rtw_set_supported_rate(pbss_network->supported_rates, network_type);

View File

@ -94,7 +94,7 @@ bool rtw_is_cckratesonly_included(u8 *rate)
return true;
}
int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
int rtw_check_network_type(unsigned char *rate, int channel)
{
if (channel > 14)
return WIRELESS_INVALID;

View File

@ -4886,7 +4886,7 @@ void mlmeext_sta_add_event_callback(struct adapter *padapter, struct sta_info *p
rtw_hal_update_sta_rate_mask(padapter, psta);
/* ToDo: HT for Ad-hoc */
psta->wireless_mode = rtw_check_network_type(psta->bssrateset, psta->bssratelen, pmlmeext->cur_channel);
psta->wireless_mode = rtw_check_network_type(psta->bssrateset, pmlmeext->cur_channel);
psta->raid = networktype_to_raid_ex(padapter, psta);
/* rate radaptive */

View File

@ -778,7 +778,7 @@ bool rtw_is_cckrates_included(u8 *rate);
bool rtw_is_cckratesonly_included(u8 *rate);
int rtw_check_network_type(unsigned char *rate, int ratelen, int channel);
int rtw_check_network_type(unsigned char *rate, int channel);
void rtw_get_bcn_info(struct wlan_network *pnetwork);