]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: rtl8723bs: remove unused 'ratelen' parameter from rtw_check_network_type()
authorNikolay Kulikov <nikolayof23@gmail.com>
Sat, 28 Feb 2026 13:09:06 +0000 (16:09 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Mar 2026 16:28:44 +0000 (17:28 +0100)
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>
drivers/staging/rtl8723bs/core/rtw_ap.c
drivers/staging/rtl8723bs/core/rtw_ieee80211.c
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
drivers/staging/rtl8723bs/include/ieee80211.h

index 9c10d5441632d251da1b22e4d259b9606aa0454b..4cdcdddf6b33e3fffd898cf7cbb4130718d4fba9 100644 (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);
 
index dbd4bcc8cd28af28d9c1be8753d0bd1e466a6c53..a657c963ff52c50aa64445ec0b7cc28fe537c52c 100644 (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;
index a631fe323157a69ec83783da3d97b4ffe0821795..38c673e3131359fe2c7d2cec1253ff44e56aab23 100644 (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 */
index 97fd5f75096b2f9caae22f34bb0da078584e3822..8ec14e8d4c89c8947bde58eebf06f31b6d5e21f6 100644 (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);