* @beacon_inject_active: indicates an active debugfs beacon ie injection
* @low_latency_causes: bit flags, indicating the causes for low-latency,
* see @iwl_mld_low_latency_cause.
- * @ps_disabled: indicates that PS is disabled for this interface
* @last_link_activation_time: last time a link was activated, for
* deferring MLO scans (to make them more reliable)
* @mld: pointer to the mld structure.
bool beacon_inject_active;
#endif
u8 low_latency_causes;
- bool ps_disabled;
time64_t last_link_activation_time;
);
/* And here fields that survive a fw restart */
iwl_mld_set_tx_power(mld, link_conf, link_conf->txpower);
}
-static void
-iwl_mld_smps_workaround(struct iwl_mld *mld, struct ieee80211_vif *vif, bool enable)
-{
- struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
- bool workaround_required =
- iwl_fw_lookup_cmd_ver(mld->fw, MAC_PM_POWER_TABLE, 0) < 2;
-
- if (!workaround_required)
- return;
-
- /* Send the device-level power commands since the
- * firmware checks the POWER_TABLE_CMD's POWER_SAVE_EN bit to
- * determine SMPS mode.
- */
- if (mld_vif->ps_disabled == !enable)
- return;
-
- mld_vif->ps_disabled = !enable;
-
- iwl_mld_update_device_power(mld, false);
-}
-
static
void iwl_mld_mac80211_vif_cfg_changed(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
}
}
- if (changes & BSS_CHANGED_PS) {
- iwl_mld_smps_workaround(mld, vif, vif->cfg.ps);
+ if (changes & BSS_CHANGED_PS)
iwl_mld_update_mac_power(mld, vif, false);
- }
/* TODO: task=MLO BSS_CHANGED_MLD_VALID_LINKS/CHANGED_MLD_TTLM */
}
FW_CTXT_ACTION_MODIFY);
if (ret)
return ret;
- iwl_mld_smps_workaround(mld, vif, vif->cfg.ps);
}
/* MFP is set by default before the station is authorized.
&mld_vif->mlo_scan_start_wk);
iwl_mld_reset_cca_40mhz_workaround(mld, vif);
- iwl_mld_smps_workaround(mld, vif, true);
}
/* once we move into assoc state, need to update the FW to
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/*
- * Copyright (C) 2024-2025 Intel Corporation
+ * Copyright (C) 2024-2026 Intel Corporation
*/
#include <net/mac80211.h>
#include "link.h"
#include "constants.h"
-static void iwl_mld_vif_ps_iterator(void *data, u8 *mac,
- struct ieee80211_vif *vif)
-{
- bool *ps_enable = (bool *)data;
- struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
-
- if (vif->type != NL80211_IFTYPE_STATION)
- return;
-
- *ps_enable &= !mld_vif->ps_disabled;
-}
-
int iwl_mld_update_device_power(struct iwl_mld *mld, bool d3)
{
struct iwl_device_power_cmd cmd = {};
- bool enable_ps = false;
- if (iwlmld_mod_params.power_scheme != IWL_POWER_SCHEME_CAM) {
- enable_ps = true;
-
- /* Disable power save if any STA interface has
- * power save turned off
- */
- ieee80211_iterate_active_interfaces_mtx(mld->hw,
- IEEE80211_IFACE_ITER_NORMAL,
- iwl_mld_vif_ps_iterator,
- &enable_ps);
- }
-
- if (enable_ps)
+ if (iwlmld_mod_params.power_scheme != IWL_POWER_SCHEME_CAM)
cmd.flags |=
cpu_to_le16(DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK);
return;
cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK);
-
- if (iwl_fw_lookup_cmd_ver(mld->fw, MAC_PM_POWER_TABLE, 0) >= 2)
- cmd->flags |= cpu_to_le16(POWER_FLAGS_ENABLE_SMPS_MSK);
+ cmd->flags |= cpu_to_le16(POWER_FLAGS_ENABLE_SMPS_MSK);
/* firmware supports LPRX for beacons at rate 1 Mbps or 6 Mbps only */
if (link_conf->beacon_rate &&