diff options
author | Bing Zhao <bzhao@marvell.com> | 2011-05-02 14:00:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-02 14:49:19 -0400 |
commit | 1a5b306f5d7398c7ffb0f69fe9a2d0023f28deb9 (patch) | |
tree | 592526de21a827a3d3797c033892032e86c95601 | |
parent | 982d96bbb7f084644ee10214812ab167e52c2c5d (diff) |
mwifiex: fix missing tsf_val TLV
In mwifiex_cmd_append_tsf_tlv(), two tsf_val TLVs should be
filled in the buffer and then sent to firmware.
The missing first TLV for tsf_val is added back in this patch.
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/mwifiex/join.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/main.h | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c index 042eb7701d04..85fca5eb4195 100644 --- a/drivers/net/wireless/mwifiex/join.c +++ b/drivers/net/wireless/mwifiex/join.c | |||
@@ -100,7 +100,7 @@ mwifiex_cmd_append_tsf_tlv(struct mwifiex_private *priv, u8 **buffer, | |||
100 | struct mwifiex_bssdescriptor *bss_desc) | 100 | struct mwifiex_bssdescriptor *bss_desc) |
101 | { | 101 | { |
102 | struct mwifiex_ie_types_tsf_timestamp tsf_tlv; | 102 | struct mwifiex_ie_types_tsf_timestamp tsf_tlv; |
103 | long long tsf_val; | 103 | __le64 tsf_val; |
104 | 104 | ||
105 | /* Null Checks */ | 105 | /* Null Checks */ |
106 | if (buffer == NULL) | 106 | if (buffer == NULL) |
@@ -116,6 +116,11 @@ mwifiex_cmd_append_tsf_tlv(struct mwifiex_private *priv, u8 **buffer, | |||
116 | memcpy(*buffer, &tsf_tlv, sizeof(tsf_tlv.header)); | 116 | memcpy(*buffer, &tsf_tlv, sizeof(tsf_tlv.header)); |
117 | *buffer += sizeof(tsf_tlv.header); | 117 | *buffer += sizeof(tsf_tlv.header); |
118 | 118 | ||
119 | /* TSF at the time when beacon/probe_response was received */ | ||
120 | tsf_val = cpu_to_le64(bss_desc->network_tsf); | ||
121 | memcpy(*buffer, &tsf_val, sizeof(tsf_val)); | ||
122 | *buffer += sizeof(tsf_val); | ||
123 | |||
119 | memcpy(&tsf_val, bss_desc->time_stamp, sizeof(tsf_val)); | 124 | memcpy(&tsf_val, bss_desc->time_stamp, sizeof(tsf_val)); |
120 | 125 | ||
121 | dev_dbg(priv->adapter->dev, "info: %s: TSF offset calc: %016llx - " | 126 | dev_dbg(priv->adapter->dev, "info: %s: TSF offset calc: %016llx - " |
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h index 1b503038270e..5043fcd22565 100644 --- a/drivers/net/wireless/mwifiex/main.h +++ b/drivers/net/wireless/mwifiex/main.h | |||
@@ -280,7 +280,7 @@ struct mwifiex_bssdescriptor { | |||
280 | * BAND_A(0X04): 'a' band | 280 | * BAND_A(0X04): 'a' band |
281 | */ | 281 | */ |
282 | u16 bss_band; | 282 | u16 bss_band; |
283 | long long network_tsf; | 283 | u64 network_tsf; |
284 | u8 time_stamp[8]; | 284 | u8 time_stamp[8]; |
285 | union ieee_types_phy_param_set phy_param_set; | 285 | union ieee_types_phy_param_set phy_param_set; |
286 | union ieee_types_ss_param_set ss_param_set; | 286 | union ieee_types_ss_param_set ss_param_set; |