Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352727
b: refs/heads/master
c: 50640f1
h: refs/heads/master
i:
  352725: 0338c85
  352723: 7b8410f
  352719: c4f3a85
v: v3
  • Loading branch information
Johannes Berg committed Feb 15, 2013
1 parent f91f4f2 commit e71ab86
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c7a6ee27abd46247c1c7edfc49fb935138da7875
refs/heads/master: 50640f169372b9977487a328dedf13a8debedff7
17 changes: 17 additions & 0 deletions trunk/include/uapi/linux/nl80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -2041,6 +2041,16 @@ enum nl80211_band_attr {
* (enum nl80211_dfs_state)
* @NL80211_FREQUENCY_ATTR_DFS_TIME: time in miliseconds for how long
* this channel is in this DFS state.
* @NL80211_FREQUENCY_ATTR_NO_HT40_MINUS: HT40- isn't possible with this
* channel as the control channel
* @NL80211_FREQUENCY_ATTR_NO_HT40_PLUS: HT40+ isn't possible with this
* channel as the control channel
* @NL80211_FREQUENCY_ATTR_NO_80MHZ: any 80 MHz channel using this channel
* as the primary or any of the secondary channels isn't possible,
* this includes 80+80 channels
* @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
* using this channel as the primary or any of the secondary channels
* isn't possible
* @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
* currently defined
* @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
Expand All @@ -2055,6 +2065,10 @@ enum nl80211_frequency_attr {
NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
NL80211_FREQUENCY_ATTR_DFS_STATE,
NL80211_FREQUENCY_ATTR_DFS_TIME,
NL80211_FREQUENCY_ATTR_NO_HT40_MINUS,
NL80211_FREQUENCY_ATTR_NO_HT40_PLUS,
NL80211_FREQUENCY_ATTR_NO_80MHZ,
NL80211_FREQUENCY_ATTR_NO_160MHZ,

/* keep last */
__NL80211_FREQUENCY_ATTR_AFTER_LAST,
Expand Down Expand Up @@ -3421,6 +3435,8 @@ enum nl80211_ap_sme_features {
* Note that even for drivers that support this, the default is to add
* stations in authenticated/associated state, so to add unauthenticated
* stations the authenticated/associated bits have to be set in the mask.
* @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits
* (HT40, VHT 80/160 MHz) if this flag is set
*/
enum nl80211_feature_flags {
NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
Expand All @@ -3437,6 +3453,7 @@ enum nl80211_feature_flags {
NL80211_FEATURE_P2P_GO_CTWIN = 1 << 11,
NL80211_FEATURE_P2P_GO_OPPPS = 1 << 12,
NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 13,
NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14,
};

/**
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv)
rdev->wiphy.rts_threshold = (u32) -1;
rdev->wiphy.coverage_class = 0;

rdev->wiphy.features = NL80211_FEATURE_SCAN_FLUSH;
rdev->wiphy.features = NL80211_FEATURE_SCAN_FLUSH |
NL80211_FEATURE_ADVERTISE_CHAN_LIMITS;

return &rdev->wiphy;
}
Expand Down
12 changes: 12 additions & 0 deletions trunk/net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,18 @@ static int nl80211_msg_put_channel(struct sk_buff *msg,
if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_DFS_TIME, time))
goto nla_put_failure;
}
if ((chan->flags & IEEE80211_CHAN_NO_HT40MINUS) &&
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_HT40_MINUS))
goto nla_put_failure;
if ((chan->flags & IEEE80211_CHAN_NO_HT40PLUS) &&
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_HT40_PLUS))
goto nla_put_failure;
if ((chan->flags & IEEE80211_CHAN_NO_80MHZ) &&
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_80MHZ))
goto nla_put_failure;
if ((chan->flags & IEEE80211_CHAN_NO_160MHZ) &&
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_160MHZ))
goto nla_put_failure;

if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
DBM_TO_MBM(chan->max_power)))
Expand Down

0 comments on commit e71ab86

Please sign in to comment.