1 --- a/include/linux/nl80211.h
2 +++ b/include/linux/nl80211.h
3 @@ -709,6 +709,9 @@ enum nl80211_commands {
4 * NL80211_CMD_AUTHENTICATE, NL80211_CMD_DEAUTHENTICATE,
5 * NL80211_CMD_DISASSOCIATE.
7 + * @NL80211_ATTR_AP_ISOLATE: (AP mode) Do not forward traffic between stations
8 + * connected to this BSS.
10 * @NL80211_ATTR_MAX: highest attribute number currently defined
11 * @__NL80211_ATTR_AFTER_LAST: internal use
13 @@ -864,6 +867,8 @@ enum nl80211_attrs {
15 NL80211_ATTR_LOCAL_STATE_CHANGE,
17 + NL80211_ATTR_AP_ISOLATE,
19 /* add attributes here, update the policy in nl80211.c */
21 __NL80211_ATTR_AFTER_LAST,
22 --- a/include/net/cfg80211.h
23 +++ b/include/net/cfg80211.h
24 @@ -512,6 +512,7 @@ struct mpath_info {
25 * @basic_rates: basic rates in IEEE 802.11 format
26 * (or NULL for no change)
27 * @basic_rates_len: number of basic rates
28 + * @ap_isolate: do not forward packets between connected stations
30 struct bss_parameters {
32 @@ -519,6 +520,7 @@ struct bss_parameters {
33 int use_short_slot_time;
40 --- a/net/wireless/nl80211.c
41 +++ b/net/wireless/nl80211.c
42 @@ -154,6 +154,7 @@ static const struct nla_policy nl80211_p
43 [NL80211_ATTR_PS_STATE] = { .type = NLA_U32 },
44 [NL80211_ATTR_CQM] = { .type = NLA_NESTED, },
45 [NL80211_ATTR_LOCAL_STATE_CHANGE] = { .type = NLA_FLAG },
46 + [NL80211_ATTR_AP_ISOLATE] = { .type = NLA_U8 },
49 /* policy for the attributes */
50 @@ -2449,6 +2450,7 @@ static int nl80211_set_bss(struct sk_buf
51 params.use_cts_prot = -1;
52 params.use_short_preamble = -1;
53 params.use_short_slot_time = -1;
54 + params.ap_isolate = -1;
56 if (info->attrs[NL80211_ATTR_BSS_CTS_PROT])
58 @@ -2465,6 +2467,8 @@ static int nl80211_set_bss(struct sk_buf
59 params.basic_rates_len =
60 nla_len(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]);
62 + if (info->attrs[NL80211_ATTR_AP_ISOLATE])
63 + params.ap_isolate = !!nla_get_u8(info->attrs[NL80211_ATTR_AP_ISOLATE]);