From: Emmanuel Grumbach With EPP, user space installs the unicast key before the station is associated so that the association frames can be protected. Since the control frame protection parameters (mic_compute_pad_delay/ mic_prep_pad_delay) are determined during the association itself, the firmware must not use that key for unicast control frames until we are associated. Till then, set cip_defer. Clear the field when iwl_mld_add_modify_sta_cmd() will be called again upon association. Assisted-by: LLM Signed-off-by: Emmanuel Grumbach Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/sta.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/sta.c b/drivers/net/wireless/intel/iwlwifi/mld/sta.c index d66b1164b8e2..745f26dfcb54 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/sta.c @@ -439,6 +439,10 @@ static int iwl_mld_send_sta_cmd(struct iwl_mld *mld, return -EINVAL; } + /* cip_defer overlaps trig_rnd_alloc of older versions */ + if (cmd_ver < 4) + cmd->cip_defer = 0; + ret = iwl_mld_send_cmd_pdu(mld, cmd_id, cmd, len); if (ret) IWL_ERR(mld, "STA_CONFIG_CMD send failed, ret=0x%x\n", ret); @@ -521,6 +525,14 @@ int iwl_mld_add_modify_sta_cmd(struct iwl_mld *mld, cmd.mic_compute_pad_delay = cmd.mic_prep_pad_delay; } + /* In case of EPP connection, tell the FW to defer unicast + * control frame protection until we are associated, as the + * control frame protection parameters are only negotiated + * during association. + */ + cmd.cip_defer = sta->epp_peer && + mld_sta->sta_state < IEEE80211_STA_ASSOC; + switch (link_sta->rx_nss) { case 1: cmd.mimo = cpu_to_le32(0); -- 2.34.1