Commit a35f64a2 authored by Johannes Berg's avatar Johannes Berg
Browse files

Merge tag 'iwlwifi-fixes-2025-11-12' of...

Merge tag 'iwlwifi-fixes-2025-11-12' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

Miri Korenblit says:
====================
iwlwifi fixes:

- avoid link toggling
- fix beacon template rate
- don't use iterator outside the loop
====================

Link: https://patch.msgid.link/DM3PPF63A6024A9E52FF4A7B23F283B7FC7A3CCA@DM3PPF63A6024A9.namprd11.prod.outlook.com


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parents c4e1ac09 1a222625
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -708,18 +708,13 @@ static int
iwl_mld_get_chan_load_from_element(struct iwl_mld *mld,
				   struct ieee80211_bss_conf *link_conf)
{
	struct ieee80211_vif *vif = link_conf->vif;
	const struct cfg80211_bss_ies *ies;
	const struct element *bss_load_elem = NULL;
	const struct ieee80211_bss_load_elem *bss_load;

	guard(rcu)();

	if (ieee80211_vif_link_active(vif, link_conf->link_id))
	ies = rcu_dereference(link_conf->bss->beacon_ies);
	else
		ies = rcu_dereference(link_conf->bss->ies);

	if (ies)
		bss_load_elem = cfg80211_find_elem(WLAN_EID_QBSS_LOAD,
						   ies->data, ies->len);
+3 −10
Original line number Diff line number Diff line
@@ -938,19 +938,12 @@ u8 iwl_mvm_mac_ctxt_get_lowest_rate(struct iwl_mvm *mvm,

u16 iwl_mvm_mac_ctxt_get_beacon_flags(const struct iwl_fw *fw, u8 rate_idx)
{
	u16 flags = iwl_mvm_mac80211_idx_to_hwrate(fw, rate_idx);
	bool is_new_rate = iwl_fw_lookup_cmd_ver(fw, BEACON_TEMPLATE_CMD, 0) > 10;
	u16 flags, cck_flag;

	if (is_new_rate) {
		flags = iwl_mvm_mac80211_idx_to_hwrate(fw, rate_idx);
		cck_flag = IWL_MAC_BEACON_CCK;
	} else {
		cck_flag = IWL_MAC_BEACON_CCK_V1;
		flags = iwl_fw_rate_idx_to_plcp(rate_idx);
	}

	if (rate_idx <= IWL_LAST_CCK_RATE)
		flags |= cck_flag;
		flags |= is_new_rate ? IWL_MAC_BEACON_CCK
			  : IWL_MAC_BEACON_CCK_V1;

	return flags;
}
+7 −7
Original line number Diff line number Diff line
@@ -463,7 +463,7 @@ static int iwl_mvm_aux_roc_te_handle_notif(struct iwl_mvm *mvm,
	if (!aux_roc_te) /* Not a Aux ROC time event */
		return -EINVAL;

	iwl_mvm_te_check_trigger(mvm, notif, te_data);
	iwl_mvm_te_check_trigger(mvm, notif, aux_roc_te);

	IWL_DEBUG_TE(mvm,
		     "Aux ROC time event notification  - UID = 0x%x action %d (error = %d)\n",
@@ -475,14 +475,14 @@ static int iwl_mvm_aux_roc_te_handle_notif(struct iwl_mvm *mvm,
		/* End TE, notify mac80211 */
		ieee80211_remain_on_channel_expired(mvm->hw);
		iwl_mvm_roc_finished(mvm); /* flush aux queue */
		list_del(&te_data->list); /* remove from list */
		te_data->running = false;
		te_data->vif = NULL;
		te_data->uid = 0;
		te_data->id = TE_MAX;
		list_del(&aux_roc_te->list); /* remove from list */
		aux_roc_te->running = false;
		aux_roc_te->vif = NULL;
		aux_roc_te->uid = 0;
		aux_roc_te->id = TE_MAX;
	} else if (le32_to_cpu(notif->action) == TE_V2_NOTIF_HOST_EVENT_START) {
		set_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status);
		te_data->running = true;
		aux_roc_te->running = true;
		ieee80211_ready_on_channel(mvm->hw); /* Start TE */
	} else {
		IWL_DEBUG_TE(mvm,
+9 −3
Original line number Diff line number Diff line
@@ -159,9 +159,15 @@ int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags,

u8 iwl_mvm_mac80211_idx_to_hwrate(const struct iwl_fw *fw, int rate_idx)
{
	if (iwl_fw_lookup_cmd_ver(fw, TX_CMD, 0) > 8)
		/* In the new rate legacy rates are indexed:
		 * 0 - 3 for CCK and 0 - 7 for OFDM.
		 */
		return (rate_idx >= IWL_FIRST_OFDM_RATE ?
			rate_idx - IWL_FIRST_OFDM_RATE :
			rate_idx);

	return iwl_fw_rate_idx_to_plcp(rate_idx);
}

u8 iwl_mvm_mac80211_ac_to_ucode_ac(enum ieee80211_ac_numbers ac)