Skip to content

Commit

Permalink
rtl8192du: Remove dead code associated with CONFIG_WFD
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
  • Loading branch information
lwfinger committed Jul 11, 2014
1 parent 3ddc5ae commit 5ae0cc4
Show file tree
Hide file tree
Showing 19 changed files with 4 additions and 2,994 deletions.
82 changes: 0 additions & 82 deletions core/rtw_ieee80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1370,88 +1370,6 @@ void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex, u8 attr_id)

#endif /* CONFIG_P2P */

#ifdef CONFIG_WFD
int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
{
int match;
uint cnt = 0;
u8 eid, wfd_oui[4] = {0x50, 0x6F, 0x9A, 0x0A};

match = false;

if (in_len < 0)
return match;
while (cnt < in_len) {
eid = in_ie[cnt];

if ((eid == _VENDOR_SPECIFIC_IE_) &&
(_rtw_memcmp(&in_ie[cnt+2], wfd_oui, 4) == true)) {
if (wfd_ie != NULL) {
memcpy(wfd_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);

} else {
if (wfd_ielen != NULL)
*wfd_ielen = 0;
}

if (wfd_ielen != NULL)
*wfd_ielen = in_ie[cnt + 1] + 2;

cnt += in_ie[cnt + 1] + 2;

match = true;
break;
} else {
cnt += in_ie[cnt + 1] + 2; /* goto next */
}
}

if (match == true)
match = cnt;

return match;
}

/* attr_content: The output buffer, contains the "body field" of WFD attribute. */
/* attr_contentlen: The data length of the "body field" of WFD attribute. */
int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id, u8 *attr_content, uint *attr_contentlen)
{
int match;
uint cnt = 0;
u8 attr_id, wfd_oui[4] = {0x50, 0x6F, 0x9A, 0x0A};

match = false;

if ((wfd_ie[0] != _VENDOR_SPECIFIC_IE_) ||
(_rtw_memcmp(wfd_ie + 2, wfd_oui, 4) != true))
return match;

/* 1 (WFD IE) + 1 (Length) + 3 (OUI) + 1 (OUI Type) */
cnt = 6;
while (cnt < wfd_ielen) {
u16 attrlen = RTW_GET_BE16(wfd_ie + cnt + 1);

attr_id = wfd_ie[cnt];
if (attr_id == target_attr_id) {
/* 3 -> 1 byte for attribute ID field, 2 bytes for length field */
if (attr_content)
memcpy(attr_content, &wfd_ie[cnt + 3], attrlen);

if (attr_contentlen)
*attr_contentlen = attrlen;

cnt += attrlen + 3;

match = true;
break;
} else {
cnt += attrlen + 3; /* goto next */
}
}
return match;
}
#endif /* CONFIG_WFD */

/* Baron adds to avoid FreeBSD warning */
int ieee80211_is_empty_essid(const char *essid, int essid_len)
{
Expand Down
13 changes: 0 additions & 13 deletions core/rtw_mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,6 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
rtw_free_mlme_ie_data(&pmlmepriv->p2p_assoc_req_ie,
&pmlmepriv->p2p_assoc_req_ie_len);
#endif

#if defined(CONFIG_WFD)
rtw_free_mlme_ie_data(&pmlmepriv->wfd_beacon_ie,
&pmlmepriv->wfd_beacon_ie_len);
rtw_free_mlme_ie_data(&pmlmepriv->wfd_probe_req_ie,
&pmlmepriv->wfd_probe_req_ie_len);
rtw_free_mlme_ie_data(&pmlmepriv->wfd_probe_resp_ie,
&pmlmepriv->wfd_probe_resp_ie_len);
rtw_free_mlme_ie_data(&pmlmepriv->wfd_go_probe_resp_ie,
&pmlmepriv->wfd_go_probe_resp_ie_len);
rtw_free_mlme_ie_data(&pmlmepriv->wfd_assoc_req_ie,
&pmlmepriv->wfd_assoc_req_ie_len);
#endif
}

void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
Expand Down
Loading

0 comments on commit 5ae0cc4

Please sign in to comment.