mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 00:30:16 +02:00
mac80211: rework the current tx power display patch
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33584 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
e3b2ecffb6
commit
a53ee82639
@ -1,14 +1,13 @@
|
|||||||
--- a/include/net/mac80211.h
|
--- a/include/net/mac80211.h
|
||||||
+++ b/include/net/mac80211.h
|
+++ b/include/net/mac80211.h
|
||||||
@@ -863,7 +863,7 @@ enum ieee80211_smps_mode {
|
@@ -1372,6 +1372,7 @@ struct ieee80211_hw {
|
||||||
*/
|
u8 max_tx_aggregation_subframes;
|
||||||
struct ieee80211_conf {
|
u8 offchannel_tx_hw_queue;
|
||||||
u32 flags;
|
u8 radiotap_mcs_details;
|
||||||
- int power_level, dynamic_ps_timeout;
|
+ s8 cur_power_level;
|
||||||
+ int cur_power_level, power_level, dynamic_ps_timeout;
|
netdev_features_t netdev_features;
|
||||||
int max_sleep_period;
|
};
|
||||||
|
|
||||||
u16 listen_interval;
|
|
||||||
--- a/net/mac80211/cfg.c
|
--- a/net/mac80211/cfg.c
|
||||||
+++ b/net/mac80211/cfg.c
|
+++ b/net/mac80211/cfg.c
|
||||||
@@ -1969,7 +1969,7 @@ static int ieee80211_get_tx_power(struct
|
@@ -1969,7 +1969,7 @@ static int ieee80211_get_tx_power(struct
|
||||||
@ -16,7 +15,7 @@
|
|||||||
struct ieee80211_local *local = wiphy_priv(wiphy);
|
struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||||
|
|
||||||
- *dbm = local->hw.conf.power_level;
|
- *dbm = local->hw.conf.power_level;
|
||||||
+ *dbm = local->hw.conf.cur_power_level;
|
+ *dbm = local->hw.cur_power_level;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -26,7 +25,7 @@
|
|||||||
|
|
||||||
if (local->hw.conf.power_level != power) {
|
if (local->hw.conf.power_level != power) {
|
||||||
changed |= IEEE80211_CONF_CHANGE_POWER;
|
changed |= IEEE80211_CONF_CHANGE_POWER;
|
||||||
+ local->hw.conf.cur_power_level = power;
|
+ local->hw.cur_power_level = power;
|
||||||
local->hw.conf.power_level = power;
|
local->hw.conf.power_level = power;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ conf->cur_power_level = sc->curtxpow / 2;
|
+ hw->cur_power_level = sc->curtxpow / 2;
|
||||||
+
|
+
|
||||||
/*
|
/*
|
||||||
* The most recent snapshot of channel->noisefloor for the old
|
* The most recent snapshot of channel->noisefloor for the old
|
||||||
@ -13,7 +13,7 @@
|
|||||||
sc->config.txpowlimit = 2 * conf->power_level;
|
sc->config.txpowlimit = 2 * conf->power_level;
|
||||||
ath9k_cmn_update_txpow(ah, sc->curtxpow,
|
ath9k_cmn_update_txpow(ah, sc->curtxpow,
|
||||||
sc->config.txpowlimit, &sc->curtxpow);
|
sc->config.txpowlimit, &sc->curtxpow);
|
||||||
+ conf->cur_power_level = sc->curtxpow / 2;
|
+ hw->cur_power_level = sc->curtxpow / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_unlock(&sc->mutex);
|
mutex_unlock(&sc->mutex);
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
return 0;
|
return 0;
|
||||||
--- a/include/net/mac80211.h
|
--- a/include/net/mac80211.h
|
||||||
+++ b/include/net/mac80211.h
|
+++ b/include/net/mac80211.h
|
||||||
@@ -3718,7 +3718,7 @@ void ieee80211_send_bar(struct ieee80211
|
@@ -3719,7 +3719,7 @@ void ieee80211_send_bar(struct ieee80211
|
||||||
* (deprecated; this will be removed once drivers get updated to use
|
* (deprecated; this will be removed once drivers get updated to use
|
||||||
* rate_idx_mask)
|
* rate_idx_mask)
|
||||||
* @rate_idx_mask: user-requested (legacy) rate mask
|
* @rate_idx_mask: user-requested (legacy) rate mask
|
||||||
@ -43,7 +43,7 @@
|
|||||||
* @bss: whether this frame is sent out in AP or IBSS mode
|
* @bss: whether this frame is sent out in AP or IBSS mode
|
||||||
*/
|
*/
|
||||||
struct ieee80211_tx_rate_control {
|
struct ieee80211_tx_rate_control {
|
||||||
@@ -3730,7 +3730,7 @@ struct ieee80211_tx_rate_control {
|
@@ -3731,7 +3731,7 @@ struct ieee80211_tx_rate_control {
|
||||||
bool rts, short_preamble;
|
bool rts, short_preamble;
|
||||||
u8 max_rate_idx;
|
u8 max_rate_idx;
|
||||||
u32 rate_idx_mask;
|
u32 rate_idx_mask;
|
||||||
|
Loading…
Reference in New Issue
Block a user