From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Ben Greear <greearb@candelatech.com>,
Johannes Berg <johannes.berg@intel.com>,
Sasha Levin <sashal@kernel.org>,
johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Subject: [PATCH AUTOSEL 5.15 05/10] mac80211: fix user-power when emulating chanctx
Date: Mon, 4 Nov 2024 05:53:54 -0500 [thread overview]
Message-ID: <20241104105414.97666-5-sashal@kernel.org> (raw)
In-Reply-To: <20241104105414.97666-1-sashal@kernel.org>
From: Ben Greear <greearb@candelatech.com>
[ Upstream commit 9b15c6cf8d2e82c8427cd06f535d8de93b5b995c ]
ieee80211_calc_hw_conf_chan was ignoring the configured
user_txpower. If it is set, use it to potentially decrease
txpower as requested.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Link: https://patch.msgid.link/20241010203954.1219686-1-greearb@candelatech.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 1c2cdaeb353b0..6253a89411cbe 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -144,6 +144,8 @@ static u32 ieee80211_hw_conf_chan(struct ieee80211_local *local)
}
power = ieee80211_chandef_max_power(&chandef);
+ if (local->user_power_level != IEEE80211_UNSET_POWER_LEVEL)
+ power = min(local->user_power_level, power);
rcu_read_lock();
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
--
2.43.0
next prev parent reply other threads:[~2024-11-04 10:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 10:53 [PATCH AUTOSEL 5.15 01/10] ASoC: Intel: bytcr_rt5640: Add support for non ACPI instantiated codec Sasha Levin
2024-11-04 10:53 ` [PATCH AUTOSEL 5.15 02/10] ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet Sasha Levin
2024-11-04 10:53 ` [PATCH AUTOSEL 5.15 03/10] ASoC: Intel: sst: Support LPE0F28 ACPI HID Sasha Levin
2024-11-04 10:53 ` [PATCH AUTOSEL 5.15 04/10] wifi: iwlwifi: mvm: Use the sync timepoint API in suspend Sasha Levin
2024-11-04 10:53 ` Sasha Levin [this message]
2024-11-04 10:53 ` [PATCH AUTOSEL 5.15 06/10] usb: add support for new USB device ID 0x17EF:0x3098 for the r8152 driver Sasha Levin
2024-11-04 10:53 ` [PATCH AUTOSEL 5.15 07/10] selftests/watchdog-test: Fix system accidentally reset after watchdog-test Sasha Levin
2024-11-04 10:53 ` [PATCH AUTOSEL 5.15 08/10] ALSA: hda/realtek: Add subwoofer quirk for Infinix ZERO BOOK 13 Sasha Levin
2024-11-04 10:53 ` [PATCH AUTOSEL 5.15 09/10] x86/amd_nb: Fix compile-testing without CONFIG_AMD_NB Sasha Levin
2024-11-04 10:53 ` [PATCH AUTOSEL 5.15 10/10] net: usb: qmi_wwan: add Quectel RG650V Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241104105414.97666-5-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=greearb@candelatech.com \
--cc=johannes.berg@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.