mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-09 14:53:05 +00:00
rtl8188eu: Remove CONFIG_WFD - not selected
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
d538ad412a
commit
39f4cd8546
12 changed files with 20 additions and 2390 deletions
|
@ -1558,116 +1558,6 @@ void rtw_WLAN_BSSID_EX_remove_p2p_attr(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 )
|
||||
{
|
||||
_rtw_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)
|
||||
_rtw_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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue