From 6b480dfa8e4f04a9b6818c409d36f1f53afb1192 Mon Sep 17 00:00:00 2001 From: Carlos Garces Date: Wed, 20 Oct 2021 21:54:12 +0200 Subject: [PATCH] include/ieee80211.h cleaup. Remove empty functions from ieee80211.h Use values from linux/ieee80211.h port 12a17d72f7948148b80c0dfa72ea983da33464ba port a9d8763889737b7e0f83956e093bd48190876044 port 872cfb096d3a009709b56f23f5280a359bbe58e2 port a4bc0fa9ec51008bb494943ec98b4ad836e3a216 port 13e00f8ebded278a7887d98ad65ceabc24f3776a --- core/mesh/rtw_mesh.c | 8 +- core/mesh/rtw_mesh_hwmp.c | 36 +-- core/rtw_beamforming.c | 12 +- core/rtw_ieee80211.c | 50 +--- core/rtw_mlme_ext.c | 122 ++++----- core/rtw_p2p.c | 18 +- core/rtw_recv.c | 24 +- core/rtw_rm.c | 4 +- core/rtw_rm_fsm.c | 2 +- core/rtw_tdls.c | 92 +++---- core/rtw_xmit.c | 46 ++-- hal/hal_com.c | 6 +- hal/rtl8192e/usb/rtl8192eu_xmit.c | 2 +- hal/rtl8192e/usb/usb_ops_linux.c | 2 +- include/ieee80211.h | 419 ++---------------------------- os_dep/linux/ioctl_cfg80211.c | 32 +-- os_dep/linux/ioctl_linux.c | 21 +- 17 files changed, 224 insertions(+), 672 deletions(-) diff --git a/core/mesh/rtw_mesh.c b/core/mesh/rtw_mesh.c index 3a252ec..7fc10e2 100644 --- a/core/mesh/rtw_mesh.c +++ b/core/mesh/rtw_mesh.c @@ -1772,7 +1772,7 @@ static int rtw_mesh_check_frames(_adapter *adapter, const u8 **buf, size_t *len, frame_body = *buf + sizeof(struct rtw_ieee80211_hdr_3addr); category = frame_body[0]; - if (category == RTW_WLAN_CATEGORY_SELF_PROTECTED) { + if (category == WLAN_CATEGORY_SELF_PROTECTED) { action = frame_body[1]; switch (action) { case RTW_ACT_SELF_PROTECTED_MESH_OPEN: @@ -1845,7 +1845,7 @@ unsigned int on_action_self_protected(_adapter *adapter, union recv_frame *rfram goto exit; category = frame_body[0]; - if (category != RTW_WLAN_CATEGORY_SELF_PROTECTED) + if (category != WLAN_CATEGORY_SELF_PROTECTED) goto exit; action = frame_body[1]; @@ -1904,7 +1904,7 @@ unsigned int on_action_mesh(_adapter *adapter, union recv_frame *rframe) /* check stainfo exist? */ category = frame_body[0]; - if (category != RTW_WLAN_CATEGORY_MESH) + if (category != WLAN_CATEGORY_MESH_ACTION) goto exit; action = frame_body[1]; @@ -2531,7 +2531,7 @@ static u8 *rtw_mesh_construct_peer_mesh_close(_adapter *adapter, struct mesh_pli set_frame_sub_type(frame, IEEE80211_STYPE_ACTION); pos += sizeof(struct rtw_ieee80211_hdr_3addr); - *(pos++) = RTW_WLAN_CATEGORY_SELF_PROTECTED; + *(pos++) = WLAN_CATEGORY_SELF_PROTECTED; *(pos++) = RTW_ACT_SELF_PROTECTED_MESH_CLOSE; pos = rtw_set_ie_mesh_id(pos, NULL, minfo->mesh_id, minfo->mesh_id_len); diff --git a/core/mesh/rtw_mesh_hwmp.c b/core/mesh/rtw_mesh_hwmp.c index 2d39e25..0aa47b9 100644 --- a/core/mesh/rtw_mesh_hwmp.c +++ b/core/mesh/rtw_mesh_hwmp.c @@ -218,7 +218,7 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8 struct xmit_frame *pmgntframe = NULL; struct rtw_ieee80211_hdr *pwlanhdr = NULL; struct pkt_attrib *pattrib = NULL; - u8 category = RTW_WLAN_CATEGORY_MESH; + u8 category = WLAN_CATEGORY_MESH_ACTION; u8 action = RTW_ACT_MESH_HWMP_PATH_SELECTION; u16 *fctrl = NULL; u8 *pos, ie_len; @@ -330,7 +330,7 @@ int rtw_mesh_path_error_tx(_adapter *adapter, struct rtw_ieee80211_hdr *pwlanhdr = NULL; struct pkt_attrib *pattrib = NULL; struct rtw_mesh_info *minfo = &adapter->mesh_info; - u8 category = RTW_WLAN_CATEGORY_MESH; + u8 category = WLAN_CATEGORY_MESH_ACTION; u8 action = RTW_ACT_MESH_HWMP_PATH_SELECTION; u8 *pos, ie_len; u16 *fctrl = NULL; @@ -644,7 +644,7 @@ static void rtw_hwmp_preq_frame_process(_adapter *adapter, target_flags = RTW_PREQ_IE_TARGET_F(preq_elem); /* PREQ gate announcements */ flags = RTW_PREQ_IE_FLAGS(preq_elem); - preq_is_gate = !!(flags & RTW_IEEE80211_PREQ_IS_GATE_FLAG); + preq_is_gate = !!(flags & IEEE80211_PREQ_IS_GATE_FLAG); RTW_HWMP_DBG("received PREQ from "MAC_FMT"\n", MAC_ARG(originator_addr)); @@ -677,11 +677,11 @@ static void rtw_hwmp_preq_frame_process(_adapter *adapter, } target_sn = minfo->sn; } else if (is_broadcast_mac_addr(target_addr) && - (target_flags & RTW_IEEE80211_PREQ_TO_FLAG)) { + (target_flags & IEEE80211_PREQ_TO_FLAG)) { rtw_rcu_read_lock(); path = rtw_mesh_path_lookup(adapter, originator_addr); if (path) { - if (flags & RTW_IEEE80211_PREQ_PROACTIVE_PREP_FLAG) { + if (flags & IEEE80211_PREQ_PROACTIVE_PREP_FLAG) { reply = _TRUE; target_addr = adapter_mac_addr(adapter); target_sn = ++minfo->sn; @@ -722,13 +722,13 @@ static void rtw_hwmp_preq_frame_process(_adapter *adapter, RTW_SN_LT(path->sn, target_sn)) { path->sn = target_sn; path->flags |= RTW_MESH_PATH_SN_VALID; - } else if ((!(target_flags & RTW_IEEE80211_PREQ_TO_FLAG)) && + } else if ((!(target_flags & IEEE80211_PREQ_TO_FLAG)) && (path->flags & RTW_MESH_PATH_ACTIVE)) { reply = _TRUE; target_metric = path->metric; target_sn = path->sn; /* Case E2 of sec 13.10.9.3 IEEE 802.11-2012*/ - target_flags |= RTW_IEEE80211_PREQ_TO_FLAG; + target_flags |= IEEE80211_PREQ_TO_FLAG; } } rtw_rcu_read_unlock(); @@ -748,7 +748,7 @@ static void rtw_hwmp_preq_frame_process(_adapter *adapter, RTW_HWMP_DBG("replying to the PREQ (PREQ for us)\n"); if (mshcfg->dot11MeshGateAnnouncementProtocol) { /* BIT 7 is used to identify the prep is from mesh gate */ - to_gate_ask = RTW_IEEE80211_PREQ_IS_GATE_FLAG | BIT(7); + to_gate_ask = IEEE80211_PREQ_IS_GATE_FLAG | BIT(7); } else { to_gate_ask = 0; } @@ -780,7 +780,7 @@ static void rtw_hwmp_preq_frame_process(_adapter *adapter, da = (path && path->is_root) ? path->rann_snd_addr : bcast_addr; - if (flags & RTW_IEEE80211_PREQ_PROACTIVE_PREP_FLAG) { + if (flags & IEEE80211_PREQ_PROACTIVE_PREP_FLAG) { target_addr = RTW_PREQ_IE_TARGET_ADDR(preq_elem); target_sn = RTW_PREQ_IE_TARGET_SN(preq_elem); } @@ -831,7 +831,7 @@ static void rtw_hwmp_prep_frame_process(_adapter *adapter, enter_critical_bh(&path->state_lock); path->gate_asked = false; exit_critical_bh(&path->state_lock); - if (!(flags & RTW_IEEE80211_PREQ_IS_GATE_FLAG)) { + if (!(flags & IEEE80211_PREQ_IS_GATE_FLAG)) { enter_critical_bh(&path->state_lock); rtw_mesh_gate_del(adapter->mesh_info.mesh_paths, path); exit_critical_bh(&path->state_lock); @@ -957,7 +957,7 @@ static void rtw_hwmp_rann_frame_process(_adapter *adapter, ttl = rann->rann_ttl; flags = rann->rann_flags; - root_is_gate = !!(flags & RTW_RANN_FLAG_IS_GATE); + root_is_gate = !!(flags & RANN_FLAG_IS_GATE); originator_addr = rann->rann_addr; originator_sn = le32_to_cpu(rann->rann_seq); interval = le32_to_cpu(rann->rann_interval); @@ -1429,9 +1429,9 @@ void rtw_mesh_path_start_discovery(_adapter *adapter) } if (preq_node->flags & RTW_PREQ_Q_F_REFRESH) - target_flags |= RTW_IEEE80211_PREQ_TO_FLAG; + target_flags |= IEEE80211_PREQ_TO_FLAG; else - target_flags &= ~RTW_IEEE80211_PREQ_TO_FLAG; + target_flags &= ~IEEE80211_PREQ_TO_FLAG; #ifdef CONFIG_RTW_MESH_ADD_ROOT_CHK is_root_add_chk = !!(path->flags & RTW_MESH_PATH_ROOT_ADD_CHK); @@ -1443,7 +1443,7 @@ void rtw_mesh_path_start_discovery(_adapter *adapter) #ifdef CONFIG_RTW_MESH_ON_DMD_GANN flags = (mshcfg->dot11MeshGateAnnouncementProtocol) - ? RTW_IEEE80211_PREQ_IS_GATE_FLAG : 0; + ? IEEE80211_PREQ_IS_GATE_FLAG : 0; #endif rtw_mesh_path_sel_frame_tx(RTW_MPATH_PREQ, flags, adapter_mac_addr(adapter), minfo->sn, target_flags, path->dst, path->sn, da, 0, @@ -1516,7 +1516,7 @@ void rtw_mesh_path_tx_root_frame(_adapter *adapter) u8 flags, target_flags = 0; flags = (mshcfg->dot11MeshGateAnnouncementProtocol) - ? RTW_RANN_FLAG_IS_GATE : 0; + ? RANN_FLAG_IS_GATE : 0; switch (mshcfg->dot11MeshHWMPRootMode) { case IEEE80211_PROACTIVE_RANN: @@ -1526,11 +1526,11 @@ void rtw_mesh_path_tx_root_frame(_adapter *adapter) interval, 0, 0, adapter); break; case IEEE80211_PROACTIVE_PREQ_WITH_PREP: - flags |= RTW_IEEE80211_PREQ_PROACTIVE_PREP_FLAG; + flags |= IEEE80211_PREQ_PROACTIVE_PREP_FLAG; case IEEE80211_PROACTIVE_PREQ_NO_PREP: interval = mshcfg->dot11MeshHWMPactivePathToRootTimeout; - target_flags |= RTW_IEEE80211_PREQ_TO_FLAG | - RTW_IEEE80211_PREQ_USN_FLAG; + target_flags |= IEEE80211_PREQ_TO_FLAG | + IEEE80211_PREQ_USN_FLAG; rtw_mesh_path_sel_frame_tx(RTW_MPATH_PREQ, flags, adapter_mac_addr(adapter), ++minfo->sn, target_flags, (u8 *) bcast_addr, 0, bcast_addr, diff --git a/core/rtw_beamforming.c b/core/rtw_beamforming.c index d0898b7..e405bf2 100644 --- a/core/rtw_beamforming.c +++ b/core/rtw_beamforming.c @@ -1631,8 +1631,8 @@ u32 rtw_bf_get_report_packet(PADAPTER adapter, union recv_frame *precv_frame) category = frame_body[0]; action = frame_body[1]; - if ((category == RTW_WLAN_CATEGORY_VHT) - && (action == RTW_WLAN_ACTION_VHT_COMPRESSED_BEAMFORMING)) { + if ((category == WLAN_CATEGORY_VHT) + && (action == WLAN_VHT_ACTION_COMPRESSED_BF)) { pMIMOCtrlField = pframe + 26; Nc = (*pMIMOCtrlField) & 0x7; Nr = ((*pMIMOCtrlField) & 0x38) >> 3; @@ -1646,8 +1646,8 @@ u32 rtw_bf_get_report_packet(PADAPTER adapter, union recv_frame *precv_frame) pCSIMatrix = pMIMOCtrlField + 3 + Nc; CSIMatrixLen = frame_len - 26 - 3 - Nc; info->TargetCSIInfo.bVHT = _TRUE; - } else if ((category == RTW_WLAN_CATEGORY_HT) - && (action == RTW_WLAN_ACTION_HT_COMPRESS_BEAMFORMING)) { + } else if ((category == WLAN_CATEGORY_HT) + && (action == WLAN_HT_ACTION_COMPRESSED_BF)) { pMIMOCtrlField = pframe + 26; Nc = (*pMIMOCtrlField) & 0x3; Nr = ((*pMIMOCtrlField) & 0xC) >> 2; @@ -1726,8 +1726,8 @@ u8 rtw_bf_send_vht_gid_mgnt_packet(PADAPTER adapter, u8 *ra, u8 *gid, u8 *positi memcpy(wlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN); memcpy(wlanhdr->addr3, get_bssid(mlmepriv), ETH_ALEN); - pframe[24] = RTW_WLAN_CATEGORY_VHT; - pframe[25] = RTW_WLAN_ACTION_VHT_GROUPID_MANAGEMENT; + pframe[24] = WLAN_CATEGORY_VHT; + pframe[25] = WLAN_VHT_ACTION_GROUPID_MGMT; /* Set Membership Status Array */ ptr = pframe + 26; memcpy(ptr, gid, 8); diff --git a/core/rtw_ieee80211.c b/core/rtw_ieee80211.c index 45150b6..4ecbeda 100644 --- a/core/rtw_ieee80211.c +++ b/core/rtw_ieee80211.c @@ -2663,50 +2663,6 @@ void rtw_bss_ex_del_wfd_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id) } } -/* Baron adds to avoid FreeBSD warning */ -int ieee80211_is_empty_essid(const char *essid, int essid_len) -{ - /* Single white space is for Linksys APs */ - if (essid_len == 1 && essid[0] == ' ') - return 1; - - /* Otherwise, if the entire essid is 0, we assume it is hidden */ - while (essid_len) { - essid_len--; - if (essid[essid_len] != '\0') - return 0; - } - - return 1; -} - -int ieee80211_get_hdrlen(u16 fc) -{ - int hdrlen = 24; - - switch (WLAN_FC_GET_TYPE(fc)) { - case RTW_IEEE80211_FTYPE_DATA: - if (fc & RTW_IEEE80211_STYPE_QOS_DATA) - hdrlen += 2; - if ((fc & RTW_IEEE80211_FCTL_FROMDS) && (fc & RTW_IEEE80211_FCTL_TODS)) - hdrlen += 6; /* Addr4 */ - break; - case RTW_IEEE80211_FTYPE_CTL: - switch (WLAN_FC_GET_STYPE(fc)) { - case RTW_IEEE80211_STYPE_CTS: - case RTW_IEEE80211_STYPE_ACK: - hdrlen = 10; - break; - default: - hdrlen = 16; - break; - } - break; - } - - return hdrlen; -} - u8 rtw_ht_mcsset_to_nss(u8 *supp_mcs_set) { u8 nss = 1; @@ -2826,15 +2782,15 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *act fc = le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)frame)->frame_ctl); - if ((fc & (RTW_IEEE80211_FCTL_FTYPE | RTW_IEEE80211_FCTL_STYPE)) - != (RTW_IEEE80211_FTYPE_MGMT | RTW_IEEE80211_STYPE_ACTION) + if ((fc & ( IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) + != (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION) ) return _FALSE; c = frame_body[0]; switch (c) { - case RTW_WLAN_CATEGORY_P2P: /* vendor-specific */ + case WLAN_CATEGORY_VENDOR_SPECIFIC: /* vendor-specific */ break; default: a = frame_body[1]; diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 280651f..bf2043d 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -68,30 +68,30 @@ struct mlme_handler mlme_ap_tbl[] = { #endif struct action_handler OnAction_tbl[] = { - {RTW_WLAN_CATEGORY_SPECTRUM_MGMT, "ACTION_SPECTRUM_MGMT", on_action_spct}, - {RTW_WLAN_CATEGORY_QOS, "ACTION_QOS", &OnAction_qos}, - {RTW_WLAN_CATEGORY_DLS, "ACTION_DLS", &OnAction_dls}, - {RTW_WLAN_CATEGORY_BACK, "ACTION_BACK", &OnAction_back}, - {RTW_WLAN_CATEGORY_PUBLIC, "ACTION_PUBLIC", on_action_public}, - {RTW_WLAN_CATEGORY_RADIO_MEAS, "ACTION_RADIO_MEAS", &on_action_rm}, - {RTW_WLAN_CATEGORY_FT, "ACTION_FT", &OnAction_ft}, - {RTW_WLAN_CATEGORY_HT, "ACTION_HT", &OnAction_ht}, + {WLAN_CATEGORY_SPECTRUM_MGMT, "ACTION_SPECTRUM_MGMT", on_action_spct}, + {WLAN_CATEGORY_QOS, "ACTION_QOS", &OnAction_qos}, + {WLAN_CATEGORY_DLS, "ACTION_DLS", &OnAction_dls}, + {WLAN_CATEGORY_BACK, "ACTION_BACK", &OnAction_back}, + {WLAN_CATEGORY_PUBLIC, "ACTION_PUBLIC", on_action_public}, + {WLAN_CATEGORY_RADIO_MEASUREMENT, "ACTION_RADIO_MEAS", &on_action_rm}, + {WLAN_CATEGORY_FAST_BBS_TRANSITION, "ACTION_FT", &OnAction_ft}, + {WLAN_CATEGORY_HT, "ACTION_HT", &OnAction_ht}, #ifdef CONFIG_IEEE80211W - {RTW_WLAN_CATEGORY_SA_QUERY, "ACTION_SA_QUERY", &OnAction_sa_query}, + {WLAN_CATEGORY_SA_QUERY, "ACTION_SA_QUERY", &OnAction_sa_query}, #else - {RTW_WLAN_CATEGORY_SA_QUERY, "ACTION_SA_QUERY", &DoReserved}, + {WLAN_CATEGORY_SA_QUERY, "ACTION_SA_QUERY", &DoReserved}, #endif /* CONFIG_IEEE80211W */ #ifdef CONFIG_RTW_WNM - {RTW_WLAN_CATEGORY_WNM, "ACTION_WNM", &on_action_wnm}, + {WLAN_CATEGORY_WNM, "ACTION_WNM", &on_action_wnm}, #endif - {RTW_WLAN_CATEGORY_UNPROTECTED_WNM, "ACTION_UNPROTECTED_WNM", &DoReserved}, + {WLAN_CATEGORY_WNM_UNPROTECTED, "ACTION_UNPROTECTED_WNM", &DoReserved}, #ifdef CONFIG_RTW_MESH - {RTW_WLAN_CATEGORY_MESH, "ACTION_MESH", &on_action_mesh}, - {RTW_WLAN_CATEGORY_SELF_PROTECTED, "ACTION_SELF_PROTECTED", &on_action_self_protected}, + {WLAN_CATEGORY_MESH_ACTION, "ACTION_MESH", &on_action_mesh}, + {WLAN_CATEGORY_SELF_PROTECTED, "ACTION_SELF_PROTECTED", &on_action_self_protected}, #endif - {RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &OnAction_wmm}, - {RTW_WLAN_CATEGORY_VHT, "ACTION_VHT", &OnAction_vht}, - {RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &OnAction_p2p}, + {WLAN_CATEGORY_WMM, "ACTION_WMM", &OnAction_wmm}, + {WLAN_CATEGORY_VHT, "ACTION_VHT", &OnAction_vht}, + {WLAN_CATEGORY_VENDOR_SPECIFIC, "ACTION_P2P", &OnAction_p2p}, }; @@ -1304,9 +1304,9 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) #ifdef CONFIG_TDLS if ((index << 4) == IEEE80211_STYPE_ACTION) { - /* category==public (4), action==TDLS_DISCOVERY_RESPONSE */ - if (*(pframe + 24) == RTW_WLAN_CATEGORY_PUBLIC && *(pframe + 25) == TDLS_DISCOVERY_RESPONSE) { - RTW_INFO("[TDLS] Recv %s from "MAC_FMT"\n", rtw_tdls_action_txt(TDLS_DISCOVERY_RESPONSE), MAC_ARG(get_addr2_ptr(pframe))); + /* category==public (4), action==WLAN_TDLS_DISCOVERY_RESPONSE */ + if (*(pframe + 24) == WLAN_CATEGORY_PUBLIC && *(pframe + 25) == WLAN_TDLS_DISCOVERY_RESPONSE) { + RTW_INFO("[TDLS] Recv %s from "MAC_FMT"\n", rtw_tdls_action_txt(WLAN_TDLS_DISCOVERY_RESPONSE), MAC_ARG(get_addr2_ptr(pframe))); On_TDLS_Dis_Rsp(padapter, precv_frame); } } @@ -3155,7 +3155,7 @@ unsigned int on_action_spct(_adapter *padapter, union recv_frame *precv_frame) goto exit; category = frame_body[0]; - if (category != RTW_WLAN_CATEGORY_SPECTRUM_MGMT) + if (category != WLAN_CATEGORY_SPECTRUM_MGMT) goto exit; action = frame_body[1]; @@ -3217,7 +3217,7 @@ unsigned int on_action_wnm(_adapter *adapter, union recv_frame *rframe) goto exit; category = frame_body[0]; - if (category != RTW_WLAN_CATEGORY_WNM) + if (category != WLAN_CATEGORY_WNM) goto exit; action = frame_body[1]; @@ -3620,7 +3620,7 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); category = frame_body[0]; - if (category == RTW_WLAN_CATEGORY_BACK) { /* representing Block Ack */ + if (category == WLAN_CATEGORY_BACK) { /* representing Block Ack */ #ifdef CONFIG_TDLS if ((psta->tdls_sta_state & TDLS_LINKED_STATE) && (psta->htpriv.ht_option == _TRUE) && @@ -3634,7 +3634,7 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) action = frame_body[1]; RTW_INFO("%s, action=%d\n", __FUNCTION__, action); switch (action) { - case RTW_WLAN_ACTION_ADDBA_REQ: /* ADDBA request */ + case WLAN_ACTION_ADDBA_REQ: /* ADDBA request */ memcpy(&(pmlmeinfo->ADDBA_req), &(frame_body[2]), sizeof(struct ADDBA_request)); /* process_addba_req(padapter, (u8*)&(pmlmeinfo->ADDBA_req), GetAddr3Ptr(pframe)); */ @@ -3642,7 +3642,7 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) break; - case RTW_WLAN_ACTION_ADDBA_RESP: /* ADDBA response */ + case WLAN_ACTION_ADDBA_RESP: /* ADDBA response */ /* status = frame_body[3] | (frame_body[4] << 8); */ /* endian issue */ status = RTW_GET_LE16(&frame_body[3]); @@ -3674,7 +3674,7 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) /* RTW_INFO("marc: ADDBA RSP: %x\n", pmlmeinfo->agg_enable_bitmap); */ break; - case RTW_WLAN_ACTION_DELBA: /* DELBA */ + case WLAN_ACTION_DELBA: /* DELBA */ if ((frame_body[3] & BIT(3)) == 0) { psta->htpriv.agg_enable_bitmap &= ~(1 << ((frame_body[3] >> 4) & 0xf)); psta->htpriv.candidate_tid_bitmap &= ~(1 << ((frame_body[3] >> 4) & 0xf)); @@ -3735,7 +3735,7 @@ int get_reg_classes_full_count(struct p2p_channels *channel_list) void issue_p2p_GO_request(_adapter *padapter, u8 *raddr) { struct p2p_channels *ch_list = &(adapter_to_rfctl(padapter)->channel_list); - unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category = WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; u32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_GO_NEGO_REQ; @@ -4131,7 +4131,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8 *raddr) void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint len, u8 result) { struct p2p_channels *ch_list = &(adapter_to_rfctl(padapter)->channel_list); - unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category = WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; u32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_GO_NEGO_RESP; @@ -4548,7 +4548,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8 *raddr, u8 *frame_body, uint l void issue_p2p_GO_confirm(_adapter *padapter, u8 *raddr, u8 result) { - unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category = WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; u32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_GO_NEGO_CONF; @@ -4782,7 +4782,7 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8 *raddr, u8 result) void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr) { struct p2p_channels *ch_list = &(adapter_to_rfctl(padapter)->channel_list); - unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category = WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; u32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_INVIT_REQ; @@ -5080,7 +5080,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8 *raddr) void issue_p2p_invitation_response(_adapter *padapter, u8 *raddr, u8 dialogToken, u8 status_code) { struct p2p_channels *ch_list = &(adapter_to_rfctl(padapter)->channel_list); - unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category = WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; u32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_INVIT_RESP; @@ -5314,7 +5314,7 @@ void issue_p2p_invitation_response(_adapter *padapter, u8 *raddr, u8 dialogToken void issue_p2p_provision_request(_adapter *padapter, u8 *pssid, u8 ussidlen, u8 *pdev_raddr) { - unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category = WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; u8 dialogToken = 1; u32 p2poui = cpu_to_be32(P2POUI); @@ -6611,7 +6611,7 @@ unsigned int on_action_public(_adapter *padapter, union recv_frame *precv_frame) goto exit; category = frame_body[0]; - if (category != RTW_WLAN_CATEGORY_PUBLIC) + if (category != WLAN_CATEGORY_PUBLIC) goto exit; action = frame_body[1]; @@ -6909,7 +6909,7 @@ unsigned int OnAction_ft(_adapter *padapter, union recv_frame *precv_frame) pframe_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); category = pframe_body[0]; - if (category != RTW_WLAN_CATEGORY_FT) + if (category != WLAN_CATEGORY_FAST_BBS_TRANSITION) goto exit; action_code = pframe_body[1]; @@ -7164,7 +7164,7 @@ void rtw_wnm_issue_action(_adapter *padapter, u8 action, u8 reason) pframe += sizeof(struct rtw_ieee80211_hdr_3addr); pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); - category = RTW_WLAN_CATEGORY_WNM; + category = WLAN_CATEGORY_WNM; pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); @@ -7208,12 +7208,12 @@ unsigned int OnAction_ht(_adapter *padapter, union recv_frame *precv_frame) goto exit; category = frame_body[0]; - if (category != RTW_WLAN_CATEGORY_HT) + if (category != WLAN_CATEGORY_HT) goto exit; action = frame_body[1]; switch (action) { - case RTW_WLAN_ACTION_HT_SM_PS: + case WLAN_HT_ACTION_SMPS: #ifdef CONFIG_80211N_HT #ifdef CONFIG_AP_MODE if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE) @@ -7221,9 +7221,9 @@ unsigned int OnAction_ht(_adapter *padapter, union recv_frame *precv_frame) #endif /*CONFIG_AP_MODE*/ #endif /*CONFIG_80211N_HT*/ break; - case RTW_WLAN_ACTION_HT_COMPRESS_BEAMFORMING: + case WLAN_HT_ACTION_COMPRESSED_BF: #ifdef CONFIG_BEAMFORMING - /*RTW_INFO("RTW_WLAN_ACTION_HT_COMPRESS_BEAMFORMING\n");*/ + /*RTW_INFO("WLAN_HT_ACTION_COMPRESSED_BF\n");*/ rtw_beamforming_get_report_frame(padapter, precv_frame); #endif /*CONFIG_BEAMFORMING*/ break; @@ -7309,25 +7309,25 @@ unsigned int OnAction_vht(_adapter *padapter, union recv_frame *precv_frame) goto exit; category = frame_body[0]; - if (category != RTW_WLAN_CATEGORY_VHT) + if (category != WLAN_CATEGORY_VHT) goto exit; action = frame_body[1]; switch (action) { - case RTW_WLAN_ACTION_VHT_COMPRESSED_BEAMFORMING: + case WLAN_VHT_ACTION_COMPRESSED_BF: #ifdef CONFIG_BEAMFORMING - /*RTW_INFO("RTW_WLAN_ACTION_VHT_COMPRESSED_BEAMFORMING\n");*/ + /*RTW_INFO("WLAN_VHT_ACTION_COMPRESSED_BF\n");*/ rtw_beamforming_get_report_frame(padapter, precv_frame); #endif /*CONFIG_BEAMFORMING*/ break; - case RTW_WLAN_ACTION_VHT_OPMODE_NOTIFICATION: + case WLAN_VHT_ACTION_OPMODE_NOTIF: /* CategoryCode(1) + ActionCode(1) + OpModeNotification(1) */ - /* RTW_INFO("RTW_WLAN_ACTION_VHT_OPMODE_NOTIFICATION\n"); */ + /* RTW_INFO("WLAN_VHT_ACTION_OPMODE_NOTIF\n"); */ psta = rtw_get_stainfo(&padapter->stapriv, whdr->addr2); if (psta) rtw_process_vht_op_mode_notify(padapter, &frame_body[2], psta); break; - case RTW_WLAN_ACTION_VHT_GROUPID_MANAGEMENT: + case WLAN_VHT_ACTION_GROUPID_MGMT: #ifdef CONFIG_BEAMFORMING #ifdef RTW_BEAMFORMING_VERSION_2 rtw_beamforming_get_vht_gid_mgnt_frame(padapter, precv_frame); @@ -7360,7 +7360,7 @@ unsigned int OnAction_p2p(_adapter *padapter, union recv_frame *precv_frame) frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); category = frame_body[0]; - if (category != RTW_WLAN_CATEGORY_P2P) + if (category != WLAN_CATEGORY_VENDOR_SPECIFIC) return _SUCCESS; if (cpu_to_be32(*((u32 *)(frame_body + 1))) != P2POUI) @@ -9914,7 +9914,7 @@ void issue_action_spct_ch_switch(_adapter *padapter, u8 *ra, u8 new_ch, u8 ch_of /* category, action */ { u8 category, action; - category = RTW_WLAN_CATEGORY_SPECTRUM_MGMT; + category = WLAN_CATEGORY_SPECTRUM_MGMT; action = RTW_WLAN_ACTION_SPCT_CHL_SWITCH; pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); @@ -9934,7 +9934,7 @@ void issue_action_spct_ch_switch(_adapter *padapter, u8 *ra, u8 new_ch, u8 ch_of #ifdef CONFIG_IEEE80211W void issue_action_SA_Query(_adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short tid, u8 key_type) { - u8 category = RTW_WLAN_CATEGORY_SA_QUERY; + u8 category = WLAN_CATEGORY_SA_QUERY; u16 reason_code; struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; @@ -10037,7 +10037,7 @@ static int issue_action_ba(_adapter *padapter, unsigned char *raddr, unsigned ch , u8 tid, u8 size, u16 status, u8 initiator, int wait_ack) { int ret = _FAIL; - u8 category = RTW_WLAN_CATEGORY_BACK; + u8 category = WLAN_CATEGORY_BACK; u16 start_seq; u16 BA_para_set; u16 BA_timeout_value; @@ -10092,7 +10092,7 @@ static int issue_action_ba(_adapter *padapter, unsigned char *raddr, unsigned ch if (category == 3) { switch (action) { - case RTW_WLAN_ACTION_ADDBA_REQ: + case WLAN_ACTION_ADDBA_REQ: do { pmlmeinfo->dialogToken++; } while (pmlmeinfo->dialogToken == 0); @@ -10134,7 +10134,7 @@ static int issue_action_ba(_adapter *padapter, unsigned char *raddr, unsigned ch pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(BA_starting_seqctrl)), &(pattrib->pktlen)); break; - case RTW_WLAN_ACTION_ADDBA_RESP: + case WLAN_ACTION_ADDBA_RESP: pframe = rtw_set_fixed_ie(pframe, 1, &(pmlmeinfo->ADDBA_req.dialog_token), &(pattrib->pktlen)); status = cpu_to_le16(status); pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&status), &(pattrib->pktlen)); @@ -10160,7 +10160,7 @@ static int issue_action_ba(_adapter *padapter, unsigned char *raddr, unsigned ch pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(pmlmeinfo->ADDBA_req.BA_timeout_value)), &(pattrib->pktlen)); break; - case RTW_WLAN_ACTION_DELBA: + case WLAN_ACTION_DELBA: BA_para_set = 0; BA_para_set |= (tid << 12) & IEEE80211_DELBA_PARAM_TID_MASK; BA_para_set |= (initiator << 11) & IEEE80211_DELBA_PARAM_INITIATOR_MASK; @@ -10197,7 +10197,7 @@ exit: */ inline void issue_addba_req(_adapter *adapter, unsigned char *ra, u8 tid) { - issue_action_ba(adapter, ra, RTW_WLAN_ACTION_ADDBA_REQ + issue_action_ba(adapter, ra, WLAN_ACTION_ADDBA_REQ , tid , 0 /* unused */ , 0 /* unused */ @@ -10219,7 +10219,7 @@ inline void issue_addba_req(_adapter *adapter, unsigned char *ra, u8 tid) */ inline void issue_addba_rsp(_adapter *adapter, unsigned char *ra, u8 tid, u16 status, u8 size) { - issue_action_ba(adapter, ra, RTW_WLAN_ACTION_ADDBA_RESP + issue_action_ba(adapter, ra, WLAN_ACTION_ADDBA_RESP , tid , size , status @@ -10251,7 +10251,7 @@ inline u8 issue_addba_rsp_wait_ack(_adapter *adapter, unsigned char *ra, u8 tid, goto exit; do { - ret = issue_action_ba(adapter, ra, RTW_WLAN_ACTION_ADDBA_RESP + ret = issue_action_ba(adapter, ra, WLAN_ACTION_ADDBA_RESP , tid , size , status @@ -10296,7 +10296,7 @@ exit: */ inline void issue_del_ba(_adapter *adapter, unsigned char *ra, u8 tid, u16 reason, u8 initiator) { - issue_action_ba(adapter, ra, RTW_WLAN_ACTION_DELBA + issue_action_ba(adapter, ra, WLAN_ACTION_DELBA , tid , 0 /* unused */ , reason @@ -10329,7 +10329,7 @@ int issue_del_ba_ex(_adapter *adapter, unsigned char *ra, u8 tid, u16 reason, u8 goto exit; do { - ret = issue_action_ba(adapter, ra, RTW_WLAN_ACTION_DELBA + ret = issue_action_ba(adapter, ra, WLAN_ACTION_DELBA , tid , 0 /* unused */ , reason @@ -10394,7 +10394,7 @@ void issue_action_BSSCoexistPacket(_adapter *padapter) RTW_INFO("%s\n", __FUNCTION__); - category = RTW_WLAN_CATEGORY_PUBLIC; + category = WLAN_CATEGORY_PUBLIC; action = ACT_PUBLIC_BSSCOEXIST; pmgntframe = alloc_mgtxmitframe(pxmitpriv); @@ -10518,8 +10518,8 @@ int _issue_action_SM_PS(_adapter *padapter , unsigned char *raddr , u8 NewMimoP { int ret = _FAIL; - unsigned char category = RTW_WLAN_CATEGORY_HT; - u8 action = RTW_WLAN_ACTION_HT_SM_PS; + unsigned char category = WLAN_CATEGORY_HT; + u8 action = WLAN_HT_ACTION_SMPS; u8 sm_power_control = 0; struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; @@ -13481,7 +13481,7 @@ void rtw_ft_issue_action_req(_adapter *padapter, u8 *pTargetAddr) struct rtw_ieee80211_hdr *pwlanhdr; struct pkt_attrib *pattrib; u8 *pframe; - u8 category = RTW_WLAN_CATEGORY_FT; + u8 category = WLAN_CATEGORY_FAST_BBS_TRANSITION; u8 action = RTW_WLAN_ACTION_FT_REQ; pmgntframe = alloc_mgtxmitframe(pxmitpriv); diff --git a/core/rtw_p2p.c b/core/rtw_p2p.c index d801867..47394c9 100644 --- a/core/rtw_p2p.c +++ b/core/rtw_p2p.c @@ -148,7 +148,7 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da) _adapter *padapter = pwdinfo->padapter; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - unsigned char category = RTW_WLAN_CATEGORY_P2P;/* P2P action frame */ + unsigned char category = WLAN_CATEGORY_VENDOR_SPECIFIC;/* P2P action frame */ u32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_GO_DISC_REQUEST; u8 dialogToken = 0; @@ -206,7 +206,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s _adapter *padapter = pwdinfo->padapter; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category = WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; u32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_DEVDISC_RESP; @@ -272,7 +272,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr, u8 *frame_body, u16 config_method) { _adapter *padapter = pwdinfo->padapter; - unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category = WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; u8 dialogToken = frame_body[7]; /* The Dialog Token of provisioning discovery request frame. */ u32 p2poui = cpu_to_be32(P2POUI); @@ -387,7 +387,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 _adapter *padapter = pwdinfo->padapter; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - unsigned char category = RTW_WLAN_CATEGORY_P2P;/* P2P action frame */ + unsigned char category = WLAN_CATEGORY_VENDOR_SPECIFIC;/* P2P action frame */ u32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_PRESENCE_RESPONSE; u8 p2pie[MAX_P2P_IE_LEN] = { 0x00 }; @@ -3741,7 +3741,7 @@ u32 rtw_xframe_build_wfd_ie(struct xmit_frame *xframe) u32 wfdielen = 0; category = frame_body[0]; - if (category == RTW_WLAN_CATEGORY_PUBLIC) { + if (category == WLAN_CATEGORY_PUBLIC) { action = frame_body[1]; if (action == ACT_PUBLIC_VENDOR && _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE @@ -3778,7 +3778,7 @@ u32 rtw_xframe_build_wfd_ie(struct xmit_frame *xframe) } } - } else if (category == RTW_WLAN_CATEGORY_P2P) { + } else if (category == WLAN_CATEGORY_VENDOR_SPECIFIC) { OUI_Subtype = frame_body[5]; dialogToken = frame_body[6]; @@ -3820,7 +3820,7 @@ bool rtw_xframe_del_wfd_ie(struct xmit_frame *xframe) uint ies_len = 0; category = frame_body[0]; - if (category == RTW_WLAN_CATEGORY_PUBLIC) { + if (category == WLAN_CATEGORY_PUBLIC) { action = frame_body[1]; if (action == ACT_PUBLIC_VENDOR && _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE @@ -3961,7 +3961,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) frame_body = (unsigned char *)(buf + sizeof(struct rtw_ieee80211_hdr_3addr)); category = frame_body[0]; /* just for check */ - if (category == RTW_WLAN_CATEGORY_PUBLIC) { + if (category == WLAN_CATEGORY_PUBLIC) { action = frame_body[1]; if (action == ACT_PUBLIC_VENDOR && _rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE @@ -4298,7 +4298,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx) } - } else if (category == RTW_WLAN_CATEGORY_P2P) { + } else if (category == WLAN_CATEGORY_VENDOR_SPECIFIC) { OUI_Subtype = frame_body[5]; dialogToken = frame_body[6]; diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 9cb73de..45d0e3f 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -1013,8 +1013,8 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame) ptdls_sta = rtw_get_stainfo(pstapriv, ieee80211_get_SA((struct ieee80211_hdr *)ptr)); if (ptdls_sta == NULL) { switch (*paction) { - case TDLS_SETUP_REQUEST: - case TDLS_DISCOVERY_REQUEST: + case WLAN_TDLS_SETUP_REQUEST: + case WLAN_TDLS_DISCOVERY_REQUEST: break; default: RTW_INFO("[TDLS] %s - Direct Link Peer = "MAC_FMT" not found for action = %d\n", __func__, MAC_ARG(ieee80211_get_SA((struct ieee80211_hdr *)ptr)), *paction); @@ -1024,32 +1024,32 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame) } switch (*paction) { - case TDLS_SETUP_REQUEST: + case WLAN_TDLS_SETUP_REQUEST: ret = On_TDLS_Setup_Req(adapter, precv_frame, ptdls_sta); break; - case TDLS_SETUP_RESPONSE: + case WLAN_TDLS_SETUP_RESPONSE: ret = On_TDLS_Setup_Rsp(adapter, precv_frame, ptdls_sta); break; - case TDLS_SETUP_CONFIRM: + case WLAN_TDLS_SETUP_CONFIRM: ret = On_TDLS_Setup_Cfm(adapter, precv_frame, ptdls_sta); break; - case TDLS_TEARDOWN: + case WLAN_TDLS_TEARDOWN: ret = On_TDLS_Teardown(adapter, precv_frame, ptdls_sta); break; - case TDLS_DISCOVERY_REQUEST: + case WLAN_TDLS_DISCOVERY_REQUEST: ret = On_TDLS_Dis_Req(adapter, precv_frame); break; - case TDLS_PEER_TRAFFIC_INDICATION: + case WLAN_TDLS_PEER_TRAFFIC_INDICATION: ret = On_TDLS_Peer_Traffic_Indication(adapter, precv_frame, ptdls_sta); break; - case TDLS_PEER_TRAFFIC_RESPONSE: + case WLAN_TDLS_PEER_TRAFFIC_RESPONSE: ret = On_TDLS_Peer_Traffic_Rsp(adapter, precv_frame, ptdls_sta); break; #ifdef CONFIG_TDLS_CH_SW - case TDLS_CHANNEL_SWITCH_REQUEST: + case WLAN_TDLS_CHANNEL_SWITCH_REQUEST: ret = On_TDLS_Ch_Switch_Req(adapter, precv_frame, ptdls_sta); break; - case TDLS_CHANNEL_SWITCH_RESPONSE: + case WLAN_TDLS_CHANNEL_SWITCH_RESPONSE: ret = On_TDLS_Ch_Switch_Rsp(adapter, precv_frame, ptdls_sta); break; #endif @@ -4351,7 +4351,7 @@ int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe) pcategory = psnap_type + ETH_TYPE_LEN + PAYLOAD_TYPE_LEN; if ((_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_TDLS, ETH_TYPE_LEN)) && - ((*pcategory == RTW_WLAN_CATEGORY_TDLS) || (*pcategory == RTW_WLAN_CATEGORY_P2P))) { + ((*pcategory == WLAN_CATEGORY_TDLS) || (*pcategory == WLAN_CATEGORY_VENDOR_SPECIFIC))) { ret = OnTDLS(padapter, prframe); if (ret == _FAIL) goto _exit_recv_func; diff --git a/core/rtw_rm.c b/core/rtw_rm.c index 2df4186..834db77 100644 --- a/core/rtw_rm.c +++ b/core/rtw_rm.c @@ -282,7 +282,7 @@ u8 rm_add_nb_req(_adapter *padapter, struct sta_info *psta) } prm->psta = psta; - prm->q.category = RTW_WLAN_CATEGORY_RADIO_MEAS; + prm->q.category = WLAN_CATEGORY_RADIO_MEASUREMENT; prm->q.diag_token = pmlmeinfo->dialogToken++; prm->q.m_token = 1; @@ -2279,7 +2279,7 @@ static void rm_dbg_add_meas(_adapter *padapter, char *s) prmpriv->prm_sel = NULL; return; } - prm->q.category = RTW_WLAN_CATEGORY_RADIO_MEAS; + prm->q.category = WLAN_CATEGORY_RADIO_MEASUREMENT; prm->q.e_id = _MEAS_REQ_IE_; /* 38 */ if (prm->q.action_code == RM_ACT_RADIO_MEAS_REQ) diff --git a/core/rtw_rm_fsm.c b/core/rtw_rm_fsm.c index 190b770..19fef5f 100644 --- a/core/rtw_rm_fsm.c +++ b/core/rtw_rm_fsm.c @@ -519,7 +519,7 @@ static int rm_state_idle(struct rm_obj *prm, enum RM_EV_ID evid) u32 val32; - prm->p.category = RTW_WLAN_CATEGORY_RADIO_MEAS; + prm->p.category = WLAN_CATEGORY_RADIO_MEASUREMENT; switch (evid) { case RM_EV_state_in: diff --git a/core/rtw_tdls.c b/core/rtw_tdls.c index 809c9de..bd91838 100644 --- a/core/rtw_tdls.c +++ b/core/rtw_tdls.c @@ -1247,7 +1247,7 @@ int issue_tdls_setup_req(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, int wa ptdlsinfo->sta_cnt++; } - ptxmgmt->action_code = TDLS_SETUP_REQUEST; + ptxmgmt->action_code = WLAN_TDLS_SETUP_REQUEST; pattrib = &pmgntframe->attrib; pmgntframe->frame_tag = DATA_FRAMETAG; @@ -1302,7 +1302,7 @@ int _issue_tdls_teardown(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, struct RTW_INFO("[TDLS] %s\n", __FUNCTION__); - ptxmgmt->action_code = TDLS_TEARDOWN; + ptxmgmt->action_code = WLAN_TDLS_TEARDOWN; pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (pmgntframe == NULL) @@ -1388,7 +1388,7 @@ int issue_tdls_dis_req(_adapter *padapter, struct tdls_txmgmt *ptxmgmt) RTW_INFO("[TDLS] %s\n", __FUNCTION__); - ptxmgmt->action_code = TDLS_DISCOVERY_REQUEST; + ptxmgmt->action_code = WLAN_TDLS_DISCOVERY_REQUEST; pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (pmgntframe == NULL) goto exit; @@ -1427,7 +1427,7 @@ int issue_tdls_setup_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt) RTW_INFO("[TDLS] %s\n", __FUNCTION__); - ptxmgmt->action_code = TDLS_SETUP_RESPONSE; + ptxmgmt->action_code = WLAN_TDLS_SETUP_RESPONSE; pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (pmgntframe == NULL) goto exit; @@ -1468,7 +1468,7 @@ int issue_tdls_setup_cfm(_adapter *padapter, struct tdls_txmgmt *ptxmgmt) RTW_INFO("[TDLS] %s\n", __FUNCTION__); - ptxmgmt->action_code = TDLS_SETUP_CONFIRM; + ptxmgmt->action_code = WLAN_TDLS_SETUP_CONFIRM; pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (pmgntframe == NULL) goto exit; @@ -1565,7 +1565,7 @@ int issue_tdls_peer_traffic_rsp(_adapter *padapter, struct sta_info *ptdls_sta, RTW_INFO("[TDLS] %s\n", __FUNCTION__); - ptxmgmt->action_code = TDLS_PEER_TRAFFIC_RESPONSE; + ptxmgmt->action_code = WLAN_TDLS_PEER_TRAFFIC_RESPONSE; pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (pmgntframe == NULL) @@ -1610,7 +1610,7 @@ int issue_tdls_peer_traffic_indication(_adapter *padapter, struct sta_info *ptdl RTW_INFO("[TDLS] %s\n", __FUNCTION__); memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); - txmgmt.action_code = TDLS_PEER_TRAFFIC_INDICATION; + txmgmt.action_code = WLAN_TDLS_PEER_TRAFFIC_INDICATION; pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (pmgntframe == NULL) @@ -1663,7 +1663,7 @@ int issue_tdls_ch_switch_req(_adapter *padapter, struct sta_info *ptdls_sta) } memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt)); - txmgmt.action_code = TDLS_CHANNEL_SWITCH_REQUEST; + txmgmt.action_code = WLAN_TDLS_CHANNEL_SWITCH_REQUEST; pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (pmgntframe == NULL) @@ -1709,7 +1709,7 @@ int issue_tdls_ch_switch_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, in goto exit; } - ptxmgmt->action_code = TDLS_CHANNEL_SWITCH_RESPONSE; + ptxmgmt->action_code = WLAN_TDLS_CHANNEL_SWITCH_RESPONSE; pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (pmgntframe == NULL) @@ -2356,7 +2356,7 @@ int On_TDLS_Dis_Req(_adapter *padapter, union recv_frame *precv_frame) ptr += prx_pkt_attrib->hdrlen + prx_pkt_attrib->iv_len + LLC_HEADER_SIZE + ETH_TYPE_LEN + PAYLOAD_TYPE_LEN; txmgmt.dialog_token = *(ptr + 2); memcpy(&txmgmt.peer, precv_frame->u.hdr.attrib.src, ETH_ALEN); - txmgmt.action_code = TDLS_DISCOVERY_RESPONSE; + txmgmt.action_code = WLAN_TDLS_DISCOVERY_RESPONSE; parsing_length = ((union recv_frame *)precv_frame)->u.hdr.len - prx_pkt_attrib->hdrlen - prx_pkt_attrib->iv_len @@ -2815,7 +2815,7 @@ void rtw_build_tdls_setup_req_ies(_adapter *padapter, struct xmit_frame *pxmitfr pframe_head = pframe; /* For rtw_tdls_set_ht_cap() */ pframe = rtw_tdls_set_payload_type(pframe, pattrib); - pframe = rtw_tdls_set_category(pframe, pattrib, RTW_WLAN_CATEGORY_TDLS); + pframe = rtw_tdls_set_category(pframe, pattrib, WLAN_CATEGORY_TDLS); pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt); @@ -2891,7 +2891,7 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr pframe_head = pframe; pframe = rtw_tdls_set_payload_type(pframe, pattrib); - pframe = rtw_tdls_set_category(pframe, pattrib, RTW_WLAN_CATEGORY_TDLS); + pframe = rtw_tdls_set_category(pframe, pattrib, WLAN_CATEGORY_TDLS); pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_status_code(pframe, pattrib, ptxmgmt); @@ -2980,7 +2980,7 @@ void rtw_build_tdls_setup_cfm_ies(_adapter *padapter, struct xmit_frame *pxmitfr u8 *pftie = NULL, *ptimeout_ie = NULL, *plinkid_ie = NULL, *prsnie = NULL, *pftie_mic = NULL; pframe = rtw_tdls_set_payload_type(pframe, pattrib); - pframe = rtw_tdls_set_category(pframe, pattrib, RTW_WLAN_CATEGORY_TDLS); + pframe = rtw_tdls_set_category(pframe, pattrib, WLAN_CATEGORY_TDLS); pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_status_code(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt); @@ -3042,7 +3042,7 @@ void rtw_build_tdls_teardown_ies(_adapter *padapter, struct xmit_frame *pxmitfra u8 *pftie = NULL, *pftie_mic = NULL, *plinkid_ie = NULL; pframe = rtw_tdls_set_payload_type(pframe, pattrib); - pframe = rtw_tdls_set_category(pframe, pattrib, RTW_WLAN_CATEGORY_TDLS); + pframe = rtw_tdls_set_category(pframe, pattrib, WLAN_CATEGORY_TDLS); pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_status_code(pframe, pattrib, ptxmgmt); @@ -3071,7 +3071,7 @@ void rtw_build_tdls_dis_req_ies(_adapter *padapter, struct xmit_frame *pxmitfram struct pkt_attrib *pattrib = &pxmitframe->attrib; pframe = rtw_tdls_set_payload_type(pframe, pattrib); - pframe = rtw_tdls_set_category(pframe, pattrib, RTW_WLAN_CATEGORY_TDLS); + pframe = rtw_tdls_set_category(pframe, pattrib, WLAN_CATEGORY_TDLS); pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_linkid(padapter, pframe, pattrib, _TRUE); @@ -3088,7 +3088,7 @@ void rtw_build_tdls_dis_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfram pktlen_index = pattrib->pktlen; pframe_head = pframe; - pframe = rtw_tdls_set_category(pframe, pattrib, RTW_WLAN_CATEGORY_PUBLIC); + pframe = rtw_tdls_set_category(pframe, pattrib, WLAN_CATEGORY_PUBLIC); pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_capability(padapter, pframe, pattrib); @@ -3125,7 +3125,7 @@ void rtw_build_tdls_peer_traffic_indication_ies(_adapter *padapter, struct xmit_ u8 AC_queue = 0; pframe = rtw_tdls_set_payload_type(pframe, pattrib); - pframe = rtw_tdls_set_category(pframe, pattrib, RTW_WLAN_CATEGORY_TDLS); + pframe = rtw_tdls_set_category(pframe, pattrib, WLAN_CATEGORY_TDLS); pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt); @@ -3154,7 +3154,7 @@ void rtw_build_tdls_peer_traffic_rsp_ies(_adapter *padapter, struct xmit_frame * struct pkt_attrib *pattrib = &pxmitframe->attrib; pframe = rtw_tdls_set_payload_type(pframe, pattrib); - pframe = rtw_tdls_set_category(pframe, pattrib, RTW_WLAN_CATEGORY_TDLS); + pframe = rtw_tdls_set_category(pframe, pattrib, WLAN_CATEGORY_TDLS); pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_dialog(pframe, pattrib, ptxmgmt); @@ -3176,7 +3176,7 @@ void rtw_build_tdls_ch_switch_req_ies(_adapter *padapter, struct xmit_frame *pxm ptdls_sta->ch_switch_timeout = switch_timeout; pframe = rtw_tdls_set_payload_type(pframe, pattrib); - pframe = rtw_tdls_set_category(pframe, pattrib, RTW_WLAN_CATEGORY_TDLS); + pframe = rtw_tdls_set_category(pframe, pattrib, WLAN_CATEGORY_TDLS); pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_target_ch(padapter, pframe, pattrib); pframe = rtw_tdls_set_reg_class(pframe, pattrib, ptdls_sta); @@ -3208,7 +3208,7 @@ void rtw_build_tdls_ch_switch_rsp_ies(_adapter *padapter, struct xmit_frame *pxm struct sta_priv *pstapriv = &padapter->stapriv; pframe = rtw_tdls_set_payload_type(pframe, pattrib); - pframe = rtw_tdls_set_category(pframe, pattrib, RTW_WLAN_CATEGORY_TDLS); + pframe = rtw_tdls_set_category(pframe, pattrib, WLAN_CATEGORY_TDLS); pframe = rtw_tdls_set_action(pframe, pattrib, ptxmgmt); pframe = rtw_tdls_set_status_code(pframe, pattrib, ptxmgmt); @@ -3230,7 +3230,7 @@ void rtw_build_tunneled_probe_req_ies(_adapter *padapter, struct xmit_frame *pxm struct pkt_attrib *pattrib = &pxmitframe->attrib; struct wifidirect_info *pwdinfo; - u8 category = RTW_WLAN_CATEGORY_P2P; + u8 category = WLAN_CATEGORY_VENDOR_SPECIFIC; u8 WFA_OUI[3] = { 0x50, 0x6f, 0x9a}; u8 probe_req = 4; u8 wfdielen = 0; @@ -3260,7 +3260,7 @@ void rtw_build_tunneled_probe_rsp_ies(_adapter *padapter, struct xmit_frame *pxm struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct pkt_attrib *pattrib = &pxmitframe->attrib; struct wifidirect_info *pwdinfo; - u8 category = RTW_WLAN_CATEGORY_P2P; + u8 category = WLAN_CATEGORY_VENDOR_SPECIFIC; u8 WFA_OUI[3] = { 0x50, 0x6f, 0x9a}; u8 probe_rsp = 5; u8 wfdielen = 0; @@ -3475,30 +3475,30 @@ int rtw_tdls_is_driver_setup(_adapter *padapter) const char *rtw_tdls_action_txt(enum TDLS_ACTION_FIELD action) { switch (action) { - case TDLS_SETUP_REQUEST: - return "TDLS_SETUP_REQUEST"; - case TDLS_SETUP_RESPONSE: - return "TDLS_SETUP_RESPONSE"; - case TDLS_SETUP_CONFIRM: - return "TDLS_SETUP_CONFIRM"; - case TDLS_TEARDOWN: - return "TDLS_TEARDOWN"; - case TDLS_PEER_TRAFFIC_INDICATION: - return "TDLS_PEER_TRAFFIC_INDICATION"; - case TDLS_CHANNEL_SWITCH_REQUEST: - return "TDLS_CHANNEL_SWITCH_REQUEST"; - case TDLS_CHANNEL_SWITCH_RESPONSE: - return "TDLS_CHANNEL_SWITCH_RESPONSE"; - case TDLS_PEER_PSM_REQUEST: - return "TDLS_PEER_PSM_REQUEST"; - case TDLS_PEER_PSM_RESPONSE: - return "TDLS_PEER_PSM_RESPONSE"; - case TDLS_PEER_TRAFFIC_RESPONSE: - return "TDLS_PEER_TRAFFIC_RESPONSE"; - case TDLS_DISCOVERY_REQUEST: - return "TDLS_DISCOVERY_REQUEST"; - case TDLS_DISCOVERY_RESPONSE: - return "TDLS_DISCOVERY_RESPONSE"; + case WLAN_TDLS_SETUP_REQUEST: + return "WLAN_TDLS_SETUP_REQUEST"; + case WLAN_TDLS_SETUP_RESPONSE: + return "WLAN_TDLS_SETUP_RESPONSE"; + case WLAN_TDLS_SETUP_CONFIRM: + return "WLAN_TDLS_SETUP_CONFIRM"; + case WLAN_TDLS_TEARDOWN: + return "WLAN_TDLS_TEARDOWN"; + case WLAN_TDLS_PEER_TRAFFIC_INDICATION: + return "WLAN_TDLS_PEER_TRAFFIC_INDICATION"; + case WLAN_TDLS_CHANNEL_SWITCH_REQUEST: + return "WLAN_TDLS_CHANNEL_SWITCH_REQUEST"; + case WLAN_TDLS_CHANNEL_SWITCH_RESPONSE: + return "WLAN_TDLS_CHANNEL_SWITCH_RESPONSE"; + case WLAN_TDLS_PEER_PSM_REQUEST: + return "WLAN_TDLS_PEER_PSM_REQUEST"; + case WLAN_TDLS_PEER_PSM_RESPONSE: + return "WLAN_TDLS_PEER_PSM_RESPONSE"; + case WLAN_TDLS_PEER_TRAFFIC_RESPONSE: + return "WLAN_TDLS_PEER_TRAFFIC_RESPONSE"; + case WLAN_TDLS_DISCOVERY_REQUEST: + return "WLAN_TDLS_DISCOVERY_REQUEST"; + case WLAN_TDLS_DISCOVERY_RESPONSE: + return "WLAN_TDLS_DISCOVERY_RESPONSE"; default: return "UNKNOWN"; } diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index c547dcf..a779541 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -1996,7 +1996,7 @@ int rtw_build_tdls_ies(_adapter *padapter, struct xmit_frame *pxmitframe, u8 *pf ptdls_sta = rtw_get_stainfo((&padapter->stapriv), pattrib->dst); if (ptdls_sta == NULL) { switch (ptxmgmt->action_code) { - case TDLS_DISCOVERY_REQUEST: + case WLAN_TDLS_DISCOVERY_REQUEST: case TUNNELED_PROBE_REQ: case TUNNELED_PROBE_RSP: break; @@ -2008,33 +2008,33 @@ int rtw_build_tdls_ies(_adapter *padapter, struct xmit_frame *pxmitframe, u8 *pf } switch (ptxmgmt->action_code) { - case TDLS_SETUP_REQUEST: + case WLAN_TDLS_SETUP_REQUEST: rtw_build_tdls_setup_req_ies(padapter, pxmitframe, pframe, ptxmgmt, ptdls_sta); break; - case TDLS_SETUP_RESPONSE: + case WLAN_TDLS_SETUP_RESPONSE: rtw_build_tdls_setup_rsp_ies(padapter, pxmitframe, pframe, ptxmgmt, ptdls_sta); break; - case TDLS_SETUP_CONFIRM: + case WLAN_TDLS_SETUP_CONFIRM: rtw_build_tdls_setup_cfm_ies(padapter, pxmitframe, pframe, ptxmgmt, ptdls_sta); break; - case TDLS_TEARDOWN: + case WLAN_TDLS_TEARDOWN: rtw_build_tdls_teardown_ies(padapter, pxmitframe, pframe, ptxmgmt, ptdls_sta); break; - case TDLS_DISCOVERY_REQUEST: + case WLAN_TDLS_DISCOVERY_REQUEST: rtw_build_tdls_dis_req_ies(padapter, pxmitframe, pframe, ptxmgmt); break; - case TDLS_PEER_TRAFFIC_INDICATION: + case WLAN_TDLS_PEER_TRAFFIC_INDICATION: rtw_build_tdls_peer_traffic_indication_ies(padapter, pxmitframe, pframe, ptxmgmt, ptdls_sta); break; #ifdef CONFIG_TDLS_CH_SW - case TDLS_CHANNEL_SWITCH_REQUEST: + case WLAN_TDLS_CHANNEL_SWITCH_REQUEST: rtw_build_tdls_ch_switch_req_ies(padapter, pxmitframe, pframe, ptxmgmt, ptdls_sta); break; - case TDLS_CHANNEL_SWITCH_RESPONSE: + case WLAN_TDLS_CHANNEL_SWITCH_RESPONSE: rtw_build_tdls_ch_switch_rsp_ies(padapter, pxmitframe, pframe, ptxmgmt, ptdls_sta); break; #endif - case TDLS_PEER_TRAFFIC_RESPONSE: + case WLAN_TDLS_PEER_TRAFFIC_RESPONSE: rtw_build_tdls_peer_traffic_rsp_ies(padapter, pxmitframe, pframe, ptxmgmt, ptdls_sta); break; #ifdef CONFIG_WFD @@ -2073,29 +2073,29 @@ s32 rtw_make_tdls_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattr set_frame_sub_type(fctrl, pattrib->subtype); switch (ptxmgmt->action_code) { - case TDLS_SETUP_REQUEST: - case TDLS_SETUP_RESPONSE: - case TDLS_SETUP_CONFIRM: - case TDLS_PEER_TRAFFIC_INDICATION: - case TDLS_PEER_PSM_REQUEST: + case WLAN_TDLS_SETUP_REQUEST: + case WLAN_TDLS_SETUP_RESPONSE: + case WLAN_TDLS_SETUP_CONFIRM: + case WLAN_TDLS_PEER_TRAFFIC_INDICATION: + case WLAN_TDLS_PEER_PSM_REQUEST: case TUNNELED_PROBE_REQ: case TUNNELED_PROBE_RSP: - case TDLS_DISCOVERY_REQUEST: + case WLAN_TDLS_DISCOVERY_REQUEST: SetToDs(fctrl); memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN); memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN); break; - case TDLS_CHANNEL_SWITCH_REQUEST: - case TDLS_CHANNEL_SWITCH_RESPONSE: - case TDLS_PEER_PSM_RESPONSE: - case TDLS_PEER_TRAFFIC_RESPONSE: + case WLAN_TDLS_CHANNEL_SWITCH_REQUEST: + case WLAN_TDLS_CHANNEL_SWITCH_RESPONSE: + case WLAN_TDLS_PEER_PSM_RESPONSE: + case WLAN_TDLS_PEER_TRAFFIC_RESPONSE: memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); tdls_seq = 1; break; - case TDLS_TEARDOWN: + case WLAN_TDLS_TEARDOWN: if (ptxmgmt->status_code == _RSON_TDLS_TEAR_UN_RSN_) { memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); @@ -2113,7 +2113,7 @@ s32 rtw_make_tdls_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattr if (pattrib->encrypt) SetPrivacy(fctrl); - if (ptxmgmt->action_code == TDLS_PEER_TRAFFIC_RESPONSE) + if (ptxmgmt->action_code == WLAN_TDLS_PEER_TRAFFIC_RESPONSE) SetPwrMgt(fctrl); if (pqospriv->qos_option) { @@ -4418,7 +4418,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev) /* Check DATA/MGNT frames */ pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; frame_ctl = le16_to_cpu(pwlanhdr->frame_ctl); - if ((frame_ctl & RTW_IEEE80211_FCTL_FTYPE) == RTW_IEEE80211_FTYPE_DATA) { + if ((frame_ctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) { pattrib = &pmgntframe->attrib; update_monitor_frame_attrib(padapter, pattrib); diff --git a/hal/hal_com.c b/hal/hal_com.c index ca7ad38..4f04c9b 100644 --- a/hal/hal_com.c +++ b/hal/hal_com.c @@ -6550,7 +6550,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pLength) { struct p2p_channels *ch_list = &(adapter_to_rfctl(padapter)->channel_list); - unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category = WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; u32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_GO_NEGO_RESP; @@ -6953,7 +6953,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *pLength) { - unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category = WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; u32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_INVIT_RESP; @@ -7200,7 +7200,7 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 * static void rtw_hal_construct_P2PProvisionDisRsp(_adapter *padapter, u8 *pframe, u32 *pLength) { - unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category = WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; u8 dialogToken = 0; u32 p2poui = cpu_to_be32(P2POUI); diff --git a/hal/rtl8192e/usb/rtl8192eu_xmit.c b/hal/rtl8192e/usb/rtl8192eu_xmit.c index 8f43e60..e94556d 100644 --- a/hal/rtl8192e/usb/rtl8192eu_xmit.c +++ b/hal/rtl8192e/usb/rtl8192eu_xmit.c @@ -939,7 +939,7 @@ s32 rtl8192eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt) fc = le16_to_cpu(tx_hdr->frame_ctl); bmcst = is_multicast_ether_addr(tx_hdr->addr1); - if ((fc & RTW_IEEE80211_FCTL_FTYPE) != RTW_IEEE80211_FTYPE_MGMT) + if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_MGMT) goto _exit; pxmit_skb = rtw_skb_alloc(len + TXDESC_SIZE); diff --git a/hal/rtl8192e/usb/usb_ops_linux.c b/hal/rtl8192e/usb/usb_ops_linux.c index a70639a..60826fd 100644 --- a/hal/rtl8192e/usb/usb_ops_linux.c +++ b/hal/rtl8192e/usb/usb_ops_linux.c @@ -179,7 +179,7 @@ int recvbuf2recvframe(PADAPTER padapter, void *ptr) #ifdef CONFIG_RX_PACKET_APPEND_FCS if (check_fwstate(&padapter->mlmepriv, WIFI_MONITOR_STATE) == _FALSE) if ((pattrib->pkt_rpt_type == NORMAL_RX) && rtw_hal_rcr_check(padapter, RCR_APPFCS)) - pattrib->pkt_len -= IEEE80211_FCS_LEN; + pattrib->pkt_len -= FCS_LEN; #endif if (rtw_os_alloc_recvframe(padapter, precvframe, diff --git a/include/ieee80211.h b/include/ieee80211.h index c7fbc09..1b05a20 100644 --- a/include/ieee80211.h +++ b/include/ieee80211.h @@ -397,15 +397,6 @@ struct sta_data { /* this is stolen from ipw2200 driver */ #define IEEE_IBSS_MAC_HASH_SIZE 31 -struct ieee_ibss_seq { - u8 mac[ETH_ALEN]; - u16 seq_num; - u16 frag_num; - unsigned long packet_time; - _list list; -}; - - struct rtw_ieee80211_hdr { u16 frame_ctl; u16 duration_id; @@ -488,78 +479,10 @@ enum eap_type { #define IEEE80211_3ADDR_LEN 24 #define IEEE80211_4ADDR_LEN 30 -#define IEEE80211_FCS_LEN 4 #define MIN_FRAG_THRESHOLD 256U #define MAX_FRAG_THRESHOLD 2346U -/* Frame control field constants */ -#define RTW_IEEE80211_FCTL_VERS 0x0003 -#define RTW_IEEE80211_FCTL_FTYPE 0x000c -#define RTW_IEEE80211_FCTL_STYPE 0x00f0 -#define RTW_IEEE80211_FCTL_TODS 0x0100 -#define RTW_IEEE80211_FCTL_FROMDS 0x0200 -#define RTW_IEEE80211_FCTL_MOREFRAGS 0x0400 -#define RTW_IEEE80211_FCTL_RETRY 0x0800 -#define RTW_IEEE80211_FCTL_PM 0x1000 -#define RTW_IEEE80211_FCTL_MOREDATA 0x2000 -#define RTW_IEEE80211_FCTL_PROTECTED 0x4000 -#define RTW_IEEE80211_FCTL_ORDER 0x8000 -#define RTW_IEEE80211_FCTL_CTL_EXT 0x0f00 - -#define RTW_IEEE80211_FTYPE_MGMT 0x0000 -#define RTW_IEEE80211_FTYPE_CTL 0x0004 -#define RTW_IEEE80211_FTYPE_DATA 0x0008 -#define RTW_IEEE80211_FTYPE_EXT 0x000c - -/* management */ -#define RTW_IEEE80211_STYPE_ASSOC_REQ 0x0000 -#define RTW_IEEE80211_STYPE_ASSOC_RESP 0x0010 -#define RTW_IEEE80211_STYPE_REASSOC_REQ 0x0020 -#define RTW_IEEE80211_STYPE_REASSOC_RESP 0x0030 -#define RTW_IEEE80211_STYPE_PROBE_REQ 0x0040 -#define RTW_IEEE80211_STYPE_PROBE_RESP 0x0050 -#define RTW_IEEE80211_STYPE_BEACON 0x0080 -#define RTW_IEEE80211_STYPE_ATIM 0x0090 -#define RTW_IEEE80211_STYPE_DISASSOC 0x00A0 -#define RTW_IEEE80211_STYPE_AUTH 0x00B0 -#define RTW_IEEE80211_STYPE_DEAUTH 0x00C0 -#define RTW_IEEE80211_STYPE_ACTION 0x00D0 - -/* control */ -#define RTW_IEEE80211_STYPE_CTL_EXT 0x0060 -#define RTW_IEEE80211_STYPE_BACK_REQ 0x0080 -#define RTW_IEEE80211_STYPE_BACK 0x0090 -#define RTW_IEEE80211_STYPE_PSPOLL 0x00A0 -#define RTW_IEEE80211_STYPE_RTS 0x00B0 -#define RTW_IEEE80211_STYPE_CTS 0x00C0 -#define RTW_IEEE80211_STYPE_ACK 0x00D0 -#define RTW_IEEE80211_STYPE_CFEND 0x00E0 -#define RTW_IEEE80211_STYPE_CFENDACK 0x00F0 - -/* data */ -#define RTW_IEEE80211_STYPE_DATA 0x0000 -#define RTW_IEEE80211_STYPE_DATA_CFACK 0x0010 -#define RTW_IEEE80211_STYPE_DATA_CFPOLL 0x0020 -#define RTW_IEEE80211_STYPE_DATA_CFACKPOLL 0x0030 -#define RTW_IEEE80211_STYPE_NULLFUNC 0x0040 -#define RTW_IEEE80211_STYPE_CFACK 0x0050 -#define RTW_IEEE80211_STYPE_CFPOLL 0x0060 -#define RTW_IEEE80211_STYPE_CFACKPOLL 0x0070 -#define RTW_IEEE80211_STYPE_QOS_DATA 0x0080 -#define RTW_IEEE80211_STYPE_QOS_DATA_CFACK 0x0090 -#define RTW_IEEE80211_STYPE_QOS_DATA_CFPOLL 0x00A0 -#define RTW_IEEE80211_STYPE_QOS_DATA_CFACKPOLL 0x00B0 -#define RTW_IEEE80211_STYPE_QOS_NULLFUNC 0x00C0 -#define RTW_IEEE80211_STYPE_QOS_CFACK 0x00D0 -#define RTW_IEEE80211_STYPE_QOS_CFPOLL 0x00E0 -#define RTW_IEEE80211_STYPE_QOS_CFACKPOLL 0x00F0 - -/* sequence control field */ -#define RTW_IEEE80211_SCTL_FRAG 0x000F -#define RTW_IEEE80211_SCTL_SEQ 0xFFF0 - - #define RTW_ERP_INFO_NON_ERP_PRESENT BIT(0) #define RTW_ERP_INFO_USE_PROTECTION BIT(1) #define RTW_ERP_INFO_BARKER_PREAMBLE_MODE BIT(2) @@ -598,13 +521,13 @@ struct ieee80211_snap_hdr { #define SNAP_SIZE sizeof(struct ieee80211_snap_hdr) -#define WLAN_FC_GET_TYPE(fc) ((fc) & RTW_IEEE80211_FCTL_FTYPE) -#define WLAN_FC_GET_STYPE(fc) ((fc) & RTW_IEEE80211_FCTL_STYPE) +#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) & RTW_IEEE80211_SCTL_FRAG) -#define WLAN_GET_SEQ_SEQ(seq) ((seq) & RTW_IEEE80211_SCTL_SEQ) +#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_ACTIVE_ROAM 65533 @@ -945,83 +868,12 @@ extern struct rate_section_ent rates_by_sections[]; #define rate_section_to_tx_num(section) (rates_by_sections[(section)].tx_num) #define rate_section_rate_num(section) (rates_by_sections[(section)].rate_num) -/* NOTE: This data is for statistical purposes; not all hardware provides this - * information for frames received. Not setting these will not cause - * any adverse affects. */ -struct ieee80211_rx_stats { - /* u32 mac_time[2]; */ - s8 rssi; - u8 signal; - u8 noise; - u8 received_channel; - u16 rate; /* in 100 kbps */ - /* u8 control; */ - u8 mask; - u8 freq; - u16 len; -}; - /* IEEE 802.11 requires that STA supports concurrent reception of at least * three fragmented frames. This define can be increased to support more * 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. */ #define IEEE80211_FRAG_CACHE_LEN 4 -struct ieee80211_frag_entry { - u32 first_frag_time; - uint seq; - uint last_frag; - uint qos; /* jackson */ - uint tid; /* jackson */ - struct sk_buff *skb; - u8 src_addr[ETH_ALEN]; - u8 dst_addr[ETH_ALEN]; -}; - -struct ieee80211_stats { - uint tx_unicast_frames; - uint tx_multicast_frames; - uint tx_fragments; - uint tx_unicast_octets; - uint tx_multicast_octets; - uint tx_deferred_transmissions; - uint tx_single_retry_frames; - uint tx_multiple_retry_frames; - uint tx_retry_limit_exceeded; - uint tx_discards; - uint rx_unicast_frames; - uint rx_multicast_frames; - uint rx_fragments; - uint rx_unicast_octets; - uint rx_multicast_octets; - uint rx_fcs_errors; - uint rx_discards_no_buffer; - uint tx_discards_wrong_sa; - uint rx_discards_undecryptable; - uint rx_message_in_msg_fragments; - uint rx_message_in_bad_msg_fragments; -}; - -struct ieee80211_softmac_stats { - uint rx_ass_ok; - uint rx_ass_err; - uint rx_probe_rq; - uint tx_probe_rs; - uint tx_beacons; - uint rx_auth_rq; - uint rx_auth_rs_ok; - uint rx_auth_rs_err; - uint tx_auth_rq; - uint no_auth_rs; - uint no_ass_rs; - uint tx_ass_rq; - uint rx_ass_rq; - uint tx_probe_rq; - uint reassoc; - uint swtxstop; - uint swtxawake; -}; - #define SEC_KEY_1 (1<<0) #define SEC_KEY_2 (1<<1) #define SEC_KEY_3 (1<<2) @@ -1043,46 +895,6 @@ struct ieee80211_softmac_stats { #define BIP_MAX_KEYID 5 #define BIP_AAD_SIZE 20 -#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) - -struct ieee80211_security { - u16 active_key:2, - enabled:1, - auth_mode:2, - auth_algo:4, - unicast_uses_group:1; - u8 key_sizes[WEP_KEYS]; - u8 keys[WEP_KEYS][WEP_KEY_LEN]; - u8 level; - u16 flags; -} __attribute__((packed)); - -#endif - -/* - - 802.11 data frame from AP - - ,-------------------------------------------------------------------. -Bytes | 2 | 2 | 6 | 6 | 6 | 2 | 0..2312 | 4 | - |------|------|---------|---------|---------|------|---------|------| -Desc. | ctrl | dura | DA/RA | TA | SA | Sequ | frame | fcs | - | | tion | (BSSID) | | | ence | data | | - `-------------------------------------------------------------------' - -Total: 28-2340 bytes - -*/ - -struct ieee80211_header_data { - u16 frame_ctl; - u16 duration_id; - u8 addr1[6]; - u8 addr2[6]; - u8 addr3[6]; - u16 seq_ctrl; -}; - #define BEACON_PROBE_SSID_ID_POSITION 12 /* Management Frame Information Element Types */ @@ -1101,11 +913,6 @@ struct ieee80211_header_data { #if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) -struct ieee80211_info_element_hdr { - u8 id; - u8 len; -} __attribute__((packed)); - struct ieee80211_info_element { u8 id; u8 len; @@ -1133,49 +940,6 @@ struct ieee80211_info_element { #define IEEE80211_DEFAULT_TX_ESSID "Penguin" #define IEEE80211_DEFAULT_BASIC_RATE 10 - -#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) - - -struct ieee80211_authentication { - struct ieee80211_header_data header; - u16 algorithm; - u16 transaction; - u16 status; - /* struct ieee80211_info_element_hdr info_element; */ -} __attribute__((packed)); - - -struct ieee80211_probe_response { - struct ieee80211_header_data header; - u32 time_stamp[2]; - u16 beacon_interval; - u16 capability; - struct ieee80211_info_element info_element; -} __attribute__((packed)); - -struct ieee80211_probe_request { - struct ieee80211_header_data header; - /*struct ieee80211_info_element info_element;*/ -} __attribute__((packed)); - -struct ieee80211_assoc_request_frame { - struct rtw_ieee80211_hdr_3addr header; - u16 capability; - u16 listen_interval; - /* u8 current_ap[ETH_ALEN]; */ - struct ieee80211_info_element_hdr info_element; -} __attribute__((packed)); - -struct ieee80211_assoc_response_frame { - struct rtw_ieee80211_hdr_3addr header; - u16 capability; - u16 status; - u16 aid; - /* struct ieee80211_info_element info_element; supported rates */ -} __attribute__((packed)); -#endif - struct ieee80211_txb { u8 nr_frags; u8 encrypted; @@ -1220,49 +984,6 @@ struct ieee80211_txb { #define IEEE80211_PS_UNICAST IEEE80211_DTIM_UCAST #define IEEE80211_PS_MBCAST IEEE80211_DTIM_MBCAST #define IW_ESSID_MAX_SIZE 32 -#if 0 -struct ieee80211_network { - /* These entries are used to identify a unique network */ - u8 bssid[ETH_ALEN]; - u8 channel; - /* Ensure null-terminated for any debug msgs */ - u8 ssid[IW_ESSID_MAX_SIZE + 1]; - u8 ssid_len; - u8 rssi; /* relative signal strength */ - u8 sq; /* signal quality */ - - /* These are network statistics */ - /* struct ieee80211_rx_stats stats; */ - u16 capability; - u16 aid; - u8 rates[MAX_RATES_LENGTH]; - u8 rates_len; - u8 rates_ex[MAX_RATES_EX_LENGTH]; - u8 rates_ex_len; - - u8 edca_parmsets[18]; - - u8 mode; - u8 flags; - u8 time_stamp[8]; - u16 beacon_interval; - u16 listen_interval; - u16 atim_window; - u8 wpa_ie[MAX_WPA_IE_LEN]; - size_t wpa_ie_len; - u8 rsn_ie[MAX_WPA_IE_LEN]; - size_t rsn_ie_len; - u8 country[6]; - u8 dtim_period; - u8 dtim_data; - u8 power_constraint; - u8 qosinfo; - u8 qbssload[5]; - u8 network_type; - int join_res; - unsigned long last_scanned; -}; -#endif /* join_res: -1: authentication fail @@ -1354,55 +1075,16 @@ typedef struct tx_pending_t { #define IEEE_G (1<<2) #define IEEE_MODE_MASK (IEEE_A | IEEE_B | IEEE_G) -/* Baron move to ieee80211.c */ -int ieee80211_is_empty_essid(const char *essid, int essid_len); -int ieee80211_get_hdrlen(u16 fc); - -#if 0 - /* Action frame categories (IEEE 802.11-2007, 7.3.1.11, Table 7-24) */ - #define WLAN_ACTION_SPECTRUM_MGMT 0 - #define WLAN_ACTION_QOS 1 - #define WLAN_ACTION_DLS 2 - #define WLAN_ACTION_BLOCK_ACK 3 - #define WLAN_ACTION_RADIO_MEASUREMENT 5 - #define WLAN_ACTION_FT 6 - #define WLAN_ACTION_SA_QUERY 8 - #define WLAN_ACTION_WMM 17 -#endif - - -/* Action category code */ -enum rtw_ieee80211_category { - RTW_WLAN_CATEGORY_SPECTRUM_MGMT = 0, - RTW_WLAN_CATEGORY_QOS = 1, - RTW_WLAN_CATEGORY_DLS = 2, - RTW_WLAN_CATEGORY_BACK = 3, - RTW_WLAN_CATEGORY_PUBLIC = 4, /* IEEE 802.11 public action frames */ - RTW_WLAN_CATEGORY_RADIO_MEAS = 5, - RTW_WLAN_CATEGORY_FT = 6, - RTW_WLAN_CATEGORY_HT = 7, - RTW_WLAN_CATEGORY_SA_QUERY = 8, - RTW_WLAN_CATEGORY_WNM = 10, - RTW_WLAN_CATEGORY_UNPROTECTED_WNM = 11, /* add for CONFIG_IEEE80211W, none 11w also can use */ - RTW_WLAN_CATEGORY_TDLS = 12, - RTW_WLAN_CATEGORY_MESH = 13, - RTW_WLAN_CATEGORY_MULTIHOP = 14, - RTW_WLAN_CATEGORY_SELF_PROTECTED = 15, - RTW_WLAN_CATEGORY_WMM = 17, - RTW_WLAN_CATEGORY_VHT = 21, - RTW_WLAN_CATEGORY_P2P = 0x7f,/* P2P action frames */ -}; - #define CATEGORY_IS_GROUP_PRIVACY(cat) \ - (cat == RTW_WLAN_CATEGORY_MESH || cat == RTW_WLAN_CATEGORY_MULTIHOP) + (cat == WLAN_CATEGORY_MESH_ACTION || cat == WLAN_CATEGORY_MULTIHOP_ACTION) #define CATEGORY_IS_NON_ROBUST(cat) \ - (cat == RTW_WLAN_CATEGORY_PUBLIC \ - || cat == RTW_WLAN_CATEGORY_HT \ - || cat == RTW_WLAN_CATEGORY_UNPROTECTED_WNM \ - || cat == RTW_WLAN_CATEGORY_SELF_PROTECTED \ - || cat == RTW_WLAN_CATEGORY_VHT \ - || cat == RTW_WLAN_CATEGORY_P2P) + (cat == WLAN_CATEGORY_PUBLIC \ + || cat == WLAN_CATEGORY_HT \ + || cat == WLAN_CATEGORY_WNM_UNPROTECTED \ + || cat == WLAN_CATEGORY_SELF_PROTECTED \ + || cat == WLAN_CATEGORY_VHT \ + || cat == WLAN_CATEGORY_VENDOR_SPECIFIC) #define CATEGORY_IS_ROBUST(cat) !CATEGORY_IS_NON_ROBUST(cat) @@ -1463,51 +1145,12 @@ enum _PUBLIC_ACTION { }; #ifdef CONFIG_TDLS -enum TDLS_ACTION_FIELD { - TDLS_SETUP_REQUEST = 0, - TDLS_SETUP_RESPONSE = 1, - TDLS_SETUP_CONFIRM = 2, - TDLS_TEARDOWN = 3, - TDLS_PEER_TRAFFIC_INDICATION = 4, - TDLS_CHANNEL_SWITCH_REQUEST = 5, - TDLS_CHANNEL_SWITCH_RESPONSE = 6, - TDLS_PEER_PSM_REQUEST = 7, - TDLS_PEER_PSM_RESPONSE = 8, - TDLS_PEER_TRAFFIC_RESPONSE = 9, - TDLS_DISCOVERY_REQUEST = 10, - TDLS_DISCOVERY_RESPONSE = 14, /* it's used in public action frame */ -}; +#define WLAN_TDLS_DISCOVERY_RESPONSE = 14 /* it's used in public action frame */ #define TUNNELED_PROBE_REQ 15 #define TUNNELED_PROBE_RSP 16 #endif /* CONFIG_TDLS */ -/* BACK action code */ -enum rtw_ieee80211_back_actioncode { - RTW_WLAN_ACTION_ADDBA_REQ = 0, - RTW_WLAN_ACTION_ADDBA_RESP = 1, - RTW_WLAN_ACTION_DELBA = 2, -}; - -/* HT features action code */ -enum rtw_ieee80211_ht_actioncode { - RTW_WLAN_ACTION_HT_NOTI_CHNL_WIDTH = 0, - RTW_WLAN_ACTION_HT_SM_PS = 1, - RTW_WLAN_ACTION_HT_PSMP = 2, - RTW_WLAN_ACTION_HT_SET_PCO_PHASE = 3, - RTW_WLAN_ACTION_HT_CSI = 4, - RTW_WLAN_ACTION_HT_NON_COMPRESS_BEAMFORMING = 5, - RTW_WLAN_ACTION_HT_COMPRESS_BEAMFORMING = 6, - RTW_WLAN_ACTION_HT_ASEL_FEEDBACK = 7, -}; - -/* BACK (block-ack) parties */ -enum rtw_ieee80211_back_parties { - RTW_WLAN_BACK_RECIPIENT = 0, - RTW_WLAN_BACK_INITIATOR = 1, - RTW_WLAN_BACK_TIMER = 2, -}; - /*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) @@ -1515,13 +1158,10 @@ enum rtw_ieee80211_back_parties { #define RTW_WLAN_20_40_BSS_COEX_OBSS_EXEMPT_REQ BIT(3) #define RTW_WLAN_20_40_BSS_COEX_OBSS_EXEMPT_GRNT BIT(4) -/* VHT features action code */ -enum rtw_ieee80211_vht_actioncode { - RTW_WLAN_ACTION_VHT_COMPRESSED_BEAMFORMING = 0, - RTW_WLAN_ACTION_VHT_GROUPID_MANAGEMENT = 1, - RTW_WLAN_ACTION_VHT_OPMODE_NOTIFICATION = 2, -}; - +#ifndef WLAN_CATEGORY_FAST_BBS_TRANSITION +/*Commit 1806239dec0dacde373f0b53f076319f6c6d95cb v5.14-rc1 */ +#define WLAN_CATEGORY_FAST_BBS_TRANSITION 6 +#endif /*IEEE 802.11r action code*/ #ifdef CONFIG_RTW_80211R enum rtw_ieee80211_ft_actioncode { @@ -1566,32 +1206,7 @@ enum rtw_ieee80211_wnm_actioncode { #define VENDOR_HT_CAPAB_OUI_TYPE 0x33 /* 00-90-4c:0x33 */ -enum rtw_ieee80211_rann_flags { - RTW_RANN_FLAG_IS_GATE = 1 << 0, -}; - -/** - * enum rtw_ieee80211_preq_flags - mesh PREQ element flags - * - * @RTW_IEEE80211_PREQ_IS_GATE_FLAG: Gate Announcement subfield - * @RTW_IEEE80211_PREQ_PROACTIVE_PREP_FLAG: proactive PREP subfield - */ -enum rtw_ieee80211_preq_flags { - RTW_IEEE80211_PREQ_IS_GATE_FLAG = 1 << 0, - RTW_IEEE80211_PREQ_PROACTIVE_PREP_FLAG = 1 << 2, -}; - -/** - * enum rtw_ieee80211_preq_target_flags - mesh PREQ element per target flags - * - * @RTW_IEEE80211_PREQ_TO_FLAG: target only subfield - * @RTW_IEEE80211_PREQ_USN_FLAG: unknown target HWMP sequence number subfield - */ -enum rtw_ieee80211_preq_target_flags { - RTW_IEEE80211_PREQ_TO_FLAG = 1<<0, - RTW_IEEE80211_PREQ_USN_FLAG = 1<<2, -}; - +#define IEEE80211_PREQ_IS_GATE_FLAG (1 << 0) /* for kernel 3.14 , both value are changed to IEEE80211_CHAN_NO_IR*/ #define RTW_IEEE80211_CHAN_NO_IBSS (1 << 2) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index d6fddbf..58d08ce 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -4504,7 +4504,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de dot11_hdr = (struct rtw_ieee80211_hdr *)skb->data; frame_ctl = le16_to_cpu(dot11_hdr->frame_ctl); /* Check if the QoS bit is set */ - if ((frame_ctl & RTW_IEEE80211_FCTL_FTYPE) == RTW_IEEE80211_FTYPE_DATA) { + if ((frame_ctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) { /* Check if this ia a Wireless Distribution System (WDS) frame * which has 4 MAC addresses */ @@ -4531,8 +4531,8 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de return ret; - } else if ((frame_ctl & (RTW_IEEE80211_FCTL_FTYPE | RTW_IEEE80211_FCTL_STYPE)) - == (RTW_IEEE80211_FTYPE_MGMT | RTW_IEEE80211_STYPE_ACTION) + } else if ((frame_ctl & ( IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) + == (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION) ) { /* only for action frames */ struct xmit_frame *pmgntframe; @@ -4561,7 +4561,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de if (type >= 0) goto dump; #endif - if (category == RTW_WLAN_CATEGORY_PUBLIC) + 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); @@ -4601,7 +4601,7 @@ dump: dump_mgntframe(padapter, pmgntframe); } else - RTW_INFO("frame_ctl=0x%x\n", frame_ctl & (RTW_IEEE80211_FCTL_FTYPE | RTW_IEEE80211_FCTL_STYPE)); + RTW_INFO("frame_ctl=0x%x\n", frame_ctl & ( IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)); fail: @@ -6203,7 +6203,7 @@ void rtw_cfg80211_rx_action(_adapter *adapter, union recv_frame *rframe, const c } #endif rtw_action_frame_parse(frame, frame_len, &category, &action); - if (category == RTW_WLAN_CATEGORY_PUBLIC) { + if (category == WLAN_CATEGORY_PUBLIC) { if (action == ACT_PUBLIC_GAS_INITIAL_REQ) { rtw_mi_set_scan_deny(adapter, 200); rtw_mi_scan_abort(adapter, _FALSE); /*rtw_scan_abort_no_wait*/ @@ -6286,7 +6286,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, u16 capability = 0; uint capability_len = 0; - unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; + unsigned char category = WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; u8 dialogToken = 1; u32 p2poui = cpu_to_be32(P2POUI); @@ -7329,7 +7329,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, wait_ack = 0; goto dump; } - else if (frame_styp == RTW_IEEE80211_STYPE_AUTH) { + else if (frame_styp == IEEE80211_STYPE_AUTH) { int retval = 0; RTW_INFO("RTW_Tx:tx_ch=%d, no_cck=%u, da="MAC_FMT"\n", tx_ch, no_cck, MAC_ARG(GetAddr1Ptr(buf))); @@ -7367,7 +7367,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, } } #endif - if (category == RTW_WLAN_CATEGORY_PUBLIC) { + if (category == WLAN_CATEGORY_PUBLIC) { RTW_INFO("RTW_Tx:%s\n", action_public_str(action)); switch (action) { case ACT_PUBLIC_GAS_INITIAL_REQ: @@ -7378,7 +7378,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, } } #ifdef CONFIG_RTW_80211K - else if (category == RTW_WLAN_CATEGORY_RADIO_MEAS) + else if (category == WLAN_CATEGORY_RADIO_MEASUREMENT) RTW_INFO("RTW_Tx: RRM Action\n"); #endif else @@ -7616,22 +7616,22 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy, #endif switch (txmgmt.action_code) { - case TDLS_SETUP_REQUEST: + case WLAN_TDLS_SETUP_REQUEST: issue_tdls_setup_req(padapter, &txmgmt, _TRUE); break; - case TDLS_SETUP_RESPONSE: + case WLAN_TDLS_SETUP_RESPONSE: issue_tdls_setup_rsp(padapter, &txmgmt); break; - case TDLS_SETUP_CONFIRM: + case WLAN_TDLS_SETUP_CONFIRM: issue_tdls_setup_cfm(padapter, &txmgmt); break; - case TDLS_TEARDOWN: + case WLAN_TDLS_TEARDOWN: issue_tdls_teardown(padapter, &txmgmt, _TRUE); break; - case TDLS_DISCOVERY_REQUEST: + case WLAN_TDLS_DISCOVERY_REQUEST: issue_tdls_dis_req(padapter, &txmgmt); break; - case TDLS_DISCOVERY_RESPONSE: + case WLAN_TDLS_DISCOVERY_RESPONSE: issue_tdls_dis_rsp(padapter, &txmgmt, pmlmeinfo->enc_algo ? _TRUE : _FALSE); break; } diff --git a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c index 7a4f7d2..398b51c 100644 --- a/os_dep/linux/ioctl_linux.c +++ b/os_dep/linux/ioctl_linux.c @@ -6689,25 +6689,6 @@ static int wpa_set_param(struct net_device *dev, u8 name, u32 value) * be set. */ -#if 0 - struct ieee80211_security sec = { - .flags = SEC_ENABLED, - .enabled = value, - }; - ieee->drop_unencrypted = value; - /* We only change SEC_LEVEL for open mode. Others - * are set by ipw_wpa_set_encryption. - */ - if (!value) { - sec.flags |= SEC_LEVEL; - sec.level = SEC_LEVEL_0; - } else { - sec.flags |= SEC_LEVEL; - sec.level = SEC_LEVEL_1; - } - if (ieee->set_security) - ieee->set_security(ieee->dev, &sec); -#endif break; } @@ -11642,7 +11623,7 @@ static u8 pktcmp(PADAPTER padapter, u8 *txbuf, u32 txsz, u8 *rxbuf, u32 rxsz) phal = GET_HAL_DATA(padapter); if (rtw_hal_rcr_check(padapter, RCR_APPFCS)) - fcssize = IEEE80211_FCS_LEN; + fcssize = FCS_LEN; else fcssize = 0;