]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iwlwifi: mvm: fix D3 replay counter value
authorJohannes Berg <johannes.berg@intel.com>
Wed, 30 Nov 2016 16:04:52 +0000 (17:04 +0100)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 3 Feb 2017 14:26:42 +0000 (16:26 +0200)
This fixes a long-standing bug that was introduced when this code
was introduced: cfg80211 passes a pointer, but we treat it as if
it was passing a value. The result is that we pass the pointer to
the firmware, instead of the value. It's not clear how this could
ever have worked, unless the firmware is ignoring this value.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/d3.c

index b02d7fc5116f7e41b4a97c79a643daa0ec2f3838..c7eb1983c4f9a191fc20d3cec151f069e7704b5d 100644 (file)
@@ -91,7 +91,7 @@ void iwl_mvm_set_rekey_data(struct ieee80211_hw *hw,
        memcpy(mvmvif->rekey_data.kek, data->kek, NL80211_KEK_LEN);
        memcpy(mvmvif->rekey_data.kck, data->kck, NL80211_KCK_LEN);
        mvmvif->rekey_data.replay_ctr =
-               cpu_to_le64(be64_to_cpup((__be64 *)&data->replay_ctr));
+               cpu_to_le64(be64_to_cpup((__be64 *)data->replay_ctr));
        mvmvif->rekey_data.valid = true;
 
        mutex_unlock(&mvm->mutex);