wifi: iwlwifi: mvm: support SPP A-MSDUs
If the firmware has the necessary support, enable SPP A-MSDUs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Daniel Gabay <daniel.gabay@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240129211905.15e4570e471f.I87cf284d3b19bb9f5558f0f33afaace6d6492acb@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2021, 2023 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@@ -109,6 +109,7 @@ enum iwl_sta_flags {
|
||||
* @STA_KEY_FLG_EN_MSK: mask for encryption algorithmi value
|
||||
* @STA_KEY_FLG_WEP_KEY_MAP: wep is either a group key (0 - legacy WEP) or from
|
||||
* station info array (1 - n 1X mode)
|
||||
* @STA_KEY_FLG_AMSDU_SPP: SPP (signaling and payload protected) A-MSDU
|
||||
* @STA_KEY_FLG_KEYID_MSK: the index of the key
|
||||
* @STA_KEY_FLG_KEYID_POS: key index bit position
|
||||
* @STA_KEY_NOT_VALID: key is invalid
|
||||
@@ -129,6 +130,7 @@ enum iwl_sta_key_flag {
|
||||
STA_KEY_FLG_EN_MSK = (7 << 0),
|
||||
|
||||
STA_KEY_FLG_WEP_KEY_MAP = BIT(3),
|
||||
STA_KEY_FLG_AMSDU_SPP = BIT(7),
|
||||
STA_KEY_FLG_KEYID_POS = 8,
|
||||
STA_KEY_FLG_KEYID_MSK = (3 << STA_KEY_FLG_KEYID_POS),
|
||||
STA_KEY_NOT_VALID = BIT(11),
|
||||
|
||||
@@ -383,6 +383,8 @@ typedef unsigned int __bitwise iwl_ucode_tlv_capa_t;
|
||||
* channels even when these are not enabled.
|
||||
* @IWL_UCODE_TLV_CAPA_DUMP_COMPLETE_SUPPORT: Support for indicating dump collection
|
||||
* complete to FW.
|
||||
* @IWL_UCODE_TLV_CAPA_SPP_AMSDU_SUPPORT: Support SPP (signaling and payload
|
||||
* protected) A-MSDU.
|
||||
*
|
||||
* @NUM_IWL_UCODE_TLV_CAPA: number of bits used
|
||||
*/
|
||||
@@ -468,6 +470,7 @@ enum iwl_ucode_tlv_capa {
|
||||
IWL_UCODE_TLV_CAPA_PSC_CHAN_SUPPORT = (__force iwl_ucode_tlv_capa_t)98,
|
||||
|
||||
IWL_UCODE_TLV_CAPA_BIGTK_SUPPORT = (__force iwl_ucode_tlv_capa_t)100,
|
||||
IWL_UCODE_TLV_CAPA_SPP_AMSDU_SUPPORT = (__force iwl_ucode_tlv_capa_t)103,
|
||||
IWL_UCODE_TLV_CAPA_DRAM_FRAG_SUPPORT = (__force iwl_ucode_tlv_capa_t)104,
|
||||
IWL_UCODE_TLV_CAPA_DUMP_COMPLETE_SUPPORT = (__force iwl_ucode_tlv_capa_t)105,
|
||||
IWL_UCODE_TLV_CAPA_SYNCED_TIME = (__force iwl_ucode_tlv_capa_t)106,
|
||||
|
||||
@@ -495,6 +495,11 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
|
||||
IWL_UCODE_TLV_CAPA_TIME_SYNC_BOTH_FTM_TM))
|
||||
hw->wiphy->hw_timestamp_max_peers = 1;
|
||||
|
||||
if (fw_has_capa(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_SPP_AMSDU_SUPPORT))
|
||||
wiphy_ext_feature_set(hw->wiphy,
|
||||
NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT);
|
||||
|
||||
ieee80211_hw_set(hw, SINGLE_SCAN_ON_ALL_BANDS);
|
||||
hw->wiphy->features |=
|
||||
NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR |
|
||||
|
||||
@@ -104,6 +104,9 @@ u32 iwl_mvm_get_sec_flags(struct iwl_mvm *mvm,
|
||||
(keyconf->keyidx == 4 || keyconf->keyidx == 5)))
|
||||
flags |= IWL_SEC_KEY_FLAG_MFP;
|
||||
|
||||
if (keyconf->flags & IEEE80211_KEY_FLAG_SPP_AMSDU)
|
||||
flags |= IWL_SEC_KEY_FLAG_SPP_AMSDU;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
||||
@@ -3559,6 +3559,9 @@ static int iwl_mvm_send_sta_key(struct iwl_mvm *mvm,
|
||||
key_flags = cpu_to_le16(keyidx);
|
||||
key_flags |= cpu_to_le16(STA_KEY_FLG_WEP_KEY_MAP);
|
||||
|
||||
if (key->flags & IEEE80211_KEY_FLAG_SPP_AMSDU)
|
||||
key_flags |= cpu_to_le16(STA_KEY_FLG_AMSDU_SPP);
|
||||
|
||||
switch (key->cipher) {
|
||||
case WLAN_CIPHER_SUITE_TKIP:
|
||||
key_flags |= cpu_to_le16(STA_KEY_FLG_TKIP);
|
||||
|
||||
Reference in New Issue
Block a user