[kernel] refresh 2.6.31 patches
[openwrt.git] / package / mac80211 / patches / 800-cfg80211_ap_isolate.patch
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.
6 *
7 + * @NL80211_ATTR_AP_ISOLATE: (AP mode) Do not forward traffic between stations
8 + * connected to this BSS.
9 + *
10 * @NL80211_ATTR_MAX: highest attribute number currently defined
11 * @__NL80211_ATTR_AFTER_LAST: internal use
12 */
13 @@ -864,6 +867,8 @@ enum nl80211_attrs {
14
15 NL80211_ATTR_LOCAL_STATE_CHANGE,
16
17 + NL80211_ATTR_AP_ISOLATE,
18 +
19 /* add attributes here, update the policy in nl80211.c */
20
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
29 */
30 struct bss_parameters {
31 int use_cts_prot;
32 @@ -519,6 +520,7 @@ struct bss_parameters {
33 int use_short_slot_time;
34 u8 *basic_rates;
35 u8 basic_rates_len;
36 + int ap_isolate;
37 };
38
39 struct mesh_config {
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 },
47 };
48
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;
55
56 if (info->attrs[NL80211_ATTR_BSS_CTS_PROT])
57 params.use_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]);
61 }
62 + if (info->attrs[NL80211_ATTR_AP_ISOLATE])
63 + params.ap_isolate = !!nla_get_u8(info->attrs[NL80211_ATTR_AP_ISOLATE]);
64
65 rtnl_lock();
66
This page took 0.063666 seconds and 5 git commands to generate.