Skip to content

Commit 8dd0498

Browse files
greearbjmberg-intel
authored andcommitted
wifi: mac80211: Fix setting txpower with emulate_chanctx
Propagate hw conf into the driver when txpower changes and driver is emulating channel contexts. Signed-off-by: Ben Greear <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent b3e046c commit 8dd0498

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

net/mac80211/cfg.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3046,6 +3046,7 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,
30463046
enum nl80211_tx_power_setting txp_type = type;
30473047
bool update_txp_type = false;
30483048
bool has_monitor = false;
3049+
int old_power = local->user_power_level;
30493050

30503051
lockdep_assert_wiphy(local->hw.wiphy);
30513052

@@ -3128,6 +3129,10 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,
31283129
}
31293130
}
31303131

3132+
if (local->emulate_chanctx &&
3133+
(old_power != local->user_power_level))
3134+
ieee80211_hw_conf_chan(local);
3135+
31313136
return 0;
31323137
}
31333138

0 commit comments

Comments
 (0)