Commit 5e74e1b4 authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: r8188eu: remove dump_ies()

Function dump_ies() is not used, remove it. It is the only user of
the functions dump_{wps,p2p}_ie(), remove these as well.
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210922200420.9693-32-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cb599f66
......@@ -1041,65 +1041,6 @@ void rtw_macaddr_cfg(u8 *mac_addr)
DBG_88E("rtw_macaddr_cfg MAC Address = %pM\n", mac_addr);
}
void dump_ies(u8 *buf, u32 buf_len)
{
u8 *pos = (u8 *)buf;
u8 id, len;
while (pos - buf <= buf_len) {
id = *pos;
len = *(pos + 1);
DBG_88E("%s ID:%u, LEN:%u\n", __func__, id, len);
dump_p2p_ie(pos, len);
dump_wps_ie(pos, len);
pos += (2 + len);
}
}
void dump_wps_ie(u8 *ie, u32 ie_len)
{
u8 *pos = (u8 *)ie;
u16 id;
u16 len;
u8 *wps_ie;
uint wps_ielen;
wps_ie = rtw_get_wps_ie(ie, ie_len, NULL, &wps_ielen);
if (wps_ie != ie || wps_ielen == 0)
return;
pos += 6;
while (pos - ie < ie_len) {
id = RTW_GET_BE16(pos);
len = RTW_GET_BE16(pos + 2);
DBG_88E("%s ID:0x%04x, LEN:%u\n", __func__, id, len);
pos += (4 + len);
}
}
void dump_p2p_ie(u8 *ie, u32 ie_len)
{
u8 *pos = (u8 *)ie;
u8 id;
u16 len;
u8 *p2p_ie;
uint p2p_ielen;
p2p_ie = rtw_get_p2p_ie(ie, ie_len, NULL, &p2p_ielen);
if (p2p_ie != ie || p2p_ielen == 0)
return;
pos += 6;
while (pos - ie < ie_len) {
id = *pos;
len = get_unaligned_le16(pos + 1);
DBG_88E("%s ID:%u, LEN:%u\n", __func__, id, len);
pos += (3 + len);
}
}
/**
* rtw_get_p2p_ie - Search P2P IE from a series of IEs
* @in_ie: Address of IEs to search
......
......@@ -1146,10 +1146,6 @@ u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id,
for (ie = (void *)buf; (((u8 *)ie) - ((u8 *)buf) + 1) < buf_len; \
ie = (void *)(((u8 *)ie) + *(((u8 *)ie)+1) + 2))
void dump_ies(u8 *buf, u32 buf_len);
void dump_wps_ie(u8 *ie, u32 ie_len);
void dump_p2p_ie(u8 *ie, u32 ie_len);
u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen);
u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id,
u8 *buf_attr, u32 *len_attr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment