76 lines
3.4 KiB
Diff
76 lines
3.4 KiB
Diff
From: Jes Sorensen <Jes.Sorensen@redhat.com>
|
|
Date: Thu, 19 Jun 2014 11:37:18 +0200
|
|
Subject: [095/249] staging: rtl8723au: Save timestamp for network in
|
|
collect_bss_info() and report it to the stack
|
|
Origin: https://git.kernel.org/linus/993c52ba61a72a8c669c8091fa75c9514776b3f7
|
|
|
|
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 | 4 ++++
|
|
drivers/staging/rtl8723au/include/wlan_bssdef.h | 1 +
|
|
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 3 ++-
|
|
3 files changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
|
|
index 84ca06b..823489b 100644
|
|
--- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
|
|
+++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
|
|
@@ -4281,6 +4281,7 @@ static struct wlan_bssid_ex *collect_bss_info(struct rtw_adapter *padapter,
|
|
capab_info = get_unaligned_le16(&mgmt->u.beacon.capab_info);
|
|
bssid->BeaconPeriod =
|
|
get_unaligned_le16(&mgmt->u.beacon.beacon_int);
|
|
+ bssid->tsf = get_unaligned_le64(&mgmt->u.beacon.timestamp);
|
|
} else if (ieee80211_is_probe_req(mgmt->frame_control)) {
|
|
ie_offset = offsetof(struct ieee80211_mgmt,
|
|
u.probe_req.variable);
|
|
@@ -4288,6 +4289,7 @@ static struct wlan_bssid_ex *collect_bss_info(struct rtw_adapter *padapter,
|
|
capab_info = 0;
|
|
bssid->BeaconPeriod =
|
|
padapter->registrypriv.dev_network.BeaconPeriod;
|
|
+ bssid->tsf = 0;
|
|
} else if (ieee80211_is_probe_resp(mgmt->frame_control)) {
|
|
ie_offset = offsetof(struct ieee80211_mgmt,
|
|
u.probe_resp.variable);
|
|
@@ -4295,12 +4297,14 @@ static struct wlan_bssid_ex *collect_bss_info(struct rtw_adapter *padapter,
|
|
capab_info = get_unaligned_le16(&mgmt->u.probe_resp.capab_info);
|
|
bssid->BeaconPeriod =
|
|
get_unaligned_le16(&mgmt->u.probe_resp.beacon_int);
|
|
+ bssid->tsf = get_unaligned_le64(&mgmt->u.probe_resp.timestamp);
|
|
} else {
|
|
bssid->reserved = 0;
|
|
ie_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
|
|
capab_info = get_unaligned_le16(&mgmt->u.beacon.capab_info);
|
|
bssid->BeaconPeriod =
|
|
padapter->registrypriv.dev_network.BeaconPeriod;
|
|
+ bssid->tsf = 0;
|
|
}
|
|
ie_offset -= offsetof(struct ieee80211_mgmt, u);
|
|
|
|
diff --git a/drivers/staging/rtl8723au/include/wlan_bssdef.h b/drivers/staging/rtl8723au/include/wlan_bssdef.h
|
|
index b717687..60455e6 100644
|
|
--- a/drivers/staging/rtl8723au/include/wlan_bssdef.h
|
|
+++ b/drivers/staging/rtl8723au/include/wlan_bssdef.h
|
|
@@ -93,6 +93,7 @@ struct wlan_bssid_ex {
|
|
u32 Privacy;
|
|
long Rssi;/* in dBM, raw data , get from PHY) */
|
|
u16 BeaconPeriod; /* units are Kusec */
|
|
+ u64 tsf;
|
|
u32 ATIMWindow; /* units are Kusec */
|
|
u32 DSConfig; /* Frequency, units are kHz */
|
|
enum nl80211_iftype ifmode;
|
|
diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
|
|
index 0a0c58d..2621a0e 100644
|
|
--- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
|
|
+++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
|
|
@@ -288,7 +288,8 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
|
|
}
|
|
|
|
bss = cfg80211_inform_bss(wiphy, notify_channel,
|
|
- pnetwork->network.MacAddress, 0,
|
|
+ pnetwork->network.MacAddress,
|
|
+ pnetwork->network.tsf,
|
|
notify_capability, notify_interval,
|
|
notify_ie, notify_ielen,
|
|
notify_signal, GFP_ATOMIC);
|