aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-10-24 04:59:25 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-30 04:11:34 -0400
commit1ea6f9c0d48b11b6ec3ec4b5579ec74fc3951cf8 (patch)
tree5a589d0bccfcac6ba0952942a04482b99752ddcc /include/net/mac80211.h
parentc8442118ad9cd05cfe3b993f058e70ab25b1009a (diff)
mac80211: handle TX power per virtual interface
Even before channel contexts/multi-channel, having a single global TX power limit was already problematic, in particular if two managed interfaces connected to two APs with different power constraints. The channel context introduction completely broke this though and in fact I had disabled TX power configuration there for drivers using channel contexts. Change everything to track TX power per interface so that different user settings and different channel maxima are treated correctly. Also continue tracking the global TX power though for compatibility with applications that attempt to configure the wiphy's TX power globally. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5f5327452c9..dfa589b721b 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -207,6 +207,7 @@ struct ieee80211_chanctx_conf {
207 * @BSS_CHANGED_SSID: SSID changed for this BSS (AP mode) 207 * @BSS_CHANGED_SSID: SSID changed for this BSS (AP mode)
208 * @BSS_CHANGED_AP_PROBE_RESP: Probe Response changed for this BSS (AP mode) 208 * @BSS_CHANGED_AP_PROBE_RESP: Probe Response changed for this BSS (AP mode)
209 * @BSS_CHANGED_PS: PS changed for this BSS (STA mode) 209 * @BSS_CHANGED_PS: PS changed for this BSS (STA mode)
210 * @BSS_CHANGED_TXPOWER: TX power setting changed for this interface
210 */ 211 */
211enum ieee80211_bss_change { 212enum ieee80211_bss_change {
212 BSS_CHANGED_ASSOC = 1<<0, 213 BSS_CHANGED_ASSOC = 1<<0,
@@ -227,6 +228,7 @@ enum ieee80211_bss_change {
227 BSS_CHANGED_SSID = 1<<15, 228 BSS_CHANGED_SSID = 1<<15,
228 BSS_CHANGED_AP_PROBE_RESP = 1<<16, 229 BSS_CHANGED_AP_PROBE_RESP = 1<<16,
229 BSS_CHANGED_PS = 1<<17, 230 BSS_CHANGED_PS = 1<<17,
231 BSS_CHANGED_TXPOWER = 1<<18,
230 232
231 /* when adding here, make sure to change ieee80211_reconfig */ 233 /* when adding here, make sure to change ieee80211_reconfig */
232}; 234};
@@ -309,6 +311,7 @@ enum ieee80211_rssi_event {
309 * @ssid: The SSID of the current vif. Only valid in AP-mode. 311 * @ssid: The SSID of the current vif. Only valid in AP-mode.
310 * @ssid_len: Length of SSID given in @ssid. 312 * @ssid_len: Length of SSID given in @ssid.
311 * @hidden_ssid: The SSID of the current vif is hidden. Only valid in AP-mode. 313 * @hidden_ssid: The SSID of the current vif is hidden. Only valid in AP-mode.
314 * @txpower: TX power in dBm
312 */ 315 */
313struct ieee80211_bss_conf { 316struct ieee80211_bss_conf {
314 const u8 *bssid; 317 const u8 *bssid;
@@ -341,6 +344,7 @@ struct ieee80211_bss_conf {
341 u8 ssid[IEEE80211_MAX_SSID_LEN]; 344 u8 ssid[IEEE80211_MAX_SSID_LEN];
342 size_t ssid_len; 345 size_t ssid_len;
343 bool hidden_ssid; 346 bool hidden_ssid;
347 int txpower;
344}; 348};
345 349
346/** 350/**
@@ -884,7 +888,8 @@ enum ieee80211_smps_mode {
884 * powersave documentation below. This variable is valid only when 888 * powersave documentation below. This variable is valid only when
885 * the CONF_PS flag is set. 889 * the CONF_PS flag is set.
886 * 890 *
887 * @power_level: requested transmit power (in dBm) 891 * @power_level: requested transmit power (in dBm), backward compatibility
892 * value only that is set to the minimum of all interfaces
888 * 893 *
889 * @channel: the channel to tune to 894 * @channel: the channel to tune to
890 * @channel_type: the channel (HT) type 895 * @channel_type: the channel (HT) type