> On Mon, 2014-12-01 at 11:30 +0100, Lorenzo Bianconi wrote: >> Enable/disable per packet Transmit Power Control (TPC) in lower drivers >> according to TX power settings configured by the user. In particular TPC is >> enabled if value passed in enum nl80211_tx_power_setting is >> NL80211_TX_POWER_AUTOMATIC (no limit from userspace) or >> NL80211_TX_POWER_LIMITED (allow using less than specified from userspace), >> whereas TPC is disabled if nl80211_tx_power_setting is set to >> NL80211_TX_POWER_FIXED (use value configured from userspace) >> >> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@xxxxxxxxx> >> --- >> include/net/mac80211.h | 10 ++++++++++ >> net/mac80211/cfg.c | 6 +++++- >> net/mac80211/ieee80211_i.h | 1 + >> net/mac80211/iface.c | 8 +++++++- >> net/mac80211/main.c | 8 +++++++- >> 5 files changed, 30 insertions(+), 3 deletions(-) >> >> diff --git a/include/net/mac80211.h b/include/net/mac80211.h >> index cff3a26..7dd2432 100644 >> --- a/include/net/mac80211.h >> +++ b/include/net/mac80211.h >> @@ -376,6 +376,8 @@ enum ieee80211_rssi_event { >> * @ssid_len: Length of SSID given in @ssid. >> * @hidden_ssid: The SSID of the current vif is hidden. Only valid in AP-mode. >> * @txpower: TX power in dBm >> + * @tpc_enabled: enable/disable per packet Transmit Power Control (TPC) for the >> + * current vif > > Why not put the enum nl80211_tx_power_setting value here? > ack >> struct ieee80211_conf { >> u32 flags; >> int power_level, dynamic_ps_timeout; >> + bool tpc_enabled; >> int max_sleep_period; > > Do you need it here at all? > In multi-vif scenario, TPC could be enabled just on given interfaces, but driver TPC registers should be configured anyway (so I used a glob flag). However I can move that logic in driver code, what do you suggest? >> +++ b/net/mac80211/ieee80211_i.h >> @@ -869,6 +869,7 @@ struct ieee80211_sub_if_data { >> >> int user_power_level; /* in dBm */ >> int ap_power_level; /* in dBm */ >> + enum nl80211_tx_power_setting tx_power_type; > > if you put this into bss_conf you can of course get rid of it here. > It sounds good to me. I can set nl80211_tx_power_setting value in ieee80211_set_tx_power() > johannes > Best regards, Lorenzo -- UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html