summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/mvm/sf.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-07-31 15:32:37 +0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-09-08 10:17:09 +0400
commit86974bff066dd8b98be46d7c7d3aba89034f0833 (patch)
tree9ae70d47f736f066c72e43ccf00d137a6ee71887 /drivers/net/wireless/iwlwifi/mvm/sf.c
parent7c8b3bc688bdcfd7789efbd17da4d85b104ad351 (diff)
downloadlinux-86974bff066dd8b98be46d7c7d3aba89034f0833.tar.xz
iwlwifi: mvm: fix endianity issues with Smart Fifo commands
This code was broken on big endian systems. Sparse didn't catch the bug since the firmware command was not tagged as little endian. Fix the bug for big endian systems and tag the field in the firmware command to prevent such issues in the future. Cc: stable@vger.kernel.org [3.14+] Fixes: 1f3b0ff8ec ("iwlwifi: mvm: Add Smart FIFO support") Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/sf.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/sf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/sf.c b/drivers/net/wireless/iwlwifi/mvm/sf.c
index 7edfd15efc9d..e843b67f2201 100644
--- a/drivers/net/wireless/iwlwifi/mvm/sf.c
+++ b/drivers/net/wireless/iwlwifi/mvm/sf.c
@@ -172,7 +172,7 @@ static int iwl_mvm_sf_config(struct iwl_mvm *mvm, u8 sta_id,
enum iwl_sf_state new_state)
{
struct iwl_sf_cfg_cmd sf_cmd = {
- .state = new_state,
+ .state = cpu_to_le32(new_state),
};
struct ieee80211_sta *sta;
int ret = 0;