mirror of https://gitee.com/openkylin/linux.git
staging: rtl8188eu: remove unused rtw_add_bcn_ie()
The function rtw_add_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>
This commit is contained in:
parent
ee34b7cb0f
commit
96b0b75941
|
@ -145,72 +145,6 @@ static void update_BCNTIM(struct adapter *padapter)
|
|||
set_tx_beacon_cmd(padapter);
|
||||
}
|
||||
|
||||
void rtw_add_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork,
|
||||
u8 index, u8 *data, u8 len)
|
||||
{
|
||||
struct ndis_802_11_var_ie *pIE;
|
||||
u8 bmatch = false;
|
||||
u8 *pie = pnetwork->ies;
|
||||
u8 *p = NULL, *dst_ie = NULL, *premainder_ie = NULL;
|
||||
u8 *pbackup_remainder_ie = NULL;
|
||||
u32 i, offset, ielen = 0, ie_offset, remainder_ielen = 0;
|
||||
|
||||
for (i = sizeof(struct ndis_802_11_fixed_ie); i < pnetwork->ie_length;) {
|
||||
pIE = (struct ndis_802_11_var_ie *)(pnetwork->ies + i);
|
||||
|
||||
if (pIE->ElementID > index) {
|
||||
break;
|
||||
/* already exist the same IE */
|
||||
} else if (pIE->ElementID == index) {
|
||||
p = (u8 *)pIE;
|
||||
ielen = pIE->Length;
|
||||
bmatch = true;
|
||||
break;
|
||||
}
|
||||
p = (u8 *)pIE;
|
||||
ielen = pIE->Length;
|
||||
i += (pIE->Length + 2);
|
||||
}
|
||||
|
||||
if (p && ielen > 0) {
|
||||
ielen += 2;
|
||||
|
||||
premainder_ie = p + ielen;
|
||||
|
||||
ie_offset = (int)(p - pie);
|
||||
|
||||
remainder_ielen = pnetwork->ie_length - ie_offset - ielen;
|
||||
|
||||
if (bmatch)
|
||||
dst_ie = p;
|
||||
else
|
||||
dst_ie = p + ielen;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
*dst_ie++ = index;
|
||||
*dst_ie++ = len;
|
||||
|
||||
memcpy(dst_ie, data, len);
|
||||
dst_ie += len;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
void rtw_remove_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork,
|
||||
u8 index)
|
||||
{
|
||||
|
|
|
@ -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_add_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork,
|
||||
u8 index, u8 *data, u8 len);
|
||||
void rtw_remove_bcn_ie(struct adapter *padapter,
|
||||
struct wlan_bssid_ex *pnetwork, u8 index);
|
||||
void update_beacon(struct adapter *padapter, u8 ie_id,
|
||||
|
|
Loading…
Reference in New Issue