From: Benjamin Berg On new enough hardware, the feature can be enabled. However, it is not yet fully supported so hide it behind a debug configuration. Also add an option to tell the firmware to use UHR trigger frames (which can be protected) instead of RTS for the initial Control frames (IFS). Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit --- .../net/wireless/intel/iwlwifi/mld/mac80211.c | 17 +++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mld/sta.c | 12 ++++++++++++ 2 files changed, 29 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c index a7530e01f8c0..821cd2d2a73b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c @@ -304,6 +304,18 @@ static void iwl_mld_hw_set_nan(struct iwl_mld *mld) hw->wiphy->nan_capa.phy.he = mld->nvm_data->nan_phy_capa.he; } +static bool iwl_mld_is_cip_supported(struct iwl_mld *mld) +{ + if (CSR_HW_RFID_TYPE(mld->trans->info.hw_rf_id) != IWL_CFG_RF_TYPE_PE) + return false; + + /* + * There is no D3 rekey support for the CIGTK, + * this can be enabled once the firmware fully supports the feature. + */ + return false; +} + static void iwl_mac_hw_set_wiphy(struct iwl_mld *mld) { struct ieee80211_hw *hw = mld->hw; @@ -432,6 +444,11 @@ static void iwl_mac_hw_set_wiphy(struct iwl_mld *mld) mld->ext_capab[0].ext_mld_capa_and_ops = IEEE80211_UHR_ML_EXT_MLD_CAPA_ML_PM; + if (iwl_mld_is_cip_supported(mld)) { + /* The hardware does not need any delays */ + mld->ext_capab[0].cip_supported = true; + mld->ext_capab[0].cip_capabilities = 0; + } } static void iwl_mac_hw_set_misc(struct iwl_mld *mld) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/sta.c b/drivers/net/wireless/intel/iwlwifi/mld/sta.c index 6122a7dab811..cfdf7c1baaaf 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/sta.c @@ -509,6 +509,18 @@ int iwl_mld_add_modify_sta_cmd(struct iwl_mld *mld, if (sta->mfp || mld_sta->sta_state < IEEE80211_STA_AUTHORIZED) cmd.mfp = cpu_to_le32(1); + if (sta->cip) { + /* Always add padding when soliciting protected frames */ + cmd.mic_prep_pad_delay = + u8_get_bits(link_sta->cip_cap, + IEEE80211_CIP_CAP_MIC_PADDING); + + /* But skip adding it inside our own protected frames */ + if (!(link_sta->cip_cap & + IEEE80211_CIP_CAP_PROTECTED_CTRL_FRAME_ONLY)) + cmd.mic_compute_pad_delay = cmd.mic_prep_pad_delay; + } + switch (link_sta->rx_nss) { case 1: cmd.mimo = cpu_to_le32(0); -- 2.34.1