mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-11-22 05:25:03 +00:00
Replace custom definitions with existing
ones at linux/ieee80211.h. port 69fea2b4e59c52844cf5196c9c81157792d194fb port 6ee9e6ee5c486f68e424185e133984d0a6ae662c port f179515da9780c4cd37bee76c3cbb6f7364451d6 port aaa0bc19facf31426ca57267edc681a42dbd1ee1 port 99bb776980eeb231558a6ede0a1dd8d1a6e8ec0c port 00f0b682841337c4d2e7dd2e75d86acb6b7ce2d8 port fc41e9618fc65bea5d615d487ca7de3b0e1110bc port 3359e2927b321c635d9529bab1f087ac39c82227 port 38caee0abe9db1db387e7bea60a980eda22e9fa6 port b05cc3a9156b6b674904016d9c213e71c149f4c2
This commit is contained in:
parent
e73d0db27b
commit
3555bdb258
@ -2429,10 +2429,10 @@ int rtw_mesh_peer_establish(_adapter *adapter, struct mesh_plink_ent *plink, str
|
||||
|
||||
rtw_ap_parse_sta_capability(adapter, sta, plink->rx_conf_ies);
|
||||
|
||||
if (rtw_ap_parse_sta_supported_rates(adapter, sta, tlv_ies, tlv_ieslen) != _STATS_SUCCESSFUL_)
|
||||
if (rtw_ap_parse_sta_supported_rates(adapter, sta, tlv_ies, tlv_ieslen) != WLAN_STATUS_SUCCESS)
|
||||
goto exit;
|
||||
|
||||
if (rtw_ap_parse_sta_security_ie(adapter, sta, &elems) != _STATS_SUCCESSFUL_)
|
||||
if (rtw_ap_parse_sta_security_ie(adapter, sta, &elems) != WLAN_STATUS_SUCCESS)
|
||||
goto exit;
|
||||
|
||||
rtw_ap_parse_sta_wmm_ie(adapter, sta, tlv_ies, tlv_ieslen);
|
||||
|
100
core/rtw_ap.c
100
core/rtw_ap.c
@ -102,7 +102,7 @@ static void update_BCNTIM(_adapter *padapter)
|
||||
u8 *p, *dst_ie, *premainder_ie = NULL, *pbackup_remainder_ie = NULL;
|
||||
uint offset, tmp_len, tim_ielen, tim_ie_offset, remainder_ielen;
|
||||
|
||||
p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, _TIM_IE_, &tim_ielen, pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_);
|
||||
p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, WLAN_EID_DS_PARAMS, &tim_ielen, pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_);
|
||||
if (p != NULL && tim_ielen > 0) {
|
||||
tim_ielen += 2;
|
||||
|
||||
@ -121,12 +121,12 @@ static void update_BCNTIM(_adapter *padapter)
|
||||
offset = _FIXED_IE_LENGTH_;
|
||||
|
||||
/* get ssid_ie len */
|
||||
p = rtw_get_ie(pie + _BEACON_IE_OFFSET_, _SSID_IE_, &tmp_len, (pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(pie + _BEACON_IE_OFFSET_, WLAN_EID_SSID, &tmp_len, (pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p != NULL)
|
||||
offset += tmp_len + 2;
|
||||
|
||||
/*get supported rates len*/
|
||||
p = rtw_get_ie(pie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &tmp_len, (pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(pie + _BEACON_IE_OFFSET_, WLAN_EID_SUPP_RATES, &tmp_len, (pnetwork_mlmeext->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p != NULL)
|
||||
offset += tmp_len + 2;
|
||||
|
||||
@ -600,7 +600,7 @@ void expire_timeout_chk(_adapter *padapter)
|
||||
|
||||
/* to update bcn with tim_bitmap for this station */
|
||||
rtw_tim_map_set(padapter, pstapriv->tim_bitmap, psta->cmn.aid);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE);
|
||||
|
||||
if (!pmlmeext->active_keep_alive_check)
|
||||
continue;
|
||||
@ -1505,7 +1505,7 @@ static void rtw_ap_check_scan(_adapter *padapter)
|
||||
ie = pbss->IEs;
|
||||
|
||||
/*check if HT CAP INFO IE exists or not*/
|
||||
pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _HT_CAPABILITY_IE_, &ie_len, (pbss->IELength - _BEACON_IE_OFFSET_));
|
||||
pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_HT_CAPABILITY, &ie_len, (pbss->IELength - _BEACON_IE_OFFSET_));
|
||||
if (pbuf == NULL) {
|
||||
/* HT CAP INFO IE don't exist, it is b/g mode bss.*/
|
||||
|
||||
@ -1814,11 +1814,11 @@ update_beacon:
|
||||
/* AP is not starting a 40 MHz BSS in presence of an 802.11g BSS. */
|
||||
mlme->ht_op_mode &= (~HT_INFO_OPERATION_MODE_OP_MODE_MASK);
|
||||
mlme->ht_op_mode |= OP_MODE_MAY_BE_LEGACY_STAS;
|
||||
update_beacon(pdvobj->padapters[i], _HT_ADD_INFO_IE_, NULL, _FALSE);
|
||||
update_beacon(pdvobj->padapters[i], WLAN_EID_HT_OPERATION, NULL, _FALSE);
|
||||
}
|
||||
#endif
|
||||
|
||||
update_beacon(pdvobj->padapters[i], _TIM_IE_, NULL, _FALSE);
|
||||
update_beacon(pdvobj->padapters[i], WLAN_EID_DS_PARAMS, NULL, _FALSE);
|
||||
}
|
||||
|
||||
if (mlme_act != MLME_OPCH_SWITCH
|
||||
@ -1963,7 +1963,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
cap = RTW_GET_LE16(ie);
|
||||
|
||||
/* SSID */
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_SSID, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p && ie_len > 0) {
|
||||
memset(&pbss_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len);
|
||||
@ -1989,7 +1989,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
/* chnnel */
|
||||
channel = 0;
|
||||
pbss_network->Configuration.Length = 0;
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _DSSET_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_DS_PARAMS, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p && ie_len > 0)
|
||||
channel = *(p + 2);
|
||||
|
||||
@ -1998,10 +1998,10 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
|
||||
memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
|
||||
/* get supported rates */
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_SUPP_RATES, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p != NULL) {
|
||||
if (padapter->registrypriv.wireless_mode == WIRELESS_11B) {
|
||||
ret_rm = rtw_remove_ie_g_rate(ie , &len, _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_);
|
||||
ret_rm = rtw_remove_ie_g_rate(ie , &len, _BEACON_IE_OFFSET_, WLAN_EID_SUPP_RATES);
|
||||
RTW_DBG("%s, rtw_remove_ie_g_rate=%d\n", __FUNCTION__,ret_rm);
|
||||
ie_len = ie_len - ret_rm;
|
||||
pbss_network->IELength=pbss_network->IELength - ret_rm;
|
||||
@ -2012,12 +2012,12 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
}
|
||||
|
||||
/* get ext_supported rates */
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _EXT_SUPPORTEDRATES_IE_, &ie_len, pbss_network->IELength - _BEACON_IE_OFFSET_);
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_EXT_SUPP_RATES, &ie_len, pbss_network->IELength - _BEACON_IE_OFFSET_);
|
||||
if (p != NULL) {
|
||||
if (padapter->registrypriv.wireless_mode == WIRELESS_11B) {
|
||||
pbss_network->IELength = pbss_network->IELength-*(p+1) -2;
|
||||
ret_rm = rtw_ies_remove_ie(ie , &len,_BEACON_IE_OFFSET_,
|
||||
_EXT_SUPPORTEDRATES_IE_,NULL,0);
|
||||
WLAN_EID_EXT_SUPP_RATES,NULL,0);
|
||||
RTW_DBG("%s, remove_ie of ext_supported rates =%d\n", __FUNCTION__, ret_rm);
|
||||
} else {
|
||||
memcpy(supportRate + supportRateNum, p + 2, ie_len);
|
||||
@ -2032,12 +2032,12 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
|
||||
|
||||
/* parsing ERP_IE */
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _ERPINFO_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_ERP_INFO, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p && ie_len > 0) {
|
||||
if(padapter->registrypriv.wireless_mode == WIRELESS_11B ) {
|
||||
|
||||
pbss_network->IELength = pbss_network->IELength - *(p+1) - 2;
|
||||
ret_rm = rtw_ies_remove_ie(ie , &len, _BEACON_IE_OFFSET_, _ERPINFO_IE_,NULL,0);
|
||||
ret_rm = rtw_ies_remove_ie(ie , &len, _BEACON_IE_OFFSET_, WLAN_EID_ERP_INFO,NULL,0);
|
||||
RTW_DBG("%s, remove_ie of ERP_IE=%d\n", __FUNCTION__, ret_rm);
|
||||
} else
|
||||
ERP_IE_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)p);
|
||||
@ -2058,7 +2058,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
pairwise_cipher = 0;
|
||||
psecuritypriv->wpa2_group_cipher = _NO_PRIVACY_;
|
||||
psecuritypriv->wpa2_pairwise_cipher = _NO_PRIVACY_;
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _RSN_IE_2_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_RSN, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p && ie_len > 0) {
|
||||
if (rtw_parse_wpa2_ie(p, ie_len + 2, &group_cipher, &pairwise_cipher, &akm, &mfp_opt) == _SUCCESS) {
|
||||
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
|
||||
@ -2131,7 +2131,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
psecuritypriv->wpa_group_cipher = _NO_PRIVACY_;
|
||||
psecuritypriv->wpa_pairwise_cipher = _NO_PRIVACY_;
|
||||
for (p = ie + _BEACON_IE_OFFSET_; ; p += (ie_len + 2)) {
|
||||
p = rtw_get_ie(p, _SSN_IE_1_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_ - (ie_len + 2)));
|
||||
p = rtw_get_ie(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_ - (ie_len + 2)));
|
||||
if ((p) && (_rtw_memcmp(p + 2, RTW_WPA_OUI, 4))) {
|
||||
if (rtw_parse_wpa_ie(p, ie_len + 2, &group_cipher, &pairwise_cipher, NULL) == _SUCCESS) {
|
||||
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
|
||||
@ -2213,7 +2213,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
#endif
|
||||
if (pregistrypriv->wmm_enable) {
|
||||
for (p = ie + _BEACON_IE_OFFSET_; ; p += (ie_len + 2)) {
|
||||
p = rtw_get_ie(p, _VENDOR_SPECIFIC_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_ - (ie_len + 2)));
|
||||
p = rtw_get_ie(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_ - (ie_len + 2)));
|
||||
if ((p) && _rtw_memcmp(p + 2, WMM_PARA_IE, 6)) {
|
||||
pmlmepriv->qospriv.qos_option = 1;
|
||||
|
||||
@ -2238,7 +2238,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
if(padapter->registrypriv.ht_enable &&
|
||||
is_supported_ht(padapter->registrypriv.wireless_mode)) {
|
||||
/* parsing HT_CAP_IE */
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _HT_CAPABILITY_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_HT_CAPABILITY, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p && ie_len > 0) {
|
||||
u8 rf_type = 0;
|
||||
HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor = MAX_AMPDU_FACTOR_64K;
|
||||
@ -2354,7 +2354,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
}
|
||||
|
||||
/* parsing HT_INFO_IE */
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _HT_ADD_INFO_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_HT_OPERATION, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p && ie_len > 0) {
|
||||
pHT_info_ie = p;
|
||||
if (channel == 0)
|
||||
@ -2876,7 +2876,7 @@ u8 rtw_ap_bmc_frames_hdl(_adapter *padapter)
|
||||
if ((rtw_tim_map_is_set(padapter, pstapriv->tim_bitmap, 0)) && (psta_bmc->sleepq_len > 0)) {
|
||||
int tx_counts = 0;
|
||||
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _FALSE, "update TIM with TIB=1");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _FALSE, "update TIM with TIB=1");
|
||||
|
||||
RTW_INFO("sleepq_len of bmc_sta = %d\n", psta_bmc->sleepq_len);
|
||||
|
||||
@ -2926,7 +2926,7 @@ u8 rtw_ap_bmc_frames_hdl(_adapter *padapter)
|
||||
|
||||
if (update_tim == _TRUE) {
|
||||
RTW_INFO("clear TIB\n");
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "bmc sleepq and HIQ empty");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "bmc sleepq and HIQ empty");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3006,13 +3006,13 @@ static void update_bcn_ext_capab_ie(_adapter *padapter)
|
||||
u8 *ie = pnetwork->IEs;
|
||||
u8 null_extcap_data[8] = {0};
|
||||
|
||||
pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _EXT_CAP_IE_, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
|
||||
pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_EXT_CAPABILITY , &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
|
||||
if (pbuf && ie_len > 0)
|
||||
rtw_remove_bcn_ie(padapter, pnetwork, _EXT_CAP_IE_);
|
||||
rtw_remove_bcn_ie(padapter, pnetwork, WLAN_EID_EXT_CAPABILITY );
|
||||
|
||||
if ((pmlmepriv->ext_capab_ie_len > 0) &&
|
||||
(_rtw_memcmp(pmlmepriv->ext_capab_ie_data, null_extcap_data, sizeof(null_extcap_data)) == _FALSE))
|
||||
rtw_add_bcn_ie(padapter, pnetwork, _EXT_CAP_IE_, pmlmepriv->ext_capab_ie_data, pmlmepriv->ext_capab_ie_len);
|
||||
rtw_add_bcn_ie(padapter, pnetwork, WLAN_EID_EXT_CAPABILITY , pmlmepriv->ext_capab_ie_data, pmlmepriv->ext_capab_ie_len);
|
||||
|
||||
}
|
||||
|
||||
@ -3031,7 +3031,7 @@ static void update_bcn_erpinfo_ie(_adapter *padapter)
|
||||
return;
|
||||
|
||||
/* parsing ERP_IE */
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _ERPINFO_IE_, &len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_ERP_INFO, &len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p && len > 0) {
|
||||
PNDIS_802_11_VARIABLE_IEs pIE = (PNDIS_802_11_VARIABLE_IEs)p;
|
||||
|
||||
@ -3084,7 +3084,7 @@ static void update_bcn_htinfo_ie(_adapter *padapter)
|
||||
pmlmepriv->num_sta_40mhz_intolerant, pmlmepriv->ht_20mhz_width_req, pmlmepriv->ht_intolerant_ch_reported, atomic_read(&pmlmepriv->olbc));
|
||||
|
||||
/*parsing HT_INFO_IE, currently only update ht_op_mode - pht_info->infos[1] & pht_info->infos[2] for wifi logo test*/
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _HT_ADD_INFO_IE_, &len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_HT_OPERATION, &len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p && len > 0) {
|
||||
struct HT_info_element *pht_info = NULL;
|
||||
|
||||
@ -3262,27 +3262,27 @@ void _update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx, const char *ta
|
||||
_enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL);
|
||||
|
||||
switch (ie_id) {
|
||||
case _TIM_IE_:
|
||||
case WLAN_EID_DS_PARAMS:
|
||||
update_BCNTIM(padapter);
|
||||
break;
|
||||
|
||||
case _ERPINFO_IE_:
|
||||
case WLAN_EID_ERP_INFO:
|
||||
update_bcn_erpinfo_ie(padapter);
|
||||
break;
|
||||
|
||||
case _HT_CAPABILITY_IE_:
|
||||
case WLAN_EID_HT_CAPABILITY:
|
||||
update_bcn_htcap_ie(padapter);
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
update_bcn_rsn_ie(padapter);
|
||||
break;
|
||||
|
||||
case _HT_ADD_INFO_IE_:
|
||||
case WLAN_EID_HT_OPERATION:
|
||||
update_bcn_htinfo_ie(padapter);
|
||||
break;
|
||||
|
||||
case _EXT_CAP_IE_:
|
||||
case WLAN_EID_EXT_CAPABILITY :
|
||||
update_bcn_ext_capab_ie(padapter);
|
||||
break;
|
||||
|
||||
@ -3294,7 +3294,7 @@ void _update_beacon(_adapter *padapter, u8 ie_id, u8 *oui, u8 tx, const char *ta
|
||||
break;
|
||||
#endif
|
||||
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
update_bcn_vendor_spec_ie(padapter, oui);
|
||||
break;
|
||||
|
||||
@ -3377,7 +3377,7 @@ void rtw_process_public_act_bsscoex(_adapter *padapter, u8 *pframe, uint frame_l
|
||||
|
||||
if (beacon_updated) {
|
||||
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_HT_OPERATION, NULL, _TRUE);
|
||||
|
||||
associated_stainfo_update(padapter, psta, STA_INFO_UPDATE_BW);
|
||||
}
|
||||
@ -3588,7 +3588,7 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||
|
||||
if (pmlmepriv->num_sta_non_erp == 1) {
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, _ERPINFO_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, WLAN_EID_ERP_INFO, NULL, _FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3600,7 +3600,7 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||
|
||||
if (pmlmepriv->num_sta_non_erp == 0) {
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, _ERPINFO_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, WLAN_EID_ERP_INFO, NULL, _FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3698,8 +3698,8 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
||||
}
|
||||
|
||||
if (rtw_ht_operation_update(padapter) > 0) {
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, WLAN_EID_HT_CAPABILITY, NULL, _FALSE);
|
||||
update_beacon(padapter, WLAN_EID_HT_OPERATION, NULL, _FALSE);
|
||||
beacon_updated = _TRUE;
|
||||
}
|
||||
}
|
||||
@ -3739,7 +3739,7 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
||||
if (rtw_tim_map_is_set(padapter, pstapriv->tim_bitmap, psta->cmn.aid)) {
|
||||
rtw_tim_map_clear(padapter, pstapriv->tim_bitmap, psta->cmn.aid);
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _FALSE);
|
||||
}
|
||||
|
||||
if (psta->no_short_preamble_set) {
|
||||
@ -3755,7 +3755,7 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
||||
pmlmepriv->num_sta_non_erp--;
|
||||
if (pmlmepriv->num_sta_non_erp == 0) {
|
||||
beacon_updated = _TRUE;
|
||||
update_beacon(padapter, _ERPINFO_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, WLAN_EID_ERP_INFO, NULL, _FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3792,8 +3792,8 @@ u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta)
|
||||
}
|
||||
|
||||
if (rtw_ht_operation_update(padapter) > 0) {
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, WLAN_EID_HT_CAPABILITY, NULL, _FALSE);
|
||||
update_beacon(padapter, WLAN_EID_HT_OPERATION, NULL, _FALSE);
|
||||
}
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
|
||||
@ -4311,7 +4311,7 @@ void rtw_ap_update_bss_chbw(_adapter *adapter, WLAN_BSSID_EX *bss, u8 ch, u8 bw,
|
||||
change_band = _TRUE;
|
||||
|
||||
/* update channel in IE */
|
||||
p = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), _DSSET_IE_, &ie_len, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs)));
|
||||
p = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), WLAN_EID_DS_PARAMS, &ie_len, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs)));
|
||||
if (p && ie_len > 0)
|
||||
*(p + 2) = ch;
|
||||
|
||||
@ -5102,7 +5102,7 @@ void tx_beacon_handlder(struct dvobj_priv *pdvobj)
|
||||
if (!check_fwstate(&padapter->mlmepriv, WIFI_OP_CH_SWITCHING)
|
||||
&& !IS_CH_WAITING(adapter_to_rfctl(padapter))
|
||||
) {
|
||||
/*update_beacon(padapter, _TIM_IE_, NULL, _FALSE);*/
|
||||
/*update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _FALSE);*/
|
||||
/*issue_beacon(padapter, 0);*/
|
||||
send_beacon(padapter);
|
||||
}
|
||||
@ -5144,13 +5144,13 @@ u16 rtw_ap_parse_sta_supported_rates(_adapter *adapter, struct sta_info *sta, u8
|
||||
u8 rate_set[12];
|
||||
u8 rate_num;
|
||||
int i;
|
||||
u16 status = _STATS_SUCCESSFUL_;
|
||||
u16 status = WLAN_STATUS_SUCCESS;
|
||||
|
||||
rtw_ies_get_supported_rate(tlv_ies, tlv_ies_len, rate_set, &rate_num);
|
||||
if (rate_num == 0) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" sta "MAC_FMT" with no supported rate\n"
|
||||
, FUNC_ADPT_ARG(adapter), MAC_ARG(sta->cmn.mac_addr));
|
||||
status = _STATS_FAILURE_;
|
||||
status = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@ -5183,7 +5183,7 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
|
||||
int group_cipher = 0, pairwise_cipher = 0;
|
||||
u32 akm = 0;
|
||||
u8 mfp_opt = MFP_NO;
|
||||
u16 status = _STATS_SUCCESSFUL_;
|
||||
u16 status = WLAN_STATUS_SUCCESS;
|
||||
|
||||
sta->dot8021xalg = 0;
|
||||
sta->wpa_psk = 0;
|
||||
@ -5268,7 +5268,7 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
|
||||
}
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
if (status != _STATS_SUCCESSFUL_)
|
||||
if (status != WLAN_STATUS_SUCCESS)
|
||||
goto exit;
|
||||
|
||||
if (!MLME_IS_AP(adapter))
|
||||
@ -5306,7 +5306,7 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
|
||||
|
||||
if (!selected_registrar) {
|
||||
RTW_INFO("selected_registrar is _FALSE , or AP is not ready to do WPS\n");
|
||||
status = _STATS_UNABLE_HANDLE_STA_;
|
||||
status = WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
@ -1470,7 +1470,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
||||
#ifdef CONFIG_80211N_HT
|
||||
phtpriv->ht_option = _FALSE;
|
||||
if (pregistrypriv->ht_enable && is_supported_ht(pregistrypriv->wireless_mode)) {
|
||||
ptmp = rtw_get_ie(&pnetwork->network.IEs[12], _HT_CAPABILITY_IE_, &tmp_len, pnetwork->network.IELength - 12);
|
||||
ptmp = rtw_get_ie(&pnetwork->network.IEs[12], WLAN_EID_HT_CAPABILITY, &tmp_len, pnetwork->network.IELength - 12);
|
||||
if (ptmp && tmp_len > 0) {
|
||||
/* Added by Albert 2010/06/23 */
|
||||
/* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
|
||||
@ -3231,8 +3231,8 @@ static void dynamic_update_bcn_check(_adapter *padapter)
|
||||
&& _FALSE == atomic_read(&pmlmepriv->olbc_ht)) {
|
||||
|
||||
if (rtw_ht_operation_update(padapter) > 0) {
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_HT_CAPABILITY, NULL, _FALSE);
|
||||
update_beacon(padapter, WLAN_EID_HT_OPERATION, NULL, _TRUE);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
@ -3245,8 +3245,8 @@ static void dynamic_update_bcn_check(_adapter *padapter)
|
||||
&& _FALSE != atomic_read(&pmlmepriv->olbc_ht)) {
|
||||
|
||||
if (rtw_ht_operation_update(padapter) > 0) {
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_HT_CAPABILITY, NULL, _FALSE);
|
||||
update_beacon(padapter, WLAN_EID_HT_OPERATION, NULL, _TRUE);
|
||||
|
||||
}
|
||||
atomic_set(&pmlmepriv->olbc, _FALSE);
|
||||
@ -4147,7 +4147,7 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter)
|
||||
rtw_tim_map_clear(padapter, pstapriv->sta_dz_bitmap, 0);
|
||||
|
||||
if (update_tim == _TRUE)
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "bmc sleepq and HIQ empty");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "bmc sleepq and HIQ empty");
|
||||
} else /* re check again */
|
||||
rtw_chk_hi_queue_cmd(padapter);
|
||||
|
||||
|
@ -530,7 +530,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
||||
ie += 2;
|
||||
|
||||
/* SSID */
|
||||
ie = rtw_set_ie(ie, _SSID_IE_, pdev_network->Ssid.SsidLength, pdev_network->Ssid.Ssid, &sz);
|
||||
ie = rtw_set_ie(ie, WLAN_EID_SSID, pdev_network->Ssid.SsidLength, pdev_network->Ssid.Ssid, &sz);
|
||||
|
||||
/* supported rates */
|
||||
if (pregistrypriv->wireless_mode == WIRELESS_11ABGN) {
|
||||
@ -551,21 +551,21 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
||||
rateLen = rtw_get_rateset_len(pdev_network->SupportedRates);
|
||||
|
||||
if (rateLen > 8) {
|
||||
ie = rtw_set_ie(ie, _SUPPORTEDRATES_IE_, 8, pdev_network->SupportedRates, &sz);
|
||||
/* ie = rtw_set_ie(ie, _EXT_SUPPORTEDRATES_IE_, (rateLen - 8), (pdev_network->SupportedRates + 8), &sz); */
|
||||
ie = rtw_set_ie(ie, WLAN_EID_SUPP_RATES, 8, pdev_network->SupportedRates, &sz);
|
||||
/* ie = rtw_set_ie(ie, WLAN_EID_EXT_SUPP_RATES, (rateLen - 8), (pdev_network->SupportedRates + 8), &sz); */
|
||||
} else
|
||||
ie = rtw_set_ie(ie, _SUPPORTEDRATES_IE_, rateLen, pdev_network->SupportedRates, &sz);
|
||||
ie = rtw_set_ie(ie, WLAN_EID_SUPP_RATES, rateLen, pdev_network->SupportedRates, &sz);
|
||||
|
||||
/* DS parameter set */
|
||||
ie = rtw_set_ie(ie, _DSSET_IE_, 1, (u8 *)&(pdev_network->Configuration.DSConfig), &sz);
|
||||
ie = rtw_set_ie(ie, WLAN_EID_DS_PARAMS, 1, (u8 *)&(pdev_network->Configuration.DSConfig), &sz);
|
||||
|
||||
|
||||
/* IBSS Parameter Set */
|
||||
|
||||
ie = rtw_set_ie(ie, _IBSS_PARA_IE_, 2, (u8 *)&(pdev_network->Configuration.ATIMWindow), &sz);
|
||||
ie = rtw_set_ie(ie, WLAN_EID_IBSS_PARAMS, 2, (u8 *)&(pdev_network->Configuration.ATIMWindow), &sz);
|
||||
|
||||
if (rateLen > 8)
|
||||
ie = rtw_set_ie(ie, _EXT_SUPPORTEDRATES_IE_, (rateLen - 8), (pdev_network->SupportedRates + 8), &sz);
|
||||
ie = rtw_set_ie(ie, WLAN_EID_EXT_SUPP_RATES, (rateLen - 8), (pdev_network->SupportedRates + 8), &sz);
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
/* HT Cap. */
|
||||
@ -942,8 +942,8 @@ int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len)
|
||||
while (cnt < in_len) {
|
||||
authmode = in_ie[cnt];
|
||||
|
||||
/* if(authmode==_WAPI_IE_) */
|
||||
if (authmode == _WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt + 6], wapi_oui1, 4) == _TRUE ||
|
||||
/* if(authmode==WLAN_EID_BSS_AC_ACCESS_DELAY) */
|
||||
if (authmode == WLAN_EID_BSS_AC_ACCESS_DELAY && (_rtw_memcmp(&in_ie[cnt + 6], wapi_oui1, 4) == _TRUE ||
|
||||
_rtw_memcmp(&in_ie[cnt + 6], wapi_oui2, 4) == _TRUE)) {
|
||||
if (wapi_ie)
|
||||
memcpy(wapi_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
||||
@ -1124,7 +1124,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_at
|
||||
if (len_attr)
|
||||
*len_attr = 0;
|
||||
|
||||
if ((wps_ie[0] != _VENDOR_SPECIFIC_IE_) ||
|
||||
if ((wps_ie[0] != WLAN_EID_VENDOR_SPECIFIC) ||
|
||||
(_rtw_memcmp(wps_ie + 2, wps_oui , 4) != _TRUE))
|
||||
return attr_ptr;
|
||||
|
||||
@ -1413,7 +1413,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
||||
elems->vht_op_mode_notify = pos;
|
||||
elems->vht_op_mode_notify_len = elen;
|
||||
break;
|
||||
case _EID_RRM_EN_CAP_IE_:
|
||||
case WLAN_EID_RRM_ENABLED_CAPABILITIES :
|
||||
elems->rm_en_cap = pos;
|
||||
elems->rm_en_cap_len = elen;
|
||||
break;
|
||||
@ -1767,7 +1767,7 @@ void rtw_ies_get_chbw(u8 *ies, int ies_len, u8 *ch, u8 *bw, u8 *offset, u8 ht, u
|
||||
*bw = CHANNEL_WIDTH_20;
|
||||
*offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||
|
||||
p = rtw_get_ie(ies, _DSSET_IE_, &ie_len, ies_len);
|
||||
p = rtw_get_ie(ies, WLAN_EID_DS_PARAMS, &ie_len, ies_len);
|
||||
if (p && ie_len > 0)
|
||||
*ch = *(p + 2);
|
||||
|
||||
@ -1944,7 +1944,7 @@ u32 rtw_get_p2p_merged_ies_len(u8 *in_ie, u32 in_len)
|
||||
while (i < in_len) {
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(in_ie + i);
|
||||
|
||||
if (pIE->ElementID == _VENDOR_SPECIFIC_IE_ && _rtw_memcmp(pIE->data, OUI, 4)) {
|
||||
if (pIE->ElementID == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(pIE->data, OUI, 4)) {
|
||||
len += pIE->Length - 4; /* 4 is P2P OUI length, don't count it in this loop */
|
||||
}
|
||||
|
||||
@ -1978,7 +1978,7 @@ int rtw_p2p_merge_ies(u8 *in_ie, u32 in_len, u8 *merge_ie)
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(in_ie + i);
|
||||
|
||||
/* Take out the rest of P2P OUIs */
|
||||
if (pIE->ElementID == _VENDOR_SPECIFIC_IE_ && _rtw_memcmp(pIE->data, OUI, 4)) {
|
||||
if (pIE->ElementID == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(pIE->data, OUI, 4)) {
|
||||
memcpy(merge_ie, pIE->data + 4, pIE->Length - 4);
|
||||
len += pIE->Length - 4;
|
||||
merge_ie += pIE->Length - 4;
|
||||
|
@ -1190,7 +1190,7 @@ int rtw_is_desired_network(_adapter *adapter, struct wlan_network *pnetwork)
|
||||
bselected = _FALSE;
|
||||
|
||||
if (psecuritypriv->ndisauthtype == Ndis802_11AuthModeWPA2PSK) {
|
||||
p = rtw_get_ie(pnetwork->network.IEs + _BEACON_IE_OFFSET_, _RSN_IE_2_, &ie_len, (pnetwork->network.IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(pnetwork->network.IEs + _BEACON_IE_OFFSET_, WLAN_EID_RSN, &ie_len, (pnetwork->network.IELength - _BEACON_IE_OFFSET_));
|
||||
if (p && ie_len > 0)
|
||||
bselected = _TRUE;
|
||||
else
|
||||
@ -4606,7 +4606,7 @@ void rtw_build_wmm_ie_ht(_adapter *padapter, u8 *out_ie, uint *pout_len)
|
||||
|
||||
if (padapter->mlmepriv.qospriv.qos_option == 0) {
|
||||
out_len = *pout_len;
|
||||
pframe = rtw_set_ie(out_ie + out_len, _VENDOR_SPECIFIC_IE_,
|
||||
pframe = rtw_set_ie(out_ie + out_len, WLAN_EID_VENDOR_SPECIFIC,
|
||||
_WMM_IE_Length_, WMM_IE, pout_len);
|
||||
|
||||
padapter->mlmepriv.qospriv.qos_option = 1;
|
||||
@ -4846,16 +4846,16 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
||||
}
|
||||
#endif/*CONFIG_BEAMFORMING*/
|
||||
|
||||
pframe = rtw_set_ie(out_ie + out_len, _HT_CAPABILITY_IE_,
|
||||
pframe = rtw_set_ie(out_ie + out_len, WLAN_EID_HT_CAPABILITY,
|
||||
sizeof(struct rtw_ieee80211_ht_cap), (unsigned char *)&ht_capie, pout_len);
|
||||
|
||||
phtpriv->ht_option = _TRUE;
|
||||
|
||||
if (in_ie != NULL) {
|
||||
p = rtw_get_ie(in_ie, _HT_ADD_INFO_IE_, &ielen, in_len);
|
||||
p = rtw_get_ie(in_ie, WLAN_EID_HT_OPERATION, &ielen, in_len);
|
||||
if (p && (ielen == sizeof(struct ieee80211_ht_addt_info))) {
|
||||
out_len = *pout_len;
|
||||
pframe = rtw_set_ie(out_ie + out_len, _HT_ADD_INFO_IE_, ielen, p + 2 , pout_len);
|
||||
pframe = rtw_set_ie(out_ie + out_len, WLAN_EID_HT_OPERATION, ielen, p + 2 , pout_len);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4903,7 +4903,7 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len, u8 channel)
|
||||
|
||||
/* check Max Rx A-MPDU Size */
|
||||
len = 0;
|
||||
p = rtw_get_ie(pie + sizeof(NDIS_802_11_FIXED_IEs), _HT_CAPABILITY_IE_, &len, ie_len - sizeof(NDIS_802_11_FIXED_IEs));
|
||||
p = rtw_get_ie(pie + sizeof(NDIS_802_11_FIXED_IEs), WLAN_EID_HT_CAPABILITY, &len, ie_len - sizeof(NDIS_802_11_FIXED_IEs));
|
||||
if (p && len > 0) {
|
||||
pht_capie = (struct rtw_ieee80211_ht_cap *)(p + 2);
|
||||
max_ampdu_sz = (pht_capie->ampdu_params_info & IEEE80211_HT_AMPDU_PARM_FACTOR);
|
||||
@ -4916,7 +4916,7 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len, u8 channel)
|
||||
|
||||
|
||||
len = 0;
|
||||
p = rtw_get_ie(pie + sizeof(NDIS_802_11_FIXED_IEs), _HT_ADD_INFO_IE_, &len, ie_len - sizeof(NDIS_802_11_FIXED_IEs));
|
||||
p = rtw_get_ie(pie + sizeof(NDIS_802_11_FIXED_IEs), WLAN_EID_HT_OPERATION, &len, ie_len - sizeof(NDIS_802_11_FIXED_IEs));
|
||||
if (p && len > 0) {
|
||||
pht_addtinfo = (struct ieee80211_ht_addt_info *)(p + 2);
|
||||
/* todo: */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -261,7 +261,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
|
||||
/* P2P_ATTR_STATUS */
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_STATUS, 1, &status);
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, p2pie, &pattrib->pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen, p2pie, &pattrib->pktlen);
|
||||
|
||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||
|
||||
@ -361,7 +361,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
|
||||
RTW_PUT_BE16(wpsie + wpsielen, config_method);
|
||||
wpsielen += 2;
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen);
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
wfdielen = build_provdisc_resp_wfd_ie(pwdinfo, pframe);
|
||||
@ -451,7 +451,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
|
||||
|
||||
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, p2pie, &(pattrib->pktlen));
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen, p2pie, &(pattrib->pktlen));
|
||||
|
||||
|
||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||
@ -510,7 +510,7 @@ u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
/* go_add_noa_attr(pwdinfo); */
|
||||
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||
pbuf = rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2pie, &len);
|
||||
|
||||
|
||||
return len;
|
||||
@ -626,7 +626,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -738,7 +738,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -929,7 +929,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
||||
#endif /* CONFIG_TDLS*/
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
pbuf = rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1035,7 +1035,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1134,7 +1134,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1233,7 +1233,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1333,7 +1333,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1433,7 +1433,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
pbuf = rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1546,7 +1546,7 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
|
||||
}
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1659,7 +1659,7 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
|
||||
}
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1759,7 +1759,7 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1858,7 +1858,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -2071,7 +2071,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
p2pielen += go_add_group_info_attr(pwdinfo, p2pie + p2pielen);
|
||||
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||
pbuf = rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2pie, &len);
|
||||
|
||||
|
||||
return len;
|
||||
@ -2200,7 +2200,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
|
||||
|
||||
}
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||
pbuf = rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2pie, &len);
|
||||
|
||||
|
||||
return len;
|
||||
@ -2235,7 +2235,7 @@ u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 status
|
||||
/* Value: */
|
||||
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||
pbuf = rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2pie, &len);
|
||||
|
||||
return len;
|
||||
|
||||
@ -2256,7 +2256,7 @@ u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||
u32 p2pielen = 0;
|
||||
int ssid_len = 0, rate_cnt = 0;
|
||||
|
||||
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, _SUPPORTEDRATES_IE_, (int *)&rate_cnt,
|
||||
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, WLAN_EID_SUPP_RATES, (int *)&rate_cnt,
|
||||
len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_);
|
||||
|
||||
if (rate_cnt <= 4) {
|
||||
@ -2289,7 +2289,7 @@ u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||
/* 5. Requested Device Type in WSC IE. (Todo) */
|
||||
/* 6. Device ID attribute in P2P IE. (Todo) */
|
||||
|
||||
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, _SSID_IE_, (int *)&ssid_len,
|
||||
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, WLAN_EID_SSID, (int *)&ssid_len,
|
||||
len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_);
|
||||
|
||||
ssid_len &= 0xff; /* Just last 1 byte is valid for ssid len of the probe request */
|
||||
|
@ -1662,7 +1662,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
||||
|
||||
/* upate BCN for TIM IE */
|
||||
/* update_BCNTIM(padapter); */
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE);
|
||||
}
|
||||
|
||||
/* _exit_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
@ -1688,7 +1688,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
||||
|
||||
/* upate BCN for TIM IE */
|
||||
/* update_BCNTIM(padapter); */
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1082,7 +1082,7 @@ static u8 *rm_gen_bcn_detail_elem(_adapter *padapter, u8 *pframe,
|
||||
#if (RM_MORE_DBG_MSG)
|
||||
RTW_INFO("RM: bcn_req_ssid\n");
|
||||
#endif
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_,
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID,
|
||||
pbss->Ssid.SsidLength,
|
||||
pbss->Ssid.Ssid, &my_len);
|
||||
break;
|
||||
|
@ -218,7 +218,7 @@ int rtw_get_rson_struct(WLAN_BSSID_EX *bssid, struct rtw_rson_struct *rson_data
|
||||
limit = bssid->IELength - _BEACON_IE_OFFSET_;
|
||||
|
||||
for (p = bssid->IEs + _BEACON_IE_OFFSET_; ; p += (len + 2)) {
|
||||
p = rtw_get_ie(p, _VENDOR_SPECIFIC_IE_, &len, limit);
|
||||
p = rtw_get_ie(p, WLAN_EID_VENDOR_SPECIFIC, &len, limit);
|
||||
limit -= len;
|
||||
if ((p == NULL) || (len == 0))
|
||||
break;
|
||||
@ -252,7 +252,7 @@ u32 rtw_rson_append_ie(_adapter *padapter, unsigned char *pframe, u32 *len)
|
||||
if ((!pdvobj) || (!pframe))
|
||||
return 0;
|
||||
ptr = ori = pframe;
|
||||
*ptr++ = _VENDOR_SPECIFIC_IE_;
|
||||
*ptr++ = WLAN_EID_VENDOR_SPECIFIC;
|
||||
*ptr++ = ie_len = sizeof(RTW_RSON_OUI)+sizeof(pdvobj->rson_data);
|
||||
memcpy(ptr, RTW_RSON_OUI, sizeof(RTW_RSON_OUI));
|
||||
ptr = ptr + sizeof(RTW_RSON_OUI);
|
||||
@ -434,7 +434,7 @@ u8 rtw_rson_ap_check_sta(_adapter *padapter, u8 *pframe, uint pkt_len, unsigned
|
||||
#ifndef CONFIG_RTW_REPEATER_SON_ROOT
|
||||
memset(&rson_target, 0, sizeof(rson_target));
|
||||
for (p = pframe + WLAN_HDR_A3_LEN + ie_offset; ; p += (len + 2)) {
|
||||
p = rtw_get_ie(p, _VENDOR_SPECIFIC_IE_, &len, pkt_len - WLAN_HDR_A3_LEN - ie_offset);
|
||||
p = rtw_get_ie(p, WLAN_EID_VENDOR_SPECIFIC, &len, pkt_len - WLAN_HDR_A3_LEN - ie_offset);
|
||||
|
||||
if ((p == NULL) || (len == 0))
|
||||
break;
|
||||
|
@ -2045,7 +2045,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
|
||||
u8 mic[16];
|
||||
|
||||
mme = whdr_pos + flen - 18;
|
||||
if (*mme != _MME_IE_)
|
||||
if (*mme != WLAN_EID_MMIE )
|
||||
return RTW_RX_HANDLED;
|
||||
|
||||
/* copy key index */
|
||||
|
@ -727,24 +727,24 @@ u8 *rtw_tdls_set_rsnie(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struct pkt_attri
|
||||
int len = 0;
|
||||
|
||||
if (ptxmgmt->len > 0)
|
||||
p = rtw_get_ie(ptxmgmt->buf, _RSN_IE_2_, &len, ptxmgmt->len);
|
||||
p = rtw_get_ie(ptxmgmt->buf, WLAN_EID_RSN, &len, ptxmgmt->len);
|
||||
|
||||
if (p != NULL)
|
||||
return rtw_set_ie(pframe, _RSN_IE_2_, len, p + 2, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_RSN, len, p + 2, &(pattrib->pktlen));
|
||||
else if (init == _TRUE)
|
||||
return rtw_set_ie(pframe, _RSN_IE_2_, sizeof(TDLS_RSNIE), TDLS_RSNIE, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_RSN, sizeof(TDLS_RSNIE), TDLS_RSNIE, &(pattrib->pktlen));
|
||||
else
|
||||
return rtw_set_ie(pframe, _RSN_IE_2_, sizeof(ptdls_sta->TDLS_RSNIE), ptdls_sta->TDLS_RSNIE, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_RSN, sizeof(ptdls_sta->TDLS_RSNIE), ptdls_sta->TDLS_RSNIE, &(pattrib->pktlen));
|
||||
}
|
||||
|
||||
u8 *rtw_tdls_set_ext_cap(u8 *pframe, struct pkt_attrib *pattrib)
|
||||
{
|
||||
return rtw_set_ie(pframe, _EXT_CAP_IE_ , sizeof(TDLS_EXT_CAPIE), TDLS_EXT_CAPIE, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_EXT_CAPABILITY , sizeof(TDLS_EXT_CAPIE), TDLS_EXT_CAPIE, &(pattrib->pktlen));
|
||||
}
|
||||
|
||||
u8 *rtw_tdls_set_qos_cap(u8 *pframe, struct pkt_attrib *pattrib)
|
||||
{
|
||||
return rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, sizeof(TDLS_WMMIE), TDLS_WMMIE, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, sizeof(TDLS_WMMIE), TDLS_WMMIE, &(pattrib->pktlen));
|
||||
}
|
||||
|
||||
u8 *rtw_tdls_set_ftie(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struct pkt_attrib *pattrib, u8 *ANonce, u8 *SNonce)
|
||||
@ -777,10 +777,10 @@ u8 *rtw_tdls_set_timeout_interval(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struc
|
||||
int len = 0;
|
||||
|
||||
if (ptxmgmt->len > 0)
|
||||
p = rtw_get_ie(ptxmgmt->buf, _TIMEOUT_ITVL_IE_, &len, ptxmgmt->len);
|
||||
p = rtw_get_ie(ptxmgmt->buf, WLAN_EID_TIMEOUT_INTERVAL, &len, ptxmgmt->len);
|
||||
|
||||
if (p != NULL)
|
||||
return rtw_set_ie(pframe, _TIMEOUT_ITVL_IE_, len, p + 2, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_TIMEOUT_INTERVAL, len, p + 2, &(pattrib->pktlen));
|
||||
else {
|
||||
/* Timeout interval */
|
||||
timeout_itvl[0] = 0x02;
|
||||
@ -789,7 +789,7 @@ u8 *rtw_tdls_set_timeout_interval(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struc
|
||||
else
|
||||
memcpy(timeout_itvl + 1, (u8 *)(&ptdls_sta->TDLS_PeerKey_Lifetime), 4);
|
||||
|
||||
return rtw_set_ie(pframe, _TIMEOUT_ITVL_IE_, 5, timeout_itvl, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_TIMEOUT_INTERVAL, 5, timeout_itvl, &(pattrib->pktlen));
|
||||
}
|
||||
}
|
||||
|
||||
@ -867,14 +867,14 @@ u8 *rtw_tdls_set_supported_rate(_adapter *padapter, u8 *pframe, struct pkt_attri
|
||||
bssrate_len = rtw_get_rateset_len(bssrate);
|
||||
|
||||
if (bssrate_len > 8) {
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , 8, bssrate, &(pattrib->pktlen));
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES , 8, bssrate, &(pattrib->pktlen));
|
||||
more_supportedrates = 1;
|
||||
} else
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , bssrate_len , bssrate, &(pattrib->pktlen));
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES , bssrate_len , bssrate, &(pattrib->pktlen));
|
||||
|
||||
/* extended supported rates */
|
||||
if (more_supportedrates == 1)
|
||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_ , (bssrate_len - 8), (bssrate + 8), &(pattrib->pktlen));
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_EXT_SUPP_RATES , (bssrate_len - 8), (bssrate + 8), &(pattrib->pktlen));
|
||||
|
||||
return pframe;
|
||||
}
|
||||
@ -1075,7 +1075,7 @@ u8 *rtw_tdls_set_wmm_params(_adapter *padapter, u8 *pframe, struct pkt_attrib *p
|
||||
memcpy(wmm_param_ele + 6, (u8 *)&TDLS_WMM_PARAM_IE, sizeof(TDLS_WMM_PARAM_IE));
|
||||
else
|
||||
memcpy(wmm_param_ele + 6, (u8 *)&pmlmeinfo->WMM_param, sizeof(pmlmeinfo->WMM_param));
|
||||
return rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, 24, wmm_param_ele, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, 24, wmm_param_ele, &(pattrib->pktlen));
|
||||
} else
|
||||
return pframe;
|
||||
}
|
||||
@ -1902,7 +1902,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
|
||||
if (ptdls_sta) {
|
||||
txmgmt.dialog_token = *(ptr + 2); /* Copy dialog token */
|
||||
txmgmt.status_code = _STATS_SUCCESSFUL_;
|
||||
txmgmt.status_code = WLAN_STATUS_SUCCESS;
|
||||
|
||||
/* Parsing information element */
|
||||
for (j = FIXED_IE; j < parsing_length;) {
|
||||
@ -1910,13 +1910,13 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(ptr + j);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _SUPPORTEDRATES_IE_:
|
||||
case WLAN_EID_SUPP_RATES:
|
||||
memcpy(supportRate, pIE->data, pIE->Length);
|
||||
supportRateNum = pIE->Length;
|
||||
break;
|
||||
case _COUNTRY_IE_:
|
||||
break;
|
||||
case _EXT_SUPPORTEDRATES_IE_:
|
||||
case WLAN_EID_EXT_SUPP_RATES:
|
||||
if (supportRateNum < sizeof(supportRate)) {
|
||||
memcpy(supportRate + supportRateNum, pIE->data, pIE->Length);
|
||||
supportRateNum += pIE->Length;
|
||||
@ -1924,7 +1924,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
break;
|
||||
case _SUPPORTED_CH_IE_:
|
||||
break;
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
rsnie_included = 1;
|
||||
if (prx_pkt_attrib->encrypt) {
|
||||
prsnie = (u8 *)pIE;
|
||||
@ -1941,22 +1941,22 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
txmgmt.status_code = _STATS_INVALID_RSNIE_;
|
||||
}
|
||||
break;
|
||||
case _EXT_CAP_IE_:
|
||||
case WLAN_EID_EXT_CAPABILITY :
|
||||
break;
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
break;
|
||||
case _FTIE_:
|
||||
if (prx_pkt_attrib->encrypt)
|
||||
memcpy(SNonce, (ptr + j + 52), 32);
|
||||
break;
|
||||
case _TIMEOUT_ITVL_IE_:
|
||||
case WLAN_EID_TIMEOUT_INTERVAL:
|
||||
if (prx_pkt_attrib->encrypt)
|
||||
timeout_interval = cpu_to_le32(*(u32 *)(ptr + j + 3));
|
||||
break;
|
||||
case _RIC_Descriptor_IE_:
|
||||
break;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
case _HT_CAPABILITY_IE_:
|
||||
case WLAN_EID_HT_CAPABILITY:
|
||||
rtw_tdls_process_ht_cap(padapter, ptdls_sta, pIE->data, pIE->Length);
|
||||
break;
|
||||
#endif
|
||||
@ -1983,7 +1983,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
|
||||
/* Check status code */
|
||||
/* If responder STA has/hasn't security on AP, but request hasn't/has RSNIE, it should reject */
|
||||
if (txmgmt.status_code == _STATS_SUCCESSFUL_) {
|
||||
if (txmgmt.status_code == WLAN_STATUS_SUCCESS) {
|
||||
if (rsnie_included && prx_pkt_attrib->encrypt == 0)
|
||||
txmgmt.status_code = _STATS_SEC_DISABLED_;
|
||||
else if (rsnie_included == 0 && prx_pkt_attrib->encrypt)
|
||||
@ -2027,7 +2027,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
if (rtw_tdls_is_driver_setup(padapter)) {
|
||||
issue_tdls_setup_rsp(padapter, &txmgmt);
|
||||
|
||||
if (txmgmt.status_code == _STATS_SUCCESSFUL_)
|
||||
if (txmgmt.status_code == WLAN_STATUS_SUCCESS)
|
||||
_set_timer(&ptdls_sta->handshake_timer, TDLS_HANDSHAKE_TIME);
|
||||
else {
|
||||
rtw_tdls_teardown_pre_hdl(padapter, ptdls_sta);
|
||||
@ -2092,13 +2092,13 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(ptr + j);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _SUPPORTEDRATES_IE_:
|
||||
case WLAN_EID_SUPP_RATES:
|
||||
memcpy(supportRate, pIE->data, pIE->Length);
|
||||
supportRateNum = pIE->Length;
|
||||
break;
|
||||
case _COUNTRY_IE_:
|
||||
break;
|
||||
case _EXT_SUPPORTEDRATES_IE_:
|
||||
case WLAN_EID_EXT_SUPP_RATES:
|
||||
if (supportRateNum < sizeof(supportRate)) {
|
||||
memcpy(supportRate + supportRateNum, pIE->data, pIE->Length);
|
||||
supportRateNum += pIE->Length;
|
||||
@ -2106,7 +2106,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
break;
|
||||
case _SUPPORTED_CH_IE_:
|
||||
break;
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
prsnie = (u8 *)pIE;
|
||||
/* Check CCMP pairwise_cipher presence. */
|
||||
ppairwise_cipher = prsnie + 10;
|
||||
@ -2115,9 +2115,9 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
if (_rtw_memcmp(ppairwise_cipher + 4 * k, RSN_CIPHER_SUITE_CCMP, 4) == _TRUE)
|
||||
verify_ccmp = 1;
|
||||
}
|
||||
case _EXT_CAP_IE_:
|
||||
case WLAN_EID_EXT_CAPABILITY :
|
||||
break;
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if (_rtw_memcmp((u8 *)pIE + 2, WMM_INFO_OUI, 6) == _TRUE) {
|
||||
/* WMM Info ID and OUI */
|
||||
if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE))
|
||||
@ -2128,14 +2128,14 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
pftie = (u8 *)pIE;
|
||||
memcpy(ANonce, (ptr + j + 20), 32);
|
||||
break;
|
||||
case _TIMEOUT_ITVL_IE_:
|
||||
case WLAN_EID_TIMEOUT_INTERVAL:
|
||||
ptimeout_ie = (u8 *)pIE;
|
||||
timeout_interval = cpu_to_le32(*(u32 *)(ptimeout_ie + 3));
|
||||
break;
|
||||
case _RIC_Descriptor_IE_:
|
||||
break;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
case _HT_CAPABILITY_IE_:
|
||||
case WLAN_EID_HT_CAPABILITY:
|
||||
rtw_tdls_process_ht_cap(padapter, ptdls_sta, pIE->data, pIE->Length);
|
||||
break;
|
||||
#endif
|
||||
@ -2173,7 +2173,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
|
||||
if (prx_pkt_attrib->encrypt) {
|
||||
if (verify_ccmp == 1) {
|
||||
txmgmt.status_code = _STATS_SUCCESSFUL_;
|
||||
txmgmt.status_code = WLAN_STATUS_SUCCESS;
|
||||
if (rtw_tdls_is_driver_setup(padapter) == _TRUE) {
|
||||
wpa_tdls_generate_tpk(padapter, ptdls_sta);
|
||||
if (tdls_verify_mic(ptdls_sta->tpk.kck, 2, plinkid_ie, prsnie, ptimeout_ie, pftie) == _FAIL) {
|
||||
@ -2188,13 +2188,13 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
} else
|
||||
txmgmt.status_code = _STATS_INVALID_RSNIE_;
|
||||
} else
|
||||
txmgmt.status_code = _STATS_SUCCESSFUL_;
|
||||
txmgmt.status_code = WLAN_STATUS_SUCCESS;
|
||||
|
||||
if (rtw_tdls_is_driver_setup(padapter) == _TRUE) {
|
||||
memcpy(txmgmt.peer, prx_pkt_attrib->src, ETH_ALEN);
|
||||
issue_tdls_setup_cfm(padapter, &txmgmt);
|
||||
|
||||
if (txmgmt.status_code == _STATS_SUCCESSFUL_) {
|
||||
if (txmgmt.status_code == WLAN_STATUS_SUCCESS) {
|
||||
rtw_tdls_set_link_established(padapter, _TRUE);
|
||||
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE) {
|
||||
@ -2262,10 +2262,10 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(ptr + j);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
prsnie = (u8 *)pIE;
|
||||
break;
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if (_rtw_memcmp((u8 *)pIE + 2, WMM_PARA_OUI, 6) == _TRUE) {
|
||||
/* WMM Parameter ID and OUI */
|
||||
ptdls_sta->qos_option = _TRUE;
|
||||
@ -2274,11 +2274,11 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
case _FTIE_:
|
||||
pftie = (u8 *)pIE;
|
||||
break;
|
||||
case _TIMEOUT_ITVL_IE_:
|
||||
case WLAN_EID_TIMEOUT_INTERVAL:
|
||||
ptimeout_ie = (u8 *)pIE;
|
||||
break;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
case _HT_EXTRA_INFO_IE_:
|
||||
case WLAN_EID_HT_OPERATION:
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_80211AC_VHT
|
||||
@ -2789,7 +2789,7 @@ void wfd_ie_tdls(_adapter *padapter, u8 *pframe, u32 *pktlen)
|
||||
memcpy(wfdie + wfdielen, pwfd_info->ip_address, 4);
|
||||
wfdielen += 4;
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, pktlen);
|
||||
|
||||
}
|
||||
#endif /* CONFIG_WFD */
|
||||
|
@ -569,7 +569,7 @@ void rtw_build_probe_resp_wapi_ie(_adapter *padapter, unsigned char *pframe, str
|
||||
|
||||
WapiSetIE(padapter);
|
||||
WapiIELength = pWapiInfo->wapiIELength;
|
||||
pframe[0] = _WAPI_IE_;
|
||||
pframe[0] = WLAN_EID_BSS_AC_ACCESS_DELAY;
|
||||
pframe[1] = WapiIELength;
|
||||
memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
|
||||
pframe += WapiIELength + 2;
|
||||
@ -591,7 +591,7 @@ void rtw_build_beacon_wapi_ie(_adapter *padapter, unsigned char *pframe, struct
|
||||
|
||||
WapiSetIE(padapter);
|
||||
WapiIELength = pWapiInfo->wapiIELength;
|
||||
pframe[0] = _WAPI_IE_;
|
||||
pframe[0] = WLAN_EID_BSS_AC_ACCESS_DELAY;
|
||||
pframe[1] = WapiIELength;
|
||||
memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
|
||||
pframe += WapiIELength + 2;
|
||||
@ -627,7 +627,7 @@ void rtw_build_assoc_req_wapi_ie(_adapter *padapter, unsigned char *pframe, stru
|
||||
memcpy(pWapiInfo->wapiIE + WapiIELength, &bkidNum, 2);
|
||||
WapiIELength += 2;
|
||||
|
||||
pframe[0] = _WAPI_IE_;
|
||||
pframe[0] = WLAN_EID_BSS_AC_ACCESS_DELAY;
|
||||
pframe[1] = WapiIELength;
|
||||
memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
|
||||
pframe += WapiIELength + 2;
|
||||
|
@ -2298,8 +2298,8 @@ inline bool match_ranges(u16 EID, u32 value)
|
||||
int nr_range;
|
||||
|
||||
switch (EID) {
|
||||
case _EXT_SUPPORTEDRATES_IE_:
|
||||
case _SUPPORTEDRATES_IE_:
|
||||
case WLAN_EID_EXT_SUPP_RATES:
|
||||
case WLAN_EID_SUPP_RATES:
|
||||
nr_range = sizeof(support_rate_ranges)/sizeof(u8);
|
||||
for (i = 0; i < nr_range; i++) {
|
||||
/* clear bit7 before searching. */
|
||||
@ -2331,8 +2331,8 @@ bool rtw_validate_value(u16 EID, u8 *p, u16 len)
|
||||
u32 i, nr_val;
|
||||
|
||||
switch (EID) {
|
||||
case _EXT_SUPPORTEDRATES_IE_:
|
||||
case _SUPPORTEDRATES_IE_:
|
||||
case WLAN_EID_EXT_SUPP_RATES:
|
||||
case WLAN_EID_SUPP_RATES:
|
||||
nr_val = len;
|
||||
for (i=0; i<nr_val; i++) {
|
||||
rate = *(p+i);
|
||||
@ -2397,7 +2397,7 @@ void rtw_absorb_ssid_ifneed(_adapter *padapter, WLAN_BSSID_EX *bssid, u8 *pframe
|
||||
snetwork = &(scanned->network);
|
||||
/* scan queue records as Hidden SSID && Input frame is NOT Hidden SSID */
|
||||
if (hidden_ssid_ap(snetwork) && !hidden_ssid_ap(bssid)) {
|
||||
p = rtw_get_ie(snetwork->IEs+ie_offset, _SSID_IE_, &ssid_len_ori, snetwork->IELength-ie_offset);
|
||||
p = rtw_get_ie(snetwork->IEs+ie_offset, WLAN_EID_SSID, &ssid_len_ori, snetwork->IELength-ie_offset);
|
||||
if (!p) {
|
||||
_exit_critical_bh(&padapter->mlmepriv.scanned_queue.lock, &irqL);
|
||||
return;
|
||||
@ -2679,14 +2679,14 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pframe + (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN) + i);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
/* to update WMM paramter set while receiving beacon */
|
||||
if (_rtw_memcmp(pIE->data, WMM_PARA_OUI, 6) && pIE->Length == WLAN_WMM_LEN) /* WMM */
|
||||
(WMM_param_handler(padapter, pIE)) ? report_wmm_edca_update(padapter) : 0;
|
||||
|
||||
break;
|
||||
|
||||
case _HT_EXTRA_INFO_IE_: /* HT info */
|
||||
case WLAN_EID_HT_OPERATION: /* HT info */
|
||||
/* HT_info_handler(padapter, pIE); */
|
||||
bwmode_update_check(padapter, pIE);
|
||||
break;
|
||||
@ -2695,13 +2695,13 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta
|
||||
rtw_process_vht_op_mode_notify(padapter, pIE->data, psta);
|
||||
break;
|
||||
#endif /* CONFIG_80211AC_VHT */
|
||||
case _ERPINFO_IE_:
|
||||
case WLAN_EID_ERP_INFO:
|
||||
ERP_IE_handler(padapter, pIE);
|
||||
VCS_update(padapter, psta);
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
case _EXT_CAP_IE_:
|
||||
case WLAN_EID_EXT_CAPABILITY :
|
||||
if (check_ap_tdls_prohibited(pIE->data, pIE->Length) == _TRUE)
|
||||
ptdlsinfo->ap_prohibited = _TRUE;
|
||||
if (check_ap_tdls_ch_switching_prohibited(pIE->data, pIE->Length) == _TRUE)
|
||||
@ -2813,12 +2813,12 @@ unsigned int is_ap_in_tkip(_adapter *padapter)
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pmlmeinfo->network.IEs + i);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if ((_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4)) && (_rtw_memcmp((pIE->data + 12), WPA_TKIP_CIPHER, 4)))
|
||||
return _TRUE;
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
if (_rtw_memcmp((pIE->data + 8), RSN_TKIP_CIPHER, 4))
|
||||
return _TRUE;
|
||||
|
||||
@ -2847,14 +2847,14 @@ unsigned int should_forbid_n_rate(_adapter *padapter)
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(cur_network->IEs + i);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if (_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4) &&
|
||||
((_rtw_memcmp((pIE->data + 12), WPA_CIPHER_SUITE_CCMP, 4)) ||
|
||||
(_rtw_memcmp((pIE->data + 16), WPA_CIPHER_SUITE_CCMP, 4))))
|
||||
return _FALSE;
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
if ((_rtw_memcmp((pIE->data + 8), RSN_CIPHER_SUITE_CCMP, 4)) ||
|
||||
(_rtw_memcmp((pIE->data + 12), RSN_CIPHER_SUITE_CCMP, 4)))
|
||||
return _FALSE;
|
||||
@ -2886,12 +2886,12 @@ unsigned int is_ap_in_wep(_adapter *padapter)
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pmlmeinfo->network.IEs + i);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if (_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4))
|
||||
return _FALSE;
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
return _FALSE;
|
||||
|
||||
default:
|
||||
@ -3098,7 +3098,7 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pframe + i);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if ((_rtw_memcmp(pIE->data, ARTHEROS_OUI1, 3)) || (_rtw_memcmp(pIE->data, ARTHEROS_OUI2, 3))) {
|
||||
RTW_INFO("link to Artheros AP\n");
|
||||
return HT_IOT_PEER_ATHEROS;
|
||||
@ -3462,7 +3462,7 @@ int rtw_ies_get_supported_rate(u8 *ies, uint ies_len, u8 *rate_set, u8 *rate_num
|
||||
return _FALSE;
|
||||
|
||||
*rate_num = 0;
|
||||
ie = rtw_get_ie(ies, _SUPPORTEDRATES_IE_, &ie_len, ies_len);
|
||||
ie = rtw_get_ie(ies, WLAN_EID_SUPP_RATES, &ie_len, ies_len);
|
||||
if (ie == NULL)
|
||||
goto ext_rate;
|
||||
|
||||
@ -3480,7 +3480,7 @@ int rtw_ies_get_supported_rate(u8 *ies, uint ies_len, u8 *rate_set, u8 *rate_num
|
||||
}
|
||||
|
||||
ext_rate:
|
||||
ie = rtw_get_ie(ies, _EXT_SUPPORTEDRATES_IE_, &ie_len, ies_len);
|
||||
ie = rtw_get_ie(ies, WLAN_EID_EXT_SUPP_RATES, &ie_len, ies_len);
|
||||
if (ie) {
|
||||
/* get valid extended supported rates */
|
||||
for (i = 0; i < 12; i++) {
|
||||
@ -4222,25 +4222,25 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame)
|
||||
len += 2;
|
||||
|
||||
/* SSID */
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &len);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &len);
|
||||
|
||||
/* supported rates... */
|
||||
rate_len = rtw_get_rateset_len(cur_network->SupportedRates);
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &len);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &len);
|
||||
|
||||
/* DS parameter set */
|
||||
pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &len);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &len);
|
||||
|
||||
/* IBSS Parameter Set... */
|
||||
/* ATIMWindow = cur->Configuration.ATIMWindow; */
|
||||
ATIMWindow = 0;
|
||||
pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &len);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_IBSS_PARAMS, 2, (unsigned char *)(&ATIMWindow), &len);
|
||||
|
||||
/* todo: ERP IE */
|
||||
|
||||
/* EXTERNDED SUPPORTED RATE */
|
||||
if (rate_len > 8)
|
||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &len);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_EXT_SUPP_RATES, (rate_len - 8), (cur_network->SupportedRates + 8), &len);
|
||||
|
||||
if ((len + TXDESC_SIZE) > 256) {
|
||||
/* RTW_INFO("marc: beacon frame too large\n"); */
|
||||
|
@ -2888,7 +2888,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
||||
RTW_PUT_LE64(&MME[2], padapter->securitypriv.dot11wBIPtxpn.val);
|
||||
|
||||
/* add MME IE with MIC all zero, MME string doesn't include element id and length */
|
||||
pframe = rtw_set_ie(pframe, _MME_IE_ , 16 , MME, &(pattrib->pktlen));
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_MMIE , 16 , MME, &(pattrib->pktlen));
|
||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||
/* total frame length - header length */
|
||||
frame_body_len = pattrib->pktlen - sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -3124,7 +3124,7 @@ void rtw_update_protection(_adapter *padapter, u8 *ie, uint ie_len)
|
||||
|
||||
case AUTO_VCS:
|
||||
default:
|
||||
perp = rtw_get_ie(ie, _ERPINFO_IE_, &erp_len, ie_len);
|
||||
perp = rtw_get_ie(ie, WLAN_EID_ERP_INFO, &erp_len, ie_len);
|
||||
if (perp == NULL)
|
||||
pxmitpriv->vcs = NONE_VCS;
|
||||
else {
|
||||
@ -4816,9 +4816,9 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
||||
/* RTW_INFO_DUMP("enqueue, tim=", pstapriv->tim_bitmap, pstapriv->aid_bmp_len); */
|
||||
if (update_tim == _TRUE) {
|
||||
if (is_broadcast_mac_addr(pattrib->ra))
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer BC");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "buffer BC");
|
||||
else
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer MC");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "buffer MC");
|
||||
} else
|
||||
chk_bmc_sleepq_cmd(padapter);
|
||||
|
||||
@ -4885,7 +4885,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
||||
if (update_tim == _TRUE) {
|
||||
/* RTW_INFO("sleepq_len==1, update BCNTIM\n"); */
|
||||
/* upate BCN for TIM IE */
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer UC");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "buffer UC");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5170,11 +5170,11 @@ _exit:
|
||||
if (update_mask) {
|
||||
/* update_BCNTIM(padapter); */
|
||||
if ((update_mask & (BIT(0) | BIT(1))) == (BIT(0) | BIT(1)))
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "clear UC&BMC");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "clear UC&BMC");
|
||||
else if ((update_mask & BIT(1)) == BIT(1))
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "clear BMC");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "clear BMC");
|
||||
else
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "clear UC");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "clear UC");
|
||||
}
|
||||
|
||||
}
|
||||
@ -5252,7 +5252,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
||||
/* RTW_INFO_DUMP("update_BCNTIM, tim=", pstapriv->tim_bitmap, pstapriv->aid_bmp_len); */
|
||||
/* upate BCN for TIM IE */
|
||||
/* update_BCNTIM(padapter); */
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE);
|
||||
/* update_mask = BIT(0); */
|
||||
}
|
||||
|
||||
|
@ -6174,14 +6174,14 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe
|
||||
pktlen += 2;
|
||||
|
||||
/* SSID */
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pktlen);
|
||||
|
||||
/* supported rates... */
|
||||
rate_len = rtw_get_rateset_len(cur_network->SupportedRates);
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &pktlen);
|
||||
|
||||
/* DS parameter set */
|
||||
pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pktlen);
|
||||
|
||||
/* if( (pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) */
|
||||
{
|
||||
@ -6190,16 +6190,16 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe
|
||||
/* IBSS Parameter Set... */
|
||||
/* ATIMWindow = cur->Configuration.ATIMWindow; */
|
||||
ATIMWindow = 0;
|
||||
pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_IBSS_PARAMS, 2, (unsigned char *)(&ATIMWindow), &pktlen);
|
||||
|
||||
/* ERP IE */
|
||||
pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_ERP_INFO, 1, &erpinfo, &pktlen);
|
||||
}
|
||||
|
||||
|
||||
/* EXTERNDED SUPPORTED RATE */
|
||||
if (rate_len > 8)
|
||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_EXT_SUPP_RATES, (rate_len - 8), (cur_network->SupportedRates + 8), &pktlen);
|
||||
|
||||
|
||||
/* todo:HT for adhoc */
|
||||
@ -6299,14 +6299,14 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p
|
||||
|
||||
|
||||
/* SSID */
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, 7, pwdinfo->p2p_wildcard_ssid, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, 7, pwdinfo->p2p_wildcard_ssid, &pktlen);
|
||||
|
||||
/* supported rates... */
|
||||
/* Use the OFDM rate in the P2P probe response frame. ( 6(B), 9(B), 12, 18, 24, 36, 48, 54 ) */
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, 8, pwdinfo->support_rate, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES, 8, pwdinfo->support_rate, &pktlen);
|
||||
|
||||
/* DS parameter set */
|
||||
pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&pwdinfo->listen_channel, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&pwdinfo->listen_channel, &pktlen);
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (pwdinfo->driver_interface == DRIVER_CFG80211) {
|
||||
@ -6520,7 +6520,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p
|
||||
wpsielen += 2;
|
||||
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen, (unsigned char *) wpsie, &pktlen);
|
||||
|
||||
|
||||
p2pielen = build_probe_resp_p2p_ie(pwdinfo, pframe);
|
||||
@ -6648,7 +6648,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_DPID_PBC);
|
||||
wpsielen += 2;
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen, (unsigned char *) wpsie, &pktlen);
|
||||
|
||||
|
||||
/* P2P IE Section. */
|
||||
@ -6930,7 +6930,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
|
||||
}
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2pie, &pktlen);
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
wfdielen = build_nego_resp_wfd_ie(pwdinfo, pframe);
|
||||
@ -7175,7 +7175,7 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
|
||||
}
|
||||
#endif
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2pie, &pktlen);
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
wfdielen = build_invitation_resp_wfd_ie(pwdinfo, pframe);
|
||||
@ -7288,7 +7288,7 @@ static void rtw_hal_construct_P2PProvisionDisRsp(_adapter *padapter, u8 *pframe,
|
||||
RTW_PUT_BE16(wpsie + wpsielen, WPS_CM_PUSH_BUTTON);
|
||||
wpsielen += 2;
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen, (unsigned char *) wpsie, &pktlen);
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
wfdielen = build_provdisc_resp_wfd_ie(pwdinfo, pframe);
|
||||
@ -7438,21 +7438,21 @@ void rtw_hal_construct_beacon(_adapter *padapter,
|
||||
/* below for ad-hoc mode */
|
||||
|
||||
/* SSID */
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pktlen);
|
||||
|
||||
/* supported rates... */
|
||||
rate_len = rtw_get_rateset_len(cur_network->SupportedRates);
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &pktlen);
|
||||
|
||||
/* DS parameter set */
|
||||
pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pktlen);
|
||||
|
||||
if ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) {
|
||||
u32 ATIMWindow;
|
||||
/* IBSS Parameter Set... */
|
||||
/* ATIMWindow = cur->Configuration.ATIMWindow; */
|
||||
ATIMWindow = 0;
|
||||
pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_IBSS_PARAMS, 2, (unsigned char *)(&ATIMWindow), &pktlen);
|
||||
}
|
||||
|
||||
|
||||
@ -7461,7 +7461,7 @@ void rtw_hal_construct_beacon(_adapter *padapter,
|
||||
|
||||
/* EXTERNDED SUPPORTED RATE */
|
||||
if (rate_len > 8)
|
||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_EXT_SUPP_RATES, (rate_len - 8), (cur_network->SupportedRates + 8), &pktlen);
|
||||
|
||||
/* todo:HT for adhoc */
|
||||
#endif
|
||||
@ -8060,19 +8060,19 @@ static void rtw_hal_construct_ProbeReq(_adapter *padapter, u8 *pframe,
|
||||
pframe += pktlen;
|
||||
|
||||
if (ssid == NULL)
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, 0, NULL, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, 0, NULL, &pktlen);
|
||||
else {
|
||||
/* RTW_INFO("%s len:%d\n", ssid->SSID, ssid->SSID_len); */
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, ssid->SSID_len, ssid->SSID, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, ssid->SSID_len, ssid->SSID, &pktlen);
|
||||
}
|
||||
|
||||
get_rate_set(padapter, bssrate, &bssrate_len);
|
||||
|
||||
if (bssrate_len > 8) {
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , 8, bssrate, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_ , (bssrate_len - 8), (bssrate + 8), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES , 8, bssrate, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_EXT_SUPP_RATES , (bssrate_len - 8), (bssrate + 8), &pktlen);
|
||||
} else
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , bssrate_len , bssrate, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES , bssrate_len , bssrate, &pktlen);
|
||||
|
||||
*pLength = pktlen;
|
||||
}
|
||||
@ -14585,7 +14585,7 @@ u8 * rtw_hal_set_8812a_vendor_ie(_adapter *padapter , u8 *pframe ,uint *frlen )
|
||||
vendor_info[6] = RT_HT_CAP_USE_JAGUAR_CCUT;
|
||||
else
|
||||
vendor_info[6] = RT_HT_CAP_USE_JAGUAR_BCUT;
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_,vender_len,vendor_info , frlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC,vender_len,vendor_info , frlen);
|
||||
|
||||
return pframe;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ static void rtw_hal_mcc_build_p2p_noa_attr(PADAPTER padapter, u8 *ie, u32 *ie_le
|
||||
, p2p_noa_attr_ie[p2p_noa_attr_len + 3]);
|
||||
|
||||
p2p_noa_attr_len = p2p_noa_attr_len + 4;
|
||||
rtw_set_ie(ie, _VENDOR_SPECIFIC_IE_, p2p_noa_attr_len, (u8 *)p2p_noa_attr_ie, ie_len);
|
||||
rtw_set_ie(ie, WLAN_EID_VENDOR_SPECIFIC, p2p_noa_attr_len, (u8 *)p2p_noa_attr_ie, ie_len);
|
||||
}
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ static void rtw_hal_mcc_update_go_p2p_ie(PADAPTER padapter)
|
||||
RTW_INFO("p2p_go_noa_ie_len:%d\n", pmccadapriv->p2p_go_noa_ie_len);
|
||||
RTW_INFO_DUMP("\n", pmccadapriv->p2p_go_noa_ie, pmccadapriv->p2p_go_noa_ie_len);
|
||||
}
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, P2P_OUI, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_VENDOR_SPECIFIC, P2P_OUI, _TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -200,7 +200,7 @@ static void rtw_hal_mcc_remove_go_p2p_ie(PADAPTER padapter)
|
||||
return;
|
||||
|
||||
pmccadapriv->p2p_go_noa_ie_len = 0;
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, P2P_OUI, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_VENDOR_SPECIFIC, P2P_OUI, _TRUE);
|
||||
}
|
||||
|
||||
/* restore IQK value for all interface */
|
||||
|
107
include/wifi.h
107
include/wifi.h
@ -118,76 +118,14 @@ enum WIFI_FRAME_SUBTYPE {
|
||||
WIFI_QOS_DATA_NULL = (BIT(6) | WIFI_QOS_DATA_TYPE),
|
||||
};
|
||||
|
||||
enum WIFI_REASON_CODE {
|
||||
_RSON_RESERVED_ = 0,
|
||||
_RSON_UNSPECIFIED_ = 1,
|
||||
_RSON_AUTH_NO_LONGER_VALID_ = 2,
|
||||
_RSON_DEAUTH_STA_LEAVING_ = 3,
|
||||
_RSON_INACTIVITY_ = 4,
|
||||
_RSON_UNABLE_HANDLE_ = 5,
|
||||
_RSON_CLS2_ = 6,
|
||||
_RSON_CLS3_ = 7,
|
||||
_RSON_DISAOC_STA_LEAVING_ = 8,
|
||||
_RSON_ASOC_NOT_AUTH_ = 9,
|
||||
|
||||
/* WPA reason */
|
||||
_RSON_INVALID_IE_ = 13,
|
||||
_RSON_MIC_FAILURE_ = 14,
|
||||
_RSON_4WAY_HNDSHK_TIMEOUT_ = 15,
|
||||
_RSON_GROUP_KEY_UPDATE_TIMEOUT_ = 16,
|
||||
_RSON_DIFF_IE_ = 17,
|
||||
_RSON_MLTCST_CIPHER_NOT_VALID_ = 18,
|
||||
_RSON_UNICST_CIPHER_NOT_VALID_ = 19,
|
||||
_RSON_AKMP_NOT_VALID_ = 20,
|
||||
_RSON_UNSUPPORT_RSNE_VER_ = 21,
|
||||
_RSON_INVALID_RSNE_CAP_ = 22,
|
||||
_RSON_IEEE_802DOT1X_AUTH_FAIL_ = 23,
|
||||
|
||||
/* belowing are Realtek definition */
|
||||
_RSON_PMK_NOT_AVAILABLE_ = 24,
|
||||
_RSON_TDLS_TEAR_TOOFAR_ = 25,
|
||||
_RSON_TDLS_TEAR_UN_RSN_ = 26,
|
||||
};
|
||||
|
||||
/* Reason codes (IEEE 802.11-2007, 7.3.1.7, Table 7-22) */
|
||||
|
||||
enum WIFI_STATUS_CODE {
|
||||
_STATS_SUCCESSFUL_ = 0,
|
||||
_STATS_FAILURE_ = 1,
|
||||
_STATS_SEC_DISABLED_ = 5,
|
||||
_STATS_NOT_IN_SAME_BSS_ = 7,
|
||||
_STATS_CAP_FAIL_ = 10,
|
||||
_STATS_NO_ASOC_ = 11,
|
||||
_STATS_OTHER_ = 12,
|
||||
_STATS_NO_SUPP_ALG_ = 13,
|
||||
_STATS_OUT_OF_AUTH_SEQ_ = 14,
|
||||
_STATS_CHALLENGE_FAIL_ = 15,
|
||||
_STATS_AUTH_TIMEOUT_ = 16,
|
||||
_STATS_UNABLE_HANDLE_STA_ = 17,
|
||||
_STATS_RATE_FAIL_ = 18,
|
||||
_STATS_REFUSED_TEMPORARILY_ = 30,
|
||||
_STATS_DECLINE_REQ_ = 37,
|
||||
_STATS_INVALID_PARAMETERS_ = 38,
|
||||
_STATS_INVALID_RSNIE_ = 72,
|
||||
enum {
|
||||
_STATS_REFUSED_TEMPORARILY_ = 30, /* Code-22-65535 reserved */
|
||||
};
|
||||
|
||||
/* IEEE 802.11r */
|
||||
#define WLAN_STATUS_INVALID_PMKID 53
|
||||
|
||||
enum WIFI_REG_DOMAIN {
|
||||
DOMAIN_FCC = 1,
|
||||
DOMAIN_IC = 2,
|
||||
DOMAIN_ETSI = 3,
|
||||
DOMAIN_SPAIN = 4,
|
||||
DOMAIN_FRANCE = 5,
|
||||
DOMAIN_MKK = 6,
|
||||
DOMAIN_ISRAEL = 7,
|
||||
DOMAIN_MKK1 = 8,
|
||||
DOMAIN_MKK2 = 9,
|
||||
DOMAIN_MKK3 = 10,
|
||||
DOMAIN_MAX
|
||||
};
|
||||
|
||||
#define _TO_DS_ BIT(8)
|
||||
#define _FROM_DS_ BIT(9)
|
||||
#define _MORE_FRAG_ BIT(10)
|
||||
@ -501,47 +439,6 @@ static inline int IsFrameTypeData(unsigned char *pframe)
|
||||
|
||||
#define _FIXED_IE_LENGTH_ _BEACON_IE_OFFSET_
|
||||
|
||||
#define _SSID_IE_ 0
|
||||
#define _SUPPORTEDRATES_IE_ 1
|
||||
#define _DSSET_IE_ 3
|
||||
#define _TIM_IE_ 5
|
||||
#define _IBSS_PARA_IE_ 6
|
||||
#define _COUNTRY_IE_ 7
|
||||
#define _CHLGETXT_IE_ 16
|
||||
#define _SUPPORTED_CH_IE_ 36
|
||||
#define _CH_SWTICH_ANNOUNCE_ 37 /* Secondary Channel Offset */
|
||||
#define _MEAS_REQ_IE_ 38
|
||||
#define _MEAS_RSP_IE_ 39
|
||||
#define _RSN_IE_2_ 48
|
||||
#define _SSN_IE_1_ 221
|
||||
#define _ERPINFO_IE_ 42
|
||||
#define _EXT_SUPPORTEDRATES_IE_ 50
|
||||
|
||||
#define _HT_CAPABILITY_IE_ 45
|
||||
#define _MDIE_ 54
|
||||
#define _FTIE_ 55
|
||||
#define _TIMEOUT_ITVL_IE_ 56
|
||||
#define _SRC_IE_ 59
|
||||
#define _HT_EXTRA_INFO_IE_ 61
|
||||
#define _HT_ADD_INFO_IE_ 61 /* _HT_EXTRA_INFO_IE_ */
|
||||
#define _WAPI_IE_ 68
|
||||
#define _EID_RRM_EN_CAP_IE_ 70
|
||||
|
||||
|
||||
/* #define EID_BSSCoexistence 72 */ /* 20/40 BSS Coexistence
|
||||
* #define EID_BSSIntolerantChlReport 73 */
|
||||
#define _RIC_Descriptor_IE_ 75
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
#define _MME_IE_ 76 /* 802.11w Management MIC element */
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
#define _LINK_ID_IE_ 101
|
||||
#define _CH_SWITCH_TIMING_ 104
|
||||
#define _PTI_BUFFER_STATUS_ 106
|
||||
#define _EXT_CAP_IE_ 127
|
||||
#define _VENDOR_SPECIFIC_IE_ 221
|
||||
|
||||
#define _RESERVED47_ 47
|
||||
|
||||
typedef enum _ELEMENT_ID {
|
||||
EID_SsId = 0, /* service set identifier (0:32) */
|
||||
EID_SupRates = 1, /* supported rates (1:8) */
|
||||
|
@ -2657,7 +2657,7 @@ static void _rtw_cfg80211_surveydone_event_callback(_adapter *padapter, struct c
|
||||
if (_rtw_memcmp(pnetwork->network.Ssid.Ssid, "Ralink_11n_AP", 13)) {
|
||||
uint ie_len = 0;
|
||||
u8 *p = NULL;
|
||||
p = rtw_get_ie(pnetwork->network.IEs + _BEACON_IE_OFFSET_, _RSN_IE_2_, &ie_len, (pnetwork->network.IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(pnetwork->network.IEs + _BEACON_IE_OFFSET_, WLAN_EID_RSN, &ie_len, (pnetwork->network.IELength - _BEACON_IE_OFFSET_));
|
||||
RTW_INFO("ie_len=%d\n", ie_len);
|
||||
}
|
||||
}
|
||||
@ -4944,8 +4944,8 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
/* pbss_network->IEs will not include p2p_ie, wfd ie */
|
||||
rtw_ies_remove_ie(pbuf, &len, _BEACON_IE_OFFSET_, _VENDOR_SPECIFIC_IE_, P2P_OUI, 4);
|
||||
rtw_ies_remove_ie(pbuf, &len, _BEACON_IE_OFFSET_, _VENDOR_SPECIFIC_IE_, WFD_OUI, 4);
|
||||
rtw_ies_remove_ie(pbuf, &len, _BEACON_IE_OFFSET_, WLAN_EID_VENDOR_SPECIFIC, P2P_OUI, 4);
|
||||
rtw_ies_remove_ie(pbuf, &len, _BEACON_IE_OFFSET_, WLAN_EID_VENDOR_SPECIFIC, WFD_OUI, 4);
|
||||
|
||||
if (rtw_check_beacon_data(adapter, pbuf, len) == _SUCCESS) {
|
||||
#ifdef CONFIG_P2P
|
||||
@ -6438,7 +6438,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
p2pielen += devinfo_contentlen;
|
||||
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2p_ie, &p2p_ielen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2p_ie, &p2p_ielen);
|
||||
/* p2pielen = build_prov_disc_request_p2p_ie( pwdinfo, pframe, NULL, 0, pwdinfo->tx_prov_disc_info.peerDevAddr); */
|
||||
/* pframe += p2pielen; */
|
||||
pattrib->pktlen += p2p_ielen;
|
||||
@ -6473,7 +6473,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(pwdinfo->tx_prov_disc_info.wps_config_method_request);
|
||||
wpsielen += 2;
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen);
|
||||
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
@ -8188,7 +8188,7 @@ u8 *rtw_cfg80211_construct_mesh_beacon_ies(struct wiphy *wiphy, _adapter *adapte
|
||||
*c = WLAN_EID_TIM;
|
||||
*(c + 1) = 4;
|
||||
c += 6;
|
||||
//c = rtw_set_ie(c, _TIM_IE_, 4, NULL, NULL);
|
||||
//c = rtw_set_ie(c, WLAN_EID_DS_PARAMS, 4, NULL, NULL);
|
||||
|
||||
/* Extended Supported Rates */
|
||||
if (n_bitrates > 8)
|
||||
@ -8889,7 +8889,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
|
||||
memcpy(pmlmepriv->wps_beacon_ie, wps_ie, wps_ielen);
|
||||
pmlmepriv->wps_beacon_ie_len = wps_ielen;
|
||||
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_VENDOR_SPECIFIC, wps_oui, _TRUE);
|
||||
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,7 @@ static inline char *iwe_stream_protocol_process(_adapter *padapter,
|
||||
#ifdef CONFIG_80211N_HT
|
||||
/* parsing HT_CAP_IE */
|
||||
if(padapter->registrypriv.ht_enable && is_supported_ht(padapter->registrypriv.wireless_mode)) {
|
||||
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], _HT_CAPABILITY_IE_, &ht_ielen, pnetwork->network.IELength - ie_offset);
|
||||
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], WLAN_EID_HT_CAPABILITY, &ht_ielen, pnetwork->network.IELength - ie_offset);
|
||||
if (p && ht_ielen > 0)
|
||||
ht_cap = _TRUE;
|
||||
}
|
||||
@ -423,7 +423,7 @@ static inline char *iwe_stream_rate_process(_adapter *padapter,
|
||||
|
||||
/* parsing HT_CAP_IE */
|
||||
if(is_supported_ht(padapter->registrypriv.wireless_mode)) {
|
||||
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], _HT_CAPABILITY_IE_, &ht_ielen, pnetwork->network.IELength - ie_offset);
|
||||
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], WLAN_EID_HT_CAPABILITY, &ht_ielen, pnetwork->network.IELength - ie_offset);
|
||||
if (p && ht_ielen > 0) {
|
||||
struct rtw_ieee80211_ht_cap *pht_capie;
|
||||
ht_cap = _TRUE;
|
||||
@ -1093,7 +1093,7 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen)
|
||||
while (cnt < ielen) {
|
||||
eid = buf[cnt];
|
||||
|
||||
if ((eid == _VENDOR_SPECIFIC_IE_) && (_rtw_memcmp(&buf[cnt + 2], wps_oui, 4) == _TRUE)) {
|
||||
if ((eid == WLAN_EID_VENDOR_SPECIFIC) && (_rtw_memcmp(&buf[cnt + 2], wps_oui, 4) == _TRUE)) {
|
||||
RTW_INFO("SET WPS_IE\n");
|
||||
|
||||
padapter->securitypriv.wps_ie_len = ((buf[cnt + 1] + 2) < MAX_WPS_IE_LEN) ? (buf[cnt + 1] + 2) : MAX_WPS_IE_LEN;
|
||||
@ -1150,7 +1150,7 @@ static int rtw_wx_get_name(struct net_device *dev,
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE) == _TRUE) {
|
||||
/* parsing HT_CAP_IE */
|
||||
if( is_supported_ht(padapter->registrypriv.wireless_mode)&&(padapter->registrypriv.ht_enable)) {
|
||||
p = rtw_get_ie(&pcur_bss->IEs[12], _HT_CAPABILITY_IE_, &ht_ielen, pcur_bss->IELength - 12);
|
||||
p = rtw_get_ie(&pcur_bss->IEs[12], WLAN_EID_HT_CAPABILITY, &ht_ielen, pcur_bss->IELength - 12);
|
||||
if (p && ht_ielen > 0 )
|
||||
ht_cap = _TRUE;
|
||||
}
|
||||
@ -7450,7 +7450,7 @@ static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param,
|
||||
|
||||
memcpy(pmlmepriv->wps_beacon_ie, param->u.bcn_ie.buf, ie_len);
|
||||
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_VENDOR_SPECIFIC, wps_oui, _TRUE);
|
||||
|
||||
pmlmeext->bstart_bss = _TRUE;
|
||||
|
||||
@ -7833,7 +7833,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
|
||||
int probereq_wpsie_len = len;
|
||||
u8 wps_oui[4] = {0x0, 0x50, 0xf2, 0x04};
|
||||
|
||||
if ((_VENDOR_SPECIFIC_IE_ == probereq_wpsie[0]) &&
|
||||
if ((WLAN_EID_VENDOR_SPECIFIC == probereq_wpsie[0]) &&
|
||||
(_rtw_memcmp(&probereq_wpsie[2], wps_oui, 4) == _TRUE)) {
|
||||
cp_sz = probereq_wpsie_len > MAX_WPS_IE_LEN ? MAX_WPS_IE_LEN : probereq_wpsie_len;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user