mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-16 11:19:12 +08:00
wifi: iwlwifi: mvm: prepare the tx_power handling to be per-link
We still need the firmware to align Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241008072037.317f44628eb9.I3f6a735181c6c20e805b61e4f9d2056b7f90d7ea@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
7953a1f57a
commit
108e80db1f
@@ -1466,15 +1466,16 @@ struct iwl_mvm_phy_ctxt *iwl_mvm_get_free_phy_ctxt(struct iwl_mvm *mvm)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
int iwl_mvm_set_tx_power(struct iwl_mvm *mvm,
|
||||
struct ieee80211_bss_conf *link_conf,
|
||||
s16 tx_power)
|
||||
{
|
||||
u32 cmd_id = REDUCE_TX_POWER_CMD;
|
||||
u32 mac_id = iwl_mvm_vif_from_mac80211(link_conf->vif)->id;
|
||||
int len;
|
||||
struct iwl_dev_tx_power_cmd_v3_v8 cmd = {
|
||||
.common.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_MAC),
|
||||
.common.mac_context_id =
|
||||
cpu_to_le32(iwl_mvm_vif_from_mac80211(vif)->id),
|
||||
.common.mac_context_id = cpu_to_le32(mac_id),
|
||||
};
|
||||
struct iwl_dev_tx_power_cmd cmd_v9_v10;
|
||||
u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 3);
|
||||
@@ -1487,8 +1488,7 @@ int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
if (cmd_ver > 8) {
|
||||
/* Those fields sit on the same place for v9 and v10 */
|
||||
cmd_v9_v10.common.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_MAC);
|
||||
cmd_v9_v10.common.mac_context_id =
|
||||
cpu_to_le32(iwl_mvm_vif_from_mac80211(vif)->id);
|
||||
cmd_v9_v10.common.mac_context_id = cpu_to_le32(mac_id);
|
||||
cmd_v9_v10.common.pwr_restriction = cpu_to_le16(u_tx_power);
|
||||
cmd_data = &cmd_v9_v10;
|
||||
}
|
||||
@@ -3323,7 +3323,7 @@ static void iwl_mvm_bss_info_changed(struct ieee80211_hw *hw,
|
||||
if (changes & BSS_CHANGED_TXPOWER) {
|
||||
IWL_DEBUG_CALIB(mvm, "Changing TX Power to %d dBm\n",
|
||||
bss_conf->txpower);
|
||||
iwl_mvm_set_tx_power(mvm, vif, bss_conf->txpower);
|
||||
iwl_mvm_set_tx_power(mvm, bss_conf, bss_conf->txpower);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1038,7 +1038,7 @@ static void iwl_mvm_mld_link_info_changed(struct ieee80211_hw *hw,
|
||||
if (changes & BSS_CHANGED_TXPOWER) {
|
||||
IWL_DEBUG_CALIB(mvm, "Changing TX Power to %d dBm\n",
|
||||
link_conf->txpower);
|
||||
iwl_mvm_set_tx_power(mvm, vif, link_conf->txpower);
|
||||
iwl_mvm_set_tx_power(mvm, link_conf, link_conf->txpower);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2989,7 +2989,8 @@ void iwl_mvm_abort_pmsr(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
bool iwl_mvm_have_links_same_channel(struct iwl_mvm_vif *vif1,
|
||||
struct iwl_mvm_vif *vif2);
|
||||
bool iwl_mvm_vif_is_active(struct iwl_mvm_vif *mvmvif);
|
||||
int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
int iwl_mvm_set_tx_power(struct iwl_mvm *mvm,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
s16 tx_power);
|
||||
int iwl_mvm_set_hw_timestamp(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
|
||||
Reference in New Issue
Block a user