FIX: [mac80211] move tpc client parameter to NRSW
BugzId: 72830
This commit is contained in:
parent
4cadd6d717
commit
e437eaade3
|
|
@ -664,20 +664,19 @@ index 78f2927..4fa5b0d 100644
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
|
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
|
||||||
index bf17fa9..0908f4a 100644
|
index bf305b2..7998620 100644
|
||||||
--- a/net/mac80211/iface.c
|
--- a/net/mac80211/iface.c
|
||||||
+++ b/net/mac80211/iface.c
|
+++ b/net/mac80211/iface.c
|
||||||
@@ -47,7 +47,8 @@ static void ieee80211_iface_work(struct work_struct *work);
|
@@ -47,7 +47,7 @@ static void ieee80211_iface_work(struct work_struct *work);
|
||||||
bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
|
bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
|
||||||
{
|
{
|
||||||
struct ieee80211_chanctx_conf *chanctx_conf;
|
struct ieee80211_chanctx_conf *chanctx_conf;
|
||||||
- int power;
|
- int power;
|
||||||
+ int power, max_power;
|
+ int power, max_power;
|
||||||
+ struct ieee80211_channel *chan;
|
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
|
chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
|
||||||
@@ -56,15 +57,30 @@ bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
|
@@ -56,7 +56,7 @@ bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -685,19 +684,8 @@ index bf17fa9..0908f4a 100644
|
||||||
+ power = max_power = ieee80211_chandef_max_power(&chanctx_conf->def);
|
+ power = max_power = ieee80211_chandef_max_power(&chanctx_conf->def);
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
||||||
+ chan = chanctx_conf->def.chan;
|
|
||||||
+ if (sdata->wdev.iftype == NL80211_IFTYPE_STATION ||
|
|
||||||
+ sdata->wdev.iftype == NL80211_IFTYPE_MESH_POINT) {
|
|
||||||
+ if (chan->flags & IEEE80211_CHAN_RADAR) {
|
|
||||||
+ if (chan->max_reg_client_no_tpc_power > 0) {
|
|
||||||
+ max_power = power = chan->max_reg_client_no_tpc_power;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (sdata->user_power_level != IEEE80211_UNSET_POWER_LEVEL)
|
if (sdata->user_power_level != IEEE80211_UNSET_POWER_LEVEL)
|
||||||
power = min(power, sdata->user_power_level);
|
@@ -65,6 +65,11 @@ bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
|
||||||
|
|
||||||
if (sdata->ap_power_level != IEEE80211_UNSET_POWER_LEVEL)
|
if (sdata->ap_power_level != IEEE80211_UNSET_POWER_LEVEL)
|
||||||
power = min(power, sdata->ap_power_level);
|
power = min(power, sdata->ap_power_level);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue