diff options
author | David Spinadel <david.spinadel@intel.com> | 2017-11-07 11:59:57 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2018-09-28 08:57:24 +0300 |
commit | 7f768ad5eb46a8a12c9bb8e37e73fe5b4a66533b (patch) | |
tree | 0ccd212a1b3a69223644146d5671d9b768f76bfb /drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |
parent | iwlwifi: pcie: read correct prph address for newer devices (diff) | |
download | linux-dev-7f768ad5eb46a8a12c9bb8e37e73fe5b4a66533b.tar.xz linux-dev-7f768ad5eb46a8a12c9bb8e37e73fe5b4a66533b.zip |
iwlwifi: mvm: Support TKIP on gen2 data path
Make the adjustments for gen2 TX and RX of TKIP packets. Strip MIC on
RX. Don't add IV space and keep the MIC space zeroed on TX.
Devices that support gen2 data path support TKIP only in station mode.
In all other modes, fall back to SW encryption. Do this early in the
set_key() callback so that the key flags would not be incorrectly set.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 134bb9fd21a4..b55a2e4a0024 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -3151,8 +3151,15 @@ static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw, switch (key->cipher) { case WLAN_CIPHER_SUITE_TKIP: - key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; - key->flags |= IEEE80211_KEY_FLAG_PUT_IV_SPACE; + if (!mvm->trans->cfg->gen2) { + key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; + key->flags |= IEEE80211_KEY_FLAG_PUT_IV_SPACE; + } else if (vif->type == NL80211_IFTYPE_STATION) { + key->flags |= IEEE80211_KEY_FLAG_PUT_MIC_SPACE; + } else { + IWL_DEBUG_MAC80211(mvm, "Use SW encryption for TKIP\n"); + return -EOPNOTSUPP; + } break; case WLAN_CIPHER_SUITE_CCMP: case WLAN_CIPHER_SUITE_GCMP: |