diff options
-rw-r--r-- | include/linux/nl80211.h | 5 | ||||
-rw-r--r-- | include/net/cfg80211.h | 2 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 2ea3edeee7aa..f8750f9a65b8 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -709,6 +709,9 @@ enum nl80211_commands { | |||
709 | * NL80211_CMD_AUTHENTICATE, NL80211_CMD_DEAUTHENTICATE, | 709 | * NL80211_CMD_AUTHENTICATE, NL80211_CMD_DEAUTHENTICATE, |
710 | * NL80211_CMD_DISASSOCIATE. | 710 | * NL80211_CMD_DISASSOCIATE. |
711 | * | 711 | * |
712 | * @NL80211_ATTR_AP_ISOLATE: (AP mode) Do not forward traffic between stations | ||
713 | * connected to this BSS. | ||
714 | * | ||
712 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 715 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
713 | * @__NL80211_ATTR_AFTER_LAST: internal use | 716 | * @__NL80211_ATTR_AFTER_LAST: internal use |
714 | */ | 717 | */ |
@@ -864,6 +867,8 @@ enum nl80211_attrs { | |||
864 | 867 | ||
865 | NL80211_ATTR_LOCAL_STATE_CHANGE, | 868 | NL80211_ATTR_LOCAL_STATE_CHANGE, |
866 | 869 | ||
870 | NL80211_ATTR_AP_ISOLATE, | ||
871 | |||
867 | /* add attributes here, update the policy in nl80211.c */ | 872 | /* add attributes here, update the policy in nl80211.c */ |
868 | 873 | ||
869 | __NL80211_ATTR_AFTER_LAST, | 874 | __NL80211_ATTR_AFTER_LAST, |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 5a4efe54cffd..f6b29bf925d0 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -511,6 +511,7 @@ struct mpath_info { | |||
511 | * @basic_rates: basic rates in IEEE 802.11 format | 511 | * @basic_rates: basic rates in IEEE 802.11 format |
512 | * (or NULL for no change) | 512 | * (or NULL for no change) |
513 | * @basic_rates_len: number of basic rates | 513 | * @basic_rates_len: number of basic rates |
514 | * @ap_isolate: do not forward packets between connected stations | ||
514 | */ | 515 | */ |
515 | struct bss_parameters { | 516 | struct bss_parameters { |
516 | int use_cts_prot; | 517 | int use_cts_prot; |
@@ -518,6 +519,7 @@ struct bss_parameters { | |||
518 | int use_short_slot_time; | 519 | int use_short_slot_time; |
519 | u8 *basic_rates; | 520 | u8 *basic_rates; |
520 | u8 basic_rates_len; | 521 | u8 basic_rates_len; |
522 | int ap_isolate; | ||
521 | }; | 523 | }; |
522 | 524 | ||
523 | struct mesh_config { | 525 | struct mesh_config { |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index df5505b3930c..c27bef8e0c11 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -151,6 +151,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { | |||
151 | [NL80211_ATTR_PS_STATE] = { .type = NLA_U32 }, | 151 | [NL80211_ATTR_PS_STATE] = { .type = NLA_U32 }, |
152 | [NL80211_ATTR_CQM] = { .type = NLA_NESTED, }, | 152 | [NL80211_ATTR_CQM] = { .type = NLA_NESTED, }, |
153 | [NL80211_ATTR_LOCAL_STATE_CHANGE] = { .type = NLA_FLAG }, | 153 | [NL80211_ATTR_LOCAL_STATE_CHANGE] = { .type = NLA_FLAG }, |
154 | [NL80211_ATTR_AP_ISOLATE] = { .type = NLA_U8 }, | ||
154 | }; | 155 | }; |
155 | 156 | ||
156 | /* policy for the attributes */ | 157 | /* policy for the attributes */ |
@@ -2441,6 +2442,7 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info) | |||
2441 | params.use_cts_prot = -1; | 2442 | params.use_cts_prot = -1; |
2442 | params.use_short_preamble = -1; | 2443 | params.use_short_preamble = -1; |
2443 | params.use_short_slot_time = -1; | 2444 | params.use_short_slot_time = -1; |
2445 | params.ap_isolate = -1; | ||
2444 | 2446 | ||
2445 | if (info->attrs[NL80211_ATTR_BSS_CTS_PROT]) | 2447 | if (info->attrs[NL80211_ATTR_BSS_CTS_PROT]) |
2446 | params.use_cts_prot = | 2448 | params.use_cts_prot = |
@@ -2457,6 +2459,8 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info) | |||
2457 | params.basic_rates_len = | 2459 | params.basic_rates_len = |
2458 | nla_len(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]); | 2460 | nla_len(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]); |
2459 | } | 2461 | } |
2462 | if (info->attrs[NL80211_ATTR_AP_ISOLATE]) | ||
2463 | params.ap_isolate = !!nla_get_u8(info->attrs[NL80211_ATTR_AP_ISOLATE]); | ||
2460 | 2464 | ||
2461 | rtnl_lock(); | 2465 | rtnl_lock(); |
2462 | 2466 | ||