brcm80211: use endian annotation for scan time configuration
authorArend van Spriel <arend@broadcom.com>
Wed, 12 Oct 2011 18:51:23 +0000 (20:51 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 14 Oct 2011 18:48:18 +0000 (14:48 -0400)
For scanning several timeout parameters are configured on the device.
These parameters have been endian annotated and converted appropriately.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

index 8fc81739e6b7dfd819ee6d0937365504b4908489..1b09be0f4564ab5645896127fcacdc12d3a6f4c6 100644 (file)
@@ -3497,12 +3497,15 @@ dongle_rom_out:
 
 static s32
 brcmf_dongle_scantime(struct net_device *ndev, s32 scan_assoc_time,
-               s32 scan_unassoc_time, s32 scan_passive_time)
+                     s32 scan_unassoc_time, s32 scan_passive_time)
 {
        s32 err = 0;
+       __le32 scan_assoc_tm_le = cpu_to_le32(scan_assoc_time);
+       __le32 scan_unassoc_tm_le = cpu_to_le32(scan_unassoc_time);
+       __le32 scan_passive_tm_le = cpu_to_le32(scan_passive_time);
 
        err = brcmf_exec_dcmd(ndev, BRCMF_C_SET_SCAN_CHANNEL_TIME,
-                          &scan_assoc_time, sizeof(scan_assoc_time));
+                          &scan_assoc_tm_le, sizeof(scan_assoc_tm_le));
        if (err) {
                if (err == -EOPNOTSUPP)
                        WL_INFO("Scan assoc time is not supported\n");
@@ -3511,7 +3514,7 @@ brcmf_dongle_scantime(struct net_device *ndev, s32 scan_assoc_time,
                goto dongle_scantime_out;
        }
        err = brcmf_exec_dcmd(ndev, BRCMF_C_SET_SCAN_UNASSOC_TIME,
-                          &scan_unassoc_time, sizeof(scan_unassoc_time));
+                          &scan_unassoc_tm_le, sizeof(scan_unassoc_tm_le));
        if (err) {
                if (err == -EOPNOTSUPP)
                        WL_INFO("Scan unassoc time is not supported\n");
@@ -3521,7 +3524,7 @@ brcmf_dongle_scantime(struct net_device *ndev, s32 scan_assoc_time,
        }
 
        err = brcmf_exec_dcmd(ndev, BRCMF_C_SET_SCAN_PASSIVE_TIME,
-                          &scan_passive_time, sizeof(scan_passive_time));
+                          &scan_passive_tm_le, sizeof(scan_passive_tm_le));
        if (err) {
                if (err == -EOPNOTSUPP)
                        WL_INFO("Scan passive time is not supported\n");