staging: rtl8188eu: remove unused rtw_remove_bcn_ie()
authorMichael Straube <straube.linux@gmail.com>
Tue, 31 Jul 2018 11:34:14 +0000 (13:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Aug 2018 07:44:27 +0000 (09:44 +0200)
The function rtw_remove_bcn_ie() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_ap.c
drivers/staging/rtl8188eu/include/rtw_ap.h

index 82fb1b028fa006dcb7ccaca6fba8260ec8a468c2..676d549ef78691fed257d389602424ea2704d46a 100644 (file)
@@ -145,46 +145,6 @@ static void update_BCNTIM(struct adapter *padapter)
        set_tx_beacon_cmd(padapter);
 }
 
-void rtw_remove_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork,
-                      u8 index)
-{
-       u8 *p, *dst_ie = NULL, *premainder_ie = NULL;
-       u8 *pbackup_remainder_ie = NULL;
-       uint offset, ielen, ie_offset, remainder_ielen = 0;
-       u8      *pie = pnetwork->ies;
-
-       p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, index, &ielen,
-                      pnetwork->ie_length - _FIXED_IE_LENGTH_);
-       if (p && ielen > 0) {
-               ielen += 2;
-
-               premainder_ie = p + ielen;
-
-               ie_offset = (int)(p - pie);
-
-               remainder_ielen = pnetwork->ie_length - ie_offset - ielen;
-
-               dst_ie = p;
-       }
-
-       if (remainder_ielen > 0) {
-               pbackup_remainder_ie = rtw_malloc(remainder_ielen);
-               if (pbackup_remainder_ie && premainder_ie)
-                       memcpy(pbackup_remainder_ie, premainder_ie,
-                              remainder_ielen);
-       }
-
-       /* copy remainder IE */
-       if (pbackup_remainder_ie) {
-               memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen);
-
-               kfree(pbackup_remainder_ie);
-       }
-
-       offset =  (uint)(dst_ie - pie);
-       pnetwork->ie_length = offset + remainder_ielen;
-}
-
 static u8 chk_sta_is_alive(struct sta_info *psta)
 {
        u8 ret = false;
index f8f07257976c8454553f5aa4f8ea897cb96886d5..7a4203bce4735ffded3933fd2df416acbd379da9 100644 (file)
@@ -19,8 +19,6 @@ void rtw_indicate_sta_disassoc_event(struct adapter *padapter,
                                     struct sta_info *psta);
 void init_mlme_ap_info(struct adapter *padapter);
 void free_mlme_ap_info(struct adapter *padapter);
-void rtw_remove_bcn_ie(struct adapter *padapter,
-                      struct wlan_bssid_ex *pnetwork, u8 index);
 void update_beacon(struct adapter *padapter, u8 ie_id,
                   u8 *oui, u8 tx);
 void add_RATid(struct adapter *padapter, struct sta_info *psta,