mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-12-23 12:37:42 +00:00
Wifi.h cleanup
Remove unused variables or replacend from /linux/if_ether.h /linux/ieee80211.h
This commit is contained in:
parent
e39c4e7a66
commit
291817708a
@ -1138,7 +1138,7 @@ void rtw_add_network(_adapter *adapter, WLAN_BSSID_EX *pnetwork)
|
||||
|
||||
#if defined(CONFIG_P2P) && defined(CONFIG_P2P_REMOVE_GROUP_INFO)
|
||||
if (adapter->registrypriv.wifi_spec == 0)
|
||||
rtw_bss_ex_del_p2p_attr(pnetwork, P2P_ATTR_GROUP_INFO);
|
||||
rtw_bss_ex_del_p2p_attr(pnetwork, IEEE80211_P2P_ATTR_GROUP_INFO);
|
||||
#endif
|
||||
|
||||
if (!hal_chk_wl_func(adapter, WL_FUNC_MIRACAST))
|
||||
|
@ -3858,7 +3858,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* P2P Capability */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CAPABILITY;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CAPABILITY;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -3877,7 +3877,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Group Owner Intent */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_GO_INTENT;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GO_INTENT;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001);
|
||||
@ -3889,7 +3889,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Configuration Timeout */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CONF_TIMEOUT;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GO_CONFIG_TIMEOUT;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -3902,7 +3902,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Listen Channel */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_LISTEN_CH;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_LISTEN_CHANNEL;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005);
|
||||
@ -3926,7 +3926,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Extended Listen Timing ATTR */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_EX_LISTEN_TIMING;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_EXT_LISTEN_TIMING;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0004);
|
||||
@ -3944,7 +3944,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Intended P2P Interface Address */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_INTENDED_IF_ADDR;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_INTENDED_IFACE_ADDR;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN);
|
||||
@ -3957,7 +3957,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Channel List */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CH_LIST;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CHANNEL_LIST;
|
||||
|
||||
/* Length: */
|
||||
/* Country String(3) */
|
||||
@ -4029,7 +4029,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Device Info */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_DEVICE_INFO;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_DEVICE_INFO;
|
||||
|
||||
/* Length: */
|
||||
/* 21->P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
|
||||
@ -4081,7 +4081,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Operating Channel */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_OPERATING_CH;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_OPER_CHANNEL;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005);
|
||||
@ -4277,7 +4277,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
|
||||
|
||||
/* P2P Status */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_STATUS;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_STATUS;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001);
|
||||
@ -4288,7 +4288,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
|
||||
|
||||
/* P2P Capability */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CAPABILITY;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CAPABILITY;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -4315,7 +4315,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
|
||||
|
||||
/* Group Owner Intent */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_GO_INTENT;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GO_INTENT;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001);
|
||||
@ -4333,7 +4333,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
|
||||
|
||||
/* Configuration Timeout */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CONF_TIMEOUT;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GO_CONFIG_TIMEOUT;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -4345,7 +4345,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
|
||||
|
||||
/* Operating Channel */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_OPERATING_CH;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_OPER_CHANNEL;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005);
|
||||
@ -4377,7 +4377,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
|
||||
|
||||
/* Intended P2P Interface Address */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_INTENDED_IF_ADDR;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_INTENDED_IFACE_ADDR;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN);
|
||||
@ -4389,7 +4389,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
|
||||
|
||||
/* Channel List */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CH_LIST;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CHANNEL_LIST;
|
||||
|
||||
/* Country String(3) */
|
||||
/* + ( Operating Class (1) + Number of Channels(1) ) * Operation Classes (?) */
|
||||
@ -4460,7 +4460,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
|
||||
|
||||
/* Device Info */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_DEVICE_INFO;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_DEVICE_INFO;
|
||||
|
||||
/* Length: */
|
||||
/* 21->P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
|
||||
@ -4512,7 +4512,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l
|
||||
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) {
|
||||
/* Group ID Attribute */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_GROUP_ID;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GROUP_ID;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN + pwdinfo->nego_ssidlen);
|
||||
@ -4622,7 +4622,7 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8 *raddr, u8 result)
|
||||
|
||||
/* P2P Status */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_STATUS;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_STATUS;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001);
|
||||
@ -4633,7 +4633,7 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8 *raddr, u8 result)
|
||||
|
||||
/* P2P Capability */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CAPABILITY;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CAPABILITY;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -4652,7 +4652,7 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8 *raddr, u8 result)
|
||||
|
||||
/* Operating Channel */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_OPERATING_CH;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_OPER_CHANNEL;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005);
|
||||
@ -4700,7 +4700,7 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8 *raddr, u8 result)
|
||||
|
||||
/* Channel List */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CH_LIST;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CHANNEL_LIST;
|
||||
|
||||
*(u16 *)(p2pie + p2pielen) = 6;
|
||||
p2pielen += 2;
|
||||
@ -4747,7 +4747,7 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8 *raddr, u8 result)
|
||||
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) {
|
||||
/* Group ID Attribute */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_GROUP_ID;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GROUP_ID;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN + pwdinfo->nego_ssidlen);
|
||||
@ -4858,7 +4858,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Configuration Timeout */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CONF_TIMEOUT;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GO_CONFIG_TIMEOUT;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -4870,7 +4870,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Invitation Flags */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_INVITATION_FLAGS;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_INVITE_FLAGS;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001);
|
||||
@ -4882,7 +4882,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Operating Channel */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_OPERATING_CH;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_OPER_CHANNEL;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005);
|
||||
@ -4911,7 +4911,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr)
|
||||
if (_rtw_memcmp(adapter_mac_addr(padapter), pwdinfo->invitereq_info.go_bssid, ETH_ALEN)) {
|
||||
/* P2P Group BSSID */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_GROUP_BSSID;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GROUP_BSSID;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN);
|
||||
@ -4925,7 +4925,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Channel List */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CH_LIST;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CHANNEL_LIST;
|
||||
|
||||
|
||||
/* Length: */
|
||||
@ -4996,7 +4996,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* P2P Group ID */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_GROUP_ID;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GROUP_ID;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(6 + pwdinfo->invitereq_info.ssidlen);
|
||||
@ -5014,7 +5014,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr)
|
||||
|
||||
/* Device Info */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_DEVICE_INFO;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_DEVICE_INFO;
|
||||
|
||||
/* Length: */
|
||||
/* 21->P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
|
||||
@ -5153,7 +5153,7 @@ void issue_p2p_invitation_response(_adapter *padapter, u8 *raddr, u8 dialogToken
|
||||
|
||||
/* P2P Status */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_STATUS;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_STATUS;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001);
|
||||
@ -5170,7 +5170,7 @@ void issue_p2p_invitation_response(_adapter *padapter, u8 *raddr, u8 dialogToken
|
||||
|
||||
/* Configuration Timeout */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CONF_TIMEOUT;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GO_CONFIG_TIMEOUT;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -5189,7 +5189,7 @@ void issue_p2p_invitation_response(_adapter *padapter, u8 *raddr, u8 dialogToken
|
||||
|
||||
/* Operating Channel */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_OPERATING_CH;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_OPER_CHANNEL;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005);
|
||||
@ -5213,7 +5213,7 @@ void issue_p2p_invitation_response(_adapter *padapter, u8 *raddr, u8 dialogToken
|
||||
|
||||
/* P2P Group BSSID */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_GROUP_BSSID;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GROUP_BSSID;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN);
|
||||
@ -5228,7 +5228,7 @@ void issue_p2p_invitation_response(_adapter *padapter, u8 *raddr, u8 dialogToken
|
||||
|
||||
/* Channel List */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CH_LIST;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CHANNEL_LIST;
|
||||
|
||||
/* Length: */
|
||||
/* Country String(3) */
|
||||
@ -5987,7 +5987,7 @@ int _issue_probereq_p2p(_adapter *padapter, u8 *da, int wait_ack)
|
||||
|
||||
/* P2P Capability */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CAPABILITY;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CAPABILITY;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -6005,7 +6005,7 @@ int _issue_probereq_p2p(_adapter *padapter, u8 *da, int wait_ack)
|
||||
|
||||
/* Listen Channel */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_LISTEN_CH;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_LISTEN_CHANNEL;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005);
|
||||
@ -6029,7 +6029,7 @@ int _issue_probereq_p2p(_adapter *padapter, u8 *da, int wait_ack)
|
||||
|
||||
/* Extended Listen Timing */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_EX_LISTEN_TIMING;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_EXT_LISTEN_TIMING;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0004);
|
||||
@ -6047,7 +6047,7 @@ int _issue_probereq_p2p(_adapter *padapter, u8 *da, int wait_ack)
|
||||
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) {
|
||||
/* Operating Channel (if this WiFi is working as the group owner now) */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_OPERATING_CH;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_OPER_CHANNEL;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005);
|
||||
@ -6334,10 +6334,10 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||
|
||||
merged_p2p_ielen = rtw_p2p_merge_ies(frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, merged_p2pie);
|
||||
|
||||
rtw_get_p2p_attr_content(merged_p2pie, merged_p2p_ielen, P2P_ATTR_INVITATION_FLAGS, &invitation_flag, &attr_contentlen);
|
||||
rtw_get_p2p_attr_content(merged_p2pie, merged_p2p_ielen, IEEE80211_P2P_ATTR_INVITE_FLAGS, &invitation_flag, &attr_contentlen);
|
||||
if (attr_contentlen) {
|
||||
|
||||
rtw_get_p2p_attr_content(merged_p2pie, merged_p2p_ielen, P2P_ATTR_GROUP_BSSID, pwdinfo->p2p_peer_interface_addr, &attr_contentlen);
|
||||
rtw_get_p2p_attr_content(merged_p2pie, merged_p2p_ielen, IEEE80211_P2P_ATTR_GROUP_BSSID, pwdinfo->p2p_peer_interface_addr, &attr_contentlen);
|
||||
/* Commented by Albert 20120510 */
|
||||
/* Copy to the pwdinfo->p2p_peer_interface_addr. */
|
||||
/* So that the WFD UI ( or Sigma ) can get the peer interface address by using the following command. */
|
||||
@ -6355,7 +6355,7 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||
/* Re-invoke the persistent group. */
|
||||
|
||||
memset(&group_id, 0x00, sizeof(struct group_id_info));
|
||||
rtw_get_p2p_attr_content(merged_p2pie, merged_p2p_ielen, P2P_ATTR_GROUP_ID, (u8 *) &group_id, &attr_contentlen);
|
||||
rtw_get_p2p_attr_content(merged_p2pie, merged_p2p_ielen, IEEE80211_P2P_ATTR_GROUP_ID, (u8 *) &group_id, &attr_contentlen);
|
||||
if (attr_contentlen) {
|
||||
if (_rtw_memcmp(group_id.go_device_addr, adapter_mac_addr(padapter), ETH_ALEN)) {
|
||||
/* The p2p device sending this p2p invitation request wants this Wi-Fi device to be the persistent GO. */
|
||||
@ -6366,7 +6366,7 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||
/* The p2p device sending this p2p invitation request wants to be the persistent GO. */
|
||||
if (is_matched_in_profilelist(pwdinfo->p2p_peer_interface_addr, &pwdinfo->profileinfo[0])) {
|
||||
u8 operatingch_info[5] = { 0x00 };
|
||||
if (rtw_get_p2p_attr_content(merged_p2pie, merged_p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info,
|
||||
if (rtw_get_p2p_attr_content(merged_p2pie, merged_p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, operatingch_info,
|
||||
&attr_contentlen)) {
|
||||
if (rtw_chset_search_ch(adapter_to_chset(padapter), (u32)operatingch_info[4]) >= 0) {
|
||||
/* The operating channel is acceptable for this device. */
|
||||
@ -6414,7 +6414,7 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||
/* Received the invitation to join a P2P group. */
|
||||
|
||||
memset(&group_id, 0x00, sizeof(struct group_id_info));
|
||||
rtw_get_p2p_attr_content(merged_p2pie, merged_p2p_ielen, P2P_ATTR_GROUP_ID, (u8 *) &group_id, &attr_contentlen);
|
||||
rtw_get_p2p_attr_content(merged_p2pie, merged_p2p_ielen, IEEE80211_P2P_ATTR_GROUP_ID, (u8 *) &group_id, &attr_contentlen);
|
||||
if (attr_contentlen) {
|
||||
if (_rtw_memcmp(group_id.go_device_addr, adapter_mac_addr(padapter), ETH_ALEN)) {
|
||||
/* In this case, the GO can't be myself. */
|
||||
@ -6465,7 +6465,7 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||
_cancel_timer_ex(&pwdinfo->restore_p2p_state_timer);
|
||||
p2p_ie = rtw_get_p2p_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen);
|
||||
if (p2p_ie) {
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, &attr_content, &attr_contentlen);
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_STATUS, &attr_content, &attr_contentlen);
|
||||
|
||||
if (attr_contentlen == 1) {
|
||||
RTW_INFO("[%s] Status = %d\n", __FUNCTION__, attr_content);
|
||||
@ -9279,7 +9279,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
|
||||
|
||||
/* P2P Capability */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CAPABILITY;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CAPABILITY;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -9297,7 +9297,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
|
||||
|
||||
/* Extended Listen Timing */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_EX_LISTEN_TIMING;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_EXT_LISTEN_TIMING;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0004);
|
||||
@ -9314,7 +9314,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
|
||||
|
||||
/* Device Info */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_DEVICE_INFO;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_DEVICE_INFO;
|
||||
|
||||
/* Length: */
|
||||
/* 21->P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
|
||||
@ -9368,7 +9368,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
|
||||
|
||||
/* P2P Interface */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_INTERFACE;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_INTERFACE;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x000D);
|
||||
@ -11039,7 +11039,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI
|
||||
u32 attr_contentlen = 0;
|
||||
u8 listen_ch[5] = { 0x00 };
|
||||
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_LISTEN_CH, listen_ch, &attr_contentlen);
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_LISTEN_CHANNEL, listen_ch, &attr_contentlen);
|
||||
bssid->Configuration.DSConfig = listen_ch[4];
|
||||
} else {
|
||||
/* use current channel */
|
||||
|
138
core/rtw_p2p.c
138
core/rtw_p2p.c
@ -129,7 +129,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
|
||||
if (attr_len > 0)
|
||||
len = rtw_set_p2p_attr_content(pbuf, P2P_ATTR_GROUP_INFO, attr_len, pdata_attr);
|
||||
len = rtw_set_p2p_attr_content(pbuf, IEEE80211_P2P_ATTR_GROUP_INFO, attr_len, pdata_attr);
|
||||
|
||||
rtw_mfree(pdata_attr, MAX_P2P_IE_LEN);
|
||||
|
||||
@ -258,8 +258,8 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
|
||||
p2pie[p2pielen++] = 0x9A;
|
||||
p2pie[p2pielen++] = 0x09; /* WFA P2P v1.0 */
|
||||
|
||||
/* P2P_ATTR_STATUS */
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_STATUS, 1, &status);
|
||||
/* IEEE80211_P2P_ATTR_STATUS */
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], IEEE80211_P2P_ATTR_STATUS, 1, &status);
|
||||
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen, p2pie, &pattrib->pktlen);
|
||||
|
||||
@ -439,7 +439,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
|
||||
p2pie[p2pielen++] = 0x09; /* WFA P2P v1.0 */
|
||||
|
||||
/* Add Status attribute in P2P IE */
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_STATUS, 1, &status);
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], IEEE80211_P2P_ATTR_STATUS, 1, &status);
|
||||
|
||||
/* Add NoA attribute in P2P IE */
|
||||
noa_attr_content[0] = 0x1;/* index */
|
||||
@ -447,7 +447,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
|
||||
|
||||
/* todo: Notice of Absence Descriptor(s) */
|
||||
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_NOA, 2, noa_attr_content);
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], IEEE80211_P2P_ATTR_ABSENCE_NOTICE, 2, noa_attr_content);
|
||||
|
||||
|
||||
|
||||
@ -495,11 +495,11 @@ u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
|
||||
capability = cpu_to_le16(capability);
|
||||
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_CAPABILITY, 2, (u8 *)&capability);
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], IEEE80211_P2P_ATTR_CAPABILITY, 2, (u8 *)&capability);
|
||||
|
||||
|
||||
/* P2P Device ID ATTR */
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_DEVICE_ID, ETH_ALEN, pwdinfo->device_addr);
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], IEEE80211_P2P_ATTR_DEVICE_ID, ETH_ALEN, pwdinfo->device_addr);
|
||||
|
||||
|
||||
/* Notice of Absence ATTR */
|
||||
@ -1897,7 +1897,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
|
||||
/* P2P Capability ATTR */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CAPABILITY;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CAPABILITY;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -1925,7 +1925,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
|
||||
/* Extended Listen Timing ATTR */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_EX_LISTEN_TIMING;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_EXT_LISTEN_TIMING;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x0004);
|
||||
@ -1951,7 +1951,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
|
||||
/* Device Info ATTR */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_DEVICE_INFO;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_DEVICE_INFO;
|
||||
|
||||
/* Length: */
|
||||
/* 21->P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
|
||||
@ -2094,7 +2094,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
|
||||
|
||||
/* P2P Capability ATTR */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CAPABILITY;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CAPABILITY;
|
||||
|
||||
/* Length: */
|
||||
*(u16*) ( p2pie + p2pielen ) = cpu_to_le16( 0x0002 );
|
||||
@ -2113,7 +2113,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
|
||||
|
||||
/* Device Info ATTR */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_DEVICE_INFO;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_DEVICE_INFO;
|
||||
|
||||
/* Length: */
|
||||
/* 21->P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
|
||||
@ -2178,7 +2178,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
|
||||
|
||||
/* P2P Group ID ATTR */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_GROUP_ID;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GROUP_ID;
|
||||
|
||||
/* Length: */
|
||||
*(u16*) ( p2pie + p2pielen ) = cpu_to_le16( ETH_ALEN + ussidlen );
|
||||
@ -2219,7 +2219,7 @@ u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 status
|
||||
|
||||
|
||||
/* Status ATTR */
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_STATUS, 1, &status_code);
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], IEEE80211_P2P_ATTR_STATUS, 1, &status_code);
|
||||
|
||||
|
||||
/* Extended Listen Timing ATTR */
|
||||
@ -2342,7 +2342,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||
|
||||
while (p2p_ie) {
|
||||
/* Check P2P Capability ATTR */
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8 *)&cap_attr, (uint *) &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_CAPABILITY, (u8 *)&cap_attr, (uint *) &attr_contentlen)) {
|
||||
RTW_INFO("[%s] Got P2P Capability Attr!!\n", __FUNCTION__);
|
||||
cap_attr = le16_to_cpu(cap_attr);
|
||||
psta->dev_cap = cap_attr & 0xff;
|
||||
@ -2352,7 +2352,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||
|
||||
|
||||
/* Check P2P Device Info ATTR */
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO, NULL, (uint *)&attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_DEVICE_INFO, NULL, (uint *)&attr_contentlen)) {
|
||||
RTW_INFO("[%s] Got P2P DEVICE INFO Attr!!\n", __FUNCTION__);
|
||||
pattr_content = pbuf = rtw_zmalloc(attr_contentlen);
|
||||
if (pattr_content) {
|
||||
@ -2360,7 +2360,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||
u16 dev_name_len;
|
||||
|
||||
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO , pattr_content, (uint *)&attr_contentlen);
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_DEVICE_INFO , pattr_content, (uint *)&attr_contentlen);
|
||||
|
||||
memcpy(psta->dev_addr, pattr_content, ETH_ALEN);/* P2P Device Address */
|
||||
|
||||
@ -2439,11 +2439,11 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
||||
u8 dev_addr[ETH_ALEN] = { 0x00 };
|
||||
u32 attr_contentlen = 0;
|
||||
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
|
||||
if (_rtw_memcmp(pwdinfo->device_addr, groupid, ETH_ALEN) &&
|
||||
_rtw_memcmp(pwdinfo->p2p_group_ssid, groupid + ETH_ALEN, pwdinfo->p2p_group_ssid_len)) {
|
||||
attr_contentlen = 0;
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_ID, dev_addr, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_DEVICE_ID, dev_addr, &attr_contentlen)) {
|
||||
_irqL irqL;
|
||||
_list *phead, *plist;
|
||||
|
||||
@ -2650,7 +2650,7 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_ING);
|
||||
|
||||
/* Check P2P Capability ATTR */
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8 *)&cap_attr, (uint *)&attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_CAPABILITY, (u8 *)&cap_attr, (uint *)&attr_contentlen)) {
|
||||
cap_attr = le16_to_cpu(cap_attr);
|
||||
|
||||
#if defined(CONFIG_WFD) && defined(CONFIG_TDLS)
|
||||
@ -2659,7 +2659,7 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
|
||||
#endif /* defined(CONFIG_WFD) && defined(CONFIG_TDLS) */
|
||||
}
|
||||
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GO_INTENT , &attr_content, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_GO_INTENT , &attr_content, &attr_contentlen)) {
|
||||
RTW_INFO("[%s] GO Intent = %d, tie = %d\n", __FUNCTION__, attr_content >> 1, attr_content & 0x01);
|
||||
pwdinfo->peer_intent = attr_content; /* include both intent and tie breaker values. */
|
||||
|
||||
@ -2686,18 +2686,18 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
|
||||
}
|
||||
}
|
||||
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_LISTEN_CH, (u8 *)listen_ch_attr, (uint *) &attr_contentlen) && attr_contentlen == 5)
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_LISTEN_CHANNEL, (u8 *)listen_ch_attr, (uint *) &attr_contentlen) && attr_contentlen == 5)
|
||||
pwdinfo->nego_req_info.peer_ch = listen_ch_attr[4];
|
||||
|
||||
RTW_INFO(FUNC_ADPT_FMT" listen channel :%u\n", FUNC_ADPT_ARG(padapter), pwdinfo->nego_req_info.peer_ch);
|
||||
|
||||
attr_contentlen = 0;
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_INTENDED_IF_ADDR, pwdinfo->p2p_peer_interface_addr, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_INTENDED_IFACE_ADDR, pwdinfo->p2p_peer_interface_addr, &attr_contentlen)) {
|
||||
if (attr_contentlen != ETH_ALEN)
|
||||
memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
|
||||
}
|
||||
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, ch_content, &ch_cnt)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_CHANNEL_LIST, ch_content, &ch_cnt)) {
|
||||
peer_ch_num = rtw_p2p_get_peer_ch_list(pwdinfo, ch_content, ch_cnt, peer_ch_list);
|
||||
ch_num_inclusioned = rtw_p2p_ch_inclusion(padapter, peer_ch_list, peer_ch_num, ch_list_inclusioned);
|
||||
|
||||
@ -2724,7 +2724,7 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
|
||||
u8 operatingch_info[5] = { 0x00 }, peer_operating_ch = 0;
|
||||
attr_contentlen = 0;
|
||||
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info, &attr_contentlen))
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, operatingch_info, &attr_contentlen))
|
||||
peer_operating_ch = operatingch_info[4];
|
||||
|
||||
if (rtw_p2p_is_channel_list_ok(peer_operating_ch,
|
||||
@ -2809,7 +2809,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
|
||||
while (p2p_ie) { /* Found the P2P IE. */
|
||||
|
||||
/* Check P2P Capability ATTR */
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8 *)&cap_attr, (uint *)&attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_CAPABILITY, (u8 *)&cap_attr, (uint *)&attr_contentlen)) {
|
||||
cap_attr = le16_to_cpu(cap_attr);
|
||||
#ifdef CONFIG_TDLS
|
||||
if (!(cap_attr & P2P_GRPCAP_INTRABSS))
|
||||
@ -2817,7 +2817,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
|
||||
#endif /* CONFIG_TDLS */
|
||||
}
|
||||
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, &attr_content, &attr_contentlen);
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_STATUS, &attr_content, &attr_contentlen);
|
||||
if (attr_contentlen == 1) {
|
||||
RTW_INFO("[%s] Status = %d\n", __FUNCTION__, attr_content);
|
||||
if (attr_content == P2P_STATUS_SUCCESS) {
|
||||
@ -2835,7 +2835,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
|
||||
|
||||
/* Try to get the peer's interface address */
|
||||
attr_contentlen = 0;
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_INTENDED_IF_ADDR, pwdinfo->p2p_peer_interface_addr, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_INTENDED_IFACE_ADDR, pwdinfo->p2p_peer_interface_addr, &attr_contentlen)) {
|
||||
if (attr_contentlen != ETH_ALEN)
|
||||
memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
|
||||
}
|
||||
@ -2843,7 +2843,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
|
||||
/* Try to get the peer's intent and tie breaker value. */
|
||||
attr_content = 0x00;
|
||||
attr_contentlen = 0;
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GO_INTENT , &attr_content, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_GO_INTENT , &attr_content, &attr_contentlen)) {
|
||||
RTW_INFO("[%s] GO Intent = %d, tie = %d\n", __FUNCTION__, attr_content >> 1, attr_content & 0x01);
|
||||
pwdinfo->peer_intent = attr_content; /* include both intent and tie breaker values. */
|
||||
|
||||
@ -2882,13 +2882,13 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
|
||||
/* Try to get the operation channel information */
|
||||
|
||||
attr_contentlen = 0;
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, operatingch_info, &attr_contentlen)) {
|
||||
RTW_INFO("[%s] Peer's operating channel = %d\n", __FUNCTION__, operatingch_info[4]);
|
||||
pwdinfo->peer_operating_ch = operatingch_info[4];
|
||||
}
|
||||
|
||||
/* Try to get the channel list information */
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, pwdinfo->channel_list_attr, &pwdinfo->channel_list_attr_len)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_CHANNEL_LIST, pwdinfo->channel_list_attr, &pwdinfo->channel_list_attr_len)) {
|
||||
RTW_INFO("[%s] channel list attribute found, len = %d\n", __FUNCTION__, pwdinfo->channel_list_attr_len);
|
||||
|
||||
peer_ch_num = rtw_p2p_get_peer_ch_list(pwdinfo, pwdinfo->channel_list_attr, pwdinfo->channel_list_attr_len, peer_ch_list);
|
||||
@ -2917,7 +2917,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
|
||||
u8 operatingch_info[5] = { 0x00 }, peer_operating_ch = 0;
|
||||
attr_contentlen = 0;
|
||||
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info, &attr_contentlen))
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, operatingch_info, &attr_contentlen))
|
||||
peer_operating_ch = operatingch_info[4];
|
||||
|
||||
if (rtw_p2p_is_channel_list_ok(peer_operating_ch,
|
||||
@ -2943,7 +2943,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
|
||||
/* Try to get the group id information if peer is GO */
|
||||
attr_contentlen = 0;
|
||||
memset(groupid, 0x00, 38);
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
|
||||
memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN);
|
||||
memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN);
|
||||
}
|
||||
@ -2982,7 +2982,7 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr
|
||||
u32 attr_contentlen = 0;
|
||||
|
||||
pwdinfo->negotiation_dialog_token = 1;
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, &attr_content, &attr_contentlen);
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_STATUS, &attr_content, &attr_contentlen);
|
||||
if (attr_contentlen == 1) {
|
||||
RTW_INFO("[%s] Status = %d\n", __FUNCTION__, attr_content);
|
||||
result = attr_content;
|
||||
@ -3024,14 +3024,14 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr
|
||||
/* Try to get the group id information */
|
||||
attr_contentlen = 0;
|
||||
memset(groupid, 0x00, 38);
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
|
||||
RTW_INFO("[%s] Ssid = %s, ssidlen = %zu\n", __FUNCTION__, &groupid[ETH_ALEN], strlen(&groupid[ETH_ALEN]));
|
||||
memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN);
|
||||
memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN);
|
||||
}
|
||||
|
||||
attr_contentlen = 0;
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, operatingch_info, &attr_contentlen)) {
|
||||
RTW_INFO("[%s] Peer's operating channel = %d\n", __FUNCTION__, operatingch_info[4]);
|
||||
pwdinfo->peer_operating_ch = operatingch_info[4];
|
||||
}
|
||||
@ -3517,10 +3517,10 @@ static void rtw_change_p2pie_op_ch(_adapter *padapter, const u8 *frame_body, u32
|
||||
u32 attr_contentlen = 0;
|
||||
u8 *pattr = NULL;
|
||||
|
||||
/* Check P2P_ATTR_OPERATING_CH */
|
||||
/* Check IEEE80211_P2P_ATTR_OPER_CHANNEL */
|
||||
attr_contentlen = 0;
|
||||
pattr = NULL;
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, (uint *)&attr_contentlen);
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, NULL, (uint *)&attr_contentlen);
|
||||
if (pattr != NULL)
|
||||
*(pattr + 4) = ch;
|
||||
|
||||
@ -3550,8 +3550,8 @@ static void rtw_change_p2pie_ch_list(_adapter *padapter, const u8 *frame_body, u
|
||||
u32 attr_contentlen = 0;
|
||||
u8 *pattr = NULL;
|
||||
|
||||
/* Check P2P_ATTR_CH_LIST */
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, (uint *)&attr_contentlen);
|
||||
/* Check IEEE80211_P2P_ATTR_CHANNEL_LIST */
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_CHANNEL_LIST, NULL, (uint *)&attr_contentlen);
|
||||
if (pattr != NULL) {
|
||||
int i;
|
||||
u32 num_of_ch;
|
||||
@ -3593,8 +3593,8 @@ static bool rtw_chk_p2pie_ch_list_with_buddy(_adapter *padapter, const u8 *frame
|
||||
u32 attr_contentlen = 0;
|
||||
u8 *pattr = NULL;
|
||||
|
||||
/* Check P2P_ATTR_CH_LIST */
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, (uint *)&attr_contentlen);
|
||||
/* Check IEEE80211_P2P_ATTR_CHANNEL_LIST */
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_CHANNEL_LIST, NULL, (uint *)&attr_contentlen);
|
||||
if (pattr != NULL) {
|
||||
int i;
|
||||
u32 num_of_ch;
|
||||
@ -3642,10 +3642,10 @@ static bool rtw_chk_p2pie_op_ch_with_buddy(_adapter *padapter, const u8 *frame_b
|
||||
u32 attr_contentlen = 0;
|
||||
u8 *pattr = NULL;
|
||||
|
||||
/* Check P2P_ATTR_OPERATING_CH */
|
||||
/* Check IEEE80211_P2P_ATTR_OPER_CHANNEL */
|
||||
attr_contentlen = 0;
|
||||
pattr = NULL;
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, (uint *)&attr_contentlen);
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, NULL, (uint *)&attr_contentlen);
|
||||
if (pattr != NULL) {
|
||||
if (*(pattr + 4) == union_ch) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" op_ch fit buddy_ch:%u\n", FUNC_ADPT_ARG(padapter), union_ch);
|
||||
@ -3682,8 +3682,8 @@ static void rtw_cfg80211_adjust_p2pie_channel(_adapter *padapter, const u8 *fram
|
||||
u32 attr_contentlen = 0;
|
||||
u8 *pattr = NULL;
|
||||
|
||||
/* Check P2P_ATTR_CH_LIST */
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, (uint *)&attr_contentlen);
|
||||
/* Check IEEE80211_P2P_ATTR_CHANNEL_LIST */
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_CHANNEL_LIST, NULL, (uint *)&attr_contentlen);
|
||||
if (pattr != NULL) {
|
||||
int i;
|
||||
u32 num_of_ch;
|
||||
@ -3708,10 +3708,10 @@ static void rtw_cfg80211_adjust_p2pie_channel(_adapter *padapter, const u8 *fram
|
||||
}
|
||||
}
|
||||
|
||||
/* Check P2P_ATTR_OPERATING_CH */
|
||||
/* Check IEEE80211_P2P_ATTR_OPER_CHANNEL */
|
||||
attr_contentlen = 0;
|
||||
pattr = NULL;
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, (uint *)&attr_contentlen);
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, NULL, (uint *)&attr_contentlen);
|
||||
if (pattr != NULL) {
|
||||
if (*(pattr + 4) && *(pattr + 4) != union_ch) {
|
||||
#ifdef RTW_SINGLE_WIPHY
|
||||
@ -3888,7 +3888,7 @@ u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_len)
|
||||
u8 ch_cnt = 0;
|
||||
u8 ch_list[40];
|
||||
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, &attr_contentlen);
|
||||
pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_CHANNEL_LIST, NULL, &attr_contentlen);
|
||||
if (pattr != NULL) {
|
||||
int i, j;
|
||||
u32 num_of_ch;
|
||||
@ -4000,16 +4000,16 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||
#endif
|
||||
}
|
||||
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, NULL, &cont_len);
|
||||
if (cont)
|
||||
op_ch = *(cont + 4);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_LISTEN_CH, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_LISTEN_CHANNEL, NULL, &cont_len);
|
||||
if (cont)
|
||||
listen_ch = *(cont + 4);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GO_INTENT, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_GO_INTENT, NULL, &cont_len);
|
||||
if (cont)
|
||||
intent = *cont;
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_INTENDED_IF_ADDR, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_INTENDED_IFACE_ADDR, NULL, &cont_len);
|
||||
if (cont && cont_len == 6)
|
||||
iaddr = cont;
|
||||
|
||||
@ -4056,16 +4056,16 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||
#endif
|
||||
}
|
||||
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, NULL, &cont_len);
|
||||
if (cont)
|
||||
op_ch = *(cont + 4);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GO_INTENT, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_GO_INTENT, NULL, &cont_len);
|
||||
if (cont)
|
||||
intent = *cont;
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
if (cont)
|
||||
status = *cont;
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_INTENDED_IF_ADDR, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_INTENDED_IFACE_ADDR, NULL, &cont_len);
|
||||
if (cont && cont_len == 6)
|
||||
iaddr = cont;
|
||||
|
||||
@ -4114,10 +4114,10 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||
#endif
|
||||
}
|
||||
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, NULL, &cont_len);
|
||||
if (cont)
|
||||
op_ch = *(cont + 4);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
if (cont)
|
||||
status = *cont;
|
||||
|
||||
@ -4157,13 +4157,13 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||
#endif
|
||||
}
|
||||
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_INVITATION_FLAGS, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_INVITE_FLAGS, NULL, &cont_len);
|
||||
if (cont)
|
||||
flags = *cont;
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, NULL, &cont_len);
|
||||
if (cont)
|
||||
op_ch = *(cont + 4);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_BSSID, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_GROUP_BSSID, NULL, &cont_len);
|
||||
if (cont && cont_len == 6)
|
||||
gbssid = cont;
|
||||
|
||||
@ -4215,7 +4215,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||
#endif
|
||||
}
|
||||
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
if (cont) {
|
||||
#ifdef CONFIG_P2P_INVITE_IOT
|
||||
if (tx && *cont == 7) {
|
||||
@ -4225,10 +4225,10 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||
#endif /* CONFIG_P2P_INVITE_IOT */
|
||||
status = *cont;
|
||||
}
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_OPER_CHANNEL, NULL, &cont_len);
|
||||
if (cont)
|
||||
op_ch = *(cont + 4);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_BSSID, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_GROUP_BSSID, NULL, &cont_len);
|
||||
if (cont && cont_len == 6)
|
||||
gbssid = cont;
|
||||
|
||||
@ -4257,7 +4257,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||
RTW_INFO("RTW_%s:P2P_DEVDISC_REQ, dialogToken=%d\n", (tx == _TRUE) ? "Tx" : "Rx", dialogToken);
|
||||
break;
|
||||
case P2P_DEVDISC_RESP:
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
RTW_INFO("RTW_%s:P2P_DEVDISC_RESP, dialogToken=%d, status:%d\n", (tx == _TRUE) ? "Tx" : "Rx", dialogToken, cont ? *cont : -1);
|
||||
break;
|
||||
case P2P_PROVISION_DISC_REQ: {
|
||||
@ -4275,7 +4275,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
||||
p2p_ie = rtw_get_p2p_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen);
|
||||
if (p2p_ie) {
|
||||
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, NULL, &contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_GROUP_ID, NULL, &contentlen)) {
|
||||
pwdev_priv->provdisc_req_issued = _FALSE;/* case: p2p_client join p2p GO */
|
||||
} else {
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
@ -4433,7 +4433,7 @@ int process_p2p_cross_connect_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
||||
|
||||
while (p2p_ie) {
|
||||
/* Get P2P Manageability IE. */
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_MANAGEABILITY, p2p_attr, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_MANAGABILITY, p2p_attr, &attr_contentlen)) {
|
||||
if ((p2p_attr[0] & (BIT(0) | BIT(1))) == 0x01)
|
||||
ret = _FALSE;
|
||||
break;
|
||||
@ -4479,7 +4479,7 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
||||
while (p2p_ie) {
|
||||
find_p2p = _TRUE;
|
||||
/* Get Notice of Absence IE. */
|
||||
noa_attr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_NOA, NULL, &attr_contentlen);
|
||||
noa_attr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_ABSENCE_NOTICE, NULL, &attr_contentlen);
|
||||
if (noa_attr) {
|
||||
find_p2p_ps = _TRUE;
|
||||
noa_index = noa_attr[0];
|
||||
|
@ -4159,17 +4159,17 @@ int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb)
|
||||
/* if SA == br_mac && skb== IP => copy SIP to br_ip ?? why */
|
||||
if (!memcmp(skb->data + MACADDRLEN, padapter->br_mac, MACADDRLEN) &&
|
||||
(*((unsigned short *)(skb->data + MACADDRLEN * 2)) == __constant_htons(ETH_P_IP)))
|
||||
memcpy(padapter->br_ip, skb->data + WLAN_ETHHDR_LEN + 12, 4);
|
||||
memcpy(padapter->br_ip, skb->data + ETH_HLEN + 12, 4);
|
||||
|
||||
if (*((unsigned short *)(skb->data + MACADDRLEN * 2)) == __constant_htons(ETH_P_IP)) {
|
||||
if (memcmp(padapter->scdb_mac, skb->data + MACADDRLEN, MACADDRLEN)) {
|
||||
void *scdb_findEntry(_adapter *priv, unsigned char *macAddr, unsigned char *ipAddr);
|
||||
|
||||
padapter->scdb_entry = (struct nat25_network_db_entry *)scdb_findEntry(padapter,
|
||||
skb->data + MACADDRLEN, skb->data + WLAN_ETHHDR_LEN + 12);
|
||||
skb->data + MACADDRLEN, skb->data + ETH_HLEN + 12);
|
||||
if (padapter->scdb_entry != NULL) {
|
||||
memcpy(padapter->scdb_mac, skb->data + MACADDRLEN, MACADDRLEN);
|
||||
memcpy(padapter->scdb_ip, skb->data + WLAN_ETHHDR_LEN + 12, 4);
|
||||
memcpy(padapter->scdb_ip, skb->data + ETH_HLEN + 12, 4);
|
||||
padapter->scdb_entry->ageing_timer = jiffies;
|
||||
do_nat25 = 0;
|
||||
}
|
||||
|
@ -6676,7 +6676,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
|
||||
/* P2P Status */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_STATUS;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_STATUS;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001);
|
||||
@ -6687,7 +6687,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
|
||||
/* P2P Capability */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CAPABILITY;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CAPABILITY;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -6714,7 +6714,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
|
||||
/* Group Owner Intent */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_GO_INTENT;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GO_INTENT;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001);
|
||||
@ -6732,7 +6732,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
|
||||
/* Configuration Timeout */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CONF_TIMEOUT;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GO_CONFIG_TIMEOUT;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -6744,7 +6744,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
|
||||
/* Operating Channel */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_OPERATING_CH;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_OPER_CHANNEL;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005);
|
||||
@ -6776,7 +6776,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
|
||||
/* Intended P2P Interface Address */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_INTENDED_IF_ADDR;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_INTENDED_IFACE_ADDR;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN);
|
||||
@ -6788,7 +6788,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
|
||||
/* Channel List */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CH_LIST;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CHANNEL_LIST;
|
||||
|
||||
/* Country String(3) */
|
||||
/* + ( Operating Class (1) + Number of Channels(1) ) * Operation Classes (?) */
|
||||
@ -6860,7 +6860,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
|
||||
/* Device Info */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_DEVICE_INFO;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_DEVICE_INFO;
|
||||
|
||||
/* Length: */
|
||||
/* 21->P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
|
||||
@ -6912,7 +6912,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) {
|
||||
/* Group ID Attribute */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_GROUP_ID;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GROUP_ID;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN + pwdinfo->nego_ssidlen);
|
||||
@ -7028,7 +7028,7 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
|
||||
|
||||
/* P2P Status */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_STATUS;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_STATUS;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0001);
|
||||
@ -7039,7 +7039,7 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
|
||||
|
||||
/* Configuration Timeout */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CONF_TIMEOUT;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GO_CONFIG_TIMEOUT;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0002);
|
||||
@ -7062,7 +7062,7 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
|
||||
|
||||
/* Operating Channel */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_OPERATING_CH;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_OPER_CHANNEL;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(0x0005);
|
||||
@ -7086,7 +7086,7 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
|
||||
|
||||
/* P2P Group BSSID */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_GROUP_BSSID;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_GROUP_BSSID;
|
||||
|
||||
/* Length: */
|
||||
*(u16 *)(p2pie + p2pielen) = cpu_to_le16(ETH_ALEN);
|
||||
@ -7101,7 +7101,7 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
|
||||
|
||||
/* Channel List */
|
||||
/* Type: */
|
||||
p2pie[p2pielen++] = P2P_ATTR_CH_LIST;
|
||||
p2pie[p2pielen++] = IEEE80211_P2P_ATTR_CHANNEL_LIST;
|
||||
|
||||
/* Length: */
|
||||
/* Country String(3) */
|
||||
|
@ -94,7 +94,7 @@ static void rtw_hal_mcc_build_p2p_noa_attr(PADAPTER padapter, u8 *ie, u32 *ie_le
|
||||
p2p_noa_attr_len = p2p_noa_attr_len + 4;
|
||||
|
||||
/* attrute ID(1 byte) */
|
||||
p2p_noa_attr_ie[p2p_noa_attr_len] = P2P_ATTR_NOA;
|
||||
p2p_noa_attr_ie[p2p_noa_attr_len] = IEEE80211_P2P_ATTR_ABSENCE_NOTICE;
|
||||
p2p_noa_attr_len = p2p_noa_attr_len + 1;
|
||||
|
||||
/* attrute length(2 bytes) length = noa_desc_num*13 + 2 */
|
||||
|
@ -45,12 +45,6 @@
|
||||
#include <osdep_service_linux.h>
|
||||
#endif
|
||||
|
||||
/* #include <rtw_byteorder.h> */
|
||||
|
||||
#ifndef BIT
|
||||
#define BIT(x) (1 << (x))
|
||||
#endif
|
||||
|
||||
#define CHECK_BIT(a, b) (!!((a) & (b)))
|
||||
|
||||
#define BIT0 0x00000001
|
||||
|
@ -15,34 +15,14 @@
|
||||
#ifndef _WIFI_H_
|
||||
#define _WIFI_H_
|
||||
|
||||
|
||||
#ifndef BIT
|
||||
#define BIT(x) (1 << (x))
|
||||
#endif
|
||||
|
||||
|
||||
#define WLAN_ETHHDR_LEN 14
|
||||
#define WLAN_ETHADDR_LEN 6
|
||||
#define WLAN_IEEE_OUI_LEN 3
|
||||
#define WLAN_ADDR_LEN 6
|
||||
#define WLAN_CRC_LEN 4
|
||||
#define WLAN_BSSID_LEN 6
|
||||
#define WLAN_BSS_TS_LEN 8
|
||||
#define WLAN_HDR_A3_LEN 24
|
||||
#define WLAN_HDR_A4_LEN 30
|
||||
#define WLAN_HDR_A3_QOS_LEN 26
|
||||
#define WLAN_HDR_A4_QOS_LEN 32
|
||||
#define WLAN_SSID_MAXLEN 32
|
||||
#define WLAN_DATA_MAXLEN 2312
|
||||
|
||||
#define WLAN_A3_PN_OFFSET 24
|
||||
#define WLAN_A4_PN_OFFSET 30
|
||||
|
||||
#define WLAN_MIN_ETHFRM_LEN 60
|
||||
#define WLAN_MAX_ETHFRM_LEN 1514
|
||||
#define WLAN_ETHHDR_LEN 14
|
||||
#define WLAN_WMM_LEN 24
|
||||
#define VENDOR_NAME_LEN 20
|
||||
#define VENDOR_NAME_LEN 20
|
||||
|
||||
#ifdef CONFIG_APPEND_VENDOR_IE_ENABLE
|
||||
#define WLAN_MAX_VENDOR_IE_LEN 255
|
||||
@ -61,11 +41,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define P80211CAPTURE_VERSION 0x80211001
|
||||
|
||||
/* This value is tested by WiFi 11n Test Plan 5.2.3.
|
||||
* This test verifies the WLAN NIC can update the NAV through sending the CTS with large duration. */
|
||||
#define WiFiNavUpperUs 30000 /* 30 ms */
|
||||
|
||||
#ifdef GREEN_HILL
|
||||
#pragma pack(1)
|
||||
@ -293,26 +268,11 @@ static inline int IsFrameTypeData(unsigned char *pframe)
|
||||
/*-----------------------------------------------------------------------------
|
||||
Below is for the security related definition
|
||||
------------------------------------------------------------------------------*/
|
||||
#define _RESERVED_FRAME_TYPE_ 0
|
||||
#define _SKB_FRAME_TYPE_ 2
|
||||
#define _PRE_ALLOCMEM_ 1
|
||||
#define _PRE_ALLOCHDR_ 3
|
||||
#define _PRE_ALLOCLLCHDR_ 4
|
||||
#define _PRE_ALLOCICVHDR_ 5
|
||||
#define _PRE_ALLOCMICHDR_ 6
|
||||
|
||||
#define _SIFSTIME_ ((priv->pmib->dot11BssType.net_work_type&WIRELESS_11A) ? 16 : 10)
|
||||
#define _ACKCTSLNG_ 14 /* 14 bytes long, including crclng */
|
||||
#define _CRCLNG_ 4
|
||||
|
||||
#define _ASOCREQ_IE_OFFSET_ 4 /* excluding wlan_hdr */
|
||||
#define _ASOCRSP_IE_OFFSET_ 6
|
||||
#define _REASOCREQ_IE_OFFSET_ 10
|
||||
#define _REASOCRSP_IE_OFFSET_ 6
|
||||
#define _PROBEREQ_IE_OFFSET_ 0
|
||||
#define _PROBERSP_IE_OFFSET_ 12
|
||||
#define _AUTH_IE_OFFSET_ 6
|
||||
#define _DEAUTH_IE_OFFSET_ 0
|
||||
#define _BEACON_IE_OFFSET_ 12
|
||||
#define _PUBLIC_ACTION_IE_OFFSET_ 8
|
||||
|
||||
@ -332,13 +292,6 @@ static inline int IsFrameTypeData(unsigned char *pframe)
|
||||
#define _STATUS_CODE_ 2
|
||||
#define _TIMESTAMP_ 8
|
||||
|
||||
#define AUTH_ODD_TO 0
|
||||
#define AUTH_EVEN_TO 1
|
||||
|
||||
#define WLAN_ETHCONV_ENCAP 1
|
||||
#define WLAN_ETHCONV_RFC1042 2
|
||||
#define WLAN_ETHCONV_8021h 3
|
||||
|
||||
#define cap_ESS BIT(0)
|
||||
#define cap_IBSS BIT(1)
|
||||
#define cap_CFPollable BIT(2)
|
||||
@ -496,12 +449,6 @@ struct ADDBA_request {
|
||||
/* Value of WPS attribute "WPS_ATTR_DEVICE_NAME */
|
||||
#define WPS_MAX_DEVICE_NAME_LEN 32
|
||||
|
||||
/* Value of WPS Request Type Attribute */
|
||||
#define WPS_REQ_TYPE_ENROLLEE_INFO_ONLY 0x00
|
||||
#define WPS_REQ_TYPE_ENROLLEE_OPEN_8021X 0x01
|
||||
#define WPS_REQ_TYPE_REGISTRAR 0x02
|
||||
#define WPS_REQ_TYPE_WLAN_MANAGER_REGISTRAR 0x03
|
||||
|
||||
/* Value of WPS Response Type Attribute */
|
||||
#define WPS_RESPONSE_TYPE_INFO_ONLY 0x00
|
||||
#define WPS_RESPONSE_TYPE_8021X 0x01
|
||||
@ -516,19 +463,9 @@ struct ADDBA_request {
|
||||
#define WPS_VERSION_1 0x10
|
||||
|
||||
/* Value of WPS Configuration Method Attribute */
|
||||
#define WPS_CONFIG_METHOD_FLASH 0x0001
|
||||
#define WPS_CONFIG_METHOD_ETHERNET 0x0002
|
||||
#define WPS_CONFIG_METHOD_LABEL 0x0004
|
||||
#define WPS_CONFIG_METHOD_DISPLAY 0x0008
|
||||
#define WPS_CONFIG_METHOD_E_NFC 0x0010
|
||||
#define WPS_CONFIG_METHOD_I_NFC 0x0020
|
||||
#define WPS_CONFIG_METHOD_NFC 0x0040
|
||||
#define WPS_CONFIG_METHOD_PBC 0x0080
|
||||
#define WPS_CONFIG_METHOD_KEYPAD 0x0100
|
||||
#define WPS_CONFIG_METHOD_VPBC 0x0280
|
||||
#define WPS_CONFIG_METHOD_PPBC 0x0480
|
||||
#define WPS_CONFIG_METHOD_VDISPLAY 0x2008
|
||||
#define WPS_CONFIG_METHOD_PDISPLAY 0x4008
|
||||
|
||||
/* Value of Category ID of WPS Primary Device Type Attribute */
|
||||
#define WPS_PDT_CID_DISPLAYS 0x0007
|
||||
@ -547,42 +484,12 @@ struct ADDBA_request {
|
||||
#define WPS_DPID_PBC 0x0004
|
||||
#define WPS_DPID_REGISTRAR_SPEC 0x0005
|
||||
|
||||
/* Value of WPS RF Bands Attribute */
|
||||
#define WPS_RF_BANDS_2_4_GHZ 0x01
|
||||
#define WPS_RF_BANDS_5_GHZ 0x02
|
||||
|
||||
/* Value of WPS Association State Attribute */
|
||||
#define WPS_ASSOC_STATE_NOT_ASSOCIATED 0x00
|
||||
#define WPS_ASSOC_STATE_CONNECTION_SUCCESS 0x01
|
||||
#define WPS_ASSOC_STATE_CONFIGURATION_FAILURE 0x02
|
||||
#define WPS_ASSOC_STATE_ASSOCIATION_FAILURE 0x03
|
||||
#define WPS_ASSOC_STATE_IP_FAILURE 0x04
|
||||
|
||||
/* =====================P2P Section===================== */
|
||||
/* For P2P */
|
||||
#define P2POUI 0x506F9A09
|
||||
|
||||
/* P2P Attribute ID */
|
||||
#define P2P_ATTR_STATUS 0x00
|
||||
#define P2P_ATTR_MINOR_REASON_CODE 0x01
|
||||
#define P2P_ATTR_CAPABILITY 0x02
|
||||
#define P2P_ATTR_DEVICE_ID 0x03
|
||||
#define P2P_ATTR_GO_INTENT 0x04
|
||||
#define P2P_ATTR_CONF_TIMEOUT 0x05
|
||||
#define P2P_ATTR_LISTEN_CH 0x06
|
||||
#define P2P_ATTR_GROUP_BSSID 0x07
|
||||
#define P2P_ATTR_EX_LISTEN_TIMING 0x08
|
||||
#define P2P_ATTR_INTENDED_IF_ADDR 0x09
|
||||
#define P2P_ATTR_MANAGEABILITY 0x0A
|
||||
#define P2P_ATTR_CH_LIST 0x0B
|
||||
#define P2P_ATTR_NOA 0x0C
|
||||
#define P2P_ATTR_DEVICE_INFO 0x0D
|
||||
#define P2P_ATTR_GROUP_INFO 0x0E
|
||||
#define P2P_ATTR_GROUP_ID 0x0F
|
||||
#define P2P_ATTR_INTERFACE 0x10
|
||||
#define P2P_ATTR_OPERATING_CH 0x11
|
||||
#define P2P_ATTR_INVITATION_FLAGS 0x12
|
||||
|
||||
/* Value of Status Attribute */
|
||||
#define P2P_STATUS_SUCCESS 0x00
|
||||
#define P2P_STATUS_FAIL_INFO_UNAVAILABLE 0x01
|
||||
|
@ -2750,7 +2750,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(_adapter *padapter, char *buf, in
|
||||
memcpy(pmlmepriv->p2p_probe_req_ie, p2p_ie, p2p_ielen);
|
||||
pmlmepriv->p2p_probe_req_ie_len = p2p_ielen;
|
||||
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_LISTEN_CH, (u8 *)listen_ch_attr, (uint *) &attr_contentlen)
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_LISTEN_CHANNEL, (u8 *)listen_ch_attr, (uint *) &attr_contentlen)
|
||||
&& attr_contentlen == 5) {
|
||||
if (wdinfo->listen_channel != listen_ch_attr[4]) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" listen channel - country:%c%c%c, class:%u, ch:%u\n",
|
||||
@ -6353,8 +6353,8 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
|
||||
if (rtw_get_p2p_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, p2p_ie, &p2p_ielen)) {
|
||||
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO, devinfo_content, &devinfo_contentlen);
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8 *)&capability, &capability_len);
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_DEVICE_INFO, devinfo_content, &devinfo_contentlen);
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_CAPABILITY, (u8 *)&capability, &capability_len);
|
||||
|
||||
}
|
||||
|
||||
@ -6415,7 +6415,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
|
||||
/* P2P Capability ATTR */
|
||||
/* Type: */
|
||||
p2p_ie[p2pielen++] = P2P_ATTR_CAPABILITY;
|
||||
p2p_ie[p2pielen++] = IEEE80211_P2P_ATTR_CAPABILITY;
|
||||
|
||||
/* Length: */
|
||||
*(u16*) ( p2p_ie + p2pielen ) = cpu_to_le16( 0x0002 );
|
||||
@ -6430,7 +6430,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
|
||||
/* Device Info ATTR */
|
||||
/* Type: */
|
||||
p2p_ie[p2pielen++] = P2P_ATTR_DEVICE_INFO;
|
||||
p2p_ie[p2pielen++] = IEEE80211_P2P_ATTR_DEVICE_INFO;
|
||||
|
||||
/* Length: */
|
||||
/* 21->P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
|
||||
@ -9041,7 +9041,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
|
||||
#endif
|
||||
|
||||
/* Check P2P Capability ATTR */
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8 *)&cap_attr, (uint *) &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, IEEE80211_P2P_ATTR_CAPABILITY, (u8 *)&cap_attr, (uint *) &attr_contentlen)) {
|
||||
u8 grp_cap = 0;
|
||||
/* RTW_INFO( "[%s] Got P2P Capability Attr!!\n", __FUNCTION__ ); */
|
||||
cap_attr = le16_to_cpu(cap_attr);
|
||||
|
@ -4386,12 +4386,12 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
|
||||
/* The P2P Device Info attribute is included in the probe response frame. */
|
||||
|
||||
memset(attr_content, 0x00, 100);
|
||||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, IEEE80211_P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen)) {
|
||||
/* Handle the P2P Device ID attribute of Beacon first */
|
||||
blnMatch = 1;
|
||||
break;
|
||||
|
||||
} else if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_INFO, attr_content, &attr_contentlen)) {
|
||||
} else if (rtw_get_p2p_attr_content(p2pie, p2pielen, IEEE80211_P2P_ATTR_DEVICE_INFO, attr_content, &attr_contentlen)) {
|
||||
/* Handle the P2P Device Info attribute of probe response */
|
||||
blnMatch = 1;
|
||||
break;
|
||||
@ -4613,7 +4613,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
|
||||
if (p2pie) {
|
||||
while (p2pie) {
|
||||
/* memset( attr_content, 0x00, 2); */
|
||||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_CAPABILITY, attr_content, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, IEEE80211_P2P_ATTR_CAPABILITY, attr_content, &attr_contentlen)) {
|
||||
/* Handle the P2P capability attribute */
|
||||
blnMatch = 1;
|
||||
break;
|
||||
@ -4857,13 +4857,13 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
||||
/* The P2P Device ID attribute is included in the Beacon frame. */
|
||||
/* The P2P Device Info attribute is included in the probe response frame. */
|
||||
|
||||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, IEEE80211_P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen)) {
|
||||
/* Handle the P2P Device ID attribute of Beacon first */
|
||||
if (_rtw_memcmp(attr_content, pinvite_req_info->peer_macaddr, ETH_ALEN)) {
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
break;
|
||||
}
|
||||
} else if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_INFO, attr_content, &attr_contentlen)) {
|
||||
} else if (rtw_get_p2p_attr_content(p2pie, p2pielen, IEEE80211_P2P_ATTR_DEVICE_INFO, attr_content, &attr_contentlen)) {
|
||||
/* Handle the P2P Device Info attribute of probe response */
|
||||
if (_rtw_memcmp(attr_content, pinvite_req_info->peer_macaddr, ETH_ALEN)) {
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
@ -5114,16 +5114,16 @@ static int rtw_p2p_set_pc(struct net_device *dev,
|
||||
/* The P2P Device ID attribute is included in the Beacon frame. */
|
||||
/* The P2P Device Info attribute is included in the probe response frame. */
|
||||
printk("[%s] Got P2P IE\n", __FUNCTION__);
|
||||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, IEEE80211_P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen)) {
|
||||
/* Handle the P2P Device ID attribute of Beacon first */
|
||||
printk("[%s] P2P_ATTR_DEVICE_ID\n", __FUNCTION__);
|
||||
printk("[%s] IEEE80211_P2P_ATTR_DEVICE_ID\n", __FUNCTION__);
|
||||
if (_rtw_memcmp(attr_content, peerMAC, ETH_ALEN)) {
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
break;
|
||||
}
|
||||
} else if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_INFO, attr_content, &attr_contentlen)) {
|
||||
} else if (rtw_get_p2p_attr_content(p2pie, p2pielen, IEEE80211_P2P_ATTR_DEVICE_INFO, attr_content, &attr_contentlen)) {
|
||||
/* Handle the P2P Device Info attribute of probe response */
|
||||
printk("[%s] P2P_ATTR_DEVICE_INFO\n", __FUNCTION__);
|
||||
printk("[%s] IEEE80211_P2P_ATTR_DEVICE_INFO\n", __FUNCTION__);
|
||||
if (_rtw_memcmp(attr_content, peerMAC, ETH_ALEN)) {
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
break;
|
||||
@ -5366,13 +5366,13 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
||||
/* The P2P Device ID attribute is included in the Beacon frame. */
|
||||
/* The P2P Device Info attribute is included in the probe response frame. */
|
||||
|
||||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen)) {
|
||||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, IEEE80211_P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen)) {
|
||||
/* Handle the P2P Device ID attribute of Beacon first */
|
||||
if (_rtw_memcmp(attr_content, peerMAC, ETH_ALEN)) {
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
break;
|
||||
}
|
||||
} else if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_INFO, attr_content, &attr_contentlen)) {
|
||||
} else if (rtw_get_p2p_attr_content(p2pie, p2pielen, IEEE80211_P2P_ATTR_DEVICE_INFO, attr_content, &attr_contentlen)) {
|
||||
/* Handle the P2P Device Info attribute of probe response */
|
||||
if (_rtw_memcmp(attr_content, peerMAC, ETH_ALEN)) {
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
|
Loading…
Reference in New Issue
Block a user