rtl8188eu: Remove some configuration variables defined when CONFIG_P2P is defined

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-03-01 22:48:40 -06:00
parent 7b6e9a069d
commit 27f745af7b
25 changed files with 227 additions and 236 deletions

View file

@ -682,11 +682,11 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, NDIS_802_11_SSID *ssid, int ssi
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
}
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
p2p_ps_wk_cmd(padapter, P2P_PS_SCAN, 1);
}
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL)
@ -2783,11 +2783,11 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)
case ANT_SELECT_WK_CID:
antenna_select_wk_hdl(padapter, pdrvextra_cmd->type_size);
break;
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
case P2P_PS_WK_CID:
p2p_ps_wk_hdl(padapter, pdrvextra_cmd->type_size);
break;
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
case P2P_PROTO_WK_CID:
/* Commented by Albert 2011/07/01 */
/* I used the type_size as the type command */

View file

@ -1358,7 +1358,7 @@ void dump_ies(u8 *buf, u32 buf_len)
dump_wps_ie(pos, len);
#ifdef CONFIG_P2P
dump_p2p_ie(pos, len);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
dump_wfd_ie(pos, len);
#endif
#endif
@ -1724,7 +1724,7 @@ void rtw_WLAN_BSSID_EX_remove_p2p_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id)
#endif /* CONFIG_P2P */
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
void dump_wfd_ie(u8 *ie, u32 ie_len)
{
u8* pos = (u8*)ie;
@ -1879,7 +1879,7 @@ int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *
return match;
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
/* Baron adds to avoid FreeBSD warning */
int ieee80211_is_empty_essid(const char *essid, int essid_len)

View file

@ -143,7 +143,7 @@ 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)
#if defined(CONFIG_P2P)
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);
@ -897,7 +897,7 @@ void rtw_add_network(struct adapter *adapter, WLAN_BSSID_EX *pnetwork)
/* _enter_critical_bh(&queue->lock, &irqL); */
#if defined(CONFIG_P2P) && defined(CONFIG_P2P_REMOVE_GROUP_INFO)
#if defined(CONFIG_P2P) && defined(CONFIG_P2P)
rtw_WLAN_BSSID_EX_remove_p2p_attr(pnetwork, P2P_ATTR_GROUP_INFO);
#endif
@ -1188,11 +1188,11 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
_exit_critical_bh(&pmlmepriv->lock, &irqL);
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
p2p_ps_wk_cmd(adapter, P2P_PS_SCAN_DONE, 0);
}
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
rtw_os_xmit_schedule(adapter);
@ -1462,9 +1462,9 @@ void rtw_indicate_disconnect( struct adapter *padapter )
}
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
p2p_ps_wk_cmd(padapter, P2P_PS_DISABLE, 1);
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_DISCONNECT, 1);
}

View file

@ -1016,9 +1016,9 @@ unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame)
process_csa_ie(padapter, pframe, len); /* channel switch announcement */
#endif /* CONFIG_DFS */
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
process_p2p_ps_ie(padapter, (pframe + WLAN_HDR_A3_LEN), (len - WLAN_HDR_A3_LEN));
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
}
}
@ -1396,10 +1396,10 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
u8 p2p_status_code = P2P_STATUS_SUCCESS;
u8 *p2pie;
u32 p2pielen = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u8 wfd_ie[ 128 ] = { 0x00 };
u32 wfd_ielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_P2P */
if((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
@ -1805,7 +1805,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
goto OnAssocReqFail;
}
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if(rtw_get_wfd_ie(pframe + WLAN_HDR_A3_LEN + ie_offset , pkt_len - WLAN_HDR_A3_LEN - ie_offset , wfd_ie, &wfd_ielen ))
{
u8 attr_content[ 10 ] = { 0x00 };
@ -1995,7 +1995,7 @@ unsigned int OnAssocRsp(struct adapter *padapter, union recv_frame *precv_frame)
{
WMM_param_handler(padapter, pIE);
}
#if defined(CONFIG_P2P) && defined(CONFIG_WFD)
#if defined(CONFIG_P2P) && defined(CONFIG_P2P)
else if ( _rtw_memcmp(pIE->data, WFD_OUI, 4)) /* WFD */
{
DBG_871X( "[%s] Found WFD IE\n", __FUNCTION__ );
@ -2504,9 +2504,9 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
u8 wpsielen = 0, p2pielen = 0, i;
u8 channel_cnt_24g = 0, channel_cnt_5gl = 0, channel_cnt_5gh = 0;
u16 len_channellist_attr = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib;
@ -2863,11 +2863,11 @@ void issue_p2p_GO_request(struct adapter *padapter, u8* raddr)
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pattrib->pktlen );
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
wfdielen = build_nego_req_wfd_ie(pwdinfo, pframe);
pframe += wfdielen;
pattrib->pktlen += wfdielen;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -2903,9 +2903,9 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8* raddr, u8* frame
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct wifidirect_info *pwdinfo = &( padapter->wdinfo);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
{
@ -3283,11 +3283,11 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8* raddr, u8* frame
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pattrib->pktlen );
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
wfdielen = build_nego_resp_wfd_ie(pwdinfo, pframe);
pframe += wfdielen;
pattrib->pktlen += wfdielen;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -3316,9 +3316,9 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8* raddr, u8 result)
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct wifidirect_info *pwdinfo = &( padapter->wdinfo);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
{
@ -3550,11 +3550,11 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8* raddr, u8 result)
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pattrib->pktlen );
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
wfdielen = build_nego_confirm_wfd_ie(pwdinfo, pframe);
pframe += wfdielen;
pattrib->pktlen += wfdielen;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -3576,9 +3576,9 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8* raddr )
u8 dialogToken = 3;
u8 channel_cnt_24g = 0, channel_cnt_5gl = 0, channel_cnt_5gh = 0;
u16 len_channellist_attr = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib;
unsigned char *pframe;
@ -3820,11 +3820,11 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8* raddr )
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pattrib->pktlen );
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
wfdielen = build_invitation_req_wfd_ie(pwdinfo, pframe);
pframe += wfdielen;
pattrib->pktlen += wfdielen;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -3845,9 +3845,9 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8* raddr, u8 dialo
u8 p2pielen = 0, i;
u8 channel_cnt_24g = 0, channel_cnt_5gl = 0, channel_cnt_5gh = 0;
u16 len_channellist_attr = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib;
@ -4032,11 +4032,11 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8* raddr, u8 dialo
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pattrib->pktlen );
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
wfdielen = build_invitation_resp_wfd_ie(pwdinfo, pframe);
pframe += wfdielen;
pattrib->pktlen += wfdielen;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -4056,9 +4056,9 @@ void issue_p2p_provision_request(struct adapter *padapter, u8* pssid, u8 ussidle
u8 wpsie[ 100 ] = { 0x00 };
u8 wpsielen = 0;
u32 p2pielen = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib;
@ -4144,11 +4144,11 @@ void issue_p2p_provision_request(struct adapter *padapter, u8* pssid, u8 ussidle
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen );
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
wfdielen = build_provdisc_req_wfd_ie(pwdinfo, pframe);
pframe += wfdielen;
pattrib->pktlen += wfdielen;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -4199,9 +4199,9 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
u8 wpsie[255] = { 0x00 };
u32 wpsielen = 0, p2pielen = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#ifdef CONFIG_INTEL_WIDI
u8 zero_array_check[L2SDTA_SERVICE_VE_LEN] = { 0x00 };
#endif /* CONFIG_INTEL_WIDI */
@ -4494,7 +4494,7 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
pattrib->pktlen += p2pielen;
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if ( true == pwdinfo->wfd_info->wfd_enable ) {
wfdielen = build_probe_resp_wfd_ie(pwdinfo, pframe, 0);
pframe += wfdielen;
@ -4507,7 +4507,7 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
pattrib->pktlen += pmlmepriv->wfd_probe_resp_ie_len;
pframe += pmlmepriv->wfd_probe_resp_ie_len;
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -4536,9 +4536,9 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
u8 wpsie[255] = { 0x00 }, p2pie[ 255 ] = { 0x00 };
u16 wpsielen = 0, p2pielen = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
@ -4833,7 +4833,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
}
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if ( true == pwdinfo->wfd_info->wfd_enable )
{
wfdielen = build_probe_req_wfd_ie(pwdinfo, pframe);
@ -4847,7 +4847,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
pattrib->pktlen += pmlmepriv->wfd_probe_req_ie_len;
pframe += pmlmepriv->wfd_probe_req_ie_len;
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -5046,11 +5046,11 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
if ( rtw_p2p_role(pwdinfo) == P2P_ROLE_CLIENT )
{
pwdinfo->p2p_info.operation_ch[ 0 ] = pwdinfo->peer_operating_ch;
#ifdef P2P_OP_CHECK_SOCIAL_CH
#ifdef CONFIG_P2P
pwdinfo->p2p_info.operation_ch[ 1 ] = 1; /* Check whether GO is operating in channel 1; */
pwdinfo->p2p_info.operation_ch[ 2 ] = 6; /* Check whether GO is operating in channel 6; */
pwdinfo->p2p_info.operation_ch[ 3 ] = 11; /* Check whether GO is operating in channel 11; */
#endif /* P2P_OP_CHECK_SOCIAL_CH */
#endif /* CONFIG_P2P */
pwdinfo->p2p_info.scan_op_ch_only = 1;
_set_timer( &pwdinfo->reset_ch_sitesurvey2, P2P_RESET_SCAN_CH );
}
@ -5080,11 +5080,11 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
if ( rtw_p2p_role(pwdinfo) == P2P_ROLE_CLIENT )
{
pwdinfo->p2p_info.operation_ch[ 0 ] = pwdinfo->peer_operating_ch;
#ifdef P2P_OP_CHECK_SOCIAL_CH
#ifdef CONFIG_P2P
pwdinfo->p2p_info.operation_ch[ 1 ] = 1; /* Check whether GO is operating in channel 1; */
pwdinfo->p2p_info.operation_ch[ 2 ] = 6; /* Check whether GO is operating in channel 6; */
pwdinfo->p2p_info.operation_ch[ 3 ] = 11; /* Check whether GO is operating in channel 11; */
#endif /* P2P_OP_CHECK_SOCIAL_CH */
#endif /* CONFIG_P2P */
pwdinfo->p2p_info.scan_op_ch_only = 1;
_set_timer( &pwdinfo->reset_ch_sitesurvey2, P2P_RESET_SCAN_CH );
}
@ -5166,11 +5166,11 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
{
/* The operating channel is acceptable for this device. */
pwdinfo->rx_invitereq_info.operation_ch[0]= operatingch_info[4];
#ifdef P2P_OP_CHECK_SOCIAL_CH
#ifdef CONFIG_P2P
pwdinfo->rx_invitereq_info.operation_ch[1]= 1; /* Check whether GO is operating in channel 1; */
pwdinfo->rx_invitereq_info.operation_ch[2]= 6; /* Check whether GO is operating in channel 6; */
pwdinfo->rx_invitereq_info.operation_ch[3]= 11; /* Check whether GO is operating in channel 11; */
#endif /* P2P_OP_CHECK_SOCIAL_CH */
#endif /* CONFIG_P2P */
pwdinfo->rx_invitereq_info.scan_op_ch_only = 1;
_set_timer( &pwdinfo->reset_ch_sitesurvey, P2P_RESET_SCAN_CH );
rtw_p2p_set_state(pwdinfo, P2P_STATE_RECV_INVITE_REQ_MATCH );
@ -5999,7 +5999,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
pframe += len;
pattrib->pktlen += len;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if(pwdinfo->wfd_info->wfd_enable) {
len = build_beacon_wfd_ie( pwdinfo, pframe );
} else {
@ -6012,7 +6012,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
}
pframe += len;
pattrib->pktlen += len;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
}
#endif /* CONFIG_P2P */
@ -6117,9 +6117,9 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
unsigned int rate_len;
#ifdef CONFIG_P2P
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_P2P */
/* DBG_871X("%s\n", __FUNCTION__); */
@ -6314,7 +6314,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
pframe += len;
pattrib->pktlen += len;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if(true == pwdinfo->wfd_info->wfd_enable)
{
len = build_probe_resp_wfd_ie(pwdinfo, pframe, 0);
@ -6330,7 +6330,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
}
pframe += len;
pattrib->pktlen += len;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
}
#endif /* CONFIG_P2P */
@ -6641,9 +6641,9 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
__le16 lestatus, leval;
#ifdef CONFIG_P2P
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_P2P */
@ -6765,7 +6765,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
pattrib->pktlen += len;
}
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)
&& (true == pwdinfo->wfd_info->wfd_enable)
)
@ -6774,7 +6774,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
pframe += wfdielen;
pattrib->pktlen += wfdielen;
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -6806,9 +6806,9 @@ void issue_assocreq(struct adapter *padapter)
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
u8 p2pie[ 255 ] = { 0x00 };
u16 p2pielen = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_P2P */
#ifdef CONFIG_DFS
@ -7183,17 +7183,17 @@ void issue_assocreq(struct adapter *padapter)
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pattrib->pktlen );
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
/* wfdielen = build_assoc_req_wfd_ie(pwdinfo, pframe); */
/* pframe += wfdielen; */
/* pattrib->pktlen += wfdielen; */
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
}
}
#endif /* CONFIG_P2P */
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if ( true == pwdinfo->wfd_info->wfd_enable )
{
wfdielen = build_assoc_req_wfd_ie(pwdinfo, pframe);
@ -7207,7 +7207,7 @@ void issue_assocreq(struct adapter *padapter)
pattrib->pktlen += pmlmepriv->wfd_assoc_req_ie_len;
pframe += pmlmepriv->wfd_assoc_req_ie_len;
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
dump_mgntframe(padapter, pmgntframe);

View file

@ -289,9 +289,9 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8* raddr,
u8 oui_subtype = P2P_PROVISION_DISC_RESP;
u8 wpsie[ 100 ] = { 0x00 };
u8 wpsielen = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib;
@ -361,11 +361,11 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8* raddr,
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen );
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
wfdielen = build_provdisc_resp_wfd_ie(pwdinfo, pframe);
pframe += wfdielen;
pattrib->pktlen += wfdielen;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -502,7 +502,7 @@ u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
return len;
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
{
u8 wfdie[ MAX_WFD_IE_LEN] = { 0x00 };
@ -1831,7 +1831,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
{
@ -2666,13 +2666,13 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
u8 *wpsie;
u16 wps_devicepassword_id = 0x0000;
uint wps_devicepassword_id_len = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u8 wfd_ie[ 128 ] = { 0x00 };
u32 wfd_ielen = 0;
#ifdef CONFIG_TDLS
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
#endif /* CONFIG_TDLS */
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
__be16 be_tmp;
if ( (wpsie=rtw_get_wps_ie( pframe + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &wps_ielen)) )
@ -2746,10 +2746,10 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
{
cap_attr = le16_to_cpu(le_tmp);
#if defined(CONFIG_WFD) && defined(CONFIG_TDLS)
#if defined(CONFIG_P2P) && defined(CONFIG_TDLS)
if(!(cap_attr & P2P_GRPCAP_INTRABSS) )
ptdlsinfo->ap_prohibited = true;
#endif /* defined(CONFIG_WFD) && defined(CONFIG_TDLS) */
#endif /* defined(CONFIG_P2P) && defined(CONFIG_TDLS) */
}
if ( rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GO_INTENT , &attr_content, &attr_contentlen) )
@ -2856,7 +2856,7 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
p2p_ie = rtw_get_p2p_ie(p2p_ie+p2p_ielen, ies_len -(p2p_ie -ies + p2p_ielen), NULL, &p2p_ielen);
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
/* Added by Albert 20110823 */
/* Try to get the TCP port information when receiving the negotiation request. */
if ( rtw_get_wfd_ie( pframe + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, wfd_ie, &wfd_ielen ) )
@ -2872,7 +2872,7 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
DBG_871X( "[%s] Peer PORT NUM = %d\n", __FUNCTION__, pwdinfo->wfd_info->peer_rtsp_ctrlport );
}
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
return( result );
}
@ -2885,13 +2885,13 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
u8 * ies;
u32 ies_len;
u8 * p2p_ie;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u8 wfd_ie[ 128 ] = { 0x00 };
u32 wfd_ielen = 0;
#ifdef CONFIG_TDLS
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
#endif /* CONFIG_TDLS */
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
ies = pframe + _PUBLIC_ACTION_IE_OFFSET_;
ies_len = len - _PUBLIC_ACTION_IE_OFFSET_;
@ -3108,7 +3108,7 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
/* Added by Albert 20111122 */
/* Try to get the TCP port information when receiving the negotiation response. */
if ( rtw_get_wfd_ie( pframe + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, wfd_ie, &wfd_ielen ) )
@ -3124,7 +3124,7 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
DBG_8192C( "[%s] Peer PORT NUM = %d\n", __FUNCTION__, pwdinfo->wfd_info->peer_rtsp_ctrlport );
}
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
return( result );
@ -3451,7 +3451,7 @@ static void rtw_cfg80211_adjust_p2pie_channel(struct adapter *padapter, const u8
{
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
void rtw_append_wfd_ie(struct adapter *padapter, u8 *buf, u32* len)
{
unsigned char *frame_body;
@ -3964,7 +3964,7 @@ void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType)
}
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength)
{
u8 * ies;
@ -4172,7 +4172,7 @@ exit:
return res;
}
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
static void reset_ch_sitesurvey_timer_process (void *FunctionContext)
{
@ -4185,11 +4185,11 @@ static void reset_ch_sitesurvey_timer_process (void *FunctionContext)
DBG_871X( "[%s] In\n", __FUNCTION__ );
/* Reset the operation channel information */
pwdinfo->rx_invitereq_info.operation_ch[0] = 0;
#ifdef P2P_OP_CHECK_SOCIAL_CH
#ifdef CONFIG_P2P
pwdinfo->rx_invitereq_info.operation_ch[1] = 0;
pwdinfo->rx_invitereq_info.operation_ch[2] = 0;
pwdinfo->rx_invitereq_info.operation_ch[3] = 0;
#endif /* P2P_OP_CHECK_SOCIAL_CH */
#endif /* CONFIG_P2P */
pwdinfo->rx_invitereq_info.scan_op_ch_only = 0;
}
@ -4204,11 +4204,11 @@ static void reset_ch_sitesurvey_timer_process2 (void *FunctionContext)
DBG_871X( "[%s] In\n", __FUNCTION__ );
/* Reset the operation channel information */
pwdinfo->p2p_info.operation_ch[0] = 0;
#ifdef P2P_OP_CHECK_SOCIAL_CH
#ifdef CONFIG_P2P
pwdinfo->p2p_info.operation_ch[1] = 0;
pwdinfo->p2p_info.operation_ch[2] = 0;
pwdinfo->p2p_info.operation_ch[3] = 0;
#endif /* P2P_OP_CHECK_SOCIAL_CH */
#endif /* CONFIG_P2P */
pwdinfo->p2p_info.scan_op_ch_only = 0;
}
@ -4292,7 +4292,7 @@ void reset_global_wifidirect_info( struct adapter* padapter )
pwdinfo->wfd_tdls_weaksec = 0;
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
int rtw_init_wifi_display_info(struct adapter* padapter)
{
int res = _SUCCESS;
@ -4315,7 +4315,7 @@ int rtw_init_wifi_display_info(struct adapter* padapter)
return res;
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
void rtw_init_wifidirect_timers(struct adapter* padapter)
{
@ -4346,7 +4346,7 @@ void rtw_init_wifidirect_addrs(struct adapter* padapter, u8 *dev_addr, u8 *iface
void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
{
struct wifidirect_info *pwdinfo;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct wifi_display_info *pwfd_info = &padapter->wfd_info;
#endif
@ -4421,12 +4421,12 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
pwdinfo->nego_ssidlen = 0;
pwdinfo->ui_got_wps_info = P2P_NO_WPSINFO;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
pwdinfo->supported_wps_cm = WPS_CONFIG_METHOD_DISPLAY | WPS_CONFIG_METHOD_PBC;
pwdinfo->wfd_info = pwfd_info;
#else
pwdinfo->supported_wps_cm = WPS_CONFIG_METHOD_DISPLAY | WPS_CONFIG_METHOD_PBC | WPS_CONFIG_METHOD_KEYPAD;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pwdinfo->channel_list_attr_len = 0;
memset( pwdinfo->channel_list_attr, 0x00, 100 );
@ -4443,19 +4443,19 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
pwdinfo->rx_invitereq_info.operation_ch[0] = 0;
pwdinfo->rx_invitereq_info.operation_ch[1] = 0; /* Used to indicate the scan end in site survey function */
#ifdef P2P_OP_CHECK_SOCIAL_CH
#ifdef CONFIG_P2P
pwdinfo->rx_invitereq_info.operation_ch[2] = 0;
pwdinfo->rx_invitereq_info.operation_ch[3] = 0;
pwdinfo->rx_invitereq_info.operation_ch[4] = 0;
#endif /* P2P_OP_CHECK_SOCIAL_CH */
#endif /* CONFIG_P2P */
pwdinfo->rx_invitereq_info.scan_op_ch_only = 0;
pwdinfo->p2p_info.operation_ch[0] = 0;
pwdinfo->p2p_info.operation_ch[1] = 0; /* Used to indicate the scan end in site survey function */
#ifdef P2P_OP_CHECK_SOCIAL_CH
#ifdef CONFIG_P2P
pwdinfo->p2p_info.operation_ch[2] = 0;
pwdinfo->p2p_info.operation_ch[3] = 0;
pwdinfo->p2p_info.operation_ch[4] = 0;
#endif /* P2P_OP_CHECK_SOCIAL_CH */
#endif /* CONFIG_P2P */
pwdinfo->p2p_info.scan_op_ch_only = 0;
}
@ -4612,7 +4612,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
init_wifidirect_info(padapter, role);
rtw_hal_set_odm_var(padapter,HAL_ODM_P2P_STATE,NULL,true);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
rtw_hal_set_odm_var(padapter,HAL_ODM_WIFI_DISPLAY_STATE,NULL,true);
#endif
@ -4649,7 +4649,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
}
rtw_hal_set_odm_var(padapter,HAL_ODM_P2P_STATE,NULL,false);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
rtw_hal_set_odm_var(padapter,HAL_ODM_WIFI_DISPLAY_STATE,NULL,false);
#endif

View file

@ -509,9 +509,9 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
/* if(pwrpriv->pwr_mode == PS_MODE_ACTIVE) */
if(ps_mode == PS_MODE_ACTIVE)
{
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
if(pwdinfo->opp_ps == 0)
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
{
DBG_871X("rtw_set_ps_mode: Leave 802.11 power save\n");
@ -601,11 +601,11 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
pwrpriv->bcn_ant_mode = bcn_ant_mode;
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
/* Set CTWindow after LPS */
if(pwdinfo->opp_ps == 1)
p2p_ps_wk_cmd(padapter, P2P_PS_ENABLE, 0);
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
rtw_set_rpwm(padapter, PS_STATE_S2);
}
@ -719,9 +719,9 @@ void LeaveAllPowerSaveMode(IN struct adapter *Adapter)
/* DBG_871X("%s.....\n",__FUNCTION__); */
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
{ /* connect */
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
p2p_ps_wk_cmd(Adapter, P2P_PS_DISABLE, enqueue);
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
rtw_lps_ctrl_wk_cmd(Adapter, LPS_CTRL_LEAVE, enqueue);
} else {

View file

@ -903,9 +903,9 @@ sint OnTDLS(struct adapter *adapter, union recv_frame *precv_frame)
sint ret = _SUCCESS;
u8 *paction = get_recvframe_data(precv_frame);
u8 category_field = 1;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u8 WFA_OUI[3] = { 0x50, 0x6f, 0x9a };
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
struct tdls_info *ptdlsinfo = &(adapter->tdlsinfo);
/* point to action field */
@ -957,7 +957,7 @@ sint OnTDLS(struct adapter *adapter, union recv_frame *precv_frame)
DBG_871X("recv tdls channel switch response frame\n");
ret=On_TDLS_Ch_Switch_Rsp(adapter, precv_frame);
break;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
case 0x50: /* First byte of WFA OUI */
if( _rtw_memcmp(WFA_OUI, (paction), 3) )
{
@ -976,7 +976,7 @@ sint OnTDLS(struct adapter *adapter, union recv_frame *precv_frame)
}
}
break;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
default:
DBG_871X("receive TDLS frame but not supported\n");
ret=_FAIL;

View file

@ -46,9 +46,9 @@ void rtw_reset_tdls_info(_adapter* padapter)
ptdlsinfo->watchdog_count = 0;
ptdlsinfo->dev_discovered = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
ptdlsinfo->wfd_info = &padapter->wfd_info;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
}
int rtw_init_tdls_info(_adapter* padapter)
@ -410,7 +410,7 @@ u8 *rtw_tdls_set_sup_ch(struct mlme_ext_priv *pmlmeext, u8 *pframe, struct pkt_a
return(rtw_set_ie(pframe, _SUPPORTED_CH_IE_, idx_5g, sup_ch, &(pattrib->pktlen)));
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
void rtw_tdls_process_wfd_ie(struct tdls_info *ptdlsinfo, u8 *ptr, u8 length)
{
u8 wfd_ie[ 128 ] = { 0x00 };
@ -535,7 +535,7 @@ exit:
return;
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
void issue_tdls_setup_req(_adapter *padapter, u8 *mac_addr)
{
@ -1251,7 +1251,7 @@ sint On_TDLS_Setup_Req(_adapter *adapter, union recv_frame *precv_frame)
ptdls_sta->stat_code = 38;
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
/* WFD test plan version 0.18.2 test item 5.1.5 */
/* SoUT does not use TDLS if AP uses weak security */
if ( adapter->wdinfo.wfd_tdls_enable )
@ -1261,7 +1261,7 @@ sint On_TDLS_Setup_Req(_adapter *adapter, union recv_frame *precv_frame)
ptdls_sta->stat_code = 5;
}
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
}
ptdls_sta->tdls_sta_state|= TDLS_INITIATOR_STATE;
@ -1278,9 +1278,9 @@ sint On_TDLS_Setup_Req(_adapter *adapter, union recv_frame *precv_frame)
ptdlsinfo->sta_maximum = true;
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
rtw_tdls_process_wfd_ie(ptdlsinfo, ptr + FIXED_IE, parsing_length - FIXED_IE);
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
}
else
@ -1416,9 +1416,9 @@ sint On_TDLS_Setup_Rsp(_adapter *adapter, union recv_frame *precv_frame)
ptdls_sta->bssratelen = supportRateNum;
memcpy(ptdls_sta->bssrateset, supportRate, supportRateNum);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
rtw_tdls_process_wfd_ie(ptdlsinfo, ptr + FIXED_IE, parsing_length - FIXED_IE);
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
if(stat_code != 0)
{
@ -1923,7 +1923,7 @@ sint On_TDLS_Ch_Switch_Rsp(_adapter *adapter, union recv_frame *precv_frame)
return _FAIL;
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
void wfd_ie_tdls(_adapter * padapter, u8 *pframe, u32 *pktlen )
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@ -2011,7 +2011,7 @@ void wfd_ie_tdls(_adapter * padapter, u8 *pframe, u32 *pktlen )
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, pktlen);
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
void rtw_build_tdls_setup_req_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe)
{
@ -2126,9 +2126,9 @@ void rtw_build_tdls_setup_req_ies(_adapter * padapter, struct xmit_frame * pxmit
memcpy((link_id_addr+12), pattrib->dst, 6);
pframe = rtw_set_ie(pframe, _LINK_ID_IE_, 18, link_id_addr, &(pattrib->pktlen));
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
wfd_ie_tdls( padapter, pframe, &(pattrib->pktlen) );
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
}
@ -2275,9 +2275,9 @@ void rtw_build_tdls_setup_rsp_ies(_adapter * padapter, struct xmit_frame * pxmit
if(pattrib->encrypt)
wpa_tdls_ftie_mic(ptdls_sta->tpk.kck, 2, plinkid_ie, prsnie, ptimeout_ie, pftie, pftie_mic);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
wfd_ie_tdls( padapter, pframe, &(pattrib->pktlen) );
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
}
@ -2617,7 +2617,7 @@ void rtw_build_tdls_ch_switch_rsp_ies(_adapter * padapter, struct xmit_frame * p
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
void rtw_build_tunneled_probe_req_ies(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe)
{
@ -2685,7 +2685,7 @@ void rtw_build_tunneled_probe_rsp_ies(_adapter * padapter, struct xmit_frame * p
}
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
void _TPK_timer_hdl(void *FunctionContext)
{

View file

@ -703,7 +703,7 @@ void flush_all_cam_entry(struct adapter *padapter)
memset((u8 *)(pmlmeinfo->FW_sta_info), 0, sizeof(pmlmeinfo->FW_sta_info));
}
#if defined(CONFIG_P2P) && defined(CONFIG_WFD)
#if defined(CONFIG_P2P) && defined(CONFIG_P2P)
int WFD_info_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
{
struct registry_priv *pregpriv = &padapter->registrypriv;

View file

@ -1368,14 +1368,14 @@ int rtw_build_tdls_ies(struct adapter * padapter, struct xmit_frame * pxmitframe
case TDLS_CHANNEL_SWITCH_RESPONSE:
rtw_build_tdls_ch_switch_rsp_ies(padapter, pxmitframe, pframe);
break;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
case TUNNELED_PROBE_REQ:
rtw_build_tunneled_probe_req_ies(padapter, pxmitframe, pframe);
break;
case TUNNELED_PROBE_RSP:
rtw_build_tunneled_probe_rsp_ies(padapter, pxmitframe, pframe);
break;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
default:
res=_FAIL;
break;

View file

@ -1086,7 +1086,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus)
;
}
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
void rtl8188e_set_p2p_ps_offload_cmd(struct adapter* padapter, u8 p2p_ps_state)
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
@ -1176,7 +1176,7 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter* padapter, u8 p2p_ps_state)
;
}
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
#ifdef CONFIG_TSF_RESET_OFFLOAD
/*

View file

@ -311,12 +311,12 @@ rtl8188e_HalDmWatchDog(
bFwCurrentInPSMode = adapter_to_pwrctl(Adapter)->bFwCurrentInPSMode;
rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake));
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
/* Fw is under p2p powersaving mode, driver should stop dynamic mechanism. */
/* modifed by thomas. 2011.06.11. */
if(Adapter->wdinfo.p2p_ps_mode)
bFwPSAwake = false;
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
if( (hw_init_completed == true)
&& ((!bFwCurrentInPSMode) && bFwPSAwake))

View file

@ -2972,14 +2972,14 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val)
rtl8188e_set_FwJoinBssReport_cmd(Adapter, mstatus);
}
break;
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
case HW_VAR_H2C_FW_P2P_PS_OFFLOAD:
{
u8 p2p_ps_state = (*(u8 *)val);
rtl8188e_set_p2p_ps_offload_cmd(Adapter, p2p_ps_state);
}
break;
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
#ifdef CONFIG_TDLS
case HW_VAR_TDLS_WRCR:
rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)&(~RCR_CBSSID_DATA ));

View file

@ -33,15 +33,6 @@
#define CONFIG_AP_MODE
#define CONFIG_P2P
#ifdef CONFIG_P2P
//The CONFIG_WFD is for supporting the Wi-Fi display
#define CONFIG_WFD
#define CONFIG_P2P_REMOVE_GROUP_INFO
#define CONFIG_P2P_PS
#define P2P_OP_CHECK_SOCIAL_CH
#endif
#define CONFIG_SKB_COPY //for amsdu

View file

@ -388,9 +388,9 @@ struct adapter {
#endif
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct wifi_display_info wfd_info;
#endif //CONFIG_WFD
#endif //CONFIG_P2P
void * HalData;
u32 hal_data_sz;

View file

@ -1302,12 +1302,12 @@ u32 rtw_set_p2p_attr_content(u8 *pbuf, u8 attr_id, u16 attr_len, u8 *pdata_attr)
void rtw_WLAN_BSSID_EX_remove_p2p_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id);
#endif
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
void dump_wfd_ie(u8 *ie, u32 ie_len);
int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen);
int rtw_get_wfd_ie_from_scan_queue(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen, u8 frame_type);
int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *attr_content, uint *attr_contentlen);
#endif // CONFIG_WFD
#endif // CONFIG_P2P
uint rtw_get_rateset_len(u8 *rateset);

View file

@ -195,7 +195,7 @@ struct tx_invite_resp_info{
u8 token; // Used to record the dialog token of p2p invitation request frame.
};
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct wifi_display_info{
u16 wfd_enable; // Eanble/Disable the WFD function.
@ -217,7 +217,7 @@ struct wifi_display_info{
// 1 -> WFD Primary Sink Device
enum SCAN_RESULT_TYPE scan_result_type; // Used when P2P is enable. This parameter will impact the scan result.
};
#endif //CONFIG_WFD
#endif //CONFIG_P2P
struct tx_provdisc_req_info{
u16 wps_config_method_request; // Used when sending the provisioning request frame
@ -247,11 +247,11 @@ struct group_id_info{
struct scan_limit_info{
u8 scan_op_ch_only; // When this flag is set, the driver should just scan the operation channel
#ifndef P2P_OP_CHECK_SOCIAL_CH
#ifndef CONFIG_P2P
u8 operation_ch[2]; // Store the operation channel of invitation request frame
#else
u8 operation_ch[5]; // Store additional channel 1,6,11 for Android 4.2 IOT & Nexus 4
#endif //P2P_OP_CHECK_SOCIAL_CH
#endif //CONFIG_P2P
};
struct cfg80211_wifidirect_info{
@ -281,7 +281,7 @@ struct wifidirect_info{
struct group_id_info groupid_info; // Store the group id information when doing the group negotiation handshake.
struct scan_limit_info rx_invitereq_info; // Used for get the limit scan channel from the Invitation procedure
struct scan_limit_info p2p_info; // Used for get the limit scan channel from the P2P negotiation handshake
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct wifi_display_info *wfd_info;
#endif
enum P2P_ROLE role;
@ -339,7 +339,7 @@ struct wifidirect_info{
// We will use the channel_cnt and channel_list fields when constructing the group negotitation confirm frame.
u8 driver_interface; // Indicate DRIVER_WEXT or DRIVER_CFG80211
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
enum P2P_PS_MODE p2p_ps_mode; // indicate p2p ps mode
enum P2P_PS_STATE p2p_ps_state; // indicate p2p ps state
u8 noa_index; // Identifies and instance of Notice of Absence timing.
@ -350,7 +350,7 @@ struct wifidirect_info{
u32 noa_duration[P2P_MAX_NOA_NUM]; // Max duration for owner, preferred or min acceptable duration for client.
u32 noa_interval[P2P_MAX_NOA_NUM]; // Length of interval for owner, preferred or max acceptable interval of client.
u32 noa_start_time[P2P_MAX_NOA_NUM]; // schedule expressed in terms of the lower 4 bytes of the TSF timer.
#endif // CONFIG_P2P_PS
#endif // CONFIG_P2P
};
struct tdls_ss_record{ //signal strength record
@ -376,7 +376,7 @@ struct tdls_info{
u8 watchdog_count;
u8 dev_discovered; //WFD_TDLS: for sigma test
u8 enable;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct wifi_display_info *wfd_info;
#endif
};
@ -511,7 +511,7 @@ struct mlme_priv {
#endif //#if defined (CONFIG_AP_MODE)
#if defined(CONFIG_WFD)
#if defined(CONFIG_P2P)
u8 *wfd_beacon_ie;
u8 *wfd_probe_req_ie;

View file

@ -604,7 +604,7 @@ int is_IBSS_empty(struct adapter *padapter);
unsigned char check_assoc_AP(u8 *pframe, uint len);
int WMM_param_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
int WFD_info_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE);
#endif
void WMMOnAssocRsp(struct adapter *padapter);

View file

@ -27,7 +27,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8* pssid, u8 ussidlen, u8* pdev_raddr );
u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 status_code);
u32 build_deauth_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunneled);
u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
@ -40,7 +40,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf);
#endif //CONFIG_WFD
#endif //CONFIG_P2P
u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint len);
u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint len, struct sta_info *psta);
@ -55,11 +55,11 @@ u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType);
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength);
void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state);
u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue);
#endif // CONFIG_P2P_PS
#endif // CONFIG_P2P
void rtw_init_cfg80211_wifidirect_info( struct adapter* padapter);
int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx);

View file

@ -101,10 +101,10 @@ void init_off_ch_timer(struct adapter *padapter, struct sta_info *psta);
void init_tdls_alive_timer(struct adapter *padapter, struct sta_info *psta);
void init_handshake_timer(struct adapter *padapter, struct sta_info *psta);
void free_tdls_sta(struct adapter *padapter, struct sta_info *ptdls_sta);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
void issue_tunneled_probe_req(struct adapter *padapter);
void issue_tunneled_probe_rsp(struct adapter *padapter, union recv_frame *precv_frame);
#endif //CONFIG_WFD
#endif //CONFIG_P2P
void issue_tdls_dis_req(struct adapter *padapter, u8 *mac_addr);
void issue_tdls_setup_req(struct adapter *padapter, u8 *mac_addr);
void issue_tdls_setup_rsp(struct adapter *padapter, union recv_frame *precv_frame);

View file

@ -1031,7 +1031,7 @@ enum P2P_PROTO_WK_ID {
P2P_RO_CH_WK = 6,
};
#ifdef CONFIG_P2P_PS
#ifdef CONFIG_P2P
enum P2P_PS_STATE {
P2P_PS_DISABLE = 0,
P2P_PS_ENABLE = 1,
@ -1046,7 +1046,7 @@ enum P2P_PS_MODE {
P2P_PS_NOA = 2,
P2P_PS_MIX = 3, /* CTWindow and NoA */
};
#endif /* CONFIG_P2P_PS */
#endif /* CONFIG_P2P */
/* =====================WFD Section===================== */
/* For Wi-Fi Display */

View file

@ -2041,7 +2041,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct adapter *padapter, char *b
/* buf += p2p_ielen; */
/* len -= p2p_ielen; */
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if(rtw_get_wfd_ie(buf, len, NULL, &wfd_ielen))
{
#ifdef CONFIG_DEBUG_CFG80211
@ -2064,7 +2064,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct adapter *padapter, char *b
}
rtw_get_wfd_ie(buf, len, pmlmepriv->wfd_probe_req_ie, &pmlmepriv->wfd_probe_req_ie_len);
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
}
@ -2606,7 +2606,7 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel
}
#endif /* CONFIG_P2P */
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
{/* check wfd_ie for assoc req; */
uint wfd_ielen=0;
u8 *wfd_ie;
@ -2634,7 +2634,7 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel
rtw_get_wfd_ie(buf, ielen, pmlmepriv->wfd_assoc_req_ie, &pmlmepriv->wfd_assoc_req_ie_len);
}
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
/* TKIP and AES disallow multicast packets until installing group key */
if(padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_
@ -3318,7 +3318,7 @@ dump:
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
memcpy(pframe, (void*)buf, len);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if (type >= 0)
{
struct wifi_display_info *pwfd_info;
@ -3330,7 +3330,7 @@ dump:
rtw_append_wfd_ie( padapter, pframe, &len );
}
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->pktlen = len;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@ -4055,9 +4055,9 @@ void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, const u8
__be32 p2poui = cpu_to_be32(P2POUI);
u8 oui_subtype = P2P_PROVISION_DISC_REQ;
u32 p2pielen = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
u32 wfdielen = 0;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib;
@ -4237,11 +4237,11 @@ void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, const u8
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen );
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
wfdielen = build_provdisc_req_wfd_ie(pwdinfo, pframe);
pframe += wfdielen;
pattrib->pktlen += wfdielen;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -4442,7 +4442,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b
pattrib->seqnum = pmlmeext->mgnt_seq;
pmlmeext->mgnt_seq++;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
{
struct wifi_display_info *pwfd_info;
@ -4453,7 +4453,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b
rtw_append_wfd_ie( padapter, pframe, &pattrib->pktlen );
}
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -4715,7 +4715,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
/* buf += p2p_ielen; */
/* len -= p2p_ielen; */
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if(rtw_get_wfd_ie(buf, len, NULL, &wfd_ielen))
{
#ifdef CONFIG_DEBUG_CFG80211
@ -4738,7 +4738,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
}
rtw_get_wfd_ie(buf, len, pmlmepriv->wfd_beacon_ie, &pmlmepriv->wfd_beacon_ie_len);
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
pmlmeext->bstart_bss = true;
@ -4898,7 +4898,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
/* buf += p2p_ielen; */
/* len -= p2p_ielen; */
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if(rtw_get_wfd_ie(buf, len, NULL, &wfd_ielen))
{
#ifdef CONFIG_DEBUG_CFG80211
@ -4921,7 +4921,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
}
rtw_get_wfd_ie(buf, len, pmlmepriv->wfd_probe_resp_ie, &pmlmepriv->wfd_probe_resp_ie_len);
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
}

View file

@ -244,14 +244,14 @@ static char *translate_scan(struct adapter *padapter,
#endif /* CONFIG_P2P */
#ifdef CONFIG_P2P
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if ( SCAN_RESULT_ALL == pwdinfo->wfd_info->scan_result_type )
{
}
else if ( ( SCAN_RESULT_P2P_ONLY == pwdinfo->wfd_info->scan_result_type ) ||
( SCAN_RESULT_WFD_TYPE == pwdinfo->wfd_info->scan_result_type ) )
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
{
if(!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
{
@ -282,7 +282,7 @@ static char *translate_scan(struct adapter *padapter,
}
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if ( SCAN_RESULT_WFD_TYPE == pwdinfo->wfd_info->scan_result_type )
{
u32 blnGotWFD = false;
@ -323,7 +323,7 @@ static char *translate_scan(struct adapter *padapter,
return start;
}
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_P2P */
@ -4032,7 +4032,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
static int rtw_p2p_get_peer_wfd_port(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
@ -4091,7 +4091,7 @@ static int rtw_p2p_get_peer_wfd_session_available(struct net_device *dev,
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
static int rtw_p2p_get_go_device_address(struct net_device *dev,
struct iw_request_info *info,
@ -4543,9 +4543,9 @@ static int rtw_p2p_invite_req(struct net_device *dev,
_irqL irqL;
struct tx_invite_req_info* pinvite_req_info = &pwdinfo->invitereq_info;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
/* Commented by Albert 20120321 */
/* The input data contains two informations. */
@ -4632,7 +4632,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if ( uintPeerChannel )
{
u8 wfd_ie[ 128 ] = { 0x00 };
@ -4669,7 +4669,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
goto exit;
}
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
if ( uintPeerChannel ) {
/* Store the GO's bssid */
@ -4723,9 +4723,9 @@ static int rtw_p2p_set_persistent(struct net_device *dev,
_irqL irqL;
struct tx_invite_req_info* pinvite_req_info = &pwdinfo->invitereq_info;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
/* Commented by Albert 20120328 */
/* The input data is 0 or 1 */
@ -4835,7 +4835,7 @@ static int rtw_p2p_set_wps_uuid(struct net_device *dev,
return ret;
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
static int rtw_p2p_set_pc(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
@ -5133,7 +5133,7 @@ exit:
return ret;
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
static int rtw_p2p_prov_disc(struct net_device *dev,
struct iw_request_info *info,
@ -5156,9 +5156,9 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
_irqL irqL;
u8 ie_offset;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
/* Commented by Albert 20110301 */
/* The input data contains two informations. */
@ -5298,7 +5298,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
if ( uintPeerChannel )
{
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
{
u8 wfd_ie[ 128 ] = { 0x00 };
uint wfd_ielen = 0;
@ -5334,7 +5334,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
goto exit;
}
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
DBG_871X( "[%s] peer channel: %d!\n", __FUNCTION__, uintPeerChannel );
memcpy( pwdinfo->tx_prov_disc_info.peerIFAddr, pnetwork->network.MacAddress, ETH_ALEN );
@ -5513,7 +5513,7 @@ static int rtw_p2p_set(struct net_device *dev,
wrqu->data.length -= 5;
ret = rtw_p2p_set_wps_uuid( dev, info, wrqu, &extra[5] );
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
else if ( _rtw_memcmp( extra, "sa=", 3 ) )
{
/* sa: WFD Session Available information */
@ -5547,7 +5547,7 @@ static int rtw_p2p_set(struct net_device *dev,
wrqu->data.length -= 13;
rtw_p2p_set_driver_iface( dev, info, wrqu, &extra[13] );
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_P2P */
return ret;
@ -5591,7 +5591,7 @@ static int rtw_p2p_get(struct net_device *dev,
} else if ( _rtw_memcmp((__force void *)wrqu->data.pointer, "op_ch", 5 ) ) {
rtw_p2p_get_op_ch( dev, info, wrqu, extra);
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
else if ( _rtw_memcmp((__force void *)wrqu->data.pointer, "peer_port", 9 ) ) {
rtw_p2p_get_peer_wfd_port( dev, info, wrqu, extra );
} else if ( _rtw_memcmp((__force void *)wrqu->data.pointer, "wfd_sa", 6 ) ) {
@ -5599,7 +5599,7 @@ static int rtw_p2p_get(struct net_device *dev,
} else if ( _rtw_memcmp((__force void *)wrqu->data.pointer, "wfd_pc", 6 ) ) {
rtw_p2p_get_peer_wfd_preferred_connection( dev, info, wrqu, extra );
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_P2P */
@ -9067,7 +9067,7 @@ static int rtw_wfd_tdls_enable(struct net_device *dev,
int ret = 0;
#ifdef CONFIG_TDLS
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
@ -9082,7 +9082,7 @@ static int rtw_wfd_tdls_enable(struct net_device *dev,
padapter->wdinfo.wfd_tdls_enable = 1;
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
@ -9196,9 +9196,9 @@ static int rtw_tdls_setup(struct net_device *dev,
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
u8 mac_addr[ETH_ALEN];
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
printk( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
@ -9206,7 +9206,7 @@ static int rtw_tdls_setup(struct net_device *dev,
mac_addr[i]=key_2char2num(*(extra+j), *(extra+j+1));
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if ( _AES_ != padapter->securitypriv.dot11PrivacyAlgrthm )
{
/* Weak Security situation with AP. */
@ -9221,7 +9221,7 @@ static int rtw_tdls_setup(struct net_device *dev,
}
}
else
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
{
issue_tdls_setup_req(padapter, mac_addr);
}
@ -9379,7 +9379,7 @@ static int rtw_tdls_setip(struct net_device *dev,
int ret = 0;
#ifdef CONFIG_TDLS
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
@ -9414,7 +9414,7 @@ static int rtw_tdls_setip(struct net_device *dev,
ptdlsinfo->wfd_info->ip_address[2], ptdlsinfo->wfd_info->ip_address[3]
);
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
@ -9427,7 +9427,7 @@ static int rtw_tdls_getip(struct net_device *dev,
int ret = 0;
#ifdef CONFIG_TDLS
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
@ -9447,7 +9447,7 @@ static int rtw_tdls_getip(struct net_device *dev,
wrqu->data.length = strlen( extra );
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
@ -9461,7 +9461,7 @@ static int rtw_tdls_getport(struct net_device *dev,
int ret = 0;
#ifdef CONFIG_TDLS
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
@ -9474,7 +9474,7 @@ static int rtw_tdls_getport(struct net_device *dev,
wrqu->data.length = strlen( extra );
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
@ -9490,7 +9490,7 @@ static int rtw_tdls_dis_result(struct net_device *dev,
int ret = 0;
#ifdef CONFIG_TDLS
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
@ -9506,7 +9506,7 @@ static int rtw_tdls_dis_result(struct net_device *dev,
wrqu->data.length = strlen( extra );
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
@ -9522,7 +9522,7 @@ static int rtw_wfd_tdls_status(struct net_device *dev,
int ret = 0;
#ifdef CONFIG_TDLS
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
@ -9541,7 +9541,7 @@ static int rtw_wfd_tdls_status(struct net_device *dev,
wrqu->data.length = strlen( extra );
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
@ -9653,7 +9653,7 @@ static int rtw_tdls(struct net_device *dev,
wrqu->data.length -= 6;
rtw_tdls_psoff( dev, info, wrqu, &extra[6] );
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
else if (_rtw_memcmp( extra, "setip=", 6 ) )
{
wrqu->data.length -= 6;
@ -9663,7 +9663,7 @@ static int rtw_tdls(struct net_device *dev,
{
issue_tunneled_probe_req((struct adapter *)rtw_netdev_priv(dev));
}
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
@ -9677,7 +9677,7 @@ static int rtw_tdls_get(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
DBG_871X( "[%s] extra = %s\n", __FUNCTION__, (__force char *)wrqu->data.pointer );
@ -9697,7 +9697,7 @@ static int rtw_tdls_get(struct net_device *dev,
if (_rtw_memcmp((__force void *)wrqu->data.pointer, "status", 6))
rtw_wfd_tdls_status( dev, info, wrqu, extra );
#endif /* CONFIG_WFD */
#endif /* CONFIG_P2P */
return ret;
}

View file

@ -881,7 +881,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
init_wifidirect_info(padapter, P2P_ROLE_DISABLE);
reset_global_wifidirect_info(padapter);
rtw_init_cfg80211_wifidirect_info(padapter);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
if(rtw_init_wifi_display_info(padapter) == _FAIL)
RT_TRACE(_module_os_intfs_c_,_drv_err_,("\n Can't init init_wifi_display_info\n"));
#endif

View file

@ -341,7 +341,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
int bytes_written = 0;
android_wifi_priv_cmd priv_cmd;
struct adapter* padapter = ( struct adapter * ) rtw_netdev_priv(net);
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
struct wifi_display_info *pwfd_info;
#endif
@ -505,7 +505,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
break;
}
#ifdef CONFIG_WFD
#ifdef CONFIG_P2P
case ANDROID_WIFI_CMD_WFD_ENABLE:
/* Commented by Albert 2012/07/24 */
/* We can enable the WFD function by using the following command: */