]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mwifiex: add missing endian conversion for fw_tsf
authorAmitkumar Karwar <akarwar@marvell.com>
Fri, 10 Jan 2014 22:30:41 +0000 (14:30 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 13 Jan 2014 19:47:00 +0000 (14:47 -0500)
It is u64 data received from firmware. Little endian to cpu
conversion is required here.

Cc: <stable@vger.kernel.org> # 3.5+
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>
drivers/net/wireless/mwifiex/scan.c

index 0ed06646f19a1e9de631f8874b1cb236dce06340..0a8a26e10f01a421361a5872065954a8ae79c614 100644 (file)
@@ -1681,7 +1681,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
                const u8 *ie_buf;
                size_t ie_len;
                u16 channel = 0;
-               u64 fw_tsf = 0;
+               __le64 fw_tsf = 0;
                u16 beacon_size = 0;
                u32 curr_bcn_bytes;
                u32 freq;
@@ -1815,7 +1815,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
                                              ie_buf, ie_len, rssi, GFP_KERNEL);
                                bss_priv = (struct mwifiex_bss_priv *)bss->priv;
                                bss_priv->band = band;
-                               bss_priv->fw_tsf = fw_tsf;
+                               bss_priv->fw_tsf = le64_to_cpu(fw_tsf);
                                if (priv->media_connected &&
                                    !memcmp(bssid,
                                            priv->curr_bss_params.bss_descriptor