aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/nl80211.h4
-rw-r--r--net/wireless/nl80211.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 79827345351d..54d6ebe38e39 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -508,6 +508,7 @@ enum nl80211_band_attr {
508 * on this channel in current regulatory domain. 508 * on this channel in current regulatory domain.
509 * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory 509 * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory
510 * on this channel in current regulatory domain. 510 * on this channel in current regulatory domain.
511 * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in dBm.
511 */ 512 */
512enum nl80211_frequency_attr { 513enum nl80211_frequency_attr {
513 __NL80211_FREQUENCY_ATTR_INVALID, 514 __NL80211_FREQUENCY_ATTR_INVALID,
@@ -516,12 +517,15 @@ enum nl80211_frequency_attr {
516 NL80211_FREQUENCY_ATTR_PASSIVE_SCAN, 517 NL80211_FREQUENCY_ATTR_PASSIVE_SCAN,
517 NL80211_FREQUENCY_ATTR_NO_IBSS, 518 NL80211_FREQUENCY_ATTR_NO_IBSS,
518 NL80211_FREQUENCY_ATTR_RADAR, 519 NL80211_FREQUENCY_ATTR_RADAR,
520 NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
519 521
520 /* keep last */ 522 /* keep last */
521 __NL80211_FREQUENCY_ATTR_AFTER_LAST, 523 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
522 NL80211_FREQUENCY_ATTR_MAX = __NL80211_FREQUENCY_ATTR_AFTER_LAST - 1 524 NL80211_FREQUENCY_ATTR_MAX = __NL80211_FREQUENCY_ATTR_AFTER_LAST - 1
523}; 525};
524 526
527#define NL80211_FREQUENCY_ATTR_MAX_TX_POWER NL80211_FREQUENCY_ATTR_MAX_TX_POWER
528
525/** 529/**
526 * enum nl80211_bitrate_attr - bitrate attributes 530 * enum nl80211_bitrate_attr - bitrate attributes
527 * @NL80211_BITRATE_ATTR_RATE: Bitrate in units of 100 kbps 531 * @NL80211_BITRATE_ATTR_RATE: Bitrate in units of 100 kbps
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 00121ceddb14..2e8464eaaaa2 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -198,6 +198,9 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
198 if (chan->flags & IEEE80211_CHAN_RADAR) 198 if (chan->flags & IEEE80211_CHAN_RADAR)
199 NLA_PUT_FLAG(msg, NL80211_FREQUENCY_ATTR_RADAR); 199 NLA_PUT_FLAG(msg, NL80211_FREQUENCY_ATTR_RADAR);
200 200
201 NLA_PUT_U8(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
202 chan->max_power);
203
201 nla_nest_end(msg, nl_freq); 204 nla_nest_end(msg, nl_freq);
202 } 205 }
203 206