switch to common ieee80211 headers

This patch switches to <linux/ieee80211.h> and <net/cfg80211.h> and
deletes a lot of duplicate definitions plus many unused ones.

rtw_ieee80211_hdr_3addr_qos is duplicate of ieee80211_qos_hdr.
rtw_ieee80211_spectrum_mgmt_actioncode is a duplication of ieee80211_spectrum_mgmt_actioncode
rtw_ieee80211_hdr_3addr is duplicate of ieee80211_hdr_3addr.
rtw_ieee80211_hdr is duplicate of ieee80211_hdr
rtw_ieee80211s_hdr is duplicate of ieee80211s_hdr
rtw_ieee80211_rann_ie is duplicate of ieee80211_rann_ie
from include/linux/ieee80211.h.

Link: https://lore.kernel.org/r/20200906133236.556427-1-insafonov@gmail.com
Link: https://lore.kernel.org/r/20200609194848.166130-1-pterjan@google.com
Also port
5cd8396540b5f7ef7c3ac499e967dd4deb8e9930
bbfe286b07d8282f4957dee692e85b3bd60de770
d87f574d6923c546e7d0f75ce0581436376b98a6
36eb7d108e8de3097f373eb8629d8739d4fa3e74
1b9e6df5169b36b3242e2e28c39f9bbfc01863e8
d94971aa97670d400371baef5d9d5cf6dc8ea2b5
This commit is contained in:
Carlos Garces 2021-10-21 17:30:03 +02:00
parent 6b480dfa8e
commit 4799326c6f
23 changed files with 547 additions and 823 deletions

View File

@ -1312,7 +1312,7 @@ static int rtw_mpm_tx_ies_sync_bss(_adapter *adapter, struct mesh_plink_ent *pli
#endif #endif
/* count for new frame length */ /* count for new frame length */
new_len = sizeof(struct rtw_ieee80211_hdr_3addr) + tlv_ies_offset; new_len = sizeof(struct ieee80211_hdr_3addr) + tlv_ies_offset;
left = BSS_EX_TLV_IES_LEN(network); left = BSS_EX_TLV_IES_LEN(network);
pos = BSS_EX_TLV_IES(network); pos = BSS_EX_TLV_IES(network);
while (left >= 2) { while (left >= 2) {
@ -1349,10 +1349,10 @@ static int rtw_mpm_tx_ies_sync_bss(_adapter *adapter, struct mesh_plink_ent *pli
} }
/* build new frame */ /* build new frame */
memcpy(new_buf, fhead, sizeof(struct rtw_ieee80211_hdr_3addr) + tlv_ies_offset); memcpy(new_buf, fhead, sizeof(struct ieee80211_hdr_3addr) + tlv_ies_offset);
new_fhead = new_buf; new_fhead = new_buf;
new_flen = new_len; new_flen = new_len;
new_fbody = new_fhead + sizeof(struct rtw_ieee80211_hdr_3addr); new_fbody = new_fhead + sizeof(struct ieee80211_hdr_3addr);
fpos = new_fbody + tlv_ies_offset; fpos = new_fbody + tlv_ies_offset;
left = BSS_EX_TLV_IES_LEN(network); left = BSS_EX_TLV_IES_LEN(network);
@ -1483,7 +1483,7 @@ static int rtw_mpm_check_frames(_adapter *adapter, u8 action, const u8 **buf, si
u8 *fhead = (u8 *)*buf; u8 *fhead = (u8 *)*buf;
size_t flen = *len; size_t flen = *len;
u8 *peer_addr = tx ? GetAddr1Ptr(fhead) : get_addr2_ptr(fhead); u8 *peer_addr = tx ? GetAddr1Ptr(fhead) : get_addr2_ptr(fhead);
u8 *frame_body = fhead + sizeof(struct rtw_ieee80211_hdr_3addr); u8 *frame_body = fhead + sizeof(struct ieee80211_hdr_3addr);
struct mpm_frame_info mpm_info; struct mpm_frame_info mpm_info;
u8 tlv_ies_offset; u8 tlv_ies_offset;
u8 *mpm_ie = NULL; u8 *mpm_ie = NULL;
@ -1493,11 +1493,11 @@ static int rtw_mpm_check_frames(_adapter *adapter, u8 action, const u8 **buf, si
int ret = 0; int ret = 0;
u8 mpm_log_buf[MPM_LOG_BUF_LEN] = {0}; u8 mpm_log_buf[MPM_LOG_BUF_LEN] = {0};
if (action == RTW_ACT_SELF_PROTECTED_MESH_OPEN) if (action == WLAN_SP_MESH_PEERING_OPEN)
tlv_ies_offset = 4; tlv_ies_offset = 4;
else if (action == RTW_ACT_SELF_PROTECTED_MESH_CONF) else if (action == WLAN_SP_MESH_PEERING_CONFIRM)
tlv_ies_offset = 6; tlv_ies_offset = 6;
else if (action == RTW_ACT_SELF_PROTECTED_MESH_CLOSE) else if (action == WLAN_SP_MESH_PEERING_CLOSE)
tlv_ies_offset = 2; tlv_ies_offset = 2;
else { else {
rtw_warn_on(1); rtw_warn_on(1);
@ -1505,23 +1505,20 @@ static int rtw_mpm_check_frames(_adapter *adapter, u8 action, const u8 **buf, si
} }
plink = rtw_mesh_plink_get(adapter, peer_addr); plink = rtw_mesh_plink_get(adapter, peer_addr);
if (!plink && (tx == _TRUE || action == RTW_ACT_SELF_PROTECTED_MESH_CONF)) { if (!plink && (tx == _TRUE || action == WLAN_SP_MESH_PEERING_CONFIRM)) {
/* warning message if no plink when: 1.TX all MPM or 2.RX CONF */
RTW_WARN("RTW_%s:%s without plink of "MAC_FMT"\n"
, (tx == _TRUE) ? "Tx" : "Rx", action_self_protected_str(action), MAC_ARG(peer_addr));
goto exit; goto exit;
} }
memset(&mpm_info, 0, sizeof(struct mpm_frame_info)); memset(&mpm_info, 0, sizeof(struct mpm_frame_info));
if (action == RTW_ACT_SELF_PROTECTED_MESH_CONF) { if (action == WLAN_SP_MESH_PEERING_CONFIRM) {
mpm_info.aid = (u8 *)frame_body + 4; mpm_info.aid = (u8 *)frame_body + 4;
mpm_info.aid_v = RTW_GET_LE16(mpm_info.aid); mpm_info.aid_v = RTW_GET_LE16(mpm_info.aid);
} }
mpm_ie = rtw_get_ie(fhead + sizeof(struct rtw_ieee80211_hdr_3addr) + tlv_ies_offset mpm_ie = rtw_get_ie(fhead + sizeof(struct ieee80211_hdr_3addr) + tlv_ies_offset
, WLAN_EID_MPM, &mpm_ielen , WLAN_EID_MPM, &mpm_ielen
, flen - sizeof(struct rtw_ieee80211_hdr_3addr) - tlv_ies_offset); , flen - sizeof(struct ieee80211_hdr_3addr) - tlv_ies_offset);
if (!mpm_ie || mpm_ielen < 2 + 2) if (!mpm_ie || mpm_ielen < 2 + 2)
goto exit; goto exit;
@ -1531,7 +1528,7 @@ static int rtw_mpm_check_frames(_adapter *adapter, u8 action, const u8 **buf, si
mpm_info.llid_v = RTW_GET_LE16(mpm_info.llid); mpm_info.llid_v = RTW_GET_LE16(mpm_info.llid);
switch (action) { switch (action) {
case RTW_ACT_SELF_PROTECTED_MESH_OPEN: case WLAN_SP_MESH_PEERING_OPEN:
/* pid:2, llid:2, (chosen_pmk:16) */ /* pid:2, llid:2, (chosen_pmk:16) */
if (mpm_info.pid_v == 0 && mpm_ielen == 4) if (mpm_info.pid_v == 0 && mpm_ielen == 4)
; ;
@ -1540,7 +1537,7 @@ static int rtw_mpm_check_frames(_adapter *adapter, u8 action, const u8 **buf, si
else else
goto exit; goto exit;
break; break;
case RTW_ACT_SELF_PROTECTED_MESH_CONF: case WLAN_SP_MESH_PEERING_CONFIRM:
/* pid:2, llid:2, plid:2, (chosen_pmk:16) */ /* pid:2, llid:2, plid:2, (chosen_pmk:16) */
mpm_info.plid = mpm_info.llid + 2; mpm_info.plid = mpm_info.llid + 2;
mpm_info.plid_v = RTW_GET_LE16(mpm_info.plid); mpm_info.plid_v = RTW_GET_LE16(mpm_info.plid);
@ -1551,7 +1548,7 @@ static int rtw_mpm_check_frames(_adapter *adapter, u8 action, const u8 **buf, si
else else
goto exit; goto exit;
break; break;
case RTW_ACT_SELF_PROTECTED_MESH_CLOSE: case WLAN_SP_MESH_PEERING_CLOSE:
/* pid:2, llid:2, (plid:2), reason:2, (chosen_pmk:16) */ /* pid:2, llid:2, (plid:2), reason:2, (chosen_pmk:16) */
if (mpm_info.pid_v == 0 && mpm_ielen == 6) { if (mpm_info.pid_v == 0 && mpm_ielen == 6) {
/* MPM, without plid */ /* MPM, without plid */
@ -1581,15 +1578,15 @@ static int rtw_mpm_check_frames(_adapter *adapter, u8 action, const u8 **buf, si
}; };
if (mpm_info.pid_v == 1) { if (mpm_info.pid_v == 1) {
mic_ie = rtw_get_ie(fhead + sizeof(struct rtw_ieee80211_hdr_3addr) + tlv_ies_offset mic_ie = rtw_get_ie(fhead + sizeof(struct ieee80211_hdr_3addr) + tlv_ies_offset
, WLAN_EID_MIC, &mic_ielen , WLAN_EID_MIC, &mic_ielen
, flen - sizeof(struct rtw_ieee80211_hdr_3addr) - tlv_ies_offset); , flen - sizeof(struct ieee80211_hdr_3addr) - tlv_ies_offset);
if (!mic_ie || mic_ielen != AES_BLOCK_SIZE) if (!mic_ie || mic_ielen != AES_BLOCK_SIZE)
goto exit; goto exit;
} }
#if CONFIG_RTW_MPM_TX_IES_SYNC_BSS #if CONFIG_RTW_MPM_TX_IES_SYNC_BSS
if ((action == RTW_ACT_SELF_PROTECTED_MESH_OPEN || action == RTW_ACT_SELF_PROTECTED_MESH_CONF) if ((action == WLAN_SP_MESH_PEERING_OPEN || action == WLAN_SP_MESH_PEERING_CONFIRM)
&& tx == _TRUE && tx == _TRUE
) { ) {
#define DBG_RTW_MPM_TX_IES_SYNC_BSS 0 #define DBG_RTW_MPM_TX_IES_SYNC_BSS 0
@ -1602,8 +1599,8 @@ static int rtw_mpm_check_frames(_adapter *adapter, u8 action, const u8 **buf, si
if (DBG_RTW_MPM_TX_IES_SYNC_BSS) { if (DBG_RTW_MPM_TX_IES_SYNC_BSS) {
RTW_INFO(FUNC_ADPT_FMT" before:\n", FUNC_ADPT_ARG(adapter)); RTW_INFO(FUNC_ADPT_FMT" before:\n", FUNC_ADPT_ARG(adapter));
dump_ies(RTW_DBGDUMP dump_ies(RTW_DBGDUMP
, fhead + sizeof(struct rtw_ieee80211_hdr_3addr) + tlv_ies_offset , fhead + sizeof(struct ieee80211_hdr_3addr) + tlv_ies_offset
, flen - sizeof(struct rtw_ieee80211_hdr_3addr) - tlv_ies_offset); , flen - sizeof(struct ieee80211_hdr_3addr) - tlv_ies_offset);
} }
rtw_mpm_tx_ies_sync_bss(adapter, plink rtw_mpm_tx_ies_sync_bss(adapter, plink
@ -1615,18 +1612,18 @@ static int rtw_mpm_check_frames(_adapter *adapter, u8 action, const u8 **buf, si
/* update pointer & len for new frame */ /* update pointer & len for new frame */
fhead = nbuf; fhead = nbuf;
flen = nlen; flen = nlen;
frame_body = fhead + sizeof(struct rtw_ieee80211_hdr_3addr); frame_body = fhead + sizeof(struct ieee80211_hdr_3addr);
if (mpm_info.pid_v == 1) { if (mpm_info.pid_v == 1) {
mic_ie = rtw_get_ie(fhead + sizeof(struct rtw_ieee80211_hdr_3addr) + tlv_ies_offset mic_ie = rtw_get_ie(fhead + sizeof(struct ieee80211_hdr_3addr) + tlv_ies_offset
, WLAN_EID_MIC, &mic_ielen , WLAN_EID_MIC, &mic_ielen
, flen - sizeof(struct rtw_ieee80211_hdr_3addr) - tlv_ies_offset); , flen - sizeof(struct ieee80211_hdr_3addr) - tlv_ies_offset);
} }
if (DBG_RTW_MPM_TX_IES_SYNC_BSS) { if (DBG_RTW_MPM_TX_IES_SYNC_BSS) {
RTW_INFO(FUNC_ADPT_FMT" after:\n", FUNC_ADPT_ARG(adapter)); RTW_INFO(FUNC_ADPT_FMT" after:\n", FUNC_ADPT_ARG(adapter));
dump_ies(RTW_DBGDUMP dump_ies(RTW_DBGDUMP
, fhead + sizeof(struct rtw_ieee80211_hdr_3addr) + tlv_ies_offset , fhead + sizeof(struct ieee80211_hdr_3addr) + tlv_ies_offset
, flen - sizeof(struct rtw_ieee80211_hdr_3addr) - tlv_ies_offset); , flen - sizeof(struct ieee80211_hdr_3addr) - tlv_ies_offset);
} }
} }
bypass_sync_bss: bypass_sync_bss:
@ -1636,14 +1633,14 @@ bypass_sync_bss:
goto mpm_log; goto mpm_log;
#if CONFIG_RTW_MESH_PEER_BLACKLIST #if CONFIG_RTW_MESH_PEER_BLACKLIST
if (action == RTW_ACT_SELF_PROTECTED_MESH_OPEN) { if (action == WLAN_SP_MESH_PEERING_OPEN) {
if (tx) if (tx)
rtw_mesh_plink_set_peer_conf_timeout(adapter, peer_addr); rtw_mesh_plink_set_peer_conf_timeout(adapter, peer_addr);
} else } else
#endif #endif
#if CONFIG_RTW_MESH_ACNODE_PREVENT #if CONFIG_RTW_MESH_ACNODE_PREVENT
if (action == RTW_ACT_SELF_PROTECTED_MESH_CLOSE) { if (action == WLAN_SP_MESH_PEERING_CLOSE) {
if (tx && mpm_info.reason && mpm_info.reason_v == WLAN_REASON_MESH_MAX_PEERS) { if (tx && mpm_info.reason && mpm_info.reason_v == WLAN_REASON_MESH_MAX_PEERS) {
if (rtw_mesh_scanned_is_acnode_confirmed(adapter, plink->scanned) if (rtw_mesh_scanned_is_acnode_confirmed(adapter, plink->scanned)
&& rtw_mesh_acnode_prevent_allow_sacrifice(adapter) && rtw_mesh_acnode_prevent_allow_sacrifice(adapter)
@ -1676,7 +1673,7 @@ bypass_sync_bss:
} }
} else } else
#endif #endif
if (action == RTW_ACT_SELF_PROTECTED_MESH_CONF) { if (action == WLAN_SP_MESH_PEERING_CONFIRM) {
_irqL irqL; _irqL irqL;
u8 *ies = NULL; u8 *ies = NULL;
u16 ies_len = 0; u16 ies_len = 0;
@ -1718,13 +1715,13 @@ bypass_sync_bss:
/* copy mesh confirm IEs */ /* copy mesh confirm IEs */
if (mpm_info.pid_v == 1) /* not include MIC & encrypted AMPE */ if (mpm_info.pid_v == 1) /* not include MIC & encrypted AMPE */
ies_len = (mic_ie - fhead) - sizeof(struct rtw_ieee80211_hdr_3addr) - 2; ies_len = (mic_ie - fhead) - sizeof(struct ieee80211_hdr_3addr) - 2;
else else
ies_len = flen - sizeof(struct rtw_ieee80211_hdr_3addr) - 2; ies_len = flen - sizeof(struct ieee80211_hdr_3addr) - 2;
ies = rtw_zmalloc(ies_len); ies = rtw_zmalloc(ies_len);
if (ies) { if (ies) {
memcpy(ies, fhead + sizeof(struct rtw_ieee80211_hdr_3addr) + 2, ies_len); memcpy(ies, fhead + sizeof(struct ieee80211_hdr_3addr) + 2, ies_len);
if (tx == _FALSE) { if (tx == _FALSE) {
plink->rx_conf_ies = ies; plink->rx_conf_ies = ies;
plink->rx_conf_ies_len = ies_len; plink->rx_conf_ies_len = ies_len;
@ -1743,11 +1740,6 @@ release_plink_ctl:
mpm_log: mpm_log:
rtw_mpm_info_msg(&mpm_info, mpm_log_buf); rtw_mpm_info_msg(&mpm_info, mpm_log_buf);
RTW_INFO("RTW_%s:%s %s\n"
, (tx == _TRUE) ? "Tx" : "Rx"
, action_self_protected_str(action)
, mpm_log_buf
);
ret = 1; ret = 1;
@ -1769,21 +1761,20 @@ static int rtw_mesh_check_frames(_adapter *adapter, const u8 **buf, size_t *len,
const u8 *frame_body; const u8 *frame_body;
u8 category, action; u8 category, action;
frame_body = *buf + sizeof(struct rtw_ieee80211_hdr_3addr); frame_body = *buf + sizeof(struct ieee80211_hdr_3addr);
category = frame_body[0]; category = frame_body[0];
if (category == WLAN_CATEGORY_SELF_PROTECTED) { if (category == WLAN_CATEGORY_SELF_PROTECTED) {
action = frame_body[1]; action = frame_body[1];
switch (action) { switch (action) {
case RTW_ACT_SELF_PROTECTED_MESH_OPEN: case WLAN_SP_MESH_PEERING_OPEN:
case RTW_ACT_SELF_PROTECTED_MESH_CONF: case WLAN_SP_MESH_PEERING_CONFIRM:
case RTW_ACT_SELF_PROTECTED_MESH_CLOSE: case WLAN_SP_MESH_PEERING_CLOSE:
rtw_mpm_check_frames(adapter, action, buf, len, tx); rtw_mpm_check_frames(adapter, action, buf, len, tx);
is_mesh_frame = action; is_mesh_frame = action;
break; break;
case RTW_ACT_SELF_PROTECTED_MESH_GK_INFORM: case RTW_ACT_SELF_PROTECTED_MESH_GK_INFORM:
case RTW_ACT_SELF_PROTECTED_MESH_GK_ACK: case WLAN_SP_MGK_ACK:
RTW_INFO("RTW_%s:%s\n", (tx == _TRUE) ? "Tx" : "Rx", action_self_protected_str(action));
is_mesh_frame = action; is_mesh_frame = action;
break; break;
default: default:
@ -1836,7 +1827,7 @@ unsigned int on_action_self_protected(_adapter *adapter, union recv_frame *rfram
struct sta_info *sta = NULL; struct sta_info *sta = NULL;
u8 *pframe = rframe->u.hdr.rx_data; u8 *pframe = rframe->u.hdr.rx_data;
uint frame_len = rframe->u.hdr.len; uint frame_len = rframe->u.hdr.len;
u8 *frame_body = (u8 *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); u8 *frame_body = (u8 *)(pframe + sizeof(struct ieee80211_hdr_3addr));
u8 category; u8 category;
u8 action; u8 action;
@ -1850,11 +1841,11 @@ unsigned int on_action_self_protected(_adapter *adapter, union recv_frame *rfram
action = frame_body[1]; action = frame_body[1];
switch (action) { switch (action) {
case RTW_ACT_SELF_PROTECTED_MESH_OPEN: case WLAN_SP_MESH_PEERING_OPEN:
case RTW_ACT_SELF_PROTECTED_MESH_CONF: case WLAN_SP_MESH_PEERING_CONFIRM:
case RTW_ACT_SELF_PROTECTED_MESH_CLOSE: case WLAN_SP_MESH_PEERING_CLOSE:
case RTW_ACT_SELF_PROTECTED_MESH_GK_INFORM: case RTW_ACT_SELF_PROTECTED_MESH_GK_INFORM:
case RTW_ACT_SELF_PROTECTED_MESH_GK_ACK: case WLAN_SP_MGK_ACK:
if (!(MLME_IS_MESH(adapter) && MLME_IS_ASOC(adapter))) if (!(MLME_IS_MESH(adapter) && MLME_IS_ASOC(adapter)))
goto exit; goto exit;
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
@ -1894,7 +1885,7 @@ unsigned int on_action_mesh(_adapter *adapter, union recv_frame *rframe)
struct sta_priv *stapriv = &adapter->stapriv; struct sta_priv *stapriv = &adapter->stapriv;
u8 *pframe = rframe->u.hdr.rx_data; u8 *pframe = rframe->u.hdr.rx_data;
uint frame_len = rframe->u.hdr.len; uint frame_len = rframe->u.hdr.len;
u8 *frame_body = (u8 *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); u8 *frame_body = (u8 *)(pframe + sizeof(struct ieee80211_hdr_3addr));
u8 category; u8 category;
u8 action; u8 action;
@ -1909,7 +1900,7 @@ unsigned int on_action_mesh(_adapter *adapter, union recv_frame *rframe)
action = frame_body[1]; action = frame_body[1];
switch (action) { switch (action) {
case RTW_ACT_MESH_HWMP_PATH_SELECTION: case WLAN_MESH_ACTION_HWMP_PATH_SELECTION:
rtw_mesh_rx_path_sel_frame(adapter, rframe); rtw_mesh_rx_path_sel_frame(adapter, rframe);
ret = _SUCCESS; ret = _SUCCESS;
break; break;
@ -2506,12 +2497,12 @@ static u8 *rtw_mesh_construct_peer_mesh_close(_adapter *adapter, struct mesh_pli
struct rtw_mesh_info *minfo = &adapter->mesh_info; struct rtw_mesh_info *minfo = &adapter->mesh_info;
u8 *frame = NULL, *pos; u8 *frame = NULL, *pos;
u32 flen; u32 flen;
struct rtw_ieee80211_hdr *whdr; struct ieee80211_hdr *whdr;
if (minfo->mesh_auth_id && !MESH_PLINK_AEK_VALID(plink)) if (minfo->mesh_auth_id && !MESH_PLINK_AEK_VALID(plink))
goto exit; goto exit;
flen = sizeof(struct rtw_ieee80211_hdr_3addr) flen = sizeof(struct ieee80211_hdr_3addr)
+ 2 /* category, action */ + 2 /* category, action */
+ 2 + minfo->mesh_id_len /* mesh id */ + 2 + minfo->mesh_id_len /* mesh id */
+ 2 + 8 + (minfo->mesh_auth_id ? 16 : 0) /* mpm */ + 2 + 8 + (minfo->mesh_auth_id ? 16 : 0) /* mpm */
@ -2523,16 +2514,16 @@ static u8 *rtw_mesh_construct_peer_mesh_close(_adapter *adapter, struct mesh_pli
if (!frame) if (!frame)
goto exit; goto exit;
whdr = (struct rtw_ieee80211_hdr *)frame; whdr = (struct ieee80211_hdr *)frame;
memcpy(whdr->addr1, adapter_mac_addr(adapter), ETH_ALEN); memcpy(whdr->addr1, adapter_mac_addr(adapter), ETH_ALEN);
memcpy(whdr->addr2, plink->addr, ETH_ALEN); memcpy(whdr->addr2, plink->addr, ETH_ALEN);
memcpy(whdr->addr3, adapter_mac_addr(adapter), ETH_ALEN); memcpy(whdr->addr3, adapter_mac_addr(adapter), ETH_ALEN);
set_frame_sub_type(frame, IEEE80211_STYPE_ACTION); set_frame_sub_type(frame, IEEE80211_STYPE_ACTION);
pos += sizeof(struct rtw_ieee80211_hdr_3addr); pos += sizeof(struct ieee80211_hdr_3addr);
*(pos++) = WLAN_CATEGORY_SELF_PROTECTED; *(pos++) = WLAN_CATEGORY_SELF_PROTECTED;
*(pos++) = RTW_ACT_SELF_PROTECTED_MESH_CLOSE; *(pos++) = WLAN_SP_MESH_PEERING_CLOSE;
pos = rtw_set_ie_mesh_id(pos, NULL, minfo->mesh_id, minfo->mesh_id_len); pos = rtw_set_ie_mesh_id(pos, NULL, minfo->mesh_id, minfo->mesh_id_len);
@ -2558,7 +2549,7 @@ static u8 *rtw_mesh_construct_peer_mesh_close(_adapter *adapter, struct mesh_pli
memcpy(ampe_buf + 38, plink->l_nonce, 32); memcpy(ampe_buf + 38, plink->l_nonce, 32);
enc_ret = rtw_mpm_ampe_enc(adapter, plink enc_ret = rtw_mpm_ampe_enc(adapter, plink
, frame + sizeof(struct rtw_ieee80211_hdr_3addr) , frame + sizeof(struct ieee80211_hdr_3addr)
, pos, ampe_buf, 1); , pos, ampe_buf, 1);
if (enc_ret != _SUCCESS) { if (enc_ret != _SUCCESS) {
rtw_mfree(frame, flen); rtw_mfree(frame, flen);
@ -3457,7 +3448,7 @@ s8 rtw_mesh_tx_set_whdr_mctrl_len(u8 mesh_frame_mode, struct pkt_attrib *attrib)
void rtw_mesh_tx_build_mctrl(_adapter *adapter, struct pkt_attrib *attrib, u8 *buf) void rtw_mesh_tx_build_mctrl(_adapter *adapter, struct pkt_attrib *attrib, u8 *buf)
{ {
struct rtw_ieee80211s_hdr *mctrl = (struct rtw_ieee80211s_hdr *)buf; struct ieee80211s_hdr *mctrl = (struct ieee80211s_hdr *)buf;
memset(mctrl, 0, XATTRIB_GET_MCTRL_LEN(attrib)); memset(mctrl, 0, XATTRIB_GET_MCTRL_LEN(attrib));
@ -3505,7 +3496,7 @@ void rtw_mesh_tx_build_mctrl(_adapter *adapter, struct pkt_attrib *attrib, u8 *b
} }
u8 rtw_mesh_tx_build_whdr(_adapter *adapter, struct pkt_attrib *attrib u8 rtw_mesh_tx_build_whdr(_adapter *adapter, struct pkt_attrib *attrib
, u16 *fctrl, struct rtw_ieee80211_hdr *whdr) , u16 *fctrl, struct ieee80211_hdr *whdr)
{ {
switch (attrib->mesh_frame_mode) { switch (attrib->mesh_frame_mode) {
case MESH_UCAST_DATA: /* 1, 1, RA, TA, mDA(=DA), mSA(=SA) */ case MESH_UCAST_DATA: /* 1, 1, RA, TA, mDA(=DA), mSA(=SA) */
@ -3635,7 +3626,7 @@ exit:
} }
int rtw_mesh_rx_data_validate_mctrl(_adapter *adapter, union recv_frame *rframe int rtw_mesh_rx_data_validate_mctrl(_adapter *adapter, union recv_frame *rframe
, const struct rtw_ieee80211s_hdr *mctrl, const u8 *mda, const u8 *msa , const struct ieee80211s_hdr *mctrl, const u8 *mda, const u8 *msa
, u8 *mctrl_len , u8 *mctrl_len
, const u8 **da, const u8 **sa) , const u8 **da, const u8 **sa)
{ {
@ -3689,7 +3680,7 @@ inline int rtw_mesh_rx_validate_mctrl_non_amsdu(_adapter *adapter, union recv_fr
int ret; int ret;
ret = rtw_mesh_rx_data_validate_mctrl(adapter, rframe ret = rtw_mesh_rx_data_validate_mctrl(adapter, rframe
, (struct rtw_ieee80211s_hdr *)(get_recvframe_data(rframe) + rattrib->hdrlen + rattrib->iv_len) , (struct ieee80211s_hdr *)(get_recvframe_data(rframe) + rattrib->hdrlen + rattrib->iv_len)
, rattrib->mda, rattrib->msa , rattrib->mda, rattrib->msa
, &rattrib->mesh_ctrl_len , &rattrib->mesh_ctrl_len
, &da, &sa); , &da, &sa);
@ -3756,7 +3747,7 @@ endlookup:
int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe
, const u8 *mda, const u8 *msa , const u8 *mda, const u8 *msa
, const u8 *da, const u8 *sa , const u8 *da, const u8 *sa
, struct rtw_ieee80211s_hdr *mctrl , struct ieee80211s_hdr *mctrl
, struct xmit_frame **fwd_frame, _list *b2u_list) , struct xmit_frame **fwd_frame, _list *b2u_list)
{ {
_adapter *adapter = rframe->u.hdr.adapter; _adapter *adapter = rframe->u.hdr.adapter;

View File

@ -505,18 +505,18 @@ int rtw_mesh_addr_resolve(_adapter *adapter, struct xmit_frame *xframe, _pkt *pk
s8 rtw_mesh_tx_set_whdr_mctrl_len(u8 mesh_frame_mode, struct pkt_attrib *attrib); s8 rtw_mesh_tx_set_whdr_mctrl_len(u8 mesh_frame_mode, struct pkt_attrib *attrib);
void rtw_mesh_tx_build_mctrl(_adapter *adapter, struct pkt_attrib *attrib, u8 *buf); void rtw_mesh_tx_build_mctrl(_adapter *adapter, struct pkt_attrib *attrib, u8 *buf);
u8 rtw_mesh_tx_build_whdr(_adapter *adapter, struct pkt_attrib *attrib u8 rtw_mesh_tx_build_whdr(_adapter *adapter, struct pkt_attrib *attrib
, u16 *fctrl, struct rtw_ieee80211_hdr *whdr); , u16 *fctrl, struct ieee80211_hdr *whdr);
int rtw_mesh_rx_data_validate_hdr(_adapter *adapter, union recv_frame *rframe, struct sta_info **sta); int rtw_mesh_rx_data_validate_hdr(_adapter *adapter, union recv_frame *rframe, struct sta_info **sta);
int rtw_mesh_rx_data_validate_mctrl(_adapter *adapter, union recv_frame *rframe int rtw_mesh_rx_data_validate_mctrl(_adapter *adapter, union recv_frame *rframe
, const struct rtw_ieee80211s_hdr *mctrl, const u8 *mda, const u8 *msa , const struct ieee80211s_hdr *mctrl, const u8 *mda, const u8 *msa
, u8 *mctrl_len, const u8 **da, const u8 **sa); , u8 *mctrl_len, const u8 **da, const u8 **sa);
int rtw_mesh_rx_validate_mctrl_non_amsdu(_adapter *adapter, union recv_frame *rframe); int rtw_mesh_rx_validate_mctrl_non_amsdu(_adapter *adapter, union recv_frame *rframe);
int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe
, const u8 *mda, const u8 *msa , const u8 *mda, const u8 *msa
, const u8 *da, const u8 *sa , const u8 *da, const u8 *sa
, struct rtw_ieee80211s_hdr *mctrl , struct ieee80211s_hdr *mctrl
, struct xmit_frame **fwd_frame, _list *b2u_list); , struct xmit_frame **fwd_frame, _list *b2u_list);
void dump_mesh_stats(void *sel, _adapter *adapter); void dump_mesh_stats(void *sel, _adapter *adapter);

View File

@ -216,10 +216,10 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
struct xmit_priv *pxmitpriv = &(adapter->xmitpriv); struct xmit_priv *pxmitpriv = &(adapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
struct xmit_frame *pmgntframe = NULL; struct xmit_frame *pmgntframe = NULL;
struct rtw_ieee80211_hdr *pwlanhdr = NULL; struct ieee80211_hdr *pwlanhdr = NULL;
struct pkt_attrib *pattrib = NULL; struct pkt_attrib *pattrib = NULL;
u8 category = WLAN_CATEGORY_MESH_ACTION; u8 category = WLAN_CATEGORY_MESH_ACTION;
u8 action = RTW_ACT_MESH_HWMP_PATH_SELECTION; u8 action = WLAN_MESH_ACTION_HWMP_PATH_SELECTION;
u16 *fctrl = NULL; u16 *fctrl = NULL;
u8 *pos, ie_len; u8 *pos, ie_len;
@ -233,10 +233,10 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pos = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pos = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pos; pwlanhdr = (struct ieee80211_hdr *)pos;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
memcpy(pwlanhdr->addr1, da, ETH_ALEN); memcpy(pwlanhdr->addr1, da, ETH_ALEN);
@ -247,8 +247,8 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
set_frame_sub_type(pos, IEEE80211_STYPE_ACTION); set_frame_sub_type(pos, IEEE80211_STYPE_ACTION);
pos += sizeof(struct rtw_ieee80211_hdr_3addr); pos += sizeof(struct ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
pos = rtw_set_fixed_ie(pos, 1, &(category), &(pattrib->pktlen)); pos = rtw_set_fixed_ie(pos, 1, &(category), &(pattrib->pktlen));
pos = rtw_set_fixed_ie(pos, 1, &(action), &(pattrib->pktlen)); pos = rtw_set_fixed_ie(pos, 1, &(action), &(pattrib->pktlen));
@ -268,7 +268,7 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
break; break;
case RTW_MPATH_RANN: case RTW_MPATH_RANN:
RTW_HWMP_DBG("sending RANN from "MAC_FMT"\n", MAC_ARG(originator_addr)); RTW_HWMP_DBG("sending RANN from "MAC_FMT"\n", MAC_ARG(originator_addr));
ie_len = sizeof(struct rtw_ieee80211_rann_ie); ie_len = sizeof(struct ieee80211_rann_ie);
pattrib->pktlen += (ie_len + 2); pattrib->pktlen += (ie_len + 2);
*pos++ = WLAN_EID_RANN; *pos++ = WLAN_EID_RANN;
break; break;
@ -327,11 +327,11 @@ int rtw_mesh_path_error_tx(_adapter *adapter,
struct xmit_priv *pxmitpriv = &(adapter->xmitpriv); struct xmit_priv *pxmitpriv = &(adapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
struct xmit_frame *pmgntframe = NULL; struct xmit_frame *pmgntframe = NULL;
struct rtw_ieee80211_hdr *pwlanhdr = NULL; struct ieee80211_hdr *pwlanhdr = NULL;
struct pkt_attrib *pattrib = NULL; struct pkt_attrib *pattrib = NULL;
struct rtw_mesh_info *minfo = &adapter->mesh_info; struct rtw_mesh_info *minfo = &adapter->mesh_info;
u8 category = WLAN_CATEGORY_MESH_ACTION; u8 category = WLAN_CATEGORY_MESH_ACTION;
u8 action = RTW_ACT_MESH_HWMP_PATH_SELECTION; u8 action = WLAN_MESH_ACTION_HWMP_PATH_SELECTION;
u8 *pos, ie_len; u8 *pos, ie_len;
u16 *fctrl = NULL; u16 *fctrl = NULL;
@ -347,9 +347,9 @@ int rtw_mesh_path_error_tx(_adapter *adapter,
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pos = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pos = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pos; pwlanhdr = (struct ieee80211_hdr *)pos;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
memcpy(pwlanhdr->addr1, ra, ETH_ALEN); memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
@ -360,8 +360,8 @@ int rtw_mesh_path_error_tx(_adapter *adapter,
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
set_frame_sub_type(pos, IEEE80211_STYPE_ACTION); set_frame_sub_type(pos, IEEE80211_STYPE_ACTION);
pos += sizeof(struct rtw_ieee80211_hdr_3addr); pos += sizeof(struct ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
pos = rtw_set_fixed_ie(pos, 1, &(category), &(pattrib->pktlen)); pos = rtw_set_fixed_ie(pos, 1, &(category), &(pattrib->pktlen));
pos = rtw_set_fixed_ie(pos, 1, &(action), &(pattrib->pktlen)); pos = rtw_set_fixed_ie(pos, 1, &(action), &(pattrib->pktlen));
@ -622,7 +622,7 @@ void rtw_ieee80211s_update_metric(_adapter *adapter, u8 mac_id,
} }
static void rtw_hwmp_preq_frame_process(_adapter *adapter, static void rtw_hwmp_preq_frame_process(_adapter *adapter,
struct rtw_ieee80211_hdr_3addr *mgmt, struct ieee80211_hdr_3addr *mgmt,
const u8 *preq_elem, u32 originator_metric) const u8 *preq_elem, u32 originator_metric)
{ {
struct rtw_mesh_info *minfo = &adapter->mesh_info; struct rtw_mesh_info *minfo = &adapter->mesh_info;
@ -805,7 +805,7 @@ rtw_next_hop_deref_protected(struct rtw_mesh_path *path)
} }
static void rtw_hwmp_prep_frame_process(_adapter *adapter, static void rtw_hwmp_prep_frame_process(_adapter *adapter,
struct rtw_ieee80211_hdr_3addr *mgmt, struct ieee80211_hdr_3addr *mgmt,
const u8 *prep_elem, u32 metric) const u8 *prep_elem, u32 metric)
{ {
struct rtw_mesh_cfg *mshcfg = &adapter->mesh_cfg; struct rtw_mesh_cfg *mshcfg = &adapter->mesh_cfg;
@ -887,7 +887,7 @@ fail:
} }
static void rtw_hwmp_perr_frame_process(_adapter *adapter, static void rtw_hwmp_perr_frame_process(_adapter *adapter,
struct rtw_ieee80211_hdr_3addr *mgmt, struct ieee80211_hdr_3addr *mgmt,
const u8 *perr_elem) const u8 *perr_elem)
{ {
struct rtw_mesh_cfg *mshcfg = &adapter->mesh_cfg; struct rtw_mesh_cfg *mshcfg = &adapter->mesh_cfg;
@ -942,8 +942,8 @@ endperr:
} }
static void rtw_hwmp_rann_frame_process(_adapter *adapter, static void rtw_hwmp_rann_frame_process(_adapter *adapter,
struct rtw_ieee80211_hdr_3addr *mgmt, struct ieee80211_hdr_3addr *mgmt,
const struct rtw_ieee80211_rann_ie *rann) const struct ieee80211_rann_ie *rann)
{ {
struct sta_info *sta; struct sta_info *sta;
struct sta_priv *pstapriv = &adapter->stapriv; struct sta_priv *pstapriv = &adapter->stapriv;
@ -1060,7 +1060,7 @@ static void rtw_hwmp_rann_frame_process(_adapter *adapter,
} }
static u32 rtw_hwmp_route_info_get(_adapter *adapter, static u32 rtw_hwmp_route_info_get(_adapter *adapter,
struct rtw_ieee80211_hdr_3addr *mgmt, struct ieee80211_hdr_3addr *mgmt,
const u8 *hwmp_ie, enum rtw_mpath_frame_type action) const u8 *hwmp_ie, enum rtw_mpath_frame_type action)
{ {
struct rtw_mesh_path *path; struct rtw_mesh_path *path;
@ -1227,8 +1227,8 @@ void rtw_mesh_rx_path_sel_frame(_adapter *adapter, union recv_frame *rframe)
struct rx_pkt_attrib *attrib = &rframe->u.hdr.attrib; struct rx_pkt_attrib *attrib = &rframe->u.hdr.attrib;
u8 *pframe = rframe->u.hdr.rx_data, *start; u8 *pframe = rframe->u.hdr.rx_data, *start;
uint frame_len = rframe->u.hdr.len, left; uint frame_len = rframe->u.hdr.len, left;
struct rtw_ieee80211_hdr_3addr *frame_hdr = (struct rtw_ieee80211_hdr_3addr *)pframe; struct ieee80211_hdr_3addr *frame_hdr = (struct ieee80211_hdr_3addr *)pframe;
u8 *frame_body = (u8 *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); u8 *frame_body = (u8 *)(pframe + sizeof(struct ieee80211_hdr_3addr));
ParseRes parse_res; ParseRes parse_res;
plink = rtw_mesh_plink_get(adapter, get_addr2_ptr(pframe)); plink = rtw_mesh_plink_get(adapter, get_addr2_ptr(pframe));
@ -1238,7 +1238,7 @@ void rtw_mesh_rx_path_sel_frame(_adapter *adapter, union recv_frame *rframe)
rtw_mesh_rx_hwmp_frame_cnts(adapter, get_addr2_ptr(pframe)); rtw_mesh_rx_hwmp_frame_cnts(adapter, get_addr2_ptr(pframe));
/* Mesh action frame IE offset = 2 */ /* Mesh action frame IE offset = 2 */
attrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr); attrib->hdrlen = sizeof(struct ieee80211_hdr_3addr);
left = frame_len - attrib->hdrlen - attrib->iv_len - attrib->icv_len - 2; left = frame_len - attrib->hdrlen - attrib->iv_len - attrib->icv_len - 2;
start = pframe + attrib->hdrlen + 2; start = pframe + attrib->hdrlen + 2;
@ -1277,7 +1277,7 @@ void rtw_mesh_rx_path_sel_frame(_adapter *adapter, union recv_frame *rframe)
rtw_hwmp_perr_frame_process(adapter, frame_hdr, elems.perr); rtw_hwmp_perr_frame_process(adapter, frame_hdr, elems.perr);
} }
if (elems.rann) if (elems.rann)
rtw_hwmp_rann_frame_process(adapter, frame_hdr, (struct rtw_ieee80211_rann_ie *)elems.rann); rtw_hwmp_rann_frame_process(adapter, frame_hdr, (struct ieee80211_rann_ie *)elems.rann);
} }
void rtw_mesh_queue_preq(struct rtw_mesh_path *path, u8 flags) void rtw_mesh_queue_preq(struct rtw_mesh_path *path, u8 flags)

View File

@ -3331,8 +3331,8 @@ void rtw_process_public_act_bsscoex(_adapter *padapter, u8 *pframe, uint frame_l
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
u8 beacon_updated = _FALSE; u8 beacon_updated = _FALSE;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr);
uint frame_body_len = frame_len - sizeof(struct rtw_ieee80211_hdr_3addr); uint frame_body_len = frame_len - sizeof(struct ieee80211_hdr_3addr);
u8 category, action; u8 category, action;
psta = rtw_get_stainfo(pstapriv, get_addr2_ptr(pframe)); psta = rtw_get_stainfo(pstapriv, get_addr2_ptr(pframe));

View File

@ -176,7 +176,7 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, enum channel_width bw)
u8 ActionHdr[4] = {ACT_CAT_VENDOR, 0x00, 0xE0, 0x4C}; u8 ActionHdr[4] = {ACT_CAT_VENDOR, 0x00, 0xE0, 0x4C};
/* MISC */ /* MISC */
struct pkt_attrib *attrib; struct pkt_attrib *attrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
enum MGN_RATE txrate; enum MGN_RATE txrate;
u8 *pframe; u8 *pframe;
u16 duration = 0; u16 duration = 0;
@ -215,10 +215,10 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, enum channel_width bw)
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
/* Frame control */ /* Frame control */
pwlanhdr->frame_ctl = 0; pwlanhdr->frame_control = 0;
set_frame_sub_type(pframe, attrib->subtype); set_frame_sub_type(pframe, attrib->subtype);
set_order_bit(pframe); set_order_bit(pframe);
@ -272,7 +272,7 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, enum channel_
struct ndpa_sta_info sta_info; struct ndpa_sta_info sta_info;
/* MISC */ /* MISC */
struct pkt_attrib *attrib; struct pkt_attrib *attrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u8 *pframe; u8 *pframe;
enum MGN_RATE txrate; enum MGN_RATE txrate;
u16 duration = 0; u16 duration = 0;
@ -310,10 +310,10 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, enum channel_
memset(pmgntframe->buf_addr, 0, TXDESC_OFFSET + WLANHDR_OFFSET); memset(pmgntframe->buf_addr, 0, TXDESC_OFFSET + WLANHDR_OFFSET);
pframe = pmgntframe->buf_addr + TXDESC_OFFSET; pframe = pmgntframe->buf_addr + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
/* Frame control */ /* Frame control */
pwlanhdr->frame_ctl = 0; pwlanhdr->frame_control = 0;
set_frame_sub_type(pframe, attrib->subtype); set_frame_sub_type(pframe, attrib->subtype);
/* Duration */ /* Duration */
@ -379,7 +379,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, enum channel_width bw)
struct ndpa_sta_info sta_info; struct ndpa_sta_info sta_info;
/* MISC */ /* MISC */
struct pkt_attrib *attrib; struct pkt_attrib *attrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
enum MGN_RATE txrate; enum MGN_RATE txrate;
u8 *pframe; u8 *pframe;
u8 *ra = NULL; u8 *ra = NULL;
@ -427,10 +427,10 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, enum channel_width bw)
memset(pmgntframe->buf_addr, 0, TXDESC_OFFSET + WLANHDR_OFFSET); memset(pmgntframe->buf_addr, 0, TXDESC_OFFSET + WLANHDR_OFFSET);
pframe = pmgntframe->buf_addr + TXDESC_OFFSET; pframe = pmgntframe->buf_addr + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
/* Frame control */ /* Frame control */
pwlanhdr->frame_ctl = 0; pwlanhdr->frame_control = 0;
set_frame_sub_type(pframe, attrib->subtype); set_frame_sub_type(pframe, attrib->subtype);
/* Duration */ /* Duration */
@ -490,7 +490,7 @@ static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll)
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
/* MISC */ /* MISC */
struct pkt_attrib *attrib; struct pkt_attrib *attrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u8 *pframe; u8 *pframe;
@ -519,10 +519,10 @@ static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll)
memset(pmgntframe->buf_addr, 0, TXDESC_OFFSET + WLANHDR_OFFSET); memset(pmgntframe->buf_addr, 0, TXDESC_OFFSET + WLANHDR_OFFSET);
pframe = pmgntframe->buf_addr + TXDESC_OFFSET; pframe = pmgntframe->buf_addr + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
/* Frame control */ /* Frame control */
pwlanhdr->frame_ctl = 0; pwlanhdr->frame_control = 0;
set_frame_sub_type(pframe, attrib->subtype); set_frame_sub_type(pframe, attrib->subtype);
/* Duration */ /* Duration */
@ -1627,7 +1627,7 @@ u32 rtw_bf_get_report_packet(PADAPTER adapter, union recv_frame *precv_frame)
if (!bfee) if (!bfee)
return _FAIL; return _FAIL;
frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); frame_body = pframe + sizeof(struct ieee80211_hdr_3addr);
category = frame_body[0]; category = frame_body[0];
action = frame_body[1]; action = frame_body[1];
@ -1693,7 +1693,7 @@ u8 rtw_bf_send_vht_gid_mgnt_packet(PADAPTER adapter, u8 *ra, u8 *gid, u8 *positi
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
/* MISC */ /* MISC */
struct pkt_attrib *attrib; struct pkt_attrib *attrib;
struct rtw_ieee80211_hdr *wlanhdr; struct ieee80211_hdr *wlanhdr;
u8 *pframe, *ptr; u8 *pframe, *ptr;
@ -1714,9 +1714,9 @@ u8 rtw_bf_send_vht_gid_mgnt_packet(PADAPTER adapter, u8 *ra, u8 *gid, u8 *positi
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pframe = (u8 *)pmgntframe->buf_addr + TXDESC_OFFSET; pframe = (u8 *)pmgntframe->buf_addr + TXDESC_OFFSET;
wlanhdr = (struct rtw_ieee80211_hdr *)pframe; wlanhdr = (struct ieee80211_hdr *)pframe;
wlanhdr->frame_ctl = 0; wlanhdr->frame_control = 0;
set_frame_sub_type(pframe, attrib->subtype); set_frame_sub_type(pframe, attrib->subtype);
set_duration(pframe, 0); set_duration(pframe, 0);
SetFragNum(pframe, 0); SetFragNum(pframe, 0);
@ -2176,7 +2176,7 @@ BOOLEAN issue_ht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, enum channel_width bw,
{ {
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv); struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
@ -2209,9 +2209,9 @@ BOOLEAN issue_ht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, enum channel_width bw,
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
set_order_bit(pframe); set_order_bit(pframe);
@ -2255,7 +2255,7 @@ BOOLEAN issue_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, enum channel_width bw, u8
{ {
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv); struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
@ -2285,9 +2285,9 @@ BOOLEAN issue_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, enum channel_width bw, u8
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
set_order_bit(pframe); set_order_bit(pframe);
@ -2334,7 +2334,7 @@ BOOLEAN issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel
{ {
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv); struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
@ -2372,9 +2372,9 @@ BOOLEAN issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
set_frame_sub_type(pframe, WIFI_NDPA); set_frame_sub_type(pframe, WIFI_NDPA);
@ -2428,7 +2428,7 @@ BOOLEAN issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel_wi
{ {
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv); struct xmit_priv *pxmitpriv = &(Adapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
@ -2458,9 +2458,9 @@ BOOLEAN issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel_wi
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
set_frame_sub_type(pframe, WIFI_NDPA); set_frame_sub_type(pframe, WIFI_NDPA);

View File

@ -2775,12 +2775,12 @@ u16 rtw_mcs_rate(u8 rf_type, u8 bw_40MHz, u8 short_GI, unsigned char *MCS_rate)
int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *action) int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *action)
{ {
const u8 *frame_body = frame + sizeof(struct rtw_ieee80211_hdr_3addr); const u8 *frame_body = frame + sizeof(struct ieee80211_hdr_3addr);
u16 fc; u16 fc;
u8 c; u8 c;
u8 a = ACT_PUBLIC_MAX; u8 a = ACT_PUBLIC_MAX;
fc = le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)frame)->frame_ctl); fc = le16_to_cpu(((struct ieee80211_hdr_3addr *)frame)->frame_control);
if ((fc & ( IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) if ((fc & ( IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE))
!= (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION) != (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION)
@ -2804,29 +2804,3 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *act
return _TRUE; return _TRUE;
} }
static const char *_action_public_str[] = {
"ACT_PUB_BSSCOEXIST",
"ACT_PUB_DSE_ENABLE",
"ACT_PUB_DSE_DEENABLE",
"ACT_PUB_DSE_REG_LOCATION",
"ACT_PUB_EXT_CHL_SWITCH",
"ACT_PUB_DSE_MSR_REQ",
"ACT_PUB_DSE_MSR_RPRT",
"ACT_PUB_MP",
"ACT_PUB_DSE_PWR_CONSTRAINT",
"ACT_PUB_VENDOR",
"ACT_PUB_GAS_INITIAL_REQ",
"ACT_PUB_GAS_INITIAL_RSP",
"ACT_PUB_GAS_COMEBACK_REQ",
"ACT_PUB_GAS_COMEBACK_RSP",
"ACT_PUB_TDLS_DISCOVERY_RSP",
"ACT_PUB_LOCATION_TRACK",
"ACT_PUB_RSVD",
};
const char *action_public_str(u8 action)
{
action = (action >= ACT_PUBLIC_MAX) ? ACT_PUBLIC_MAX : action;
return _action_public_str[action];
}

File diff suppressed because it is too large Load Diff

View File

@ -1830,7 +1830,7 @@ void SetPacketTx(PADAPTER padapter)
{ {
u8 *ptr, *pkt_start, *pkt_end; u8 *ptr, *pkt_start, *pkt_end;
u32 pkt_size, i; u32 pkt_size, i;
struct rtw_ieee80211_hdr *hdr; struct ieee80211_hdr *hdr;
u8 payload; u8 payload;
bool bmcast; bool bmcast;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
@ -1943,8 +1943,8 @@ void SetPacketTx(PADAPTER padapter)
#endif #endif
/* 3 4. make wlan header, make_wlanhdr() */ /* 3 4. make wlan header, make_wlanhdr() */
hdr = (struct rtw_ieee80211_hdr *)pkt_start; hdr = (struct ieee80211_hdr *)pkt_start;
set_frame_sub_type(&hdr->frame_ctl, pattrib->subtype); set_frame_sub_type(&hdr->frame_control, pattrib->subtype);
memcpy(hdr->addr1, pattrib->dst, ETH_ALEN); /* DA */ memcpy(hdr->addr1, pattrib->dst, ETH_ALEN); /* DA */
memcpy(hdr->addr2, pattrib->src, ETH_ALEN); /* SA */ memcpy(hdr->addr2, pattrib->src, ETH_ALEN); /* SA */

View File

@ -2249,7 +2249,7 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
unsigned char *pframe, *pmp_pkt; unsigned char *pframe, *pmp_pkt;
struct ethhdr *pethhdr; struct ethhdr *pethhdr;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
int llc_sz, payload_len; int llc_sz, payload_len;
struct mp_xmit_frame *pxframe = NULL; struct mp_xmit_frame *pxframe = NULL;
@ -2295,9 +2295,9 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
memset(pxframe->mem, 0 , WLANHDR_OFFSET); memset(pxframe->mem, 0 , WLANHDR_OFFSET);
pframe = (u8 *)(pxframe->mem) + WLANHDR_OFFSET; pframe = (u8 *)(pxframe->mem) + WLANHDR_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
set_frame_sub_type(pframe, (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA)); set_frame_sub_type(pframe, (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA));

View File

@ -143,7 +143,7 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
_adapter *padapter = pwdinfo->padapter; _adapter *padapter = pwdinfo->padapter;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
@ -166,9 +166,9 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
memcpy(pwlanhdr->addr1, da, ETH_ALEN); memcpy(pwlanhdr->addr1, da, ETH_ALEN);
@ -179,8 +179,8 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION); set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pframe += sizeof(struct ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
/* Build P2P action frame header */ /* Build P2P action frame header */
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen));
@ -201,7 +201,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
_adapter *padapter = pwdinfo->padapter; _adapter *padapter = pwdinfo->padapter;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
@ -226,9 +226,9 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
memcpy(pwlanhdr->addr1, da, ETH_ALEN); memcpy(pwlanhdr->addr1, da, ETH_ALEN);
@ -239,8 +239,8 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION); set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pframe += sizeof(struct ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
/* Build P2P public action frame header */ /* Build P2P public action frame header */
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen));
@ -286,7 +286,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
@ -303,9 +303,9 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); memcpy(pwlanhdr->addr1, raddr, ETH_ALEN);
@ -316,8 +316,8 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION); set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pframe += sizeof(struct ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen));
pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen));
@ -382,7 +382,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
_adapter *padapter = pwdinfo->padapter; _adapter *padapter = pwdinfo->padapter;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
@ -407,9 +407,9 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
memcpy(pwlanhdr->addr1, da, ETH_ALEN); memcpy(pwlanhdr->addr1, da, ETH_ALEN);
@ -420,8 +420,8 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION); set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pframe += sizeof(struct ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
/* Build P2P action frame header */ /* Build P2P action frame header */
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen));
@ -2428,7 +2428,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
u8 *p2p_ie; u8 *p2p_ie;
u32 p2p_ielen = 0; u32 p2p_ielen = 0;
frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr));
dialogToken = frame_body[7]; dialogToken = frame_body[7];
status = P2P_STATUS_FAIL_UNKNOWN_P2PGROUP; status = P2P_STATUS_FAIL_UNKNOWN_P2PGROUP;
@ -2506,7 +2506,7 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
u16 uconfig_method = 0; u16 uconfig_method = 0;
frame_body = (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); frame_body = (pframe + sizeof(struct ieee80211_hdr_3addr));
wpsie = rtw_get_wps_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &wps_ielen); wpsie = rtw_get_wps_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &wps_ielen);
if (wpsie) { if (wpsie) {
@ -3050,7 +3050,7 @@ u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
u8 dialogToken = 0; u8 dialogToken = 0;
u8 status = P2P_STATUS_SUCCESS; u8 status = P2P_STATUS_SUCCESS;
frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr));
dialogToken = frame_body[6]; dialogToken = frame_body[6];
@ -3735,7 +3735,7 @@ u32 rtw_xframe_build_wfd_ie(struct xmit_frame *xframe)
_adapter *adapter = xframe->padapter; _adapter *adapter = xframe->padapter;
struct wifidirect_info *wdinfo = &adapter->wdinfo; struct wifidirect_info *wdinfo = &adapter->wdinfo;
u8 *frame = xframe->buf_addr + TXDESC_OFFSET; u8 *frame = xframe->buf_addr + TXDESC_OFFSET;
u8 *frame_body = frame + sizeof(struct rtw_ieee80211_hdr_3addr); u8 *frame_body = frame + sizeof(struct ieee80211_hdr_3addr);
u8 *frame_tail = frame + xframe->attrib.pktlen; u8 *frame_tail = frame + xframe->attrib.pktlen;
u8 category, action, OUI_Subtype, dialogToken = 0; u8 category, action, OUI_Subtype, dialogToken = 0;
u32 wfdielen = 0; u32 wfdielen = 0;
@ -3743,7 +3743,7 @@ u32 rtw_xframe_build_wfd_ie(struct xmit_frame *xframe)
category = frame_body[0]; category = frame_body[0];
if (category == WLAN_CATEGORY_PUBLIC) { if (category == WLAN_CATEGORY_PUBLIC) {
action = frame_body[1]; action = frame_body[1];
if (action == ACT_PUBLIC_VENDOR if (action == WLAN_PUB_ACTION_VENDOR_SPECIFIC
&& _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE && _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE
) { ) {
OUI_Subtype = frame_body[6]; OUI_Subtype = frame_body[6];
@ -3812,7 +3812,7 @@ bool rtw_xframe_del_wfd_ie(struct xmit_frame *xframe)
{ {
#define DBG_XFRAME_DEL_WFD_IE 0 #define DBG_XFRAME_DEL_WFD_IE 0
u8 *frame = xframe->buf_addr + TXDESC_OFFSET; u8 *frame = xframe->buf_addr + TXDESC_OFFSET;
u8 *frame_body = frame + sizeof(struct rtw_ieee80211_hdr_3addr); u8 *frame_body = frame + sizeof(struct ieee80211_hdr_3addr);
u8 *frame_tail = frame + xframe->attrib.pktlen; u8 *frame_tail = frame + xframe->attrib.pktlen;
u8 category, action, OUI_Subtype; u8 category, action, OUI_Subtype;
u8 *ies = NULL; u8 *ies = NULL;
@ -3822,7 +3822,7 @@ bool rtw_xframe_del_wfd_ie(struct xmit_frame *xframe)
category = frame_body[0]; category = frame_body[0];
if (category == WLAN_CATEGORY_PUBLIC) { if (category == WLAN_CATEGORY_PUBLIC) {
action = frame_body[1]; action = frame_body[1];
if (action == ACT_PUBLIC_VENDOR if (action == WLAN_PUB_ACTION_VENDOR_SPECIFIC
&& _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE && _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE
) { ) {
OUI_Subtype = frame_body[6]; OUI_Subtype = frame_body[6];
@ -3958,12 +3958,12 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
u8 *iaddr = NULL; u8 *iaddr = NULL;
u8 *gbssid = NULL; u8 *gbssid = NULL;
frame_body = (unsigned char *)(buf + sizeof(struct rtw_ieee80211_hdr_3addr)); frame_body = (unsigned char *)(buf + sizeof(struct ieee80211_hdr_3addr));
category = frame_body[0]; category = frame_body[0];
/* just for check */ /* just for check */
if (category == WLAN_CATEGORY_PUBLIC) { if (category == WLAN_CATEGORY_PUBLIC) {
action = frame_body[1]; action = frame_body[1];
if (action == ACT_PUBLIC_VENDOR if (action == WLAN_PUB_ACTION_VENDOR_SPECIFIC
&& _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE && _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE
) { ) {
OUI_Subtype = frame_body[6]; OUI_Subtype = frame_body[6];
@ -3971,13 +3971,13 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
is_p2p_frame = OUI_Subtype; is_p2p_frame = OUI_Subtype;
#ifdef CONFIG_DEBUG_CFG80211 #ifdef CONFIG_DEBUG_CFG80211
RTW_INFO("ACTION_CATEGORY_PUBLIC: ACT_PUBLIC_VENDOR, OUI=0x%x, OUI_Subtype=%d, dialogToken=%d\n", RTW_INFO("ACTION_CATEGORY_PUBLIC: WLAN_PUB_ACTION_VENDOR_SPECIFIC , OUI=0x%x, OUI_Subtype=%d, dialogToken=%d\n",
cpu_to_be32(*((u32 *)(frame_body + 2))), OUI_Subtype, dialogToken); cpu_to_be32(*((u32 *)(frame_body + 2))), OUI_Subtype, dialogToken);
#endif #endif
p2p_ie = rtw_get_p2p_ie( p2p_ie = rtw_get_p2p_ie(
(u8 *)buf + sizeof(struct rtw_ieee80211_hdr_3addr) + _PUBLIC_ACTION_IE_OFFSET_ (u8 *)buf + sizeof(struct ieee80211_hdr_3addr) + _PUBLIC_ACTION_IE_OFFSET_
, len - sizeof(struct rtw_ieee80211_hdr_3addr) - _PUBLIC_ACTION_IE_OFFSET_ , len - sizeof(struct ieee80211_hdr_3addr) - _PUBLIC_ACTION_IE_OFFSET_
, NULL, &p2p_ielen); , NULL, &p2p_ielen);
switch (OUI_Subtype) { /* OUI Subtype */ switch (OUI_Subtype) { /* OUI Subtype */
@ -3996,7 +3996,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0) if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0)
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)); rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr));
#endif #endif
} }
@ -4036,10 +4036,10 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
if (!tx) { if (!tx) {
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
if (rtw_mi_check_status(padapter, MI_LINKED) if (rtw_mi_check_status(padapter, MI_LINKED)
&& rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == _FALSE && rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr)) == _FALSE
&& padapter->registrypriv.full_ch_in_p2p_handshake == 0) { && padapter->registrypriv.full_ch_in_p2p_handshake == 0) {
RTW_INFO(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter)); RTW_INFO(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter));
rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr), 0); rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr), 0);
} }
#endif #endif
} }
@ -4052,7 +4052,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
if (tx) { if (tx) {
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0) if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0)
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)); rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr));
#endif #endif
} }
@ -4093,10 +4093,10 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
pwdev_priv->provdisc_req_issued = _FALSE; pwdev_priv->provdisc_req_issued = _FALSE;
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
if (rtw_mi_check_status(padapter, MI_LINKED) if (rtw_mi_check_status(padapter, MI_LINKED)
&& rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == _FALSE && rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr)) == _FALSE
&& padapter->registrypriv.full_ch_in_p2p_handshake == 0) { && padapter->registrypriv.full_ch_in_p2p_handshake == 0) {
RTW_INFO(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter)); RTW_INFO(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter));
rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr), 0); rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr), 0);
} }
#endif #endif
} }
@ -4110,7 +4110,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
if (tx) { if (tx) {
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0) if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0)
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)); rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr));
#endif #endif
} }
@ -4153,7 +4153,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
if (rtw_mi_check_status(padapter, MI_LINKED) if (rtw_mi_check_status(padapter, MI_LINKED)
&& padapter->registrypriv.full_ch_in_p2p_handshake == 0) && padapter->registrypriv.full_ch_in_p2p_handshake == 0)
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)); rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr));
#endif #endif
} }
@ -4190,14 +4190,14 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0) { if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0) {
#if defined(CONFIG_P2P_INVITE_IOT) #if defined(CONFIG_P2P_INVITE_IOT)
if (op_ch != -1 && rtw_chk_p2pie_op_ch_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == _FALSE) { if (op_ch != -1 && rtw_chk_p2pie_op_ch_with_buddy(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr)) == _FALSE) {
RTW_INFO(FUNC_ADPT_FMT" op_ch:%u has no intersect with buddy\n", FUNC_ADPT_ARG(padapter), op_ch); RTW_INFO(FUNC_ADPT_FMT" op_ch:%u has no intersect with buddy\n", FUNC_ADPT_ARG(padapter), op_ch);
rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr), 0); rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr), 0);
} else } else
#endif #endif
if (rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)) == _FALSE) { if (rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr)) == _FALSE) {
RTW_INFO(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter)); RTW_INFO(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter));
rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr), 0); rtw_change_p2pie_ch_list(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr), 0);
} }
} }
#endif #endif
@ -4211,7 +4211,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
if (tx) { if (tx) {
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT) #if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_CFG80211_ONECHANNEL_UNDER_CONCURRENT)
if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0) if (rtw_mi_check_status(padapter, MI_LINKED) && padapter->registrypriv.full_ch_in_p2p_handshake == 0)
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len - sizeof(struct rtw_ieee80211_hdr_3addr)); rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len - sizeof(struct ieee80211_hdr_3addr));
#endif #endif
} }
@ -4261,7 +4261,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
RTW_INFO("RTW_%s:P2P_DEVDISC_RESP, dialogToken=%d, status:%d\n", (tx == _TRUE) ? "Tx" : "Rx", dialogToken, cont ? *cont : -1); RTW_INFO("RTW_%s:P2P_DEVDISC_RESP, dialogToken=%d, status:%d\n", (tx == _TRUE) ? "Tx" : "Rx", dialogToken, cont ? *cont : -1);
break; break;
case P2P_PROVISION_DISC_REQ: { case P2P_PROVISION_DISC_REQ: {
size_t frame_body_len = len - sizeof(struct rtw_ieee80211_hdr_3addr); size_t frame_body_len = len - sizeof(struct ieee80211_hdr_3addr);
u8 *p2p_ie; u8 *p2p_ie;
uint p2p_ielen = 0; uint p2p_ielen = 0;
uint contentlen = 0; uint contentlen = 0;

View File

@ -177,7 +177,7 @@ void _rtw_free_recv_priv(struct recv_priv *precvpriv)
bool rtw_rframe_del_wfd_ie(union recv_frame *rframe, u8 ies_offset) bool rtw_rframe_del_wfd_ie(union recv_frame *rframe, u8 ies_offset)
{ {
#define DBG_RFRAME_DEL_WFD_IE 0 #define DBG_RFRAME_DEL_WFD_IE 0
u8 *ies = rframe->u.hdr.rx_data + sizeof(struct rtw_ieee80211_hdr_3addr) + ies_offset; u8 *ies = rframe->u.hdr.rx_data + sizeof(struct ieee80211_hdr_3addr) + ies_offset;
uint ies_len_ori = rframe->u.hdr.len - (ies - rframe->u.hdr.rx_data); uint ies_len_ori = rframe->u.hdr.len - (ies - rframe->u.hdr.rx_data);
uint ies_len; uint ies_len;
@ -1762,7 +1762,7 @@ static sint validate_mgmt_protect(_adapter *adapter, union recv_frame *precv_fra
} else { } else {
RTW_INFO(FUNC_ADPT_FMT" bmc:%u, action(%u), privacy:%u, encrypt:%u, bdecrypted:%u\n" RTW_INFO(FUNC_ADPT_FMT" bmc:%u, action(%u), privacy:%u, encrypt:%u, bdecrypted:%u\n"
, FUNC_ADPT_ARG(adapter), is_bmc , FUNC_ADPT_ARG(adapter), is_bmc
, *(ptr + sizeof(struct rtw_ieee80211_hdr_3addr)) , *(ptr + sizeof(struct ieee80211_hdr_3addr))
, pattrib->privacy, pattrib->encrypt, pattrib->bdecrypted); , pattrib->privacy, pattrib->encrypt, pattrib->bdecrypted);
} }
} }
@ -1775,7 +1775,7 @@ static sint validate_mgmt_protect(_adapter *adapter, union recv_frame *precv_fra
} }
if (subtype == IEEE80211_STYPE_ACTION) if (subtype == IEEE80211_STYPE_ACTION)
category = *(ptr + sizeof(struct rtw_ieee80211_hdr_3addr)); category = *(ptr + sizeof(struct ieee80211_hdr_3addr));
if (is_bmc) { if (is_bmc) {
/* broadcast cases */ /* broadcast cases */
@ -1873,7 +1873,7 @@ bip_verify:
/* cases to decrypt mgmt frame */ /* cases to decrypt mgmt frame */
pattrib->bdecrypted = 0; pattrib->bdecrypted = 0;
pattrib->encrypt = _AES_; pattrib->encrypt = _AES_;
pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr); pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr);
/* set iv and icv length */ /* set iv and icv length */
SET_ICE_IV_LEN(pattrib->iv_len, pattrib->icv_len, pattrib->encrypt); SET_ICE_IV_LEN(pattrib->iv_len, pattrib->icv_len, pattrib->encrypt);
@ -3049,7 +3049,7 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
#ifdef CONFIG_RTW_MESH #ifdef CONFIG_RTW_MESH
if (MLME_IS_MESH(padapter)) { if (MLME_IS_MESH(padapter)) {
u8 *mda = pdata, *msa = pdata + ETH_ALEN; u8 *mda = pdata, *msa = pdata + ETH_ALEN;
struct rtw_ieee80211s_hdr *mctrl = (struct rtw_ieee80211s_hdr *)(pdata + ETH_HLEN); struct ieee80211s_hdr *mctrl = (struct ieee80211s_hdr *)(pdata + ETH_HLEN);
int v_ret; int v_ret;
v_ret = rtw_mesh_rx_data_validate_mctrl(padapter, prframe v_ret = rtw_mesh_rx_data_validate_mctrl(padapter, prframe
@ -3167,7 +3167,7 @@ static int recv_process_mpdu(_adapter *padapter, union recv_frame *prframe)
act = rtw_mesh_rx_msdu_act_check(prframe act = rtw_mesh_rx_msdu_act_check(prframe
, pattrib->mda, pattrib->msa , pattrib->mda, pattrib->msa
, pattrib->dst, pattrib->src , pattrib->dst, pattrib->src
, (struct rtw_ieee80211s_hdr *)(get_recvframe_data(prframe) + pattrib->hdrlen + pattrib->iv_len) , (struct ieee80211s_hdr *)(get_recvframe_data(prframe) + pattrib->hdrlen + pattrib->iv_len)
, &fwd_frame, &b2u_list); , &fwd_frame, &b2u_list);
} }
#endif #endif

View File

@ -319,7 +319,7 @@ static u8 *build_wlan_hdr(_adapter *padapter, struct xmit_frame *pmgntframe,
u8 *pframe; u8 *pframe;
u16 *fctrl; u16 *fctrl;
struct pkt_attrib *pattr; struct pkt_attrib *pattr;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
@ -331,9 +331,9 @@ static u8 *build_wlan_hdr(_adapter *padapter, struct xmit_frame *pmgntframe,
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
memcpy(pwlanhdr->addr1, psta->cmn.mac_addr, ETH_ALEN); memcpy(pwlanhdr->addr1, psta->cmn.mac_addr, ETH_ALEN);
@ -349,8 +349,8 @@ static u8 *build_wlan_hdr(_adapter *padapter, struct xmit_frame *pmgntframe,
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION); set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pframe += sizeof(struct ieee80211_hdr_3addr);
pattr->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pattr->pktlen = sizeof(struct ieee80211_hdr_3addr);
return pframe; return pframe;
} }
@ -763,7 +763,7 @@ int rm_recv_radio_mens_req(_adapter *padapter,
struct rm_obj *prm; struct rm_obj *prm;
struct rm_priv *prmpriv = &padapter->rmpriv; struct rm_priv *prmpriv = &padapter->rmpriv;
u8 *pdiag_body = (u8 *)(precv_frame->u.hdr.rx_data + u8 *pdiag_body = (u8 *)(precv_frame->u.hdr.rx_data +
sizeof(struct rtw_ieee80211_hdr_3addr)); sizeof(struct ieee80211_hdr_3addr));
u8 *pmeas_body = &pdiag_body[5]; u8 *pmeas_body = &pdiag_body[5];
u8 rmid, update = 0; u8 rmid, update = 0;
@ -863,7 +863,7 @@ int rm_recv_radio_mens_rep(_adapter *padapter,
struct rm_obj *prm; struct rm_obj *prm;
u32 rmid; u32 rmid;
u8 *pdiag_body = (u8 *)(precv_frame->u.hdr.rx_data + u8 *pdiag_body = (u8 *)(precv_frame->u.hdr.rx_data +
sizeof(struct rtw_ieee80211_hdr_3addr)); sizeof(struct ieee80211_hdr_3addr));
u8 *pmeas_body = &pdiag_body[3]; u8 *pmeas_body = &pdiag_body[3];
@ -907,7 +907,7 @@ int rm_radio_mens_nb_rep(_adapter *padapter,
union recv_frame *precv_frame, struct sta_info *psta) union recv_frame *precv_frame, struct sta_info *psta)
{ {
u8 *pdiag_body = (u8 *)(precv_frame->u.hdr.rx_data + u8 *pdiag_body = (u8 *)(precv_frame->u.hdr.rx_data +
sizeof(struct rtw_ieee80211_hdr_3addr)); sizeof(struct ieee80211_hdr_3addr));
u8 *pmeas_body = &pdiag_body[3]; u8 *pmeas_body = &pdiag_body[3];
u32 len = precv_frame->u.hdr.len; u32 len = precv_frame->u.hdr.len;
u32 rmid; u32 rmid;
@ -938,7 +938,7 @@ int rm_radio_mens_nb_rep(_adapter *padapter,
#ifdef CONFIG_LAYER2_ROAMING #ifdef CONFIG_LAYER2_ROAMING
if (rtw_wnm_btm_candidates_survey(padapter if (rtw_wnm_btm_candidates_survey(padapter
,(pdiag_body + 3) ,(pdiag_body + 3)
,(len - sizeof(struct rtw_ieee80211_hdr_3addr)) ,(len - sizeof(struct ieee80211_hdr_3addr))
,_FALSE) == _FAIL) ,_FALSE) == _FAIL)
return _FALSE; return _FALSE;
#endif #endif
@ -954,7 +954,7 @@ unsigned int rm_on_action(_adapter *padapter, union recv_frame *precv_frame)
u8 *pframe_body = NULL; u8 *pframe_body = NULL;
u8 action_code = 0; u8 action_code = 0;
u8 diag_token = 0; u8 diag_token = 0;
struct rtw_ieee80211_hdr_3addr *whdr; struct ieee80211_hdr_3addr *whdr;
struct sta_info *psta; struct sta_info *psta;
@ -965,7 +965,7 @@ unsigned int rm_on_action(_adapter *padapter, union recv_frame *precv_frame)
GetAddr1Ptr(pframe), ETH_ALEN)) GetAddr1Ptr(pframe), ETH_ALEN))
goto exit; goto exit;
whdr = (struct rtw_ieee80211_hdr_3addr *)pframe; whdr = (struct ieee80211_hdr_3addr *)pframe;
RTW_INFO("RM: %s bssid = " MAC_FMT "\n", RTW_INFO("RM: %s bssid = " MAC_FMT "\n",
__func__, MAC_ARG(whdr->addr2)); __func__, MAC_ARG(whdr->addr2));
@ -977,7 +977,7 @@ unsigned int rm_on_action(_adapter *padapter, union recv_frame *precv_frame)
} }
pframe_body = (unsigned char *)(pframe + pframe_body = (unsigned char *)(pframe +
sizeof(struct rtw_ieee80211_hdr_3addr)); sizeof(struct ieee80211_hdr_3addr));
/* Figure 8-438 radio measurement request frame Action field format */ /* Figure 8-438 radio measurement request frame Action field format */
/* Category = pframe_body[0] = 5 (Radio Measurement) */ /* Category = pframe_body[0] = 5 (Radio Measurement) */

View File

@ -2041,7 +2041,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
uint len, ori_len; uint len, ori_len;
u16 pkt_keyid = 0; u16 pkt_keyid = 0;
u64 pkt_ipn = 0; u64 pkt_ipn = 0;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u8 mic[16]; u8 mic[16];
mme = whdr_pos + flen - 18; mme = whdr_pos + flen - 18;
@ -2073,7 +2073,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
} }
/* mapping to wlan header */ /* mapping to wlan header */
pwlanhdr = (struct rtw_ieee80211_hdr *)whdr_pos; pwlanhdr = (struct ieee80211_hdr *)whdr_pos;
/* save the frame body + MME */ /* save the frame body + MME */
memcpy(BIP_AAD + BIP_AAD_SIZE, whdr_pos + WLAN_HDR_A3_LEN, flen - WLAN_HDR_A3_LEN); memcpy(BIP_AAD + BIP_AAD_SIZE, whdr_pos + WLAN_HDR_A3_LEN, flen - WLAN_HDR_A3_LEN);
@ -2085,7 +2085,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
memset(mme + 10, 0, 8); memset(mme + 10, 0, 8);
/* conscruct AAD, copy frame control field */ /* conscruct AAD, copy frame control field */
memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2); memcpy(BIP_AAD, &pwlanhdr->frame_control, 2);
ClearRetry(BIP_AAD); ClearRetry(BIP_AAD);
ClearPwrMgt(BIP_AAD); ClearPwrMgt(BIP_AAD);
ClearMData(BIP_AAD); ClearMData(BIP_AAD);

View File

@ -282,7 +282,7 @@ int _issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsi
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl, *qc; unsigned short *fctrl, *qc;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
@ -305,9 +305,9 @@ int _issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsi
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
if (power_mode) if (power_mode)
@ -329,8 +329,8 @@ int _issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsi
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
set_frame_sub_type(pframe, IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC); set_frame_sub_type(pframe, IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr_qos); pframe += sizeof(struct ieee80211_qos_hdr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos); pattrib->pktlen = sizeof(struct ieee80211_qos_hdr);
pattrib->last_txcmdsz = pattrib->pktlen; pattrib->last_txcmdsz = pattrib->pktlen;
@ -1505,7 +1505,7 @@ int issue_tdls_dis_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, u8 priva
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
@ -1523,9 +1523,9 @@ int issue_tdls_dis_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, u8 priva
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
/* unicast probe request frame */ /* unicast probe request frame */
@ -1540,8 +1540,8 @@ int issue_tdls_dis_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, u8 priva
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION); set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pframe += sizeof(struct ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
rtw_build_tdls_dis_rsp_ies(padapter, pmgntframe, pframe, ptxmgmt, privacy); rtw_build_tdls_dis_rsp_ies(padapter, pmgntframe, pframe, ptxmgmt, privacy);

View File

@ -310,7 +310,7 @@ void SecCalculateMicSMS4(
memcpy((TempBuf + 16), (pHeader + 16), 6); /* Addr3 */ memcpy((TempBuf + 16), (pHeader + 16), 6); /* Addr3 */
fc = le16_to_cpu(header->frame_ctl); fc = le16_to_cpu(header->frame_control);
@ -473,7 +473,7 @@ u8 WapiCheckPnInSwDecrypt(
header = (struct ieee80211_hdr_3addr_qos *)pskb->data; header = (struct ieee80211_hdr_3addr_qos *)pskb->data;
pTaddr = header->addr2; pTaddr = header->addr2;
pRaddr = header->addr1; pRaddr = header->addr1;
fc = le16_to_cpu(header->frame_ctl); fc = le16_to_cpu(header->frame_control);
if (GetToDs(&fc)) if (GetToDs(&fc))
pDaddr = header->addr3; pDaddr = header->addr3;

View File

@ -2263,7 +2263,7 @@ int check_ielen(u8 *start, uint len)
int validate_beacon_len(u8 *pframe, u32 len) int validate_beacon_len(u8 *pframe, u32 len)
{ {
u8 ie_offset = _BEACON_IE_OFFSET_ + sizeof(struct rtw_ieee80211_hdr_3addr); u8 ie_offset = _BEACON_IE_OFFSET_ + sizeof(struct ieee80211_hdr_3addr);
if (len < ie_offset) { if (len < ie_offset) {
RTW_INFO("%s: incorrect beacon length(%d)\n", __func__, len); RTW_INFO("%s: incorrect beacon length(%d)\n", __func__, len);
@ -2422,7 +2422,7 @@ void rtw_debug_rx_bcn(_adapter *adapter, u8 *pframe, u32 packet_len)
{ {
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
struct mlme_ext_info *mlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *mlmeinfo = &(pmlmeext->mlmext_info);
u16 sn = ((struct rtw_ieee80211_hdr_3addr *)pframe)->seq_ctl >> 4; u16 sn = ((struct ieee80211_hdr_3addr *)pframe)->seq_ctl >> 4;
u64 tsf, tsf_offset; u64 tsf, tsf_offset;
u8 dtim_cnt, dtim_period, tim_bmap, tim_pvbit; u8 dtim_cnt, dtim_period, tim_bmap, tim_pvbit;
@ -2468,8 +2468,8 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
capability = le16_to_cpu(*(unsigned short *)(pframe + WLAN_HDR_A3_LEN + 10)); capability = le16_to_cpu(*(unsigned short *)(pframe + WLAN_HDR_A3_LEN + 10));
/* checking IEs */ /* checking IEs */
left = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr) - _BEACON_IE_OFFSET_; left = packet_len - sizeof(struct ieee80211_hdr_3addr) - _BEACON_IE_OFFSET_;
pos = pframe + sizeof(struct rtw_ieee80211_hdr_3addr) + _BEACON_IE_OFFSET_; pos = pframe + sizeof(struct ieee80211_hdr_3addr) + _BEACON_IE_OFFSET_;
if (rtw_ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed) if (rtw_ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed)
return _FALSE; return _FALSE;
@ -3585,7 +3585,7 @@ void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len)
u8 *pIE; u8 *pIE;
u32 *pbuf; u32 *pbuf;
pIE = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); pIE = pframe + sizeof(struct ieee80211_hdr_3addr);
pbuf = (u32 *)pIE; pbuf = (u32 *)pIE;
pmlmeext->TSFValue = le32_to_cpu(*(pbuf + 1)); pmlmeext->TSFValue = le32_to_cpu(*(pbuf + 1));
@ -4178,7 +4178,7 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame)
unsigned short ATIMWindow; unsigned short ATIMWindow;
unsigned char *pframe; unsigned char *pframe;
struct tx_desc *ptxdesc; struct tx_desc *ptxdesc;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
unsigned int rate_len, len = 0; unsigned int rate_len, len = 0;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
@ -4191,9 +4191,9 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame)
pframe = beacon_frame + TXDESC_SIZE; pframe = beacon_frame + TXDESC_SIZE;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN);
@ -4202,8 +4202,8 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame)
set_frame_sub_type(pframe, IEEE80211_STYPE_BEACON); set_frame_sub_type(pframe, IEEE80211_STYPE_BEACON);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pframe += sizeof(struct ieee80211_hdr_3addr);
len = sizeof(struct rtw_ieee80211_hdr_3addr); len = sizeof(struct ieee80211_hdr_3addr);
/* timestamp will be inserted by hardware */ /* timestamp will be inserted by hardware */
pframe += 8; pframe += 8;

View File

@ -1720,12 +1720,12 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
{ {
u16 *qc; u16 *qc;
struct rtw_ieee80211_hdr *pwlanhdr = (struct rtw_ieee80211_hdr *)hdr; struct ieee80211_hdr *pwlanhdr = (struct ieee80211_hdr *)hdr;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct qos_priv *pqospriv = &pmlmepriv->qospriv; struct qos_priv *pqospriv = &pmlmepriv->qospriv;
u8 qos_option = _FALSE; u8 qos_option = _FALSE;
sint res = _SUCCESS; sint res = _SUCCESS;
u16 *fctrl = &pwlanhdr->frame_ctl; u16 *fctrl =&pwlanhdr->frame_control;
/* struct sta_info *psta; */ /* struct sta_info *psta; */
@ -2057,7 +2057,7 @@ exit:
s32 rtw_make_tdls_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib, struct tdls_txmgmt *ptxmgmt) s32 rtw_make_tdls_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib, struct tdls_txmgmt *ptxmgmt)
{ {
u16 *qc; u16 *qc;
struct rtw_ieee80211_hdr *pwlanhdr = (struct rtw_ieee80211_hdr *)hdr; struct ieee80211_hdr *pwlanhdr = (struct ieee80211_hdr *)hdr;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct qos_priv *pqospriv = &pmlmepriv->qospriv; struct qos_priv *pqospriv = &pmlmepriv->qospriv;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
@ -2065,7 +2065,7 @@ s32 rtw_make_tdls_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattr
u8 tdls_seq = 0, baddr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; u8 tdls_seq = 0, baddr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
sint res = _SUCCESS; sint res = _SUCCESS;
u16 *fctrl = &pwlanhdr->frame_ctl; u16 *fctrl =&pwlanhdr->frame_control;
memset(hdr, 0, WLANHDR_OFFSET); memset(hdr, 0, WLANHDR_OFFSET);
@ -2777,7 +2777,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u8 MME[_MME_IE_LENGTH_]; u8 MME[_MME_IE_LENGTH_];
_irqL irqL; _irqL irqL;
@ -2792,14 +2792,14 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
} }
mem_start = pframe = (u8 *)(pxmitframe->buf_addr) + TXDESC_OFFSET; mem_start = pframe = (u8 *)(pxmitframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
subtype = get_frame_sub_type(pframe); /* bit(7)~bit(2) */ subtype = get_frame_sub_type(pframe); /* bit(7)~bit(2) */
/* check if robust mgmt frame */ /* check if robust mgmt frame */
if (subtype != IEEE80211_STYPE_DEAUTH && subtype != IEEE80211_STYPE_DISASSOC && subtype != IEEE80211_STYPE_ACTION) if (subtype != IEEE80211_STYPE_DEAUTH && subtype != IEEE80211_STYPE_DISASSOC && subtype != IEEE80211_STYPE_ACTION)
return _SUCCESS; return _SUCCESS;
if (subtype == IEEE80211_STYPE_ACTION) { if (subtype == IEEE80211_STYPE_ACTION) {
category = *(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); category = *(pframe + sizeof(struct ieee80211_hdr_3addr));
if (CATEGORY_IS_NON_ROBUST(category)) if (CATEGORY_IS_NON_ROBUST(category))
return _SUCCESS; return _SUCCESS;
} }
@ -2878,7 +2878,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
memset(MME, 0, _MME_IE_LENGTH_); memset(MME, 0, _MME_IE_LENGTH_);
MGMT_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); MGMT_body = pframe + sizeof(struct ieee80211_hdr_3addr);
pframe += pattrib->pktlen; pframe += pattrib->pktlen;
/* octent 0 and 1 is key index ,BIP keyid is 4 or 5, LSB only need octent 0 */ /* octent 0 and 1 is key index ,BIP keyid is 4 or 5, LSB only need octent 0 */
@ -2891,10 +2891,10 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
pframe = rtw_set_ie(pframe, WLAN_EID_MMIE , 16 , MME, &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, WLAN_EID_MMIE , 16 , MME, &(pattrib->pktlen));
pattrib->last_txcmdsz = pattrib->pktlen; pattrib->last_txcmdsz = pattrib->pktlen;
/* total frame length - header length */ /* total frame length - header length */
frame_body_len = pattrib->pktlen - sizeof(struct rtw_ieee80211_hdr_3addr); frame_body_len = pattrib->pktlen - sizeof(struct ieee80211_hdr_3addr);
/* conscruct AAD, copy frame control field */ /* conscruct AAD, copy frame control field */
memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2); memcpy(BIP_AAD, &pwlanhdr->frame_control, 2);
ClearRetry(BIP_AAD); ClearRetry(BIP_AAD);
ClearPwrMgt(BIP_AAD); ClearPwrMgt(BIP_AAD);
ClearMData(BIP_AAD); ClearMData(BIP_AAD);
@ -4371,7 +4371,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
struct ieee80211_radiotap_header rtap_hdr; struct ieee80211_radiotap_header rtap_hdr;
_adapter *padapter = (_adapter *)rtw_netdev_priv(ndev); _adapter *padapter = (_adapter *)rtw_netdev_priv(ndev);
struct pkt_file pktfile; struct pkt_file pktfile;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
@ -4416,8 +4416,8 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
/* Check DATA/MGNT frames */ /* Check DATA/MGNT frames */
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
frame_ctl = le16_to_cpu(pwlanhdr->frame_ctl); frame_ctl = le16_to_cpu(pwlanhdr->frame_control);
if ((frame_ctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) { if ((frame_ctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) {
pattrib = &pmgntframe->attrib; pattrib = &pmgntframe->attrib;

View File

@ -5955,7 +5955,7 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe
/* struct xmit_frame *pmgntframe; */ /* struct xmit_frame *pmgntframe; */
/* struct pkt_attrib *pattrib; */ /* struct pkt_attrib *pattrib; */
/* unsigned char *pframe; */ /* unsigned char *pframe; */
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
unsigned int rate_len; unsigned int rate_len;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
@ -5981,10 +5981,10 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe
/* _enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); /* _enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
* #endif */ /* #if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) */ * #endif */ /* #if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) */
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
eth_broadcast_addr(pwlanhdr->addr1); eth_broadcast_addr(pwlanhdr->addr1);
@ -5995,8 +5995,8 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe
/* pmlmeext->mgnt_seq++; */ /* pmlmeext->mgnt_seq++; */
set_frame_sub_type(pframe, IEEE80211_STYPE_BEACON); set_frame_sub_type(pframe, IEEE80211_STYPE_BEACON);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pframe += sizeof(struct ieee80211_hdr_3addr);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pktlen = sizeof(struct ieee80211_hdr_3addr);
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) { if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) {
/* RTW_INFO("ie len=%d\n", cur_network->IELength); */ /* RTW_INFO("ie len=%d\n", cur_network->IELength); */
@ -6112,8 +6112,8 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe
u8 *wps_ie; u8 *wps_ie;
uint wps_ielen; uint wps_ielen;
u8 sr = 0; u8 sr = 0;
wps_ie = rtw_get_wps_ie(pmgntframe->buf_addr + TXDESC_OFFSET + sizeof(struct rtw_ieee80211_hdr_3addr) + _BEACON_IE_OFFSET_, wps_ie = rtw_get_wps_ie(pmgntframe->buf_addr + TXDESC_OFFSET + sizeof(struct ieee80211_hdr_3addr) + _BEACON_IE_OFFSET_,
pattrib->pktlen - sizeof(struct rtw_ieee80211_hdr_3addr) - _BEACON_IE_OFFSET_, NULL, &wps_ielen); pattrib->pktlen - sizeof(struct ieee80211_hdr_3addr) - _BEACON_IE_OFFSET_, NULL, &wps_ielen);
if (wps_ie && wps_ielen > 0) if (wps_ie && wps_ielen > 0)
rtw_get_wps_attr_content(wps_ie, wps_ielen, WPS_ATTR_SELECTED_REGISTRAR, (u8 *)(&sr), NULL); rtw_get_wps_attr_content(wps_ie, wps_ielen, WPS_ATTR_SELECTED_REGISTRAR, (u8 *)(&sr), NULL);
if (sr != 0) if (sr != 0)
@ -6231,7 +6231,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p
/* struct xmit_frame *pmgntframe; */ /* struct xmit_frame *pmgntframe; */
/* struct pkt_attrib *pattrib; */ /* struct pkt_attrib *pattrib; */
/* unsigned char *pframe; */ /* unsigned char *pframe; */
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
unsigned char *mac; unsigned char *mac;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
@ -6257,11 +6257,11 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p
u8 dbgbufLen = 0, index = 0; u8 dbgbufLen = 0, index = 0;
RTW_INFO("%s\n", __FUNCTION__); RTW_INFO("%s\n", __FUNCTION__);
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
mac = adapter_mac_addr(padapter); mac = adapter_mac_addr(padapter);
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
/* DA filled by FW */ /* DA filled by FW */
@ -6274,7 +6274,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p
SetSeqNum(pwlanhdr, 0); SetSeqNum(pwlanhdr, 0);
set_frame_sub_type(fctrl, IEEE80211_STYPE_PROBE_RESP); set_frame_sub_type(fctrl, IEEE80211_STYPE_PROBE_RESP);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pktlen = sizeof(struct ieee80211_hdr_3addr);
pframe += pktlen; pframe += pktlen;
@ -6567,7 +6567,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
/* struct xmit_frame *pmgntframe; */ /* struct xmit_frame *pmgntframe; */
/* struct pkt_attrib *pattrib; */ /* struct pkt_attrib *pattrib; */
/* unsigned char *pframe; */ /* unsigned char *pframe; */
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
@ -6584,9 +6584,9 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
u8 dbgbufLen = 0, index = 0; u8 dbgbufLen = 0, index = 0;
RTW_INFO("%s\n", __FUNCTION__); RTW_INFO("%s\n", __FUNCTION__);
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
/* RA, filled by FW */ /* RA, filled by FW */
@ -6597,7 +6597,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
SetSeqNum(pwlanhdr, 0); SetSeqNum(pwlanhdr, 0);
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION); set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pktlen = sizeof(struct ieee80211_hdr_3addr);
pframe += pktlen; pframe += pktlen;
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pktlen));
@ -6970,7 +6970,7 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
/* struct xmit_frame *pmgntframe; */ /* struct xmit_frame *pmgntframe; */
/* struct pkt_attrib *pattrib; */ /* struct pkt_attrib *pattrib; */
/* unsigned char *pframe; */ /* unsigned char *pframe; */
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
@ -6983,9 +6983,9 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
RTW_INFO("%s\n", __FUNCTION__); RTW_INFO("%s\n", __FUNCTION__);
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
/* RA fill by FW */ /* RA fill by FW */
@ -6998,8 +6998,8 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
SetSeqNum(pwlanhdr, 0); SetSeqNum(pwlanhdr, 0);
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION); set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pframe += sizeof(struct ieee80211_hdr_3addr);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pktlen = sizeof(struct ieee80211_hdr_3addr);
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pktlen));
pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pktlen));
@ -7215,7 +7215,7 @@ static void rtw_hal_construct_P2PProvisionDisRsp(_adapter *padapter, u8 *pframe,
/* struct xmit_frame *pmgntframe; */ /* struct xmit_frame *pmgntframe; */
/* struct pkt_attrib *pattrib; */ /* struct pkt_attrib *pattrib; */
/* unsigned char *pframe; */ /* unsigned char *pframe; */
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
@ -7228,9 +7228,9 @@ static void rtw_hal_construct_P2PProvisionDisRsp(_adapter *padapter, u8 *pframe,
RTW_INFO("%s\n", __FUNCTION__); RTW_INFO("%s\n", __FUNCTION__);
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
/* RA filled by FW */ /* RA filled by FW */
@ -7241,8 +7241,8 @@ static void rtw_hal_construct_P2PProvisionDisRsp(_adapter *padapter, u8 *pframe,
SetSeqNum(pwlanhdr, 0); SetSeqNum(pwlanhdr, 0);
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION); set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pframe += sizeof(struct ieee80211_hdr_3addr);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pktlen = sizeof(struct ieee80211_hdr_3addr);
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pktlen));
pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pktlen));
@ -7382,7 +7382,7 @@ u8 rtw_hal_set_p2p_wowlan_offload_cmd(_adapter *adapter)
void rtw_hal_construct_beacon(_adapter *padapter, void rtw_hal_construct_beacon(_adapter *padapter,
u8 *pframe, u32 *pLength) u8 *pframe, u32 *pLength)
{ {
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; u16 *fctrl;
u32 rate_len, pktlen; u32 rate_len, pktlen;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
@ -7391,9 +7391,9 @@ void rtw_hal_construct_beacon(_adapter *padapter,
/* RTW_INFO("%s\n", __FUNCTION__); */ /* RTW_INFO("%s\n", __FUNCTION__); */
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
eth_broadcast_addr(pwlanhdr->addr1); eth_broadcast_addr(pwlanhdr->addr1);
@ -7404,8 +7404,8 @@ void rtw_hal_construct_beacon(_adapter *padapter,
/* pmlmeext->mgnt_seq++; */ /* pmlmeext->mgnt_seq++; */
set_frame_sub_type(pframe, IEEE80211_STYPE_BEACON); set_frame_sub_type(pframe, IEEE80211_STYPE_BEACON);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pframe += sizeof(struct ieee80211_hdr_3addr);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pktlen = sizeof(struct ieee80211_hdr_3addr);
/* timestamp will be inserted by hardware */ /* timestamp will be inserted by hardware */
pframe += 8; pframe += 8;
@ -7481,7 +7481,7 @@ _ConstructBeacon:
static void rtw_hal_construct_PSPoll(_adapter *padapter, static void rtw_hal_construct_PSPoll(_adapter *padapter,
u8 *pframe, u32 *pLength) u8 *pframe, u32 *pLength)
{ {
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; u16 *fctrl;
u32 pktlen; u32 pktlen;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
@ -7489,10 +7489,10 @@ static void rtw_hal_construct_PSPoll(_adapter *padapter,
/* RTW_INFO("%s\n", __FUNCTION__); */ /* RTW_INFO("%s\n", __FUNCTION__); */
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
/* Frame control. */ /* Frame control. */
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
SetPwrMgt(fctrl); SetPwrMgt(fctrl);
set_frame_sub_type(pframe, (IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL)); set_frame_sub_type(pframe, (IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL));
@ -7516,7 +7516,7 @@ void rtw_hal_construct_fw_dbg_msg_pkt(
u8 *pframe, u8 *pframe,
u32 *plength) u32 *plength)
{ {
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; u16 *fctrl;
u32 pktlen; u32 pktlen;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@ -7526,9 +7526,9 @@ void rtw_hal_construct_fw_dbg_msg_pkt(
/* RTW_INFO("%s:%d\n", __FUNCTION__, bForcePowerSave); */ /* RTW_INFO("%s:%d\n", __FUNCTION__, bForcePowerSave); */
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
eth_broadcast_addr(pwlanhdr->addr1); eth_broadcast_addr(pwlanhdr->addr1);
@ -7539,7 +7539,7 @@ void rtw_hal_construct_fw_dbg_msg_pkt(
set_frame_sub_type(pframe, (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA)); set_frame_sub_type(pframe, (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA));
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pktlen = sizeof(struct ieee80211_hdr_3addr);
*plength = pktlen; *plength = pktlen;
} }
@ -7554,7 +7554,7 @@ void rtw_hal_construct_NullFunctionData(
u8 bEosp, u8 bEosp,
u8 bForcePowerSave) u8 bForcePowerSave)
{ {
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; u16 *fctrl;
u32 pktlen; u32 pktlen;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@ -7566,9 +7566,9 @@ void rtw_hal_construct_NullFunctionData(
/* RTW_INFO("%s:%d\n", __FUNCTION__, bForcePowerSave); */ /* RTW_INFO("%s:%d\n", __FUNCTION__, bForcePowerSave); */
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
if (bForcePowerSave) if (bForcePowerSave)
SetPwrMgt(fctrl); SetPwrMgt(fctrl);
@ -7604,19 +7604,19 @@ void rtw_hal_construct_NullFunctionData(
set_duration(pwlanhdr, 0); set_duration(pwlanhdr, 0);
if (bQoS == _TRUE) { if (bQoS == _TRUE) {
struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr; struct ieee80211_qos_hdr *pwlanqoshdr;
set_frame_sub_type(pframe, IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC); set_frame_sub_type(pframe, IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
pwlanqoshdr = (struct rtw_ieee80211_hdr_3addr_qos *)pframe; pwlanqoshdr = (struct ieee80211_qos_hdr *)pframe;
SetPriority(&pwlanqoshdr->qc, AC); SetPriority(&pwlanqoshdr->qos_ctrl, AC);
SetEOSP(&pwlanqoshdr->qc, bEosp); SetEOSP(&pwlanqoshdr->qos_ctrl, bEosp);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos); pktlen = sizeof(struct ieee80211_qos_hdr);
} else { } else {
set_frame_sub_type(pframe, IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC); set_frame_sub_type(pframe, IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pktlen = sizeof(struct ieee80211_hdr_3addr);
} }
*pLength = pktlen; *pLength = pktlen;
@ -7625,7 +7625,7 @@ void rtw_hal_construct_NullFunctionData(
void rtw_hal_construct_ProbeRsp(_adapter *padapter, u8 *pframe, u32 *pLength, void rtw_hal_construct_ProbeRsp(_adapter *padapter, u8 *pframe, u32 *pLength,
BOOLEAN bHideSSID) BOOLEAN bHideSSID)
{ {
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; u16 *fctrl;
u8 *mac, *bssid, *sta_addr; u8 *mac, *bssid, *sta_addr;
u32 pktlen; u32 pktlen;
@ -7635,13 +7635,13 @@ void rtw_hal_construct_ProbeRsp(_adapter *padapter, u8 *pframe, u32 *pLength,
/*RTW_INFO("%s\n", __FUNCTION__);*/ /*RTW_INFO("%s\n", __FUNCTION__);*/
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
mac = adapter_mac_addr(padapter); mac = adapter_mac_addr(padapter);
bssid = cur_network->MacAddress; bssid = cur_network->MacAddress;
sta_addr = get_my_bssid(&pmlmeinfo->network); sta_addr = get_my_bssid(&pmlmeinfo->network);
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
memcpy(pwlanhdr->addr1, sta_addr, ETH_ALEN); memcpy(pwlanhdr->addr1, sta_addr, ETH_ALEN);
memcpy(pwlanhdr->addr2, mac, ETH_ALEN); memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
@ -7650,7 +7650,7 @@ void rtw_hal_construct_ProbeRsp(_adapter *padapter, u8 *pframe, u32 *pLength,
SetSeqNum(pwlanhdr, 0); SetSeqNum(pwlanhdr, 0);
set_frame_sub_type(fctrl, IEEE80211_STYPE_PROBE_RESP); set_frame_sub_type(fctrl, IEEE80211_STYPE_PROBE_RESP);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pktlen = sizeof(struct ieee80211_hdr_3addr);
pframe += pktlen; pframe += pktlen;
if (cur_network->IELength > MAX_IE_SZ) if (cur_network->IELength > MAX_IE_SZ)
@ -7669,7 +7669,7 @@ static void rtw_hal_append_tkip_mic(PADAPTER padapter,
{ {
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
struct mic_data micdata; struct mic_data micdata;
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
int res = 0; int res = 0;
@ -7682,7 +7682,7 @@ static void rtw_hal_append_tkip_mic(PADAPTER padapter,
RTW_INFO("%s(): Add MIC, offset: %d\n", __func__, offset); RTW_INFO("%s(): Add MIC, offset: %d\n", __func__, offset);
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
psta = rtw_get_stainfo(&padapter->stapriv, psta = rtw_get_stainfo(&padapter->stapriv,
get_my_bssid(&(pmlmeinfo->network))); get_my_bssid(&(pmlmeinfo->network)));
@ -7721,7 +7721,7 @@ static void rtw_hal_construct_ARPRsp(
u8 *pIPAddress u8 *pIPAddress
) )
{ {
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; u16 *fctrl;
u32 pktlen; u32 pktlen;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@ -7736,9 +7736,9 @@ static void rtw_hal_construct_ARPRsp(
u8 EncryptionHeadOverhead = 0, arp_offset = 0; u8 EncryptionHeadOverhead = 0, arp_offset = 0;
/* RTW_INFO("%s:%d\n", __FUNCTION__, bForcePowerSave); */ /* RTW_INFO("%s:%d\n", __FUNCTION__, bForcePowerSave); */
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
@ -7848,7 +7848,7 @@ static void rtw_hal_construct_ARPRsp(
static void rtw_hal_construct_na_message(_adapter *padapter, static void rtw_hal_construct_na_message(_adapter *padapter,
u8 *pframe, u32 *pLength) u8 *pframe, u32 *pLength)
{ {
struct rtw_ieee80211_hdr *pwlanhdr = NULL; struct ieee80211_hdr *pwlanhdr = NULL;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wlan_network *cur_network = &pmlmepriv->cur_network; struct wlan_network *cur_network = &pmlmepriv->cur_network;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@ -7870,9 +7870,9 @@ static void rtw_hal_construct_na_message(_adapter *padapter,
u8 EncryptionHeadOverhead = 0, na_msg_offset = 0; u8 EncryptionHeadOverhead = 0, na_msg_offset = 0;
/* RTW_INFO("%s:%d\n", __FUNCTION__, bForcePowerSave); */ /* RTW_INFO("%s:%d\n", __FUNCTION__, bForcePowerSave); */
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
@ -8025,7 +8025,7 @@ static void rtw_hal_construct_ndp_info(_adapter *padapter,
static void rtw_hal_construct_ProbeReq(_adapter *padapter, u8 *pframe, static void rtw_hal_construct_ProbeReq(_adapter *padapter, u8 *pframe,
u32 *pLength, pno_ssid_t *ssid) u32 *pLength, pno_ssid_t *ssid)
{ {
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; u16 *fctrl;
u32 pktlen; u32 pktlen;
unsigned char *mac; unsigned char *mac;
@ -8036,10 +8036,10 @@ static void rtw_hal_construct_ProbeReq(_adapter *padapter, u8 *pframe,
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
int bssrate_len = 0; int bssrate_len = 0;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
mac = adapter_mac_addr(padapter); mac = adapter_mac_addr(padapter);
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
eth_broadcast_addr(pwlanhdr->addr1); eth_broadcast_addr(pwlanhdr->addr1);
@ -8050,7 +8050,7 @@ static void rtw_hal_construct_ProbeReq(_adapter *padapter, u8 *pframe,
SetSeqNum(pwlanhdr, 0); SetSeqNum(pwlanhdr, 0);
set_frame_sub_type(pframe, IEEE80211_STYPE_PROBE_REQ); set_frame_sub_type(pframe, IEEE80211_STYPE_PROBE_REQ);
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pktlen = sizeof(struct ieee80211_hdr_3addr);
pframe += pktlen; pframe += pktlen;
if (ssid == NULL) if (ssid == NULL)
@ -8204,7 +8204,7 @@ static void rtw_hal_construct_GTKRsp(
u32 *pLength u32 *pLength
) )
{ {
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; u16 *fctrl;
u32 pktlen; u32 pktlen;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@ -8218,9 +8218,9 @@ static void rtw_hal_construct_GTKRsp(
u8 EncryptionHeadOverhead = 0; u8 EncryptionHeadOverhead = 0;
/* RTW_INFO("%s:%d\n", __FUNCTION__, bForcePowerSave); */ /* RTW_INFO("%s:%d\n", __FUNCTION__, bForcePowerSave); */
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */

View File

@ -1011,7 +1011,7 @@ send_fw_ht_ndpa_packet(
struct _ADAPTER *adapter = dm->adapter; struct _ADAPTER *adapter = dm->adapter;
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
struct xmit_priv *pxmitpriv = &(adapter->xmitpriv); struct xmit_priv *pxmitpriv = &(adapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
@ -1048,9 +1048,9 @@ send_fw_ht_ndpa_packet(
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
set_order_bit(pframe); set_order_bit(pframe);
@ -1099,7 +1099,7 @@ send_sw_ht_ndpa_packet(
struct _ADAPTER *adapter = dm->adapter; struct _ADAPTER *adapter = dm->adapter;
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
struct xmit_priv *pxmitpriv = &(adapter->xmitpriv); struct xmit_priv *pxmitpriv = &(adapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
@ -1134,9 +1134,9 @@ send_sw_ht_ndpa_packet(
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
set_order_bit(pframe); set_order_bit(pframe);
@ -1186,7 +1186,7 @@ send_fw_vht_ndpa_packet(
struct _ADAPTER *adapter = dm->adapter; struct _ADAPTER *adapter = dm->adapter;
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
struct xmit_priv *pxmitpriv = &(adapter->xmitpriv); struct xmit_priv *pxmitpriv = &(adapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
@ -1224,9 +1224,9 @@ send_fw_vht_ndpa_packet(
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
set_frame_sub_type(pframe, WIFI_NDPA); set_frame_sub_type(pframe, WIFI_NDPA);
@ -1287,7 +1287,7 @@ send_sw_vht_ndpa_packet(
struct _ADAPTER *adapter = dm->adapter; struct _ADAPTER *adapter = dm->adapter;
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
struct xmit_priv *pxmitpriv = &(adapter->xmitpriv); struct xmit_priv *pxmitpriv = &(adapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
@ -1325,9 +1325,9 @@ send_sw_vht_ndpa_packet(
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &pwlanhdr->frame_ctl; fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
set_frame_sub_type(pframe, WIFI_NDPA); set_frame_sub_type(pframe, WIFI_NDPA);

View File

@ -923,7 +923,7 @@ s32 rtl8192eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
struct urb *urb; struct urb *urb;
unsigned char *pxmitbuf; unsigned char *pxmitbuf;
struct tx_desc *ptxdesc; struct tx_desc *ptxdesc;
struct rtw_ieee80211_hdr *tx_hdr; struct ieee80211_hdr *tx_hdr;
struct hostapd_priv *phostapdpriv = padapter->phostapdpriv; struct hostapd_priv *phostapdpriv = padapter->phostapdpriv;
struct net_device *pnetdev = padapter->pnetdev; struct net_device *pnetdev = padapter->pnetdev;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
@ -935,8 +935,8 @@ s32 rtl8192eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
skb = pkt; skb = pkt;
len = skb->len; len = skb->len;
tx_hdr = (struct rtw_ieee80211_hdr *)(skb->data); tx_hdr = (struct ieee80211_hdr *)(skb->data);
fc = le16_to_cpu(tx_hdr->frame_ctl); fc = le16_to_cpu(tx_hdr->frame_control);
bmcst = is_multicast_ether_addr(tx_hdr->addr1); bmcst = is_multicast_ether_addr(tx_hdr->addr1);
if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_MGMT) if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_MGMT)

View File

@ -15,9 +15,6 @@
#ifndef __IEEE80211_H #ifndef __IEEE80211_H
#define __IEEE80211_H #define __IEEE80211_H
#define MGMT_QUEUE_NUM 5
#define ETH_ALEN 6
#define ETH_TYPE_LEN 2 #define ETH_TYPE_LEN 2
#define PAYLOAD_TYPE_LEN 1 #define PAYLOAD_TYPE_LEN 1
@ -380,64 +377,6 @@ struct sta_data {
#define IW_QUAL_NOISE_UPDATED 0x4 #define IW_QUAL_NOISE_UPDATED 0x4
#endif #endif
#define IEEE80211_DATA_LEN 2304
/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
6.2.1.1.2.
The figure in section 7.1.2 suggests a body size of up to 2312
bytes is allowed, which is a bit confusing, I suspect this
represents the 2304 bytes of real data, plus a possible 8 bytes of
WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */
#define IEEE80211_HLEN 30
#define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN)
/* this is stolen from ipw2200 driver */
#define IEEE_IBSS_MAC_HASH_SIZE 31
struct rtw_ieee80211_hdr {
u16 frame_ctl;
u16 duration_id;
u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN];
u16 seq_ctl;
u8 addr4[ETH_ALEN];
} __attribute__((packed));
struct rtw_ieee80211_hdr_3addr {
u16 frame_ctl;
u16 duration_id;
u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN];
u16 seq_ctl;
} __attribute__((packed));
struct rtw_ieee80211_hdr_qos {
u16 frame_ctl;
u16 duration_id;
u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN];
u16 seq_ctl;
u8 addr4[ETH_ALEN];
u16 qc;
} __attribute__((packed));
struct rtw_ieee80211_hdr_3addr_qos {
u16 frame_ctl;
u16 duration_id;
u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN];
u16 seq_ctl;
u16 qc;
} __attribute__((packed));
struct eapol { struct eapol {
u8 snap[6]; u8 snap[6];
u16 ethertype; u16 ethertype;
@ -446,40 +385,6 @@ struct eapol {
u16 length; u16 length;
} __attribute__((packed)); } __attribute__((packed));
struct rtw_ieee80211s_hdr {
u8 flags;
u8 ttl;
u32 seqnum;
u8 eaddr1[ETH_ALEN];
u8 eaddr2[ETH_ALEN];
} __attribute__((packed));
/**
* struct rtw_ieee80211_rann_ie
*
* This structure refers to "Root Announcement information element"
*/
struct rtw_ieee80211_rann_ie {
u8 rann_flags;
u8 rann_hopcount;
u8 rann_ttl;
u8 rann_addr[ETH_ALEN];
u32 rann_seq;
u32 rann_interval;
u32 rann_metric;
} __attribute__((packed));
enum eap_type {
EAP_PACKET = 0,
EAPOL_START,
EAPOL_LOGOFF,
EAPOL_KEY,
EAPOL_ENCAP_ASF_ALERT
};
#define IEEE80211_3ADDR_LEN 24
#define IEEE80211_4ADDR_LEN 30
#define MIN_FRAG_THRESHOLD 256U #define MIN_FRAG_THRESHOLD 256U
#define MAX_FRAG_THRESHOLD 2346U #define MAX_FRAG_THRESHOLD 2346U
@ -489,16 +394,11 @@ enum eap_type {
/* QoS,QOS */ /* QoS,QOS */
#define NORMAL_ACK 0 #define NORMAL_ACK 0
#define NO_ACK 1
#define NON_EXPLICIT_ACK 2
#define BLOCK_ACK 3
#ifndef ETH_P_PAE #ifndef ETH_P_PAE
#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
#endif /* ETH_P_PAE */ #endif /* ETH_P_PAE */
#define ETH_P_PREAUTH 0x88C7 /* IEEE 802.11i pre-authentication */
#define ETH_P_ECONET 0x0018 #define ETH_P_ECONET 0x0018
#ifndef ETH_P_80211_RAW #ifndef ETH_P_80211_RAW
@ -521,14 +421,6 @@ struct ieee80211_snap_hdr {
#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr) #define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
#define WLAN_FC_GET_TYPE(fc) ((fc) & IEEE80211_FCTL_FTYPE)
#define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE)
#define WLAN_QC_GET_TID(qc) ((qc) & 0x0f)
#define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG)
#define WLAN_GET_SEQ_SEQ(seq) ((seq) & IEEE80211_SCTL_SEQ)
#define WLAN_REASON_SA_QUERY_TIMEOUT 65532 #define WLAN_REASON_SA_QUERY_TIMEOUT 65532
#define WLAN_REASON_ACTIVE_ROAM 65533 #define WLAN_REASON_ACTIVE_ROAM 65533
#define WLAN_REASON_JOIN_WRONG_CHANNEL 65534 #define WLAN_REASON_JOIN_WRONG_CHANNEL 65534
@ -578,44 +470,6 @@ struct ieee80211_snap_hdr {
#define IEEE80211_OFDM_RATE_54MB 0x6C #define IEEE80211_OFDM_RATE_54MB 0x6C
#define IEEE80211_BASIC_RATE_MASK 0x80 #define IEEE80211_BASIC_RATE_MASK 0x80
#define IEEE80211_CCK_RATE_1MB_MASK (1<<0)
#define IEEE80211_CCK_RATE_2MB_MASK (1<<1)
#define IEEE80211_CCK_RATE_5MB_MASK (1<<2)
#define IEEE80211_CCK_RATE_11MB_MASK (1<<3)
#define IEEE80211_OFDM_RATE_6MB_MASK (1<<4)
#define IEEE80211_OFDM_RATE_9MB_MASK (1<<5)
#define IEEE80211_OFDM_RATE_12MB_MASK (1<<6)
#define IEEE80211_OFDM_RATE_18MB_MASK (1<<7)
#define IEEE80211_OFDM_RATE_24MB_MASK (1<<8)
#define IEEE80211_OFDM_RATE_36MB_MASK (1<<9)
#define IEEE80211_OFDM_RATE_48MB_MASK (1<<10)
#define IEEE80211_OFDM_RATE_54MB_MASK (1<<11)
#define IEEE80211_CCK_RATES_MASK 0x0000000F
#define IEEE80211_CCK_BASIC_RATES_MASK (IEEE80211_CCK_RATE_1MB_MASK | \
IEEE80211_CCK_RATE_2MB_MASK)
#define IEEE80211_CCK_DEFAULT_RATES_MASK (IEEE80211_CCK_BASIC_RATES_MASK | \
IEEE80211_CCK_RATE_5MB_MASK | \
IEEE80211_CCK_RATE_11MB_MASK)
#define IEEE80211_OFDM_RATES_MASK 0x00000FF0
#define IEEE80211_OFDM_BASIC_RATES_MASK (IEEE80211_OFDM_RATE_6MB_MASK | \
IEEE80211_OFDM_RATE_12MB_MASK | \
IEEE80211_OFDM_RATE_24MB_MASK)
#define IEEE80211_OFDM_DEFAULT_RATES_MASK (IEEE80211_OFDM_BASIC_RATES_MASK | \
IEEE80211_OFDM_RATE_9MB_MASK | \
IEEE80211_OFDM_RATE_18MB_MASK | \
IEEE80211_OFDM_RATE_36MB_MASK | \
IEEE80211_OFDM_RATE_48MB_MASK | \
IEEE80211_OFDM_RATE_54MB_MASK)
#define IEEE80211_DEFAULT_RATES_MASK (IEEE80211_OFDM_DEFAULT_RATES_MASK | \
IEEE80211_CCK_DEFAULT_RATES_MASK)
#define IEEE80211_NUM_OFDM_RATES 8
#define IEEE80211_NUM_CCK_RATES 4
#define IEEE80211_OFDM_SHIFT_MASK_A 4
enum MGN_RATE { enum MGN_RATE {
MGN_1M = 0x02, MGN_1M = 0x02,
MGN_2M = 0x04, MGN_2M = 0x04,
@ -841,11 +695,6 @@ const char *rate_section_str(u8 section);
#define IS_HT_RATE_SECTION(section) ((section) >= HT_1SS && (section) <= HT_4SS) #define IS_HT_RATE_SECTION(section) ((section) >= HT_1SS && (section) <= HT_4SS)
#define IS_VHT_RATE_SECTION(section) ((section) >= VHT_1SS && (section) <= VHT_4SS) #define IS_VHT_RATE_SECTION(section) ((section) >= VHT_1SS && (section) <= VHT_4SS)
#define IS_1T_RATE_SECTION(section) ((section) == CCK || (section) == OFDM || (section) == HT_1SS || (section) == VHT_1SS)
#define IS_2T_RATE_SECTION(section) ((section) == HT_2SS || (section) == VHT_2SS)
#define IS_3T_RATE_SECTION(section) ((section) == HT_3SS || (section) == VHT_3SS)
#define IS_4T_RATE_SECTION(section) ((section) == HT_4SS || (section) == VHT_4SS)
extern u8 mgn_rates_cck[]; extern u8 mgn_rates_cck[];
extern u8 mgn_rates_ofdm[]; extern u8 mgn_rates_ofdm[];
extern u8 mgn_rates_mcs0_7[]; extern u8 mgn_rates_mcs0_7[];
@ -872,53 +721,17 @@ extern struct rate_section_ent rates_by_sections[];
* three fragmented frames. This define can be increased to support more * three fragmented frames. This define can be increased to support more
* concurrent frames, but it should be noted that each entry can consume about * concurrent frames, but it should be noted that each entry can consume about
* 2 kB of RAM and increasing cache size will slow down frame reassembly. */ * 2 kB of RAM and increasing cache size will slow down frame reassembly. */
#define IEEE80211_FRAG_CACHE_LEN 4
#define SEC_KEY_1 (1<<0)
#define SEC_KEY_2 (1<<1)
#define SEC_KEY_3 (1<<2)
#define SEC_KEY_4 (1<<3)
#define SEC_ACTIVE_KEY (1<<4)
#define SEC_AUTH_MODE (1<<5)
#define SEC_UNICAST_GROUP (1<<6)
#define SEC_LEVEL (1<<7)
#define SEC_ENABLED (1<<8)
#define SEC_LEVEL_0 0 /* None */
#define SEC_LEVEL_1 1 /* WEP 40 and 104 bit */
#define SEC_LEVEL_2 2 /* Level 1 + TKIP */
#define SEC_LEVEL_2_CKIP 3 /* Level 1 + CKIP */
#define SEC_LEVEL_3 4 /* Level 2 + CCMP */
#define WEP_KEYS 4 #define WEP_KEYS 4
#define WEP_KEY_LEN 13
#define BIP_MAX_KEYID 5 #define BIP_MAX_KEYID 5
#define BIP_AAD_SIZE 20 #define BIP_AAD_SIZE 20
#define BEACON_PROBE_SSID_ID_POSITION 12
/* Management Frame Information Element Types */
#define MFIE_TYPE_SSID 0
#define MFIE_TYPE_RATES 1
#define MFIE_TYPE_FH_SET 2
#define MFIE_TYPE_DS_SET 3
#define MFIE_TYPE_CF_SET 4
#define MFIE_TYPE_TIM 5
#define MFIE_TYPE_IBSS_SET 6
#define MFIE_TYPE_CHALLENGE 16
#define MFIE_TYPE_ERP 42
#define MFIE_TYPE_RSN 48
#define MFIE_TYPE_RATES_EX 50
#define MFIE_TYPE_GENERIC 221
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
struct ieee80211_info_element { struct ieee80211_info_element {
u8 id; u8 id;
u8 len; u8 len;
u8 data[0]; u8 data[0];
} __attribute__((packed)); } __attribute__((packed));
#endif
/* /*
* These are the data types that can make up management packets * These are the data types that can make up management packets
@ -937,22 +750,6 @@ struct ieee80211_info_element {
u16 status; u16 status;
*/ */
#define IEEE80211_DEFAULT_TX_ESSID "Penguin"
#define IEEE80211_DEFAULT_BASIC_RATE 10
struct ieee80211_txb {
u8 nr_frags;
u8 encrypted;
u16 reserved;
u16 frag_size;
u16 payload_size;
struct sk_buff *fragments[0];
};
/* SWEEP TABLE ENTRIES NUMBER*/
#define MAX_SWEEP_TAB_ENTRIES 42
#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET 7
/* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs /* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs
* only use 8, and then use extended rates for the remaining supported * only use 8, and then use extended rates for the remaining supported
* rates. Other APs, however, stick all of their supported rates on the * rates. Other APs, however, stick all of their supported rates on the
@ -1088,61 +885,45 @@ typedef struct tx_pending_t {
#define CATEGORY_IS_ROBUST(cat) !CATEGORY_IS_NON_ROBUST(cat) #define CATEGORY_IS_ROBUST(cat) !CATEGORY_IS_NON_ROBUST(cat)
/* SPECTRUM_MGMT action code */ #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0))
enum rtw_ieee80211_spectrum_mgmt_actioncode { /*Commit 3cb57df37bf3c87c7bbd2bd6f94d9d48c1c8e2ae v4.13-rc1 */
RTW_WLAN_ACTION_SPCT_MSR_REQ = 0, enum ieee80211_pub_actioncode_extend {
RTW_WLAN_ACTION_SPCT_MSR_RPRT = 1, WLAN_PUB_ACTION_20_40_BSS_COEX = 0,
RTW_WLAN_ACTION_SPCT_TPC_REQ = 2, WLAN_PUB_ACTION_DSE_ENABLEMENT = 1,
RTW_WLAN_ACTION_SPCT_TPC_RPRT = 3, WLAN_PUB_ACTION_DSE_DEENABLEMENT = 2,
RTW_WLAN_ACTION_SPCT_CHL_SWITCH = 4, WLAN_PUB_ACTION_DSE_REG_LOC_ANN = 3,
RTW_WLAN_ACTION_SPCT_EXT_CHL_SWITCH = 5, WLAN_PUB_ACTION_DSE_MSMT_REQ = 5,
}; WLAN_PUB_ACTION_DSE_MSMT_RESP = 6,
WLAN_PUB_ACTION_MSMT_PILOT = 7,
/* SELF_PROTECTED action code */ WLAN_PUB_ACTION_DSE_PC = 8,
enum rtw_ieee80211_self_protected_actioncode { WLAN_PUB_ACTION_VENDOR_SPECIFIC = 9,
RTW_ACT_SELF_PROTECTED_RSVD = 0, WLAN_PUB_ACTION_GAS_INITIAL_REQ = 10,
RTW_ACT_SELF_PROTECTED_MESH_OPEN = 1, WLAN_PUB_ACTION_GAS_INITIAL_RESP = 11,
RTW_ACT_SELF_PROTECTED_MESH_CONF = 2, WLAN_PUB_ACTION_GAS_COMEBACK_REQ = 12,
RTW_ACT_SELF_PROTECTED_MESH_CLOSE = 3, WLAN_PUB_ACTION_GAS_COMEBACK_RESP = 13,
RTW_ACT_SELF_PROTECTED_MESH_GK_INFORM = 4, WLAN_PUB_ACTION_LOC_TRACK_NOTI = 15,
RTW_ACT_SELF_PROTECTED_MESH_GK_ACK = 5, WLAN_PUB_ACTION_QAB_REQUEST_FRAME = 16,
RTW_ACT_SELF_PROTECTED_NUM, WLAN_PUB_ACTION_QAB_RESPONSE_FRAME = 17,
}; WLAN_PUB_ACTION_QMF_POLICY = 18,
WLAN_PUB_ACTION_QMF_POLICY_CHANGE = 19,
/* MESH action code */ WLAN_PUB_ACTION_QLOAD_REQUEST = 20,
enum rtw_ieee80211_mesh_actioncode { WLAN_PUB_ACTION_QLOAD_REPORT = 21,
RTW_ACT_MESH_LINK_METRIC_REPORT, WLAN_PUB_ACTION_HCCA_TXOP_ADVERT = 22,
RTW_ACT_MESH_HWMP_PATH_SELECTION, WLAN_PUB_ACTION_HCCA_TXOP_RESPONSE = 23,
RTW_ACT_MESH_GATE_ANNOUNCEMENT, WLAN_PUB_ACTION_PUBLIC_KEY = 24,
RTW_ACT_MESH_CONGESTION_CONTROL_NOTIFICATION, WLAN_PUB_ACTION_CHANNEL_AVAIL_QUERY = 25,
RTW_ACT_MESH_MCCA_SETUP_REQUEST, WLAN_PUB_ACTION_CHANNEL_SCHEDULE_MGMT = 26,
RTW_ACT_MESH_MCCA_SETUP_REPLY, WLAN_PUB_ACTION_CONTACT_VERI_SIGNAL = 27,
RTW_ACT_MESH_MCCA_ADVERTISEMENT_REQUEST, WLAN_PUB_ACTION_GDD_ENABLEMENT_REQ = 28,
RTW_ACT_MESH_MCCA_ADVERTISEMENT, WLAN_PUB_ACTION_GDD_ENABLEMENT_RESP = 29,
RTW_ACT_MESH_MCCA_TEARDOWN, WLAN_PUB_ACTION_NETWORK_CHANNEL_CONTROL = 30,
RTW_ACT_MESH_TBTT_ADJUSTMENT_REQUEST, WLAN_PUB_ACTION_WHITE_SPACE_MAP_ANN = 31,
RTW_ACT_MESH_TBTT_ADJUSTMENT_RESPONSE, WLAN_PUB_ACTION_FTM_REQUEST = 32,
}; WLAN_PUB_ACTION_FTM = 33,
WLAN_PUB_ACTION_FILS_DISCOVERY = 34,
enum _PUBLIC_ACTION {
ACT_PUBLIC_BSSCOEXIST = 0, /* 20/40 BSS Coexistence */
ACT_PUBLIC_DSE_ENABLE = 1,
ACT_PUBLIC_DSE_DEENABLE = 2,
ACT_PUBLIC_DSE_REG_LOCATION = 3,
ACT_PUBLIC_EXT_CHL_SWITCH = 4,
ACT_PUBLIC_DSE_MSR_REQ = 5,
ACT_PUBLIC_DSE_MSR_RPRT = 6,
ACT_PUBLIC_MP = 7, /* Measurement Pilot */
ACT_PUBLIC_DSE_PWR_CONSTRAINT = 8,
ACT_PUBLIC_VENDOR = 9, /* for WIFI_DIRECT */
ACT_PUBLIC_GAS_INITIAL_REQ = 10,
ACT_PUBLIC_GAS_INITIAL_RSP = 11,
ACT_PUBLIC_GAS_COMEBACK_REQ = 12,
ACT_PUBLIC_GAS_COMEBACK_RSP = 13,
ACT_PUBLIC_TDLS_DISCOVERY_RSP = 14,
ACT_PUBLIC_LOCATION_TRACK = 15,
ACT_PUBLIC_MAX
}; };
#endif
#define ACT_PUBLIC_MAX (WLAN_PUB_ACTION_LOC_TRACK_NOTI + 1)
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
#define WLAN_TDLS_DISCOVERY_RESPONSE = 14 /* it's used in public action frame */ #define WLAN_TDLS_DISCOVERY_RESPONSE = 14 /* it's used in public action frame */
@ -1152,7 +933,6 @@ enum _PUBLIC_ACTION {
#endif /* CONFIG_TDLS */ #endif /* CONFIG_TDLS */
/*20/40 BSS Coexistence element */ /*20/40 BSS Coexistence element */
#define RTW_WLAN_20_40_BSS_COEX_INFO_REQ BIT(0)
#define RTW_WLAN_20_40_BSS_COEX_40MHZ_INTOL BIT(1) #define RTW_WLAN_20_40_BSS_COEX_40MHZ_INTOL BIT(1)
#define RTW_WLAN_20_40_BSS_COEX_20MHZ_WIDTH_REQ BIT(2) #define RTW_WLAN_20_40_BSS_COEX_20MHZ_WIDTH_REQ BIT(2)
#define RTW_WLAN_20_40_BSS_COEX_OBSS_EXEMPT_REQ BIT(3) #define RTW_WLAN_20_40_BSS_COEX_OBSS_EXEMPT_REQ BIT(3)
@ -1187,20 +967,6 @@ enum rtw_ieee80211_wnm_actioncode {
#define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0 #define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0
#define WME_OUI_SUBTYPE_PARAMETER_ELEMENT 1 #define WME_OUI_SUBTYPE_PARAMETER_ELEMENT 1
#define WME_OUI_SUBTYPE_TSPEC_ELEMENT 2 #define WME_OUI_SUBTYPE_TSPEC_ELEMENT 2
#define WME_VERSION 1
#define WME_ACTION_CODE_SETUP_REQUEST 0
#define WME_ACTION_CODE_SETUP_RESPONSE 1
#define WME_ACTION_CODE_TEARDOWN 2
#define WME_SETUP_RESPONSE_STATUS_ADMISSION_ACCEPTED 0
#define WME_SETUP_RESPONSE_STATUS_INVALID_PARAMETERS 1
#define WME_SETUP_RESPONSE_STATUS_REFUSED 3
#define WME_TSPEC_DIRECTION_UPLINK 0
#define WME_TSPEC_DIRECTION_DOWNLINK 1
#define WME_TSPEC_DIRECTION_BI_DIRECTIONAL 3
#define OUI_BROADCOM 0x00904c /* Broadcom (Epigram) */ #define OUI_BROADCOM 0x00904c /* Broadcom (Epigram) */
@ -1460,7 +1226,6 @@ u8 rtw_ht_mcsset_to_nss(u8 *supp_mcs_set);
u32 rtw_ht_mcs_set_to_bitmap(u8 *mcs_set, u8 nss); u32 rtw_ht_mcs_set_to_bitmap(u8 *mcs_set, u8 nss);
int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *action); int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *action);
const char *action_public_str(u8 action);
u8 key_2char2num(u8 hch, u8 lch); u8 key_2char2num(u8 hch, u8 lch);
u8 str_2char2num(u8 hch, u8 lch); u8 str_2char2num(u8 hch, u8 lch);

View File

@ -786,7 +786,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
u8 *pbuf; u8 *pbuf;
size_t buf_size = MAX_BSSINFO_LEN; size_t buf_size = MAX_BSSINFO_LEN;
size_t len, bssinf_len = 0; size_t len, bssinf_len = 0;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
struct wireless_dev *wdev = padapter->rtw_wdev; struct wireless_dev *wdev = padapter->rtw_wdev;
@ -801,7 +801,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
/* RTW_INFO("%s\n", __func__); */ /* RTW_INFO("%s\n", __func__); */
bssinf_len = pnetwork->network.IELength + sizeof(struct rtw_ieee80211_hdr_3addr); bssinf_len = pnetwork->network.IELength + sizeof(struct ieee80211_hdr_3addr);
if (bssinf_len > buf_size) { if (bssinf_len > buf_size) {
RTW_INFO("%s IE Length too long > %zu byte\n", __FUNCTION__, buf_size); RTW_INFO("%s IE Length too long > %zu byte\n", __FUNCTION__, buf_size);
goto exit; goto exit;
@ -854,8 +854,8 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
/* pbuf = buf; */ /* pbuf = buf; */
pwlanhdr = (struct rtw_ieee80211_hdr *)pbuf; pwlanhdr = (struct ieee80211_hdr *)pbuf;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/); SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
@ -873,8 +873,8 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
memcpy(pwlanhdr->addr3, pnetwork->network.MacAddress, ETH_ALEN); memcpy(pwlanhdr->addr3, pnetwork->network.MacAddress, ETH_ALEN);
/* pbuf += sizeof(struct rtw_ieee80211_hdr_3addr); */ /* pbuf += sizeof(struct ieee80211_hdr_3addr); */
len = sizeof(struct rtw_ieee80211_hdr_3addr); len = sizeof(struct ieee80211_hdr_3addr);
memcpy((pbuf + len), pnetwork->network.IEs, pnetwork->network.IELength); memcpy((pbuf + len), pnetwork->network.IEs, pnetwork->network.IELength);
*((u64 *)(pbuf + len)) = cpu_to_le64(notify_timestamp); *((u64 *)(pbuf + len)) = cpu_to_le64(notify_timestamp);
@ -1124,10 +1124,10 @@ check_bss:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
roam_info.bssid = cur_network->network.MacAddress; roam_info.bssid = cur_network->network.MacAddress;
roam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2; roam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct ieee80211_hdr_3addr) + 2;
roam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2; roam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct ieee80211_hdr_3addr) - 2;
roam_info.resp_ie = pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6; roam_info.resp_ie = pmlmepriv->assoc_rsp + sizeof(struct ieee80211_hdr_3addr) + 6;
roam_info.resp_ie_len = pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6; roam_info.resp_ie_len = pmlmepriv->assoc_rsp_len - sizeof(struct ieee80211_hdr_3addr) - 6;
cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC); cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
#else #else
@ -1136,10 +1136,10 @@ check_bss:
, notify_channel , notify_channel
#endif #endif
, cur_network->network.MacAddress , cur_network->network.MacAddress
, pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2 , pmlmepriv->assoc_req + sizeof(struct ieee80211_hdr_3addr) + 2
, pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2 , pmlmepriv->assoc_req_len - sizeof(struct ieee80211_hdr_3addr) - 2
, pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6 , pmlmepriv->assoc_rsp + sizeof(struct ieee80211_hdr_3addr) + 6
, pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6 , pmlmepriv->assoc_rsp_len - sizeof(struct ieee80211_hdr_3addr) - 6
, GFP_ATOMIC); , GFP_ATOMIC);
#endif /*LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)*/ #endif /*LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)*/
@ -1156,10 +1156,10 @@ check_bss:
if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) != _TRUE) if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) != _TRUE)
rtw_cfg80211_connect_result(pwdev, cur_network->network.MacAddress rtw_cfg80211_connect_result(pwdev, cur_network->network.MacAddress
, pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2 , pmlmepriv->assoc_req + sizeof(struct ieee80211_hdr_3addr) + 2
, pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2 , pmlmepriv->assoc_req_len - sizeof(struct ieee80211_hdr_3addr) - 2
, pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6 , pmlmepriv->assoc_rsp + sizeof(struct ieee80211_hdr_3addr) + 6
, pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6 , pmlmepriv->assoc_rsp_len - sizeof(struct ieee80211_hdr_3addr) - 6
, WLAN_STATUS_SUCCESS, GFP_ATOMIC); , WLAN_STATUS_SUCCESS, GFP_ATOMIC);
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE) #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
RTW_INFO("pwdev->sme_state(a)=%d\n", pwdev->sme_state); RTW_INFO("pwdev->sme_state(a)=%d\n", pwdev->sme_state);
@ -4386,7 +4386,7 @@ void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, const u8 *da, unsign
int channel; int channel;
u8 *pmgmt_frame; u8 *pmgmt_frame;
uint frame_len; uint frame_len;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
u8 mgmt_buf[128] = {0}; u8 mgmt_buf[128] = {0};
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
@ -4404,9 +4404,9 @@ void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, const u8 *da, unsign
freq = rtw_ch2freq(channel); freq = rtw_ch2freq(channel);
pmgmt_frame = mgmt_buf; pmgmt_frame = mgmt_buf;
pwlanhdr = (struct rtw_ieee80211_hdr *)pmgmt_frame; pwlanhdr = (struct ieee80211_hdr *)pmgmt_frame;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
memcpy(pwlanhdr->addr1, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pwlanhdr->addr1, adapter_mac_addr(padapter), ETH_ALEN);
@ -4417,8 +4417,8 @@ void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, const u8 *da, unsign
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
set_frame_sub_type(pmgmt_frame, IEEE80211_STYPE_DEAUTH); set_frame_sub_type(pmgmt_frame, IEEE80211_STYPE_DEAUTH);
pmgmt_frame += sizeof(struct rtw_ieee80211_hdr_3addr); pmgmt_frame += sizeof(struct ieee80211_hdr_3addr);
frame_len = sizeof(struct rtw_ieee80211_hdr_3addr); frame_len = sizeof(struct ieee80211_hdr_3addr);
reason = cpu_to_le16(reason); reason = cpu_to_le16(reason);
pmgmt_frame = rtw_set_fixed_ie(pmgmt_frame, _RSON_CODE_ , (unsigned char *)&reason, &frame_len); pmgmt_frame = rtw_set_fixed_ie(pmgmt_frame, _RSON_CODE_ , (unsigned char *)&reason, &frame_len);
@ -4463,7 +4463,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
u16 frame_ctl; u16 frame_ctl;
unsigned char src_mac_addr[ETH_ALEN]; unsigned char src_mac_addr[ETH_ALEN];
unsigned char dst_mac_addr[ETH_ALEN]; unsigned char dst_mac_addr[ETH_ALEN];
struct rtw_ieee80211_hdr *dot11_hdr; struct ieee80211_hdr *dot11_hdr;
struct ieee80211_radiotap_header *rtap_hdr; struct ieee80211_radiotap_header *rtap_hdr;
_adapter *padapter = (_adapter *)rtw_netdev_priv(ndev); _adapter *padapter = (_adapter *)rtw_netdev_priv(ndev);
#ifdef CONFIG_DFS_MASTER #ifdef CONFIG_DFS_MASTER
@ -4501,16 +4501,16 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
/* Skip the ratio tap header */ /* Skip the ratio tap header */
skb_pull(skb, rtap_len); skb_pull(skb, rtap_len);
dot11_hdr = (struct rtw_ieee80211_hdr *)skb->data; dot11_hdr = (struct ieee80211_hdr *)skb->data;
frame_ctl = le16_to_cpu(dot11_hdr->frame_ctl); frame_ctl = le16_to_cpu(dot11_hdr->frame_control);
/* Check if the QoS bit is set */ /* Check if the QoS bit is set */
if ((frame_ctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) { if ((frame_ctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) {
/* Check if this ia a Wireless Distribution System (WDS) frame /* Check if this ia a Wireless Distribution System (WDS) frame
* which has 4 MAC addresses * which has 4 MAC addresses
*/ */
if (dot11_hdr->frame_ctl & 0x0080) if (dot11_hdr->frame_control & 0x0080)
qos_len = 2; qos_len = 2;
if ((dot11_hdr->frame_ctl & 0x0300) == 0x0300) if ((dot11_hdr->frame_control & 0x0300) == 0x0300)
dot11_hdr_len += 6; dot11_hdr_len += 6;
memcpy(dst_mac_addr, dot11_hdr->addr1, sizeof(dst_mac_addr)); memcpy(dst_mac_addr, dot11_hdr->addr1, sizeof(dst_mac_addr));
@ -4540,7 +4540,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
unsigned char *pframe; unsigned char *pframe;
/* u8 category, action, OUI_Subtype, dialogToken=0; */ /* u8 category, action, OUI_Subtype, dialogToken=0; */
/* unsigned char *frame_body; */ /* unsigned char *frame_body; */
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
u8 *buf = skb->data; u8 *buf = skb->data;
@ -4550,7 +4550,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
if (rtw_action_frame_parse(buf, len, &category, &action) == _FALSE) { if (rtw_action_frame_parse(buf, len, &category, &action) == _FALSE) {
RTW_INFO(FUNC_NDEV_FMT" frame_control:0x%x\n", FUNC_NDEV_ARG(ndev), RTW_INFO(FUNC_NDEV_FMT" frame_control:0x%x\n", FUNC_NDEV_ARG(ndev),
le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)buf)->frame_ctl)); le16_to_cpu(((struct ieee80211_hdr_3addr *)buf)->frame_control));
goto fail; goto fail;
} }
@ -4561,10 +4561,6 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
if (type >= 0) if (type >= 0)
goto dump; goto dump;
#endif #endif
if (category == WLAN_CATEGORY_PUBLIC)
RTW_INFO("RTW_Tx:%s\n", action_public_str(action));
else
RTW_INFO("RTW_Tx:category(%u), action(%u)\n", category, action);
dump: dump:
/* starting alloc mgmt frame to dump it */ /* starting alloc mgmt frame to dump it */
@ -4589,7 +4585,7 @@ dump:
rtw_xframe_chk_wfd_ie(pmgntframe); rtw_xframe_chk_wfd_ie(pmgntframe);
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
/* update seq number */ /* update seq number */
pmlmeext->mgnt_seq = GetSequence(pwlanhdr); pmlmeext->mgnt_seq = GetSequence(pwlanhdr);
pattrib->seqnum = pmlmeext->mgnt_seq; pattrib->seqnum = pmlmeext->mgnt_seq;
@ -6204,7 +6200,7 @@ void rtw_cfg80211_rx_action(_adapter *adapter, union recv_frame *rframe, const c
#endif #endif
rtw_action_frame_parse(frame, frame_len, &category, &action); rtw_action_frame_parse(frame, frame_len, &category, &action);
if (category == WLAN_CATEGORY_PUBLIC) { if (category == WLAN_CATEGORY_PUBLIC) {
if (action == ACT_PUBLIC_GAS_INITIAL_REQ) { if (action == WLAN_PUB_ACTION_GAS_INITIAL_REQ ) {
rtw_mi_set_scan_deny(adapter, 200); rtw_mi_set_scan_deny(adapter, 200);
rtw_mi_scan_abort(adapter, _FALSE); /*rtw_scan_abort_no_wait*/ rtw_mi_scan_abort(adapter, _FALSE); /*rtw_scan_abort_no_wait*/
} }
@ -6269,7 +6265,7 @@ void rtw_cfg80211_rx_mframe(_adapter *adapter, union recv_frame *rframe, const c
if (msg) if (msg)
RTW_INFO("RTW_Rx:%s\n", msg); RTW_INFO("RTW_Rx:%s\n", msg);
else else
RTW_INFO("RTW_Rx:frame_control:0x%02x\n", le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)rframe)->frame_ctl)); RTW_INFO("RTW_Rx:frame_control:0x%02x\n", le16_to_cpu(((struct ieee80211_hdr_3addr *)rframe)->frame_control));
} }
} }
@ -6299,14 +6295,14 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; unsigned short *fctrl;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct wifidirect_info *pwdinfo = &(padapter->wdinfo); struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
u8 *frame_body = (unsigned char *)(buf + sizeof(struct rtw_ieee80211_hdr_3addr)); u8 *frame_body = (unsigned char *)(buf + sizeof(struct ieee80211_hdr_3addr));
size_t frame_body_len = len - sizeof(struct rtw_ieee80211_hdr_3addr); size_t frame_body_len = len - sizeof(struct ieee80211_hdr_3addr);
RTW_INFO("[%s] In\n", __FUNCTION__); RTW_INFO("[%s] In\n", __FUNCTION__);
@ -6368,9 +6364,9 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
fctrl = &(pwlanhdr->frame_ctl); fctrl =&pwlanhdr->frame_control;
*(fctrl) = 0; *(fctrl) = 0;
memcpy(pwlanhdr->addr1, pwdinfo->tx_prov_disc_info.peerDevAddr, ETH_ALEN); memcpy(pwlanhdr->addr1, pwdinfo->tx_prov_disc_info.peerDevAddr, ETH_ALEN);
@ -6381,8 +6377,8 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION); set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pframe += sizeof(struct ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen));
pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen));
@ -7008,7 +7004,7 @@ static int _cfg80211_rtw_mgmt_tx(_adapter *padapter, u8 tx_ch, u8 no_cck, const
unsigned char *pframe; unsigned char *pframe;
int ret = _FAIL; int ret = _FAIL;
bool ack = _TRUE; bool ack = _TRUE;
struct rtw_ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
#if defined(RTW_ROCH_BACK_OP) && defined(CONFIG_P2P) && defined(CONFIG_CONCURRENT_MODE) #if defined(RTW_ROCH_BACK_OP) && defined(CONFIG_P2P) && defined(CONFIG_CONCURRENT_MODE)
struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(padapter); struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(padapter);
#endif #endif
@ -7102,7 +7098,7 @@ issue_mgmt_frame:
memcpy(pframe, (void *)buf, len); memcpy(pframe, (void *)buf, len);
pattrib->pktlen = len; pattrib->pktlen = len;
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct ieee80211_hdr *)pframe;
/* update seq number */ /* update seq number */
pmlmeext->mgnt_seq = GetSequence(pwlanhdr); pmlmeext->mgnt_seq = GetSequence(pwlanhdr);
pattrib->seqnum = pmlmeext->mgnt_seq; pattrib->seqnum = pmlmeext->mgnt_seq;
@ -7321,7 +7317,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
cfg80211_action_tx_status(ndev, *cookie, buf, len, ack, GFP_KERNEL); cfg80211_action_tx_status(ndev, *cookie, buf, len, ack, GFP_KERNEL);
#endif #endif
frame_styp = le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)buf)->frame_ctl) & IEEE80211_FCTL_STYPE; frame_styp = le16_to_cpu(((struct ieee80211_hdr_3addr *)buf)->frame_control) & IEEE80211_FCTL_STYPE;
if (IEEE80211_STYPE_PROBE_RESP == frame_styp) { if (IEEE80211_STYPE_PROBE_RESP == frame_styp) {
#ifdef CONFIG_DEBUG_CFG80211 #ifdef CONFIG_DEBUG_CFG80211
RTW_INFO("RTW_Tx: probe_resp tx_ch=%d, no_cck=%u, da="MAC_FMT"\n", tx_ch, no_cck, MAC_ARG(GetAddr1Ptr(buf))); RTW_INFO("RTW_Tx: probe_resp tx_ch=%d, no_cck=%u, da="MAC_FMT"\n", tx_ch, no_cck, MAC_ARG(GetAddr1Ptr(buf)));
@ -7345,7 +7341,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
if (rtw_action_frame_parse(buf, len, &category, &action) == _FALSE) { if (rtw_action_frame_parse(buf, len, &category, &action) == _FALSE) {
RTW_INFO(FUNC_ADPT_FMT" frame_control:0x%02x\n", FUNC_ADPT_ARG(padapter), RTW_INFO(FUNC_ADPT_FMT" frame_control:0x%02x\n", FUNC_ADPT_ARG(padapter),
le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)buf)->frame_ctl)); le16_to_cpu(((struct ieee80211_hdr_3addr *)buf)->frame_control));
goto exit; goto exit;
} }
@ -7368,10 +7364,9 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
} }
#endif #endif
if (category == WLAN_CATEGORY_PUBLIC) { if (category == WLAN_CATEGORY_PUBLIC) {
RTW_INFO("RTW_Tx:%s\n", action_public_str(action));
switch (action) { switch (action) {
case ACT_PUBLIC_GAS_INITIAL_REQ: case WLAN_PUB_ACTION_GAS_INITIAL_REQ :
case ACT_PUBLIC_GAS_INITIAL_RSP: case WLAN_PUB_ACTION_GAS_INITIAL_RESP:
sleep_ms = 50; sleep_ms = 50;
retry_guarantee_ms = RTW_MAX_MGMT_TX_MS_GAS; retry_guarantee_ms = RTW_MAX_MGMT_TX_MS_GAS;
break; break;

View File

@ -11427,7 +11427,7 @@ static struct xmit_frame *createloopbackpkt(PADAPTER padapter, u32 size)
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct tx_desc *desc; struct tx_desc *desc;
u8 *pkt_start, *pkt_end, *ptr; u8 *pkt_start, *pkt_end, *ptr;
struct rtw_ieee80211_hdr *hdr; struct ieee80211_hdr *hdr;
bool bmcast; bool bmcast;
_irqL irqL; _irqL irqL;
@ -11532,8 +11532,8 @@ static struct xmit_frame *createloopbackpkt(PADAPTER padapter, u32 size)
pkt_end = pkt_start + pattrib->last_txcmdsz; pkt_end = pkt_start + pattrib->last_txcmdsz;
/* 3 5.1. make wlan header, make_wlanhdr() */ /* 3 5.1. make wlan header, make_wlanhdr() */
hdr = (struct rtw_ieee80211_hdr *)pkt_start; hdr = (struct ieee80211_hdr *)pkt_start;
set_frame_sub_type(&hdr->frame_ctl, pattrib->subtype); set_frame_sub_type(&hdr->frame_control, pattrib->subtype);
memcpy(hdr->addr1, pattrib->dst, ETH_ALEN); /* DA */ memcpy(hdr->addr1, pattrib->dst, ETH_ALEN); /* DA */
memcpy(hdr->addr2, pattrib->src, ETH_ALEN); /* SA */ memcpy(hdr->addr2, pattrib->src, ETH_ALEN); /* SA */
memcpy(hdr->addr3, get_bssid(&padapter->mlmepriv), ETH_ALEN); /* RA, BSSID */ memcpy(hdr->addr3, get_bssid(&padapter->mlmepriv), ETH_ALEN); /* RA, BSSID */