aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/nl80211.h4
-rw-r--r--include/net/cfg80211.h3
-rw-r--r--net/wireless/nl80211.c5
3 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 8e28053ea423..380421253d16 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -849,6 +849,8 @@ enum nl80211_commands {
849 * flag isn't set, the frame will be rejected. This is also used as an 849 * flag isn't set, the frame will be rejected. This is also used as an
850 * nl80211 capability flag. 850 * nl80211 capability flag.
851 * 851 *
852 * @NL80211_ATTR_BSS_HTOPMODE: HT operation mode (u16)
853 *
852 * @NL80211_ATTR_MAX: highest attribute number currently defined 854 * @NL80211_ATTR_MAX: highest attribute number currently defined
853 * @__NL80211_ATTR_AFTER_LAST: internal use 855 * @__NL80211_ATTR_AFTER_LAST: internal use
854 */ 856 */
@@ -1025,6 +1027,8 @@ enum nl80211_attrs {
1025 1027
1026 NL80211_ATTR_OFFCHANNEL_TX_OK, 1028 NL80211_ATTR_OFFCHANNEL_TX_OK,
1027 1029
1030 NL80211_ATTR_BSS_HT_OPMODE,
1031
1028 /* add attributes here, update the policy in nl80211.c */ 1032 /* add attributes here, update the policy in nl80211.c */
1029 1033
1030 __NL80211_ATTR_AFTER_LAST, 1034 __NL80211_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 8764c9a5bab7..0d5979924be3 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -605,6 +605,8 @@ struct mpath_info {
605 * (or NULL for no change) 605 * (or NULL for no change)
606 * @basic_rates_len: number of basic rates 606 * @basic_rates_len: number of basic rates
607 * @ap_isolate: do not forward packets between connected stations 607 * @ap_isolate: do not forward packets between connected stations
608 * @ht_opmode: HT Operation mode
609 * (u16 = opmode, -1 = do not change)
608 */ 610 */
609struct bss_parameters { 611struct bss_parameters {
610 int use_cts_prot; 612 int use_cts_prot;
@@ -613,6 +615,7 @@ struct bss_parameters {
613 u8 *basic_rates; 615 u8 *basic_rates;
614 u8 basic_rates_len; 616 u8 basic_rates_len;
615 int ap_isolate; 617 int ap_isolate;
618 int ht_opmode;
616}; 619};
617 620
618/* 621/*
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 2cf03331d4a2..c3f80e565365 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -121,6 +121,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
121 [NL80211_ATTR_BSS_SHORT_SLOT_TIME] = { .type = NLA_U8 }, 121 [NL80211_ATTR_BSS_SHORT_SLOT_TIME] = { .type = NLA_U8 },
122 [NL80211_ATTR_BSS_BASIC_RATES] = { .type = NLA_BINARY, 122 [NL80211_ATTR_BSS_BASIC_RATES] = { .type = NLA_BINARY,
123 .len = NL80211_MAX_SUPP_RATES }, 123 .len = NL80211_MAX_SUPP_RATES },
124 [NL80211_ATTR_BSS_HT_OPMODE] = { .type = NLA_U16 },
124 125
125 [NL80211_ATTR_MESH_PARAMS] = { .type = NLA_NESTED }, 126 [NL80211_ATTR_MESH_PARAMS] = { .type = NLA_NESTED },
126 127
@@ -2462,6 +2463,7 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info)
2462 params.use_short_preamble = -1; 2463 params.use_short_preamble = -1;
2463 params.use_short_slot_time = -1; 2464 params.use_short_slot_time = -1;
2464 params.ap_isolate = -1; 2465 params.ap_isolate = -1;
2466 params.ht_opmode = -1;
2465 2467
2466 if (info->attrs[NL80211_ATTR_BSS_CTS_PROT]) 2468 if (info->attrs[NL80211_ATTR_BSS_CTS_PROT])
2467 params.use_cts_prot = 2469 params.use_cts_prot =
@@ -2480,6 +2482,9 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info)
2480 } 2482 }
2481 if (info->attrs[NL80211_ATTR_AP_ISOLATE]) 2483 if (info->attrs[NL80211_ATTR_AP_ISOLATE])
2482 params.ap_isolate = !!nla_get_u8(info->attrs[NL80211_ATTR_AP_ISOLATE]); 2484 params.ap_isolate = !!nla_get_u8(info->attrs[NL80211_ATTR_AP_ISOLATE]);
2485 if (info->attrs[NL80211_ATTR_BSS_HT_OPMODE])
2486 params.ht_opmode =
2487 nla_get_u16(info->attrs[NL80211_ATTR_BSS_HT_OPMODE]);
2483 2488
2484 if (!rdev->ops->change_bss) 2489 if (!rdev->ops->change_bss)
2485 return -EOPNOTSUPP; 2490 return -EOPNOTSUPP;