staging: r8188eu: remove should_forbid_n_rate()
authorMichael Straube <straube.linux@gmail.com>
Sun, 29 Aug 2021 09:25:02 +0000 (11:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 06:49:44 +0000 (08:49 +0200)
Function should_forbid_n_rate() is unused, remove it.

Acked-by: Phillip Potter <phil@philpotter.co.uk>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210829092502.3658-7-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_wlan_util.c
drivers/staging/r8188eu/include/rtw_mlme_ext.h

index 8491d82..ccb5fbb 100644 (file)
@@ -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;
index 1695a96..e15e2ce 100644 (file)
@@ -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);