staging: rtl8188eu: remove cckrates{only}_included()
authorMichael Straube <straube.linux@gmail.com>
Tue, 29 Sep 2020 06:28:45 +0000 (08:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 08:57:07 +0000 (10:57 +0200)
In rtw_ieee80211.c there are rtw_is_cckrates_included() and
rtw_is_cckratesonly_included() which have the same functionality as
cckrates_included() and cckrates_only_included() defined in
rtw_wlan_util.c. Remove the functions from rtw_wlan_util.c and use
those from rtw_ieee80211.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200929062847.23985-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_wlan_util.c
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h

index efe1f1ba7acf45aaeea07e01d80ad1d6ef953d54..bf7dd13dde0394fe85e0db452910da6650dd75c9 100644 (file)
@@ -53,32 +53,6 @@ static const u8 rtw_basic_rate_mix[7] = {
        IEEE80211_OFDM_RATE_24MB | IEEE80211_BASIC_RATE_MASK
 };
 
-bool cckrates_included(unsigned char *rate, int ratelen)
-{
-       int i;
-
-       for (i = 0; i < ratelen; i++) {
-               u8 r = rate[i] & 0x7f;
-
-               if (r == 2 || r == 4 || r == 11 || r == 22)
-                       return true;
-       }
-       return false;
-}
-
-bool cckratesonly_included(unsigned char *rate, int ratelen)
-{
-       int i;
-
-       for (i = 0; i < ratelen; i++) {
-               u8 r = rate[i] & 0x7f;
-
-               if (r != 2 && r != 4 && r != 11 && r != 22)
-                       return false;
-       }
-       return true;
-}
-
 unsigned char networktype_to_raid(unsigned char network_type)
 {
        switch (network_type) {
@@ -111,9 +85,9 @@ u8 judge_network_type(struct adapter *padapter, unsigned char *rate, int ratelen
        if (pmlmeinfo->HT_enable)
                network_type = WIRELESS_11_24N;
 
-       if (cckratesonly_included(rate, ratelen))
+       if (rtw_is_cckratesonly_included(rate))
                network_type |= WIRELESS_11B;
-       else if (cckrates_included(rate, ratelen))
+       else if (rtw_is_cckrates_included(rate))
                network_type |= WIRELESS_11BG;
        else
                network_type |= WIRELESS_11G;
@@ -1362,9 +1336,9 @@ void update_wireless_mode(struct adapter *padapter)
        if (pmlmeinfo->HT_enable)
                network_type = WIRELESS_11_24N;
 
-       if (cckratesonly_included(rate, ratelen))
+       if (rtw_is_cckratesonly_included(rate))
                network_type |= WIRELESS_11B;
-       else if (cckrates_included(rate, ratelen))
+       else if (rtw_is_cckrates_included(rate))
                network_type |= WIRELESS_11BG;
        else
                network_type |= WIRELESS_11G;
index 565bfe46256cb4e0d8e7166ab4fc61bc106668c8..713e23229ef557a1f4376f13ac50b53addcb01a4 100644 (file)
@@ -568,9 +568,6 @@ void addba_timer_hdl(struct timer_list *t);
        mod_timer(&mlmeext->link_timer, jiffies +       \
                  msecs_to_jiffies(ms))
 
-bool cckrates_included(unsigned char *rate, int ratelen);
-bool cckratesonly_included(unsigned char *rate, int ratelen);
-
 void process_addba_req(struct adapter *padapter, u8 *paddba_req, u8 *addr);
 
 void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len);