aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/uapi/linux/nl80211.h8
-rw-r--r--net/wireless/nl80211.c9
2 files changed, 13 insertions, 4 deletions
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 7e25164adfe9..129b7b087148 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -1515,6 +1515,11 @@ enum nl80211_commands {
1515 * to react to radar events, e.g. initiate a channel switch or leave the 1515 * to react to radar events, e.g. initiate a channel switch or leave the
1516 * IBSS network. 1516 * IBSS network.
1517 * 1517 *
1518 * @NL80211_ATTR_SUPPORT_5_MHZ: A flag indicating that the device supports
1519 * 5 MHz channel bandwidth.
1520 * @NL80211_ATTR_SUPPORT_10_MHZ: A flag indicating that the device supports
1521 * 10 MHz channel bandwidth.
1522 *
1518 * @NL80211_ATTR_MAX: highest attribute number currently defined 1523 * @NL80211_ATTR_MAX: highest attribute number currently defined
1519 * @__NL80211_ATTR_AFTER_LAST: internal use 1524 * @__NL80211_ATTR_AFTER_LAST: internal use
1520 */ 1525 */
@@ -1831,6 +1836,9 @@ enum nl80211_attrs {
1831 1836
1832 NL80211_ATTR_HANDLE_DFS, 1837 NL80211_ATTR_HANDLE_DFS,
1833 1838
1839 NL80211_ATTR_SUPPORT_5_MHZ,
1840 NL80211_ATTR_SUPPORT_10_MHZ,
1841
1834 /* add attributes here, update the policy in nl80211.c */ 1842 /* add attributes here, update the policy in nl80211.c */
1835 1843
1836 __NL80211_ATTR_AFTER_LAST, 1844 __NL80211_ATTR_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 79632edebb6c..8c83fbb3824f 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1228,10 +1228,6 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev,
1228 if ((dev->wiphy.flags & WIPHY_FLAG_TDLS_EXTERNAL_SETUP) && 1228 if ((dev->wiphy.flags & WIPHY_FLAG_TDLS_EXTERNAL_SETUP) &&
1229 nla_put_flag(msg, NL80211_ATTR_TDLS_EXTERNAL_SETUP)) 1229 nla_put_flag(msg, NL80211_ATTR_TDLS_EXTERNAL_SETUP))
1230 goto nla_put_failure; 1230 goto nla_put_failure;
1231 if ((dev->wiphy.flags & WIPHY_FLAG_SUPPORTS_5_10_MHZ) &&
1232 nla_put_flag(msg, WIPHY_FLAG_SUPPORTS_5_10_MHZ))
1233 goto nla_put_failure;
1234
1235 state->split_start++; 1231 state->split_start++;
1236 if (state->split) 1232 if (state->split)
1237 break; 1233 break;
@@ -1560,6 +1556,11 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev,
1560 if (nl80211_send_coalesce(msg, dev)) 1556 if (nl80211_send_coalesce(msg, dev))
1561 goto nla_put_failure; 1557 goto nla_put_failure;
1562 1558
1559 if ((dev->wiphy.flags & WIPHY_FLAG_SUPPORTS_5_10_MHZ) &&
1560 (nla_put_flag(msg, NL80211_ATTR_SUPPORT_5_MHZ) ||
1561 nla_put_flag(msg, NL80211_ATTR_SUPPORT_10_MHZ)))
1562 goto nla_put_failure;
1563
1563 /* done */ 1564 /* done */
1564 state->split_start = 0; 1565 state->split_start = 0;
1565 break; 1566 break;