]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
brcmfmac: fix big endian bug in i-scan.
authorHante Meuleman <meuleman@broadcom.com>
Tue, 11 Sep 2012 19:16:47 +0000 (21:16 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 10 Oct 2012 02:30:52 +0000 (03:30 +0100)
commit ed205b361956c96e0d8c09a8c9135a6a79cd9541 upstream.

ssid len is 32 bit and needs endian conversion for big endian systems.

Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

index 5eddabe5228a9e7a3f1f00b737114f98dc34c2f0..e4e326a5f9ab4fafe142a705438f140139160f0c 100644 (file)
@@ -498,8 +498,10 @@ static void wl_iscan_prep(struct brcmf_scan_params_le *params_le,
        params_le->active_time = cpu_to_le32(-1);
        params_le->passive_time = cpu_to_le32(-1);
        params_le->home_time = cpu_to_le32(-1);
-       if (ssid && ssid->SSID_len)
-               memcpy(&params_le->ssid_le, ssid, sizeof(struct brcmf_ssid));
+       if (ssid && ssid->SSID_len) {
+               params_le->ssid_le.SSID_len = cpu_to_le32(ssid->SSID_len);
+               memcpy(&params_le->ssid_le.SSID, ssid->SSID, ssid->SSID_len);
+       }
 }
 
 static s32