diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2012-04-17 00:36:52 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-17 14:57:15 -0400 |
commit | b5abcf0219263f4e961dca71cbe26e06c5b0ee68 (patch) | |
tree | 8e8898fd6b41a13a24098b762d2f2be8a50869c0 /drivers/net/wireless/mwifiex/join.c | |
parent | 9558a407dd00f6cd7f93b923768e8ee255fa4444 (diff) |
mwifiex: corrections in timestamp related code
We get two timing related fields for each bss from firmware in scan
results.
1) timestamp - Actual timestamp information in probe response/beacon
2) network_tsf - firmware's TSF value at the time the beacon or probe
response was received.
Both are needed while associating by firmware.
The patch takes care of following things.
1) We should pass "timestamp" to cfg80211_inform_bss(), but currently
"network_tsf" is being provided. This error is corrected here.
2) Rename "network_tsf" to "fw_tsf"
3) Make use of u64 variable instead of an array of u8/u32 to save
parsed "timestamp" information.
4) Use timestamp provided to stack in scan results using
cfg80211_inform_bss() while associating. (bss->tsf)
5) Allocate space to save fw_tsf in "priv" of cfg80211_bss
and retrieve it while associating.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/join.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/join.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c index 5189afb8c353..8a390982463e 100644 --- a/drivers/net/wireless/mwifiex/join.c +++ b/drivers/net/wireless/mwifiex/join.c | |||
@@ -118,15 +118,15 @@ mwifiex_cmd_append_tsf_tlv(struct mwifiex_private *priv, u8 **buffer, | |||
118 | *buffer += sizeof(tsf_tlv.header); | 118 | *buffer += sizeof(tsf_tlv.header); |
119 | 119 | ||
120 | /* TSF at the time when beacon/probe_response was received */ | 120 | /* TSF at the time when beacon/probe_response was received */ |
121 | tsf_val = cpu_to_le64(bss_desc->network_tsf); | 121 | tsf_val = cpu_to_le64(bss_desc->fw_tsf); |
122 | memcpy(*buffer, &tsf_val, sizeof(tsf_val)); | 122 | memcpy(*buffer, &tsf_val, sizeof(tsf_val)); |
123 | *buffer += sizeof(tsf_val); | 123 | *buffer += sizeof(tsf_val); |
124 | 124 | ||
125 | memcpy(&tsf_val, bss_desc->time_stamp, sizeof(tsf_val)); | 125 | tsf_val = cpu_to_le64(bss_desc->timestamp); |
126 | 126 | ||
127 | dev_dbg(priv->adapter->dev, | 127 | dev_dbg(priv->adapter->dev, |
128 | "info: %s: TSF offset calc: %016llx - %016llx\n", | 128 | "info: %s: TSF offset calc: %016llx - %016llx\n", |
129 | __func__, tsf_val, bss_desc->network_tsf); | 129 | __func__, bss_desc->timestamp, bss_desc->fw_tsf); |
130 | 130 | ||
131 | memcpy(*buffer, &tsf_val, sizeof(tsf_val)); | 131 | memcpy(*buffer, &tsf_val, sizeof(tsf_val)); |
132 | *buffer += sizeof(tsf_val); | 132 | *buffer += sizeof(tsf_val); |