make fpu emulation support configurable through kernel_menuconfig by adding a prompt...
[openwrt/openwrt.git] / package / mac80211 / patches / 500-nl80211_4addr.patch
1 --- a/include/linux/nl80211.h
2 +++ b/include/linux/nl80211.h
3 @@ -584,6 +584,8 @@ enum nl80211_commands {
4 * changed then the list changed and the dump should be repeated
5 * completely from scratch.
6 *
7 + * @NL80211_ATTR_4ADDR: Use 4-address frames on a virtual interface
8 + *
9 * @NL80211_ATTR_MAX: highest attribute number currently defined
10 * @__NL80211_ATTR_AFTER_LAST: internal use
11 */
12 @@ -714,6 +716,8 @@ enum nl80211_attrs {
13
14 NL80211_ATTR_PID,
15
16 + NL80211_ATTR_4ADDR,
17 +
18 /* add attributes here, update the policy in nl80211.c */
19
20 __NL80211_ATTR_AFTER_LAST,
21 --- a/include/net/cfg80211.h
22 +++ b/include/net/cfg80211.h
23 @@ -207,10 +207,12 @@ struct ieee80211_supported_band {
24 * struct vif_params - describes virtual interface parameters
25 * @mesh_id: mesh ID to use
26 * @mesh_id_len: length of the mesh ID
27 + * @use_4addr: use 4-address frames
28 */
29 struct vif_params {
30 u8 *mesh_id;
31 int mesh_id_len;
32 + int use_4addr;
33 };
34
35 /**
36 --- a/net/wireless/nl80211.c
37 +++ b/net/wireless/nl80211.c
38 @@ -140,6 +140,7 @@ static struct nla_policy nl80211_policy[
39 [NL80211_ATTR_CIPHER_SUITE_GROUP] = { .type = NLA_U32 },
40 [NL80211_ATTR_WPA_VERSIONS] = { .type = NLA_U32 },
41 [NL80211_ATTR_PID] = { .type = NLA_U32 },
42 + [NL80211_ATTR_4ADDR] = { .type = NLA_U8 },
43 };
44
45 /* policy for the attributes */
46 @@ -989,6 +990,13 @@ static int nl80211_set_interface(struct
47 change = true;
48 }
49
50 + if (info->attrs[NL80211_ATTR_4ADDR]) {
51 + params.use_4addr = !!nla_get_u8(info->attrs[NL80211_ATTR_4ADDR]);
52 + change = true;
53 + } else {
54 + params.use_4addr = -1;
55 + }
56 +
57 if (info->attrs[NL80211_ATTR_MNTR_FLAGS]) {
58 if (ntype != NL80211_IFTYPE_MONITOR) {
59 err = -EINVAL;
60 @@ -1055,6 +1063,9 @@ static int nl80211_new_interface(struct
61 params.mesh_id_len = nla_len(info->attrs[NL80211_ATTR_MESH_ID]);
62 }
63
64 + if (info->attrs[NL80211_ATTR_4ADDR])
65 + params.use_4addr = !!nla_get_u8(info->attrs[NL80211_ATTR_4ADDR]);
66 +
67 err = parse_monitor_flags(type == NL80211_IFTYPE_MONITOR ?
68 info->attrs[NL80211_ATTR_MNTR_FLAGS] : NULL,
69 &flags);