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

staging: rtl8723au: rtw_get_cur_max_rate23a(): We are in N mode if...

staging: rtl8723au: rtw_get_cur_max_rate23a(): We are in N mode if WLAN_EID_HT_CAPABILITY is present
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8f9558b9
......@@ -100,9 +100,7 @@ u16 rtw_get_cur_max_rate23a(struct rtw_adapter *adapter)
u8 bw_40MHz = 0, short_GI_20 = 0, short_GI_40 = 0;
u16 mcs_rate = 0;
if (pmlmeext->cur_wireless_mode & (WIRELESS_11_24N|WIRELESS_11_5N)) {
p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
&pcur_bss->IEs[12],
p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, &pcur_bss->IEs[12],
pcur_bss->IELength - 12);
if (p && p[1] > 0) {
pht_capie = (struct ieee80211_ht_cap *)(p + 2);
......@@ -119,11 +117,9 @@ u16 rtw_get_cur_max_rate23a(struct rtw_adapter *adapter)
/* short_GI = (pht_capie->cap_info & (IEEE80211_HT_CAP
_SGI_20|IEEE80211_HT_CAP_SGI_40)) ? 1 : 0; */
short_GI_20 =
(pmlmeinfo->ht_cap.cap_info &
short_GI_20 = (pmlmeinfo->ht_cap.cap_info &
cpu_to_le16(IEEE80211_HT_CAP_SGI_20)) ? 1:0;
short_GI_40 =
(pmlmeinfo->ht_cap.cap_info &
short_GI_40 = (pmlmeinfo->ht_cap.cap_info &
cpu_to_le16(IEEE80211_HT_CAP_SGI_40)) ? 1:0;
rf_type = rtl8723a_get_rf_type(adapter);
......@@ -131,10 +127,9 @@ u16 rtw_get_cur_max_rate23a(struct rtw_adapter *adapter)
pregistrypriv->cbw40_enable,
short_GI_20, short_GI_40,
&pmlmeinfo->ht_cap.mcs);
}
} else {
while ((pcur_bss->SupportedRates[i] != 0) &&
(pcur_bss->SupportedRates[i] != 0xFF)) {
while (pcur_bss->SupportedRates[i] != 0 &&
pcur_bss->SupportedRates[i] != 0xFF) {
rate = pcur_bss->SupportedRates[i] & 0x7F;
if (rate>max_rate)
max_rate = rate;
......
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