mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
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:
parent
7b6e9a069d
commit
27f745af7b
25 changed files with 227 additions and 236 deletions
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue