Commit a9e9d363 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: rtw_get_bcn_info23a(): Use cfg80211_find_ie()

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7f234006
...@@ -909,8 +909,7 @@ void rtw_get_bcn_info23a(struct wlan_network *pnetwork) ...@@ -909,8 +909,7 @@ void rtw_get_bcn_info23a(struct wlan_network *pnetwork)
u16 wpa_len = 0, rsn_len = 0; u16 wpa_len = 0, rsn_len = 0;
struct HT_info_element *pht_info = NULL; struct HT_info_element *pht_info = NULL;
struct ieee80211_ht_cap *pht_cap = NULL; struct ieee80211_ht_cap *pht_cap = NULL;
unsigned int len; const u8 *p;
unsigned char *p;
cap = get_unaligned_le16( cap = get_unaligned_le16(
rtw_get_capability23a_from_ie(pnetwork->network.IEs)); rtw_get_capability23a_from_ie(pnetwork->network.IEs));
...@@ -951,20 +950,20 @@ void rtw_get_bcn_info23a(struct wlan_network *pnetwork) ...@@ -951,20 +950,20 @@ void rtw_get_bcn_info23a(struct wlan_network *pnetwork)
/* get bwmode and ch_offset */ /* get bwmode and ch_offset */
/* parsing HT_CAP_IE */ /* parsing HT_CAP_IE */
p = rtw_get_ie23a(pnetwork->network.IEs + _FIXED_IE_LENGTH_, p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
WLAN_EID_HT_CAPABILITY, &len, pnetwork->network.IEs + _FIXED_IE_LENGTH_,
pnetwork->network.IELength - _FIXED_IE_LENGTH_); pnetwork->network.IELength - _FIXED_IE_LENGTH_);
if (p && len > 0) { if (p && p[1] > 0) {
pht_cap = (struct ieee80211_ht_cap *)(p + 2); pht_cap = (struct ieee80211_ht_cap *)(p + 2);
pnetwork->BcnInfo.ht_cap_info = pht_cap->cap_info; pnetwork->BcnInfo.ht_cap_info = pht_cap->cap_info;
} else { } else {
pnetwork->BcnInfo.ht_cap_info = 0; pnetwork->BcnInfo.ht_cap_info = 0;
} }
/* parsing HT_INFO_IE */ /* parsing HT_INFO_IE */
p = rtw_get_ie23a(pnetwork->network.IEs + _FIXED_IE_LENGTH_, p = cfg80211_find_ie(WLAN_EID_HT_OPERATION,
WLAN_EID_HT_OPERATION, &len, pnetwork->network.IEs + _FIXED_IE_LENGTH_,
pnetwork->network.IELength - _FIXED_IE_LENGTH_); pnetwork->network.IELength - _FIXED_IE_LENGTH_);
if (p && len > 0) { if (p && p[1] > 0) {
pht_info = (struct HT_info_element *)(p + 2); pht_info = (struct HT_info_element *)(p + 2);
pnetwork->BcnInfo.ht_info_infos_0 = pht_info->infos[0]; pnetwork->BcnInfo.ht_info_infos_0 = pht_info->infos[0];
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment