1 --- a/include/net/mac80211.h
2 +++ b/include/net/mac80211.h
3 @@ -825,7 +825,7 @@ enum ieee80211_smps_mode {
5 struct ieee80211_conf {
7 - int power_level, dynamic_ps_timeout;
8 + int cur_power_level, power_level, dynamic_ps_timeout;
12 --- a/net/mac80211/cfg.c
13 +++ b/net/mac80211/cfg.c
14 @@ -1742,7 +1742,7 @@ static int ieee80211_get_tx_power(struct
16 struct ieee80211_local *local = wiphy_priv(wiphy);
18 - *dbm = local->hw.conf.power_level;
19 + *dbm = local->hw.conf.cur_power_level;
23 --- a/net/mac80211/main.c
24 +++ b/net/mac80211/main.c
25 @@ -165,6 +165,7 @@ int ieee80211_hw_config(struct ieee80211
27 if (local->hw.conf.power_level != power) {
28 changed |= IEEE80211_CONF_CHANGE_POWER;
29 + local->hw.conf.cur_power_level = power;
30 local->hw.conf.power_level = power;