]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iwlwifi: mvm: fix endianity in scan command
authorDavid Spinadel <david.spinadel@intel.com>
Wed, 25 Jun 2014 10:17:53 +0000 (13:17 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 7 Jul 2014 18:41:11 +0000 (21:41 +0300)
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h
drivers/net/wireless/iwlwifi/mvm/scan.c

index 48a1d8f5675d8a72d7116fb82841c1b0f952bbff..c02a9e45ec5eaec78ce9ef49c47957c6fcd2c7da 100644 (file)
@@ -509,7 +509,7 @@ struct iwl_scan_offload_profile_cfg {
  * @full_scan_mul:     number of partial scans before each full scan
  */
 struct iwl_scan_offload_schedule {
-       u16 delay;
+       __le16 delay;
        u8 iterations;
        u8 full_scan_mul;
 } __packed;
index 14fc6adc963a673689dcdf2d2ba7ba4e4136a308..004b1f5d031429a2798cc1d35464daa6ae59db00 100644 (file)
@@ -899,11 +899,11 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
                .watchdog = IWL_SCHED_SCAN_WATCHDOG,
 
                .schedule_line[0].iterations = IWL_FAST_SCHED_SCAN_ITERATIONS,
-               .schedule_line[0].delay = req->interval / 1000,
+               .schedule_line[0].delay = cpu_to_le16(req->interval / 1000),
                .schedule_line[0].full_scan_mul = 1,
 
                .schedule_line[1].iterations = 0xff,
-               .schedule_line[1].delay = req->interval / 1000,
+               .schedule_line[1].delay = cpu_to_le16(req->interval / 1000),
                .schedule_line[1].full_scan_mul = IWL_FULL_SCAN_MULTIPLIER,
        };
 
@@ -1281,11 +1281,11 @@ int iwl_mvm_unified_sched_scan_lmac(struct iwl_mvm *mvm,
        iwl_mvm_unified_scan_fill_tx_cmd(mvm, cmd->tx_cmd, false);
        iwl_scan_offload_build_ssid(req, cmd->direct_scan, &ssid_bitmap, false);
 
-       cmd->schedule[0].delay = req->interval / MSEC_PER_SEC;
+       cmd->schedule[0].delay = cpu_to_le16(req->interval / MSEC_PER_SEC);
        cmd->schedule[0].iterations = IWL_FAST_SCHED_SCAN_ITERATIONS;
        cmd->schedule[0].full_scan_mul = 1;
 
-       cmd->schedule[1].delay = req->interval / MSEC_PER_SEC;
+       cmd->schedule[1].delay = cpu_to_le16(req->interval / MSEC_PER_SEC);
        cmd->schedule[1].iterations = 0xff;
        cmd->schedule[1].full_scan_mul = IWL_FULL_SCAN_MULTIPLIER;