remove ELEMENT_ID enum

Values are replaced with the equivalent ones from enum ieee80211_eid linux/ieee80211.h

Link: https://lore.kernel.org/r/20201208040733.379197-22-ross.schm.dev@gmail.com
This commit is contained in:
Carlos Garces 2021-10-21 20:58:08 +02:00
parent 34f947ef16
commit 7a0d67040a
10 changed files with 75 additions and 152 deletions

View File

@ -2421,7 +2421,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
&& (!rfctl->country_ent || COUNTRY_CHPLAN_EN_11AC(rfctl->country_ent)) && (!rfctl->country_ent || COUNTRY_CHPLAN_EN_11AC(rfctl->country_ent))
) { ) {
/* Parsing VHT CAP IE */ /* Parsing VHT CAP IE */
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, EID_VHTCapability, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_)); p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_VHT_CAPABILITY, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
if (p && ie_len > 0) if (p && ie_len > 0)
vht_cap = _TRUE; vht_cap = _TRUE;
@ -2452,7 +2452,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
SET_EXT_CAPABILITY_ELE_BSS_COEXIST(pmlmepriv->ext_capab_ie_data, 1); SET_EXT_CAPABILITY_ELE_BSS_COEXIST(pmlmepriv->ext_capab_ie_data, 1);
pmlmepriv->ext_capab_ie_len = 10; pmlmepriv->ext_capab_ie_len = 10;
rtw_set_ie(pbss_network->IEs + pbss_network->IELength, EID_EXTCapability, 8, pmlmepriv->ext_capab_ie_data, &len); rtw_set_ie(pbss_network->IEs + pbss_network->IELength, WLAN_EID_EXT_CAPABILITY, 8, pmlmepriv->ext_capab_ie_data, &len);
pbss_network->IELength += pmlmepriv->ext_capab_ie_len; pbss_network->IELength += pmlmepriv->ext_capab_ie_len;
} }
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
@ -3344,7 +3344,7 @@ void rtw_process_public_act_bsscoex(_adapter *padapter, u8 *pframe, uint frame_l
action = frame_body[1]; action = frame_body[1];
if (frame_body_len > 0) { if (frame_body_len > 0) {
if ((frame_body[2] == EID_BSSCoexistence) && (frame_body[3] > 0)) { if ((frame_body[2] == WLAN_EID_BSS_COEX_2040) && (frame_body[3] > 0)) {
u8 ie_data = frame_body[4]; u8 ie_data = frame_body[4];
if (ie_data & RTW_WLAN_20_40_BSS_COEX_40MHZ_INTOL) { if (ie_data & RTW_WLAN_20_40_BSS_COEX_40MHZ_INTOL) {
@ -3364,8 +3364,8 @@ void rtw_process_public_act_bsscoex(_adapter *padapter, u8 *pframe, uint frame_l
} }
if (frame_body_len > 8) { if (frame_body_len > 8) {
/* if EID_BSSIntolerantChlReport ie exists */ /* if WLAN_EID_BSS_INTOLERANT_CHL_REPORT ie exists */
if ((frame_body[5] == EID_BSSIntolerantChlReport) && (frame_body[6] > 0)) { if ((frame_body[5] == WLAN_EID_BSS_INTOLERANT_CHL_REPORT) && (frame_body[6] > 0)) {
/*todo:*/ /*todo:*/
if (pmlmepriv->ht_intolerant_ch_reported == _FALSE) { if (pmlmepriv->ht_intolerant_ch_reported == _FALSE) {
pmlmepriv->ht_intolerant_ch_reported = _TRUE; pmlmepriv->ht_intolerant_ch_reported = _TRUE;
@ -4327,8 +4327,8 @@ void rtw_ap_update_bss_chbw(_adapter *adapter, WLAN_BSSID_EX *bss, u8 ch, u8 bw,
int vht_cap_ielen, vht_op_ielen; int vht_cap_ielen, vht_op_ielen;
u8 center_freq; u8 center_freq;
vht_cap_ie = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), EID_VHTCapability, &vht_cap_ielen, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs))); vht_cap_ie = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), WLAN_EID_VHT_CAPABILITY, &vht_cap_ielen, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs)));
vht_op_ie = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), EID_VHTOperation, &vht_op_ielen, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs))); vht_op_ie = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), WLAN_EID_VHT_OPERATION, &vht_op_ielen, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs)));
center_freq = rtw_get_center_ch(ch, bw, offset); center_freq = rtw_get_center_ch(ch, bw, offset);
/* update vht cap ie */ /* update vht cap ie */
@ -4369,8 +4369,8 @@ void rtw_ap_update_bss_chbw(_adapter *adapter, WLAN_BSSID_EX *bss, u8 ch, u8 bw,
u8 *ht_cap_ie, *ht_op_ie; u8 *ht_cap_ie, *ht_op_ie;
int ht_cap_ielen, ht_op_ielen; int ht_cap_ielen, ht_op_ielen;
ht_cap_ie = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), EID_HTCapability, &ht_cap_ielen, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs))); ht_cap_ie = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), WLAN_EID_HT_CAPABILITY, &ht_cap_ielen, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs)));
ht_op_ie = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), EID_HTInfo, &ht_op_ielen, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs))); ht_op_ie = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), WLAN_EID_HT_OPERATION, &ht_op_ielen, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs)));
/* update ht cap ie */ /* update ht cap ie */
if (ht_cap_ie && ht_cap_ielen) { if (ht_cap_ie && ht_cap_ielen) {

View File

@ -1776,13 +1776,13 @@ void rtw_ies_get_chbw(u8 *ies, int ies_len, u8 *ch, u8 *bw, u8 *offset, u8 ht, u
u8 *ht_cap_ie, *ht_op_ie; u8 *ht_cap_ie, *ht_op_ie;
int ht_cap_ielen, ht_op_ielen; int ht_cap_ielen, ht_op_ielen;
ht_cap_ie = rtw_get_ie(ies, EID_HTCapability, &ht_cap_ielen, ies_len); ht_cap_ie = rtw_get_ie(ies, WLAN_EID_HT_CAPABILITY, &ht_cap_ielen, ies_len);
if (ht_cap_ie && ht_cap_ielen) { if (ht_cap_ie && ht_cap_ielen) {
if (GET_HT_CAP_ELE_CHL_WIDTH(ht_cap_ie + 2)) if (GET_HT_CAP_ELE_CHL_WIDTH(ht_cap_ie + 2))
*bw = CHANNEL_WIDTH_40; *bw = CHANNEL_WIDTH_40;
} }
ht_op_ie = rtw_get_ie(ies, EID_HTInfo, &ht_op_ielen, ies_len); ht_op_ie = rtw_get_ie(ies, WLAN_EID_HT_OPERATION, &ht_op_ielen, ies_len);
if (ht_op_ie && ht_op_ielen) { if (ht_op_ie && ht_op_ielen) {
if (*ch == 0) if (*ch == 0)
*ch = GET_HT_OP_ELE_PRI_CHL(ht_op_ie + 2); *ch = GET_HT_OP_ELE_PRI_CHL(ht_op_ie + 2);
@ -1811,7 +1811,7 @@ void rtw_ies_get_chbw(u8 *ies, int ies_len, u8 *ch, u8 *bw, u8 *offset, u8 ht, u
u8 *vht_op_ie; u8 *vht_op_ie;
int vht_op_ielen; int vht_op_ielen;
vht_op_ie = rtw_get_ie(ies, EID_VHTOperation, &vht_op_ielen, ies_len); vht_op_ie = rtw_get_ie(ies, WLAN_EID_VHT_OPERATION, &vht_op_ielen, ies_len);
if (vht_op_ie && vht_op_ielen) { if (vht_op_ie && vht_op_ielen) {
if (GET_VHT_OPERATION_ELE_CHL_WIDTH(vht_op_ie + 2) >= 1) if (GET_VHT_OPERATION_ELE_CHL_WIDTH(vht_op_ie + 2) >= 1)
*bw = CHANNEL_WIDTH_80; *bw = CHANNEL_WIDTH_80;

View File

@ -5118,7 +5118,7 @@ void rtw_append_exented_cap(_adapter *padapter, u8 *out_ie, uint *pout_len)
transmit the Extended Capabilities element. transmit the Extended Capabilities element.
*/ */
if (_FALSE == _rtw_memcmp(cap_content, null_content, 8)) if (_FALSE == _rtw_memcmp(cap_content, null_content, 8))
pframe = rtw_set_ie(out_ie + *pout_len, EID_EXTCapability, 8, cap_content , pout_len); pframe = rtw_set_ie(out_ie + *pout_len, WLAN_EID_EXT_CAPABILITY, 8, cap_content , pout_len);
} }
#endif #endif

View File

@ -2847,14 +2847,14 @@ unsigned int OnAssocRsp(_adapter *padapter, union recv_frame *precv_frame)
break; break;
#ifdef CONFIG_80211AC_VHT #ifdef CONFIG_80211AC_VHT
case EID_VHTCapability: case WLAN_EID_VHT_CAPABILITY:
VHT_caps_handler(padapter, pIE); VHT_caps_handler(padapter, pIE);
#ifdef ROKU_PRIVATE #ifdef ROKU_PRIVATE
VHT_caps_handler_infra_ap(padapter, pIE); VHT_caps_handler_infra_ap(padapter, pIE);
#endif /* ROKU_PRIVATE */ #endif /* ROKU_PRIVATE */
break; break;
case EID_VHTOperation: case WLAN_EID_VHT_OPERATION:
VHT_operation_handler(padapter, pIE); VHT_operation_handler(padapter, pIE);
break; break;
#endif #endif
@ -8857,7 +8857,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p
u32 ie_len = 0; u32 ie_len = 0;
/* FILL VHT CAP IE */ /* FILL VHT CAP IE */
pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, EID_VHTCapability, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_)); pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_VHT_CAPABILITY, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
if (pbuf && ie_len > 0) { if (pbuf && ie_len > 0) {
memcpy(pframe, pbuf, ie_len + 2); memcpy(pframe, pbuf, ie_len + 2);
pframe += (ie_len + 2); pframe += (ie_len + 2);
@ -8865,7 +8865,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p
} }
/* FILL VHT OPERATION IE */ /* FILL VHT OPERATION IE */
pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, EID_VHTOperation, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_)); pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_VHT_OPERATION, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
if (pbuf && ie_len > 0) { if (pbuf && ie_len > 0) {
memcpy(pframe, pbuf, ie_len + 2); memcpy(pframe, pbuf, ie_len + 2);
pframe += (ie_len + 2); pframe += (ie_len + 2);
@ -9052,7 +9052,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
if (pmlmeext->cur_channel > 14) { if (pmlmeext->cur_channel > 14) {
pow_cap_ele[0] = 13; /* Minimum transmit power capability */ pow_cap_ele[0] = 13; /* Minimum transmit power capability */
pow_cap_ele[1] = 21; /* Maximum transmit power capability */ pow_cap_ele[1] = 21; /* Maximum transmit power capability */
pframe = rtw_set_ie(pframe, EID_PowerCap, 2, pow_cap_ele, &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, WLAN_EID_PWR_CAPABILITY, 2, pow_cap_ele, &(pattrib->pktlen));
/* supported channels */ /* supported channels */
while (sup_ch_idx < rfctl->max_chan_nums && rfctl->channel_set[sup_ch_idx].ChannelNum != 0) { while (sup_ch_idx < rfctl->max_chan_nums && rfctl->channel_set[sup_ch_idx].ChannelNum != 0) {
@ -9066,7 +9066,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
} }
sup_ch_idx++; sup_ch_idx++;
} }
pframe = rtw_set_ie(pframe, EID_SupportedChannels, idx_5g, sup_ch, &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, WLAN_EID_SUPPORTED_CHANNELS, idx_5g, sup_ch, &(pattrib->pktlen));
} }
#endif /* CONFIG_DFS */ #endif /* CONFIG_DFS */
@ -9183,7 +9183,7 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
} }
break; break;
case EID_WPA2: case WLAN_EID_RSN:
#ifdef CONFIG_RTW_80211R #ifdef CONFIG_RTW_80211R
if ((is_reassoc) && (rtw_ft_roam(padapter))) { if ((is_reassoc) && (rtw_ft_roam(padapter))) {
rtw_ft_update_rsnie(padapter, _TRUE, pattrib, &pframe); rtw_ft_update_rsnie(padapter, _TRUE, pattrib, &pframe);
@ -9199,36 +9199,36 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
} }
#endif /* CONFIG_IOCTL_CFG80211 */ #endif /* CONFIG_IOCTL_CFG80211 */
pframe = rtw_set_ie(pframe, EID_WPA2, pIE->Length, pIE->data, &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, WLAN_EID_RSN, pIE->Length, pIE->data, &(pattrib->pktlen));
} }
break; break;
#ifdef CONFIG_80211N_HT #ifdef CONFIG_80211N_HT
case EID_HTCapability: case WLAN_EID_HT_CAPABILITY:
if (padapter->mlmepriv.htpriv.ht_option == _TRUE) { if (padapter->mlmepriv.htpriv.ht_option == _TRUE) {
if (!(is_ap_in_tkip(padapter))) { if (!(is_ap_in_tkip(padapter))) {
memcpy(&(pmlmeinfo->HT_caps), pIE->data, sizeof(struct HT_caps_element)); memcpy(&(pmlmeinfo->HT_caps), pIE->data, sizeof(struct HT_caps_element));
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info = cpu_to_le16(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info); pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info = cpu_to_le16(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info);
pframe = rtw_set_ie(pframe, EID_HTCapability, pIE->Length , (u8 *)(&(pmlmeinfo->HT_caps)), &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, WLAN_EID_HT_CAPABILITY, pIE->Length , (u8 *)(&(pmlmeinfo->HT_caps)), &(pattrib->pktlen));
} }
} }
break; break;
case EID_EXTCapability: case WLAN_EID_EXT_CAPABILITY:
if (padapter->mlmepriv.htpriv.ht_option == _TRUE) if (padapter->mlmepriv.htpriv.ht_option == _TRUE)
pframe = rtw_set_ie(pframe, EID_EXTCapability, pIE->Length, pIE->data, &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, WLAN_EID_EXT_CAPABILITY, pIE->Length, pIE->data, &(pattrib->pktlen));
break; break;
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT #ifdef CONFIG_80211AC_VHT
case EID_VHTCapability: case WLAN_EID_VHT_CAPABILITY:
if (padapter->mlmepriv.vhtpriv.vht_option == _TRUE) if (padapter->mlmepriv.vhtpriv.vht_option == _TRUE)
pframe = rtw_set_ie(pframe, EID_VHTCapability, pIE->Length, pIE->data, &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, WLAN_EID_VHT_CAPABILITY, pIE->Length, pIE->data, &(pattrib->pktlen));
break; break;
case EID_OpModeNotification: case WLAN_EID_OPMODE_NOTIF:
if (padapter->mlmepriv.vhtpriv.vht_option == _TRUE) if (padapter->mlmepriv.vhtpriv.vht_option == _TRUE)
pframe = rtw_set_ie(pframe, EID_OpModeNotification, pIE->Length, pIE->data, &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, WLAN_EID_OPMODE_NOTIF, pIE->Length, pIE->data, &(pattrib->pktlen));
break; break;
#endif /* CONFIG_80211AC_VHT */ #endif /* CONFIG_80211AC_VHT */
default: default:
@ -10433,7 +10433,7 @@ void issue_action_BSSCoexistPacket(_adapter *padapter)
iedata |= BIT(2);/* 20 MHz BSS Width Request */ iedata |= BIT(2);/* 20 MHz BSS Width Request */
pframe = rtw_set_ie(pframe, EID_BSSCoexistence, 1, &iedata, &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, WLAN_EID_BSS_COEX_2040, 1, &iedata, &(pattrib->pktlen));
} }
@ -10496,7 +10496,7 @@ void issue_action_BSSCoexistPacket(_adapter *padapter)
} }
} }
pframe = rtw_set_ie(pframe, EID_BSSIntolerantChlReport, k, InfoContent, &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, WLAN_EID_BSS_INTOLERANT_CHL_REPORT, k, InfoContent, &(pattrib->pktlen));
} }
@ -13327,14 +13327,14 @@ u8 rtw_ft_update_rsnie(
u8 *pie; u8 *pie;
u32 len; u32 len;
pie = rtw_get_ie(pft_roam->updated_ft_ies, EID_WPA2, &len, pie = rtw_get_ie(pft_roam->updated_ft_ies, WLAN_EID_RSN, &len,
pft_roam->updated_ft_ies_len); pft_roam->updated_ft_ies_len);
if (!bwrite) if (!bwrite)
return (pie)?_SUCCESS:_FAIL; return (pie)?_SUCCESS:_FAIL;
if (pie) { if (pie) {
*pframe = rtw_set_ie(((u8 *)*pframe), EID_WPA2, len, *pframe = rtw_set_ie(((u8 *)*pframe), WLAN_EID_RSN, len,
pie+2, &(pattrib->pktlen)); pie+2, &(pattrib->pktlen));
} else } else
return _FAIL; return _FAIL;
@ -14021,11 +14021,11 @@ u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf)
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT #ifdef CONFIG_80211AC_VHT
case EID_VHTCapability: /* Get VHT Cap IE. */ case WLAN_EID_VHT_CAPABILITY: /* Get VHT Cap IE. */
pmlmeinfo->VHT_enable = 1; pmlmeinfo->VHT_enable = 1;
break; break;
case EID_VHTOperation: /* Get VHT Operation IE. */ case WLAN_EID_VHT_OPERATION: /* Get VHT Operation IE. */
break; break;
#endif /* CONFIG_80211AC_VHT */ #endif /* CONFIG_80211AC_VHT */
default: default:

View File

@ -1103,11 +1103,11 @@ static u8 *rm_gen_bcn_detail_elem(_adapter *padapter, u8 *pframe,
continue; continue;
#if (RM_MORE_DBG_MSG) #if (RM_MORE_DBG_MSG)
switch (eid) { switch (eid) {
case EID_QBSSLoad: case WLAN_EID_QBSS_LOAD:
RTW_INFO("RM: EID_QBSSLoad\n"); RTW_INFO("RM: WLAN_EID_QBSS_LOAD\n");
break; break;
case EID_HTCapability: case WLAN_EID_HT_CAPABILITY:
RTW_INFO("RM: EID_HTCapability\n"); RTW_INFO("RM: WLAN_EID_HT_CAPABILITY\n");
break; break;
case _MDIE_: case _MDIE_:
RTW_INFO("RM: EID_MobilityDomain\n"); RTW_INFO("RM: EID_MobilityDomain\n");
@ -1220,7 +1220,7 @@ static u8 *rm_bcn_rep_fill_scan_resule (struct rm_obj *prm,
my_len = 0; my_len = 0;
/* meas ID */ /* meas ID */
val8 = EID_MeasureReport; val8 = WLAN_EID_MEASURE_REPORT;
pframe = rtw_set_fixed_ie(pframe, 1, &val8, &my_len); pframe = rtw_set_fixed_ie(pframe, 1, &val8, &my_len);
/* remember position form elelment length */ /* remember position form elelment length */

View File

@ -664,7 +664,7 @@ void rtw_tdls_process_vht_op_mode_notify(_adapter *padapter, struct sta_info *pt
u8 *rtw_tdls_set_aid(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattrib) u8 *rtw_tdls_set_aid(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattrib)
{ {
return rtw_set_ie(pframe, EID_AID, 2, (u8 *)&(padapter->mlmepriv.cur_network.aid), &(pattrib->pktlen)); return rtw_set_ie(pframe, WLAN_EID_AID, 2, (u8 *)&(padapter->mlmepriv.cur_network.aid), &(pattrib->pktlen));
} }
u8 *rtw_tdls_set_vht_cap(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattrib) u8 *rtw_tdls_set_vht_cap(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattrib)
@ -777,10 +777,10 @@ u8 *rtw_tdls_set_timeout_interval(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struc
int len = 0; int len = 0;
if (ptxmgmt->len > 0) if (ptxmgmt->len > 0)
p = rtw_get_ie(ptxmgmt->buf, WLAN_EID_TIMEOUT_INTERVAL, &len, ptxmgmt->len); p = rtw_get_ie(ptxmgmt->buf, WLAN_WLAN_EID_TIMEOUT_INTERVAL_INTERVAL, &len, ptxmgmt->len);
if (p != NULL) if (p != NULL)
return rtw_set_ie(pframe, WLAN_EID_TIMEOUT_INTERVAL, len, p + 2, &(pattrib->pktlen)); return rtw_set_ie(pframe, WLAN_WLAN_EID_TIMEOUT_INTERVAL_INTERVAL, len, p + 2, &(pattrib->pktlen));
else { else {
/* Timeout interval */ /* Timeout interval */
timeout_itvl[0] = 0x02; timeout_itvl[0] = 0x02;
@ -789,7 +789,7 @@ u8 *rtw_tdls_set_timeout_interval(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struc
else else
memcpy(timeout_itvl + 1, (u8 *)(&ptdls_sta->TDLS_PeerKey_Lifetime), 4); memcpy(timeout_itvl + 1, (u8 *)(&ptdls_sta->TDLS_PeerKey_Lifetime), 4);
return rtw_set_ie(pframe, WLAN_EID_TIMEOUT_INTERVAL, 5, timeout_itvl, &(pattrib->pktlen)); return rtw_set_ie(pframe, WLAN_WLAN_EID_TIMEOUT_INTERVAL_INTERVAL, 5, timeout_itvl, &(pattrib->pktlen));
} }
} }
@ -802,7 +802,7 @@ u8 *rtw_tdls_set_bss_coexist(_adapter *padapter, u8 *pframe, struct pkt_attrib *
/* Information Bit should be set by TDLS test plan 5.9 */ /* Information Bit should be set by TDLS test plan 5.9 */
iedata |= BIT(0); iedata |= BIT(0);
return rtw_set_ie(pframe, EID_BSSCoexistence, 1, &iedata, &(pattrib->pktlen)); return rtw_set_ie(pframe, WLAN_EID_BSS_COEX_2040, 1, &iedata, &(pattrib->pktlen));
} }
u8 *rtw_tdls_set_payload_type(u8 *pframe, struct pkt_attrib *pattrib) u8 *rtw_tdls_set_payload_type(u8 *pframe, struct pkt_attrib *pattrib)
@ -843,7 +843,7 @@ u8 *rtw_tdls_set_reg_class(u8 *pframe, struct pkt_attrib *pattrib, struct sta_in
u8 *rtw_tdls_set_second_channel_offset(u8 *pframe, struct pkt_attrib *pattrib, u8 ch_offset) u8 *rtw_tdls_set_second_channel_offset(u8 *pframe, struct pkt_attrib *pattrib, u8 ch_offset)
{ {
return rtw_set_ie(pframe, EID_SecondaryChnlOffset , 1, &ch_offset, &(pattrib->pktlen)); return rtw_set_ie(pframe, WLAN_EID_SECONDARY_CHANNEL_OFFSET , 1, &ch_offset, &(pattrib->pktlen));
} }
u8 *rtw_tdls_set_capability(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattrib) u8 *rtw_tdls_set_capability(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattrib)
@ -1949,7 +1949,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
if (prx_pkt_attrib->encrypt) if (prx_pkt_attrib->encrypt)
memcpy(SNonce, (ptr + j + 52), 32); memcpy(SNonce, (ptr + j + 52), 32);
break; break;
case WLAN_EID_TIMEOUT_INTERVAL: case WLAN_WLAN_EID_TIMEOUT_INTERVAL_INTERVAL:
if (prx_pkt_attrib->encrypt) if (prx_pkt_attrib->encrypt)
timeout_interval = cpu_to_le32(*(u32 *)(ptr + j + 3)); timeout_interval = cpu_to_le32(*(u32 *)(ptr + j + 3));
break; break;
@ -1961,13 +1961,13 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
break; break;
#endif #endif
#ifdef CONFIG_80211AC_VHT #ifdef CONFIG_80211AC_VHT
case EID_AID: case WLAN_EID_AID:
break; break;
case EID_VHTCapability: case WLAN_EID_VHT_CAPABILITY:
rtw_tdls_process_vht_cap(padapter, ptdls_sta, pIE->data, pIE->Length); rtw_tdls_process_vht_cap(padapter, ptdls_sta, pIE->data, pIE->Length);
break; break;
#endif #endif
case EID_BSSCoexistence: case WLAN_EID_BSS_COEX_2040:
break; break;
case WLAN_EID_LINK_ID: case WLAN_EID_LINK_ID:
if (_rtw_memcmp(get_bssid(pmlmepriv), pIE->data, 6) == _FALSE) if (_rtw_memcmp(get_bssid(pmlmepriv), pIE->data, 6) == _FALSE)
@ -2128,7 +2128,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
pftie = (u8 *)pIE; pftie = (u8 *)pIE;
memcpy(ANonce, (ptr + j + 20), 32); memcpy(ANonce, (ptr + j + 20), 32);
break; break;
case WLAN_EID_TIMEOUT_INTERVAL: case WLAN_WLAN_EID_TIMEOUT_INTERVAL_INTERVAL:
ptimeout_ie = (u8 *)pIE; ptimeout_ie = (u8 *)pIE;
timeout_interval = cpu_to_le32(*(u32 *)(ptimeout_ie + 3)); timeout_interval = cpu_to_le32(*(u32 *)(ptimeout_ie + 3));
break; break;
@ -2140,17 +2140,17 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
break; break;
#endif #endif
#ifdef CONFIG_80211AC_VHT #ifdef CONFIG_80211AC_VHT
case EID_AID: case WLAN_EID_AID:
/* todo in the future if necessary */ /* todo in the future if necessary */
break; break;
case EID_VHTCapability: case WLAN_EID_VHT_CAPABILITY:
rtw_tdls_process_vht_cap(padapter, ptdls_sta, pIE->data, pIE->Length); rtw_tdls_process_vht_cap(padapter, ptdls_sta, pIE->data, pIE->Length);
break; break;
case EID_OpModeNotification: case WLAN_EID_OPMODE_NOTIF:
rtw_tdls_process_vht_op_mode_notify(padapter, ptdls_sta, pIE->data, pIE->Length); rtw_tdls_process_vht_op_mode_notify(padapter, ptdls_sta, pIE->data, pIE->Length);
break; break;
#endif #endif
case EID_BSSCoexistence: case WLAN_EID_BSS_COEX_2040:
break; break;
case WLAN_EID_LINK_ID: case WLAN_EID_LINK_ID:
plinkid_ie = (u8 *)pIE; plinkid_ie = (u8 *)pIE;
@ -2274,7 +2274,7 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame, struct
case WLAN_EID_FAST_BSS_TRANSITION: case WLAN_EID_FAST_BSS_TRANSITION:
pftie = (u8 *)pIE; pftie = (u8 *)pIE;
break; break;
case WLAN_EID_TIMEOUT_INTERVAL: case WLAN_WLAN_EID_TIMEOUT_INTERVAL_INTERVAL:
ptimeout_ie = (u8 *)pIE; ptimeout_ie = (u8 *)pIE;
break; break;
#ifdef CONFIG_80211N_HT #ifdef CONFIG_80211N_HT
@ -2282,10 +2282,10 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame, struct
break; break;
#endif #endif
#ifdef CONFIG_80211AC_VHT #ifdef CONFIG_80211AC_VHT
case EID_VHTOperation: case WLAN_EID_VHT_OPERATION:
rtw_tdls_process_vht_operation(padapter, ptdls_sta, pIE->data, pIE->Length); rtw_tdls_process_vht_operation(padapter, ptdls_sta, pIE->data, pIE->Length);
break; break;
case EID_OpModeNotification: case WLAN_EID_OPMODE_NOTIF:
rtw_tdls_process_vht_op_mode_notify(padapter, ptdls_sta, pIE->data, pIE->Length); rtw_tdls_process_vht_op_mode_notify(padapter, ptdls_sta, pIE->data, pIE->Length);
break; break;
#endif #endif
@ -2559,7 +2559,7 @@ sint On_TDLS_Ch_Switch_Req(_adapter *padapter, union recv_frame *precv_frame, st
pIE = (PNDIS_802_11_VARIABLE_IEs)(ptr + j); pIE = (PNDIS_802_11_VARIABLE_IEs)(ptr + j);
switch (pIE->ElementID) { switch (pIE->ElementID) {
case EID_SecondaryChnlOffset: case WLAN_EID_SECONDARY_CHANNEL_OFFSET:
switch (*(pIE->data)) { switch (*(pIE->data)) {
case EXTCHNL_OFFSET_UPPER: case EXTCHNL_OFFSET_UPPER:
pchsw_info->ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER; pchsw_info->ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER;

View File

@ -763,7 +763,7 @@ u32 rtw_build_vht_operation_ie(_adapter *padapter, u8 *pbuf, u8 channel)
memcpy(operation + 3, pvhtpriv->vht_mcs_map, 2); memcpy(operation + 3, pvhtpriv->vht_mcs_map, 2);
rtw_set_ie(pbuf, EID_VHTOperation, 5, operation, &len); rtw_set_ie(pbuf, WLAN_EID_VHT_OPERATION, 5, operation, &len);
return len; return len;
} }
@ -786,7 +786,7 @@ u32 rtw_build_vht_op_mode_notify_ie(_adapter *padapter, u8 *pbuf, u8 bw)
pvhtpriv->vht_op_mode_notify = opmode; pvhtpriv->vht_op_mode_notify = opmode;
pbuf = rtw_set_ie(pbuf, EID_OpModeNotification, 1, &opmode, &len); pbuf = rtw_set_ie(pbuf, WLAN_EID_OPMODE_NOTIF, 1, &opmode, &len);
return len; return len;
} }
@ -926,7 +926,7 @@ u32 rtw_build_vht_cap_ie(_adapter *padapter, u8 *pbuf)
SET_VHT_CAPABILITY_ELE_MCS_RX_HIGHEST_RATE(pcap, HighestRate); /* indicate we support highest rx rate is 600Mbps. */ SET_VHT_CAPABILITY_ELE_MCS_RX_HIGHEST_RATE(pcap, HighestRate); /* indicate we support highest rx rate is 600Mbps. */
SET_VHT_CAPABILITY_ELE_MCS_TX_HIGHEST_RATE(pcap, HighestRate); /* indicate we support highest tx rate is 600Mbps. */ SET_VHT_CAPABILITY_ELE_MCS_TX_HIGHEST_RATE(pcap, HighestRate); /* indicate we support highest tx rate is 600Mbps. */
pbuf = rtw_set_ie(pbuf, EID_VHTCapability, 12, pcap, &len); pbuf = rtw_set_ie(pbuf, WLAN_EID_VHT_CAPABILITY, 12, pcap, &len);
return len; return len;
} }
@ -948,10 +948,10 @@ u32 rtw_restructure_vht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_le
ht_op_ie = rtw_get_ie(in_ie + 12, WLAN_EID_HT_OPERATION, &ielen, in_len - 12); ht_op_ie = rtw_get_ie(in_ie + 12, WLAN_EID_HT_OPERATION, &ielen, in_len - 12);
if (!ht_op_ie || ielen != HT_OP_IE_LEN) if (!ht_op_ie || ielen != HT_OP_IE_LEN)
goto exit; goto exit;
vht_cap_ie = rtw_get_ie(in_ie + 12, EID_VHTCapability, &ielen, in_len - 12); vht_cap_ie = rtw_get_ie(in_ie + 12, WLAN_EID_VHT_CAPABILITY, &ielen, in_len - 12);
if (!vht_cap_ie || ielen != VHT_CAP_IE_LEN) if (!vht_cap_ie || ielen != VHT_CAP_IE_LEN)
goto exit; goto exit;
vht_op_ie = rtw_get_ie(in_ie + 12, EID_VHTOperation, &ielen, in_len - 12); vht_op_ie = rtw_get_ie(in_ie + 12, WLAN_EID_VHT_OPERATION, &ielen, in_len - 12);
if (!vht_op_ie || ielen != VHT_OP_IE_LEN) if (!vht_op_ie || ielen != VHT_OP_IE_LEN)
goto exit; goto exit;
@ -961,7 +961,7 @@ u32 rtw_restructure_vht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_le
/* VHT Operation element */ /* VHT Operation element */
out_vht_op_ie = out_ie + *pout_len; out_vht_op_ie = out_ie + *pout_len;
rtw_set_ie(out_vht_op_ie, EID_VHTOperation, VHT_OP_IE_LEN, vht_op_ie + 2 , pout_len); rtw_set_ie(out_vht_op_ie, WLAN_EID_VHT_OPERATION, VHT_OP_IE_LEN, vht_op_ie + 2 , pout_len);
/* get primary channel from HT_OP_IE */ /* get primary channel from HT_OP_IE */
oper_ch = GET_HT_OP_ELE_PRI_CHL(ht_op_ie + 2); oper_ch = GET_HT_OP_ELE_PRI_CHL(ht_op_ie + 2);
@ -1072,7 +1072,7 @@ void rtw_vht_ies_attach(_adapter *padapter, WLAN_BSSID_EX *pnetwork)
sint ie_len = 0; sint ie_len = 0;
u8 *p = NULL; u8 *p = NULL;
p = rtw_get_ie(pnetwork->IEs + _BEACON_IE_OFFSET_, EID_VHTCapability, &ie_len, p = rtw_get_ie(pnetwork->IEs + _BEACON_IE_OFFSET_, WLAN_EID_VHT_CAPABILITY, &ie_len,
(pnetwork->IELength - _BEACON_IE_OFFSET_)); (pnetwork->IELength - _BEACON_IE_OFFSET_));
if (p && ie_len > 0) if (p && ie_len > 0)
return; return;
@ -1082,7 +1082,7 @@ void rtw_vht_ies_attach(_adapter *padapter, WLAN_BSSID_EX *pnetwork)
/* VHT Operation mode notifiy bit in Extended IE (127) */ /* VHT Operation mode notifiy bit in Extended IE (127) */
SET_EXT_CAPABILITY_ELE_OP_MODE_NOTIF(pmlmepriv->ext_capab_ie_data, 1); SET_EXT_CAPABILITY_ELE_OP_MODE_NOTIF(pmlmepriv->ext_capab_ie_data, 1);
pmlmepriv->ext_capab_ie_len = 10; pmlmepriv->ext_capab_ie_len = 10;
rtw_set_ie(pnetwork->IEs + pnetwork->IELength, EID_EXTCapability, 8, pmlmepriv->ext_capab_ie_data, &len); rtw_set_ie(pnetwork->IEs + pnetwork->IELength, WLAN_EID_EXT_CAPABILITY, 8, pmlmepriv->ext_capab_ie_data, &len);
pnetwork->IELength += pmlmepriv->ext_capab_ie_len; pnetwork->IELength += pmlmepriv->ext_capab_ie_len;
/* VHT Capabilities element */ /* VHT Capabilities element */
@ -1103,9 +1103,9 @@ void rtw_vht_ies_detach(_adapter *padapter, WLAN_BSSID_EX *pnetwork)
{ {
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
rtw_remove_bcn_ie(padapter, pnetwork, EID_EXTCapability); rtw_remove_bcn_ie(padapter, pnetwork, WLAN_EID_EXT_CAPABILITY);
rtw_remove_bcn_ie(padapter, pnetwork, EID_VHTCapability); rtw_remove_bcn_ie(padapter, pnetwork, WLAN_EID_VHT_CAPABILITY);
rtw_remove_bcn_ie(padapter, pnetwork, EID_VHTOperation); rtw_remove_bcn_ie(padapter, pnetwork, WLAN_EID_VHT_OPERATION);
pmlmepriv->vhtpriv.vht_option = _FALSE; pmlmepriv->vhtpriv.vht_option = _FALSE;
} }
@ -1123,7 +1123,7 @@ void rtw_check_for_vht20(_adapter *adapter, u8 *ies, int ies_len)
int vht_op_ielen; int vht_op_ielen;
RTW_INFO(FUNC_ADPT_FMT" vht80 is not allowed without ht40\n", FUNC_ADPT_ARG(adapter)); RTW_INFO(FUNC_ADPT_FMT" vht80 is not allowed without ht40\n", FUNC_ADPT_ARG(adapter));
vht_op_ie = rtw_get_ie(ies, EID_VHTOperation, &vht_op_ielen, ies_len); vht_op_ie = rtw_get_ie(ies, WLAN_EID_VHT_OPERATION, &vht_op_ielen, ies_len);
if (vht_op_ie && vht_op_ielen) { if (vht_op_ie && vht_op_ielen) {
RTW_INFO(FUNC_ADPT_FMT" switch to vht20\n", FUNC_ADPT_ARG(adapter)); RTW_INFO(FUNC_ADPT_FMT" switch to vht20\n", FUNC_ADPT_ARG(adapter));
SET_VHT_OPERATION_ELE_CHL_WIDTH(vht_op_ie + 2, 0); SET_VHT_OPERATION_ELE_CHL_WIDTH(vht_op_ie + 2, 0);

View File

@ -2691,7 +2691,7 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta
bwmode_update_check(padapter, pIE); bwmode_update_check(padapter, pIE);
break; break;
#ifdef CONFIG_80211AC_VHT #ifdef CONFIG_80211AC_VHT
case EID_OpModeNotification: case WLAN_EID_OPMODE_NOTIF:
rtw_process_vht_op_mode_notify(padapter, pIE->data, psta); rtw_process_vht_op_mode_notify(padapter, pIE->data, psta);
break; break;
#endif /* CONFIG_80211AC_VHT */ #endif /* CONFIG_80211AC_VHT */
@ -3254,7 +3254,7 @@ unsigned char get_vht_mu_bfer_cap(u8 *pframe, uint len)
switch (pIE->ElementID) { switch (pIE->ElementID) {
case EID_VHTCapability: case WLAN_EID_VHT_CAPABILITY:
mu_bfer = GET_VHT_CAPABILITY_ELE_MU_BFER(pIE->data); mu_bfer = GET_VHT_CAPABILITY_ELE_MU_BFER(pIE->data);
break; break;
default: default:

View File

@ -318,83 +318,6 @@ static inline int IsFrameTypeData(unsigned char *pframe)
#define _FIXED_IE_LENGTH_ _BEACON_IE_OFFSET_ #define _FIXED_IE_LENGTH_ _BEACON_IE_OFFSET_
typedef enum _ELEMENT_ID {
EID_SsId = 0, /* service set identifier (0:32) */
EID_SupRates = 1, /* supported rates (1:8) */
EID_FHParms = 2, /* FH parameter set (5) */
EID_DSParms = 3, /* DS parameter set (1) */
EID_CFParms = 4, /* CF parameter set (6) */
EID_Tim = 5, /* Traffic Information Map (4:254) */
EID_IbssParms = 6, /* IBSS parameter set (2) */
EID_Country = 7, /* */
/* Form 7.3.2: Information elements in 802.11E/D13.0, page 46. */
EID_QBSSLoad = 11,
EID_EDCAParms = 12,
EID_TSpec = 13,
EID_TClass = 14,
EID_Schedule = 15,
/* */
EID_Ctext = 16, /* challenge text*/
EID_POWER_CONSTRAINT = 32, /* Power Constraint*/
/* vivi for WIFITest, 802.11h AP, 20100427 */
/* 2010/12/26 MH The definition we can declare always!! */
EID_PowerCap = 33,
EID_SupportedChannels = 36,
EID_ChlSwitchAnnounce = 37,
EID_MeasureRequest = 38, /* Measurement Request */
EID_MeasureReport = 39, /* Measurement Report */
EID_ERPInfo = 42,
/* Form 7.3.2: Information elements in 802.11E/D13.0, page 46. */
EID_TSDelay = 43,
EID_TCLASProc = 44,
EID_HTCapability = 45,
EID_QoSCap = 46,
/* */
EID_WPA2 = 48,
EID_ExtSupRates = 50,
EID_FTIE = 55, /* Defined in 802.11r */
EID_Timeout = 56, /* Defined in 802.11r */
EID_SupRegulatory = 59, /* Supported Requlatory Classes 802.11y */
EID_HTInfo = 61,
EID_SecondaryChnlOffset = 62,
EID_BSSCoexistence = 72, /* 20/40 BSS Coexistence */
EID_BSSIntolerantChlReport = 73,
EID_OBSS = 74, /* Overlapping BSS Scan Parameters */
EID_LinkIdentifier = 101, /* Defined in 802.11z */
EID_WakeupSchedule = 102, /* Defined in 802.11z */
EID_ChnlSwitchTimeing = 104, /* Defined in 802.11z */
EID_PTIControl = 105, /* Defined in 802.11z */
EID_PUBufferStatus = 106, /* Defined in 802.11z */
EID_EXTCapability = 127, /* Extended Capabilities */
/* From S19:Aironet IE and S21:AP IP address IE in CCX v1.13, p16 and p18. */
EID_Aironet = 133, /* 0x85: Aironet Element for Cisco CCX */
EID_CiscoIP = 149, /* 0x95: IP Address IE for Cisco CCX */
EID_CellPwr = 150, /* 0x96: Cell Power Limit IE. Ref. 0x96. */
EID_CCKM = 156,
EID_Vendor = 221, /* 0xDD: Vendor Specific */
EID_WAPI = 68,
EID_VHTCapability = 191, /* Based on 802.11ac D2.0 */
EID_VHTOperation = 192, /* Based on 802.11ac D2.0 */
EID_AID = 197, /* Based on 802.11ac D4.0 */
EID_OpModeNotification = 199, /* Based on 802.11ac D3.0 */
} ELEMENT_ID, *PELEMENT_ID;
/* --------------------------------------------------------------------------- /* ---------------------------------------------------------------------------
Below is the fixed elements... Below is the fixed elements...
-----------------------------------------------------------------------------*/ -----------------------------------------------------------------------------*/

View File

@ -367,7 +367,7 @@ static inline char *iwe_stream_protocol_process(_adapter *padapter,
#ifdef CONFIG_80211AC_VHT #ifdef CONFIG_80211AC_VHT
/* parsing VHT_CAP_IE */ /* parsing VHT_CAP_IE */
if(padapter->registrypriv.wireless_mode & WIRELESS_11AC) { if(padapter->registrypriv.wireless_mode & WIRELESS_11AC) {
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], EID_VHTCapability, &vht_ielen, pnetwork->network.IELength - ie_offset); p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], WLAN_EID_VHT_CAPABILITY, &vht_ielen, pnetwork->network.IELength - ie_offset);
if (p && vht_ielen > 0) if (p && vht_ielen > 0)
vht_cap = _TRUE; vht_cap = _TRUE;
} }
@ -436,7 +436,7 @@ static inline char *iwe_stream_rate_process(_adapter *padapter,
#ifdef CONFIG_80211AC_VHT #ifdef CONFIG_80211AC_VHT
/* parsing VHT_CAP_IE */ /* parsing VHT_CAP_IE */
if(padapter->registrypriv.wireless_mode & WIRELESS_11AC){ if(padapter->registrypriv.wireless_mode & WIRELESS_11AC){
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], EID_VHTCapability, &vht_ielen, pnetwork->network.IELength - ie_offset); p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], WLAN_EID_VHT_CAPABILITY, &vht_ielen, pnetwork->network.IELength - ie_offset);
if (p && vht_ielen > 0) { if (p && vht_ielen > 0) {
u8 mcs_map[2]; u8 mcs_map[2];