60 lines
2.4 KiB
Diff
60 lines
2.4 KiB
Diff
From: Jes Sorensen <Jes.Sorensen@redhat.com>
|
|
Date: Sat, 31 May 2014 18:05:19 +0200
|
|
Subject: [020/249] staging: rtl8723au: collect_bss_info23a(): ieee80211_mgmt
|
|
capab_info is little endian
|
|
Origin: https://git.kernel.org/linus/c2b8047aff855bfbcb5a2ff478465c01bb82fda5
|
|
|
|
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
---
|
|
drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
|
|
index fde8a32..1c22d1b 100644
|
|
--- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
|
|
+++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
|
|
@@ -4546,7 +4546,7 @@ int collect_bss_info23a(struct rtw_adapter *padapter,
|
|
if (ieee80211_is_beacon(mgmt->frame_control)) {
|
|
bssid->reserved = 1;
|
|
ie_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
|
|
- capab_info = mgmt->u.beacon.capab_info;
|
|
+ capab_info = get_unaligned_le16(&mgmt->u.beacon.capab_info);
|
|
bssid->BeaconPeriod =
|
|
get_unaligned_le16(&mgmt->u.beacon.beacon_int);
|
|
} else if (ieee80211_is_probe_req(mgmt->frame_control)) {
|
|
@@ -4560,13 +4560,13 @@ int collect_bss_info23a(struct rtw_adapter *padapter,
|
|
ie_offset = offsetof(struct ieee80211_mgmt,
|
|
u.probe_resp.variable);
|
|
bssid->reserved = 3;
|
|
- capab_info = mgmt->u.probe_resp.capab_info;
|
|
+ capab_info = get_unaligned_le16(&mgmt->u.probe_resp.capab_info);
|
|
bssid->BeaconPeriod =
|
|
get_unaligned_le16(&mgmt->u.probe_resp.beacon_int);
|
|
} else {
|
|
bssid->reserved = 0;
|
|
ie_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
|
|
- capab_info = mgmt->u.beacon.capab_info;
|
|
+ capab_info = get_unaligned_le16(&mgmt->u.beacon.capab_info);
|
|
bssid->BeaconPeriod =
|
|
padapter->registrypriv.dev_network.BeaconPeriod;
|
|
}
|
|
@@ -4662,7 +4662,7 @@ int collect_bss_info23a(struct rtw_adapter *padapter,
|
|
return _SUCCESS;
|
|
}
|
|
|
|
- if (capab_info & BIT(0)) {
|
|
+ if (capab_info & WLAN_CAPABILITY_ESS) {
|
|
bssid->ifmode = NL80211_IFTYPE_STATION;
|
|
ether_addr_copy(bssid->MacAddress, mgmt->sa);
|
|
} else {
|
|
@@ -4670,7 +4670,7 @@ int collect_bss_info23a(struct rtw_adapter *padapter,
|
|
ether_addr_copy(bssid->MacAddress, mgmt->bssid);
|
|
}
|
|
|
|
- if (capab_info & BIT(4))
|
|
+ if (capab_info & WLAN_CAPABILITY_PRIVACY)
|
|
bssid->Privacy = 1;
|
|
else
|
|
bssid->Privacy = 0;
|