mirror of https://gitee.com/openkylin/linux.git
staging: rtl8723au: Get rid of obsolete _FIXED_IE_LENGTH_ + _BEACON_IE_OFFSET
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
68e6c79609
commit
1de65ccb1f
|
@ -77,8 +77,8 @@ static void update_BCNTIM(struct rtw_adapter *padapter)
|
||||||
|
|
||||||
tim_bitmap_le = cpu_to_le16(pstapriv->tim_bitmap);
|
tim_bitmap_le = cpu_to_le16(pstapriv->tim_bitmap);
|
||||||
|
|
||||||
p = rtw_get_ie23a(pie + _FIXED_IE_LENGTH_, WLAN_EID_TIM, &tim_ielen,
|
p = rtw_get_ie23a(pie, WLAN_EID_TIM, &tim_ielen,
|
||||||
pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_);
|
pnetwork_mlmeext->IELength);
|
||||||
if (p != NULL && tim_ielen>0) {
|
if (p != NULL && tim_ielen>0) {
|
||||||
tim_ielen += 2;
|
tim_ielen += 2;
|
||||||
|
|
||||||
|
@ -94,19 +94,17 @@ static void update_BCNTIM(struct rtw_adapter *padapter)
|
||||||
tim_ielen = 0;
|
tim_ielen = 0;
|
||||||
|
|
||||||
/* calulate head_len */
|
/* calulate head_len */
|
||||||
offset = _FIXED_IE_LENGTH_;
|
offset = 0;
|
||||||
|
|
||||||
/* get ssid_ie len */
|
/* get ssid_ie len */
|
||||||
p = rtw_get_ie23a(pie + _BEACON_IE_OFFSET_, WLAN_EID_SSID,
|
p = rtw_get_ie23a(pie, WLAN_EID_SSID,
|
||||||
&tmp_len, (pnetwork_mlmeext->IELength -
|
&tmp_len, pnetwork_mlmeext->IELength);
|
||||||
_BEACON_IE_OFFSET_));
|
|
||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
offset += tmp_len+2;
|
offset += tmp_len+2;
|
||||||
|
|
||||||
/* get supported rates len */
|
/* get supported rates len */
|
||||||
p = rtw_get_ie23a(pie + _BEACON_IE_OFFSET_, WLAN_EID_SUPP_RATES,
|
p = rtw_get_ie23a(pie, WLAN_EID_SUPP_RATES,
|
||||||
&tmp_len, (pnetwork_mlmeext->IELength -
|
&tmp_len, pnetwork_mlmeext->IELength);
|
||||||
_BEACON_IE_OFFSET_));
|
|
||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
offset += tmp_len+2;
|
offset += tmp_len+2;
|
||||||
|
|
||||||
|
@ -663,9 +661,8 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
|
||||||
/* and at first time the security ie (RSN/WPA IE) will not include in beacon. */
|
/* and at first time the security ie (RSN/WPA IE) will not include in beacon. */
|
||||||
if (NULL == cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
|
if (NULL == cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
|
||||||
WLAN_OUI_TYPE_MICROSOFT_WPS,
|
WLAN_OUI_TYPE_MICROSOFT_WPS,
|
||||||
pnetwork->IEs + _FIXED_IE_LENGTH_,
|
pnetwork->IEs,
|
||||||
pnetwork->IELength -
|
pnetwork->IELength))
|
||||||
_FIXED_IE_LENGTH_))
|
|
||||||
pmlmeext->bstart_bss = true;
|
pmlmeext->bstart_bss = true;
|
||||||
|
|
||||||
/* todo: update wmm, ht cap */
|
/* todo: update wmm, ht cap */
|
||||||
|
@ -804,9 +801,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct wlan_bssid_ex *pbss_network = &pmlmepriv->cur_network.network;
|
struct wlan_bssid_ex *pbss_network = &pmlmepriv->cur_network.network;
|
||||||
u8 *ie = pbss_network->IEs;
|
u8 *ie = pbss_network->IEs;
|
||||||
u8 *pbuf = mgmt->u.beacon.variable - _FIXED_IE_LENGTH_;
|
u8 *pbuf = mgmt->u.beacon.variable;
|
||||||
len -= (offsetof(struct ieee80211_mgmt, u.beacon.variable) -
|
len -= offsetof(struct ieee80211_mgmt, u.beacon.variable);
|
||||||
_FIXED_IE_LENGTH_);
|
|
||||||
/* SSID */
|
/* SSID */
|
||||||
/* Supported rates */
|
/* Supported rates */
|
||||||
/* DS Params */
|
/* DS Params */
|
||||||
|
@ -841,8 +837,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
|
||||||
memcpy(pbss_network->MacAddress, myid(&padapter->eeprompriv), ETH_ALEN);
|
memcpy(pbss_network->MacAddress, myid(&padapter->eeprompriv), ETH_ALEN);
|
||||||
|
|
||||||
/* SSID */
|
/* SSID */
|
||||||
p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_SSID, &ie_len,
|
p = rtw_get_ie23a(ie, WLAN_EID_SSID, &ie_len, pbss_network->IELength);
|
||||||
(pbss_network->IELength -_BEACON_IE_OFFSET_));
|
|
||||||
if (p && ie_len > 0) {
|
if (p && ie_len > 0) {
|
||||||
memset(&pbss_network->Ssid, 0, sizeof(struct cfg80211_ssid));
|
memset(&pbss_network->Ssid, 0, sizeof(struct cfg80211_ssid));
|
||||||
memcpy(pbss_network->Ssid.ssid, (p + 2), ie_len);
|
memcpy(pbss_network->Ssid.ssid, (p + 2), ie_len);
|
||||||
|
@ -851,8 +846,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
|
||||||
|
|
||||||
/* chnnel */
|
/* chnnel */
|
||||||
channel = 0;
|
channel = 0;
|
||||||
p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_DS_PARAMS, &ie_len,
|
p = rtw_get_ie23a(ie, WLAN_EID_DS_PARAMS, &ie_len,
|
||||||
(pbss_network->IELength - _BEACON_IE_OFFSET_));
|
pbss_network->IELength);
|
||||||
if (p && ie_len > 0)
|
if (p && ie_len > 0)
|
||||||
channel = *(p + 2);
|
channel = *(p + 2);
|
||||||
|
|
||||||
|
@ -860,16 +855,16 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
|
||||||
|
|
||||||
memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
|
memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
|
||||||
/* get supported rates */
|
/* get supported rates */
|
||||||
p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_SUPP_RATES, &ie_len,
|
p = rtw_get_ie23a(ie, WLAN_EID_SUPP_RATES, &ie_len,
|
||||||
(pbss_network->IELength - _BEACON_IE_OFFSET_));
|
pbss_network->IELength);
|
||||||
if (p) {
|
if (p) {
|
||||||
memcpy(supportRate, p+2, ie_len);
|
memcpy(supportRate, p+2, ie_len);
|
||||||
supportRateNum = ie_len;
|
supportRateNum = ie_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get ext_supported rates */
|
/* get ext_supported rates */
|
||||||
p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_EXT_SUPP_RATES,
|
p = rtw_get_ie23a(ie, WLAN_EID_EXT_SUPP_RATES,
|
||||||
&ie_len, pbss_network->IELength - _BEACON_IE_OFFSET_);
|
&ie_len, pbss_network->IELength);
|
||||||
if (p) {
|
if (p) {
|
||||||
memcpy(supportRate+supportRateNum, p+2, ie_len);
|
memcpy(supportRate+supportRateNum, p+2, ie_len);
|
||||||
supportRateNum += ie_len;
|
supportRateNum += ie_len;
|
||||||
|
@ -881,8 +876,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
|
||||||
rtw_set_supported_rate23a(pbss_network->SupportedRates, network_type);
|
rtw_set_supported_rate23a(pbss_network->SupportedRates, network_type);
|
||||||
|
|
||||||
/* parsing ERP_IE */
|
/* parsing ERP_IE */
|
||||||
p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_ERP_INFO, &ie_len,
|
p = rtw_get_ie23a(ie, WLAN_EID_ERP_INFO, &ie_len,
|
||||||
(pbss_network->IELength - _BEACON_IE_OFFSET_));
|
pbss_network->IELength);
|
||||||
if (p && ie_len > 0)
|
if (p && ie_len > 0)
|
||||||
ERP_IE_handler23a(padapter, p);
|
ERP_IE_handler23a(padapter, p);
|
||||||
|
|
||||||
|
@ -898,8 +893,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
|
||||||
group_cipher = 0; pairwise_cipher = 0;
|
group_cipher = 0; pairwise_cipher = 0;
|
||||||
psecuritypriv->wpa2_group_cipher = 0;
|
psecuritypriv->wpa2_group_cipher = 0;
|
||||||
psecuritypriv->wpa2_pairwise_cipher = 0;
|
psecuritypriv->wpa2_pairwise_cipher = 0;
|
||||||
p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_RSN, &ie_len,
|
p = rtw_get_ie23a(ie, WLAN_EID_RSN, &ie_len,
|
||||||
(pbss_network->IELength - _BEACON_IE_OFFSET_));
|
pbss_network->IELength);
|
||||||
if (p && ie_len > 0) {
|
if (p && ie_len > 0) {
|
||||||
if (rtw_parse_wpa2_ie23a(p, ie_len+2, &group_cipher,
|
if (rtw_parse_wpa2_ie23a(p, ie_len+2, &group_cipher,
|
||||||
&pairwise_cipher, NULL) == _SUCCESS) {
|
&pairwise_cipher, NULL) == _SUCCESS) {
|
||||||
|
@ -919,10 +914,9 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
|
||||||
pairwise_cipher = 0;
|
pairwise_cipher = 0;
|
||||||
psecuritypriv->wpa_group_cipher = 0;
|
psecuritypriv->wpa_group_cipher = 0;
|
||||||
psecuritypriv->wpa_pairwise_cipher = 0;
|
psecuritypriv->wpa_pairwise_cipher = 0;
|
||||||
for (p = ie + _BEACON_IE_OFFSET_; ;p += (ie_len + 2)) {
|
for (p = ie; ;p += (ie_len + 2)) {
|
||||||
p = rtw_get_ie23a(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len,
|
p = rtw_get_ie23a(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len,
|
||||||
(pbss_network->IELength - _BEACON_IE_OFFSET_ -
|
pbss_network->IELength - (ie_len + 2));
|
||||||
(ie_len + 2)));
|
|
||||||
if ((p) && (!memcmp(p+2, RTW_WPA_OUI23A_TYPE, 4))) {
|
if ((p) && (!memcmp(p+2, RTW_WPA_OUI23A_TYPE, 4))) {
|
||||||
if (rtw_parse_wpa_ie23a(p, ie_len+2, &group_cipher,
|
if (rtw_parse_wpa_ie23a(p, ie_len+2, &group_cipher,
|
||||||
&pairwise_cipher, NULL) == _SUCCESS) {
|
&pairwise_cipher, NULL) == _SUCCESS) {
|
||||||
|
@ -947,10 +941,10 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
|
||||||
ie_len = 0;
|
ie_len = 0;
|
||||||
pmlmepriv->qos_option = 0;
|
pmlmepriv->qos_option = 0;
|
||||||
if (pregistrypriv->wmm_enable) {
|
if (pregistrypriv->wmm_enable) {
|
||||||
for (p = ie + _BEACON_IE_OFFSET_; ;p += (ie_len + 2)) {
|
for (p = ie; ;p += (ie_len + 2)) {
|
||||||
p = rtw_get_ie23a(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len,
|
p = rtw_get_ie23a(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len,
|
||||||
(pbss_network->IELength -
|
(pbss_network->IELength -
|
||||||
_BEACON_IE_OFFSET_ - (ie_len + 2)));
|
(ie_len + 2)));
|
||||||
if ((p) && !memcmp(p+2, WMM_PARA_IE, 6)) {
|
if ((p) && !memcmp(p+2, WMM_PARA_IE, 6)) {
|
||||||
pmlmepriv->qos_option = 1;
|
pmlmepriv->qos_option = 1;
|
||||||
|
|
||||||
|
@ -970,8 +964,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* parsing HT_CAP_IE */
|
/* parsing HT_CAP_IE */
|
||||||
p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_HT_CAPABILITY, &ie_len,
|
p = rtw_get_ie23a(ie, WLAN_EID_HT_CAPABILITY, &ie_len,
|
||||||
(pbss_network->IELength - _BEACON_IE_OFFSET_));
|
pbss_network->IELength);
|
||||||
if (p && ie_len > 0) {
|
if (p && ie_len > 0) {
|
||||||
u8 rf_type;
|
u8 rf_type;
|
||||||
|
|
||||||
|
@ -1002,8 +996,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* parsing HT_INFO_IE */
|
/* parsing HT_INFO_IE */
|
||||||
p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_HT_OPERATION, &ie_len,
|
p = rtw_get_ie23a(ie, WLAN_EID_HT_OPERATION, &ie_len,
|
||||||
(pbss_network->IELength - _BEACON_IE_OFFSET_));
|
pbss_network->IELength);
|
||||||
if (p && ie_len > 0)
|
if (p && ie_len > 0)
|
||||||
pHT_info_ie = p;
|
pHT_info_ie = p;
|
||||||
|
|
||||||
|
@ -1176,7 +1170,7 @@ static void update_bcn_erpinfo_ie(struct rtw_adapter *padapter)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* parsing ERP_IE */
|
/* parsing ERP_IE */
|
||||||
p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_ERP_INFO, &len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
|
p = rtw_get_ie23a(ie, WLAN_EID_ERP_INFO, &len, pnetwork->IELength);
|
||||||
if (p && len > 0) {
|
if (p && len > 0) {
|
||||||
if (pmlmepriv->num_sta_non_erp == 1)
|
if (pmlmepriv->num_sta_non_erp == 1)
|
||||||
p[2] |= WLAN_ERP_NON_ERP_PRESENT |
|
p[2] |= WLAN_ERP_NON_ERP_PRESENT |
|
||||||
|
|
|
@ -546,10 +546,8 @@ static int rtw_is_desired_network(struct rtw_adapter *adapter,
|
||||||
if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) {
|
if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) {
|
||||||
if (cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
|
if (cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
|
||||||
WLAN_OUI_TYPE_MICROSOFT_WPA,
|
WLAN_OUI_TYPE_MICROSOFT_WPA,
|
||||||
pnetwork->network.IEs +
|
pnetwork->network.IEs,
|
||||||
_FIXED_IE_LENGTH_,
|
pnetwork->network.IELength))
|
||||||
pnetwork->network.IELength -
|
|
||||||
_FIXED_IE_LENGTH_))
|
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
@ -1916,7 +1914,7 @@ int rtw_restruct_wmm_ie23a(struct rtw_adapter *adapter, u8 *in_ie,
|
||||||
unsigned int ielength = 0;
|
unsigned int ielength = 0;
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
|
|
||||||
i = _FIXED_IE_LENGTH_; /* after the fixed IE */
|
i = 0; /* after the fixed IE */
|
||||||
while (i < in_len) {
|
while (i < in_len) {
|
||||||
ielength = initial_out_len;
|
ielength = initial_out_len;
|
||||||
|
|
||||||
|
@ -2025,9 +2023,7 @@ int rtw_restruct_sec_ie23a(struct rtw_adapter *adapter, u8 *in_ie, u8 *out_ie,
|
||||||
("+rtw_restruct_sec_ie23a: ndisauthmode=%d "
|
("+rtw_restruct_sec_ie23a: ndisauthmode=%d "
|
||||||
"ndissecuritytype=%d\n", ndisauthmode, ndissecuritytype));
|
"ndissecuritytype=%d\n", ndisauthmode, ndissecuritytype));
|
||||||
|
|
||||||
/* copy fixed ie only */
|
ielength = 0;
|
||||||
memcpy(out_ie, in_ie, _FIXED_IE_LENGTH_);
|
|
||||||
ielength = _FIXED_IE_LENGTH_;
|
|
||||||
if (ndisauthmode == Ndis802_11AuthModeWPA ||
|
if (ndisauthmode == Ndis802_11AuthModeWPA ||
|
||||||
ndisauthmode == Ndis802_11AuthModeWPAPSK)
|
ndisauthmode == Ndis802_11AuthModeWPAPSK)
|
||||||
authmode = WLAN_EID_VENDOR_SPECIFIC;
|
authmode = WLAN_EID_VENDOR_SPECIFIC;
|
||||||
|
@ -2158,8 +2154,7 @@ bool rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie,
|
||||||
|
|
||||||
phtpriv->ht_option = false;
|
phtpriv->ht_option = false;
|
||||||
|
|
||||||
p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, in_ie + _FIXED_IE_LENGTH_,
|
p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, in_ie, in_len);
|
||||||
in_len - _FIXED_IE_LENGTH_);
|
|
||||||
|
|
||||||
if (p && p[1] > 0) {
|
if (p && p[1] > 0) {
|
||||||
u32 rx_packet_offset, max_recvbuf_sz;
|
u32 rx_packet_offset, max_recvbuf_sz;
|
||||||
|
@ -2204,9 +2199,7 @@ bool rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie,
|
||||||
|
|
||||||
phtpriv->ht_option = true;
|
phtpriv->ht_option = true;
|
||||||
|
|
||||||
p = cfg80211_find_ie(WLAN_EID_HT_OPERATION,
|
p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, in_ie, in_len);
|
||||||
in_ie + _FIXED_IE_LENGTH_,
|
|
||||||
in_len - _FIXED_IE_LENGTH_);
|
|
||||||
if (p && (p[1] == sizeof(struct ieee80211_ht_operation))) {
|
if (p && (p[1] == sizeof(struct ieee80211_ht_operation))) {
|
||||||
out_len = *pout_len;
|
out_len = *pout_len;
|
||||||
pframe = rtw_set_ie23a(out_ie + out_len,
|
pframe = rtw_set_ie23a(out_ie + out_len,
|
||||||
|
|
|
@ -2420,12 +2420,9 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms)
|
||||||
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) {
|
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) {
|
||||||
u8 *iebuf;
|
u8 *iebuf;
|
||||||
int buflen;
|
int buflen;
|
||||||
pframe -= _BEACON_IE_OFFSET_;
|
|
||||||
/* DBG_8723A("ie len =%d\n", cur_network->IELength); */
|
/* DBG_8723A("ie len =%d\n", cur_network->IELength); */
|
||||||
memcpy(pframe, cur_network->IEs, cur_network->IELength);
|
memcpy(pframe, cur_network->IEs, cur_network->IELength);
|
||||||
len_diff = update_hidden_ssid(pframe + _BEACON_IE_OFFSET_,
|
len_diff = update_hidden_ssid(pframe, cur_network->IELength,
|
||||||
cur_network->IELength -
|
|
||||||
_BEACON_IE_OFFSET_,
|
|
||||||
pmlmeinfo->hidden_ssid_mode);
|
pmlmeinfo->hidden_ssid_mode);
|
||||||
pframe += (cur_network->IELength+len_diff);
|
pframe += (cur_network->IELength+len_diff);
|
||||||
pattrib->pktlen += (cur_network->IELength+len_diff);
|
pattrib->pktlen += (cur_network->IELength+len_diff);
|
||||||
|
@ -2585,13 +2582,10 @@ static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da,
|
||||||
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) {
|
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) {
|
||||||
pwps_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
|
pwps_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
|
||||||
WLAN_OUI_TYPE_MICROSOFT_WPS,
|
WLAN_OUI_TYPE_MICROSOFT_WPS,
|
||||||
cur_network->IEs +
|
cur_network->IEs,
|
||||||
_FIXED_IE_LENGTH_,
|
cur_network->IELength);
|
||||||
cur_network->IELength -
|
|
||||||
_FIXED_IE_LENGTH_);
|
|
||||||
|
|
||||||
memcpy(pframe, cur_network->IEs + _FIXED_IE_LENGTH_,
|
memcpy(pframe, cur_network->IEs, cur_network->IELength);
|
||||||
cur_network->IELength - _FIXED_IE_LENGTH_);
|
|
||||||
pframe += cur_network->IELength;
|
pframe += cur_network->IELength;
|
||||||
pattrib->pktlen += cur_network->IELength;
|
pattrib->pktlen += cur_network->IELength;
|
||||||
|
|
||||||
|
@ -3045,9 +3039,8 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status,
|
||||||
if (pstat->flags & WLAN_STA_HT && pmlmepriv->htpriv.ht_option) {
|
if (pstat->flags & WLAN_STA_HT && pmlmepriv->htpriv.ht_option) {
|
||||||
/* FILL HT CAP INFO IE */
|
/* FILL HT CAP INFO IE */
|
||||||
/* p = hostapd_eid_ht_capabilities_info(hapd, p); */
|
/* p = hostapd_eid_ht_capabilities_info(hapd, p); */
|
||||||
p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
|
p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, ie,
|
||||||
ie + _BEACON_IE_OFFSET_,
|
pnetwork->IELength);
|
||||||
pnetwork->IELength -_BEACON_IE_OFFSET_);
|
|
||||||
if (p && p[1]) {
|
if (p && p[1]) {
|
||||||
memcpy(pframe, p, p[1] + 2);
|
memcpy(pframe, p, p[1] + 2);
|
||||||
pframe += (p[1] + 2);
|
pframe += (p[1] + 2);
|
||||||
|
@ -3056,9 +3049,8 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status,
|
||||||
|
|
||||||
/* FILL HT ADD INFO IE */
|
/* FILL HT ADD INFO IE */
|
||||||
/* p = hostapd_eid_ht_operation(hapd, p); */
|
/* p = hostapd_eid_ht_operation(hapd, p); */
|
||||||
p = cfg80211_find_ie(WLAN_EID_HT_OPERATION,
|
p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, ie,
|
||||||
ie + _BEACON_IE_OFFSET_,
|
pnetwork->IELength);
|
||||||
pnetwork->IELength - _BEACON_IE_OFFSET_);
|
|
||||||
if (p && p[1] > 0) {
|
if (p && p[1] > 0) {
|
||||||
memcpy(pframe, p, p[1] + 2);
|
memcpy(pframe, p, p[1] + 2);
|
||||||
pframe += (p[1] + 2);
|
pframe += (p[1] + 2);
|
||||||
|
@ -3072,10 +3064,9 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status,
|
||||||
0x01, 0x01};
|
0x01, 0x01};
|
||||||
int ie_len = 0;
|
int ie_len = 0;
|
||||||
|
|
||||||
for (p = ie + _BEACON_IE_OFFSET_; ; p += (ie_len + 2)) {
|
for (p = ie; ; p += (ie_len + 2)) {
|
||||||
p = cfg80211_find_ie(WLAN_EID_VENDOR_SPECIFIC, p,
|
p = cfg80211_find_ie(WLAN_EID_VENDOR_SPECIFIC, p,
|
||||||
pnetwork->IELength -
|
pnetwork->IELength - (ie_len + 2));
|
||||||
_BEACON_IE_OFFSET_ - (ie_len + 2));
|
|
||||||
if (p)
|
if (p)
|
||||||
ie_len = p[1];
|
ie_len = p[1];
|
||||||
else
|
else
|
||||||
|
@ -4534,9 +4525,8 @@ static void process_80211d(struct rtw_adapter *padapter,
|
||||||
u8 noc; /* number of channel */
|
u8 noc; /* number of channel */
|
||||||
u8 j, k;
|
u8 j, k;
|
||||||
|
|
||||||
ie = cfg80211_find_ie(WLAN_EID_COUNTRY,
|
ie = cfg80211_find_ie(WLAN_EID_COUNTRY, bssid->IEs,
|
||||||
bssid->IEs + _FIXED_IE_LENGTH_,
|
bssid->IELength);
|
||||||
bssid->IELength - _FIXED_IE_LENGTH_);
|
|
||||||
if (!ie || ie[1] < IEEE80211_COUNTRY_IE_MIN_LEN)
|
if (!ie || ie[1] < IEEE80211_COUNTRY_IE_MIN_LEN)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -6065,10 +6055,9 @@ int set_tx_beacon_cmd23a(struct rtw_adapter* padapter)
|
||||||
memcpy(&ptxBeacon_parm->network, &pmlmeinfo->network,
|
memcpy(&ptxBeacon_parm->network, &pmlmeinfo->network,
|
||||||
sizeof(struct wlan_bssid_ex));
|
sizeof(struct wlan_bssid_ex));
|
||||||
|
|
||||||
len_diff = update_hidden_ssid(
|
len_diff = update_hidden_ssid(ptxBeacon_parm->network.IEs,
|
||||||
ptxBeacon_parm->network.IEs+_BEACON_IE_OFFSET_,
|
ptxBeacon_parm->network.IELength,
|
||||||
ptxBeacon_parm->network.IELength-_BEACON_IE_OFFSET_,
|
pmlmeinfo->hidden_ssid_mode);
|
||||||
pmlmeinfo->hidden_ssid_mode);
|
|
||||||
ptxBeacon_parm->network.IELength += len_diff;
|
ptxBeacon_parm->network.IELength += len_diff;
|
||||||
|
|
||||||
init_h2fwcmd_w_parm_no_rsp(ph2c, ptxBeacon_parm,
|
init_h2fwcmd_w_parm_no_rsp(ph2c, ptxBeacon_parm,
|
||||||
|
|
|
@ -428,10 +428,9 @@ static void ConstructProbeRsp(struct rtw_adapter *padapter, u8 *pframe,
|
||||||
if (cur_network->IELength > MAX_IE_SZ)
|
if (cur_network->IELength > MAX_IE_SZ)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memcpy(mgmt->u.probe_resp.variable,
|
memcpy(mgmt->u.probe_resp.variable, cur_network->IEs,
|
||||||
cur_network->IEs + _FIXED_IE_LENGTH_,
|
cur_network->IELength);
|
||||||
cur_network->IELength - _FIXED_IE_LENGTH_);
|
pktlen += (cur_network->IELength);
|
||||||
pktlen += (cur_network->IELength - _FIXED_IE_LENGTH_);
|
|
||||||
|
|
||||||
*pLength = pktlen;
|
*pLength = pktlen;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,11 +23,6 @@
|
||||||
*/
|
*/
|
||||||
#define WiFiNavUpperUs 30000 /* 30 ms */
|
#define WiFiNavUpperUs 30000 /* 30 ms */
|
||||||
|
|
||||||
#define _BEACON_IE_OFFSET_ 0
|
|
||||||
|
|
||||||
#define _FIXED_IE_LENGTH_ _BEACON_IE_OFFSET_
|
|
||||||
|
|
||||||
|
|
||||||
#define EID_BSSIntolerantChlReport 73
|
#define EID_BSSIntolerantChlReport 73
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -264,8 +264,8 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
|
||||||
|
|
||||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||||
|
|
||||||
notify_ie = pnetwork->network.IEs + _FIXED_IE_LENGTH_;
|
notify_ie = pnetwork->network.IEs;
|
||||||
notify_ielen = pnetwork->network.IELength - _FIXED_IE_LENGTH_;
|
notify_ielen = pnetwork->network.IELength;
|
||||||
|
|
||||||
/* We've set wiphy's signal_type as CFG80211_SIGNAL_TYPE_MBM:
|
/* We've set wiphy's signal_type as CFG80211_SIGNAL_TYPE_MBM:
|
||||||
* signal strength in mBm (100*dBm)
|
* signal strength in mBm (100*dBm)
|
||||||
|
@ -1191,8 +1191,7 @@ static u16 rtw_get_cur_max_rate(struct rtw_adapter *adapter)
|
||||||
u16 mcs_rate = 0;
|
u16 mcs_rate = 0;
|
||||||
|
|
||||||
p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
|
p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
|
||||||
&pcur_bss->IEs[_FIXED_IE_LENGTH_],
|
pcur_bss->IEs, pcur_bss->IELength);
|
||||||
pcur_bss->IELength - _FIXED_IE_LENGTH_);
|
|
||||||
if (p && p[1] > 0) {
|
if (p && p[1] > 0) {
|
||||||
pht_capie = (struct ieee80211_ht_cap *)(p + 2);
|
pht_capie = (struct ieee80211_ht_cap *)(p + 2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue