diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-11-10 19:27:19 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-11-10 19:27:19 +0000 |
commit | 085fe6bf4bb73124543b7720610582450a1bdc7b (patch) | |
tree | 67c498562236b5fcf9fec91196ba1a4122f0914d /package/mac80211/patches/500-nl80211_4addr.patch | |
parent | 5e3e6c8c0d8580f7d2c41cf1cfeb9a05665844ae (diff) | |
download | master-187ad058-085fe6bf4bb73124543b7720610582450a1bdc7b.tar.gz master-187ad058-085fe6bf4bb73124543b7720610582450a1bdc7b.tar.bz2 master-187ad058-085fe6bf4bb73124543b7720610582450a1bdc7b.zip |
mac80211: implement wds sta support (wds ap support work in progress, needs hostapd changes)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18356 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/500-nl80211_4addr.patch')
-rw-r--r-- | package/mac80211/patches/500-nl80211_4addr.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/package/mac80211/patches/500-nl80211_4addr.patch b/package/mac80211/patches/500-nl80211_4addr.patch new file mode 100644 index 0000000000..de3b78fdbb --- /dev/null +++ b/package/mac80211/patches/500-nl80211_4addr.patch @@ -0,0 +1,69 @@ +--- a/include/linux/nl80211.h ++++ b/include/linux/nl80211.h +@@ -584,6 +584,8 @@ enum nl80211_commands { + * changed then the list changed and the dump should be repeated + * completely from scratch. + * ++ * @NL80211_ATTR_4ADDR: Use 4-address frames on a virtual interface ++ * + * @NL80211_ATTR_MAX: highest attribute number currently defined + * @__NL80211_ATTR_AFTER_LAST: internal use + */ +@@ -714,6 +716,8 @@ enum nl80211_attrs { + + NL80211_ATTR_PID, + ++ NL80211_ATTR_4ADDR, ++ + /* add attributes here, update the policy in nl80211.c */ + + __NL80211_ATTR_AFTER_LAST, +--- a/include/net/cfg80211.h ++++ b/include/net/cfg80211.h +@@ -207,10 +207,12 @@ struct ieee80211_supported_band { + * struct vif_params - describes virtual interface parameters + * @mesh_id: mesh ID to use + * @mesh_id_len: length of the mesh ID ++ * @use_4addr: use 4-address frames + */ + struct vif_params { + u8 *mesh_id; + int mesh_id_len; ++ int use_4addr; + }; + + /** +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -140,6 +140,7 @@ static struct nla_policy nl80211_policy[ + [NL80211_ATTR_CIPHER_SUITE_GROUP] = { .type = NLA_U32 }, + [NL80211_ATTR_WPA_VERSIONS] = { .type = NLA_U32 }, + [NL80211_ATTR_PID] = { .type = NLA_U32 }, ++ [NL80211_ATTR_4ADDR] = { .type = NLA_U8 }, + }; + + /* policy for the attributes */ +@@ -989,6 +990,13 @@ static int nl80211_set_interface(struct + change = true; + } + ++ if (info->attrs[NL80211_ATTR_4ADDR]) { ++ params.use_4addr = !!nla_get_u8(info->attrs[NL80211_ATTR_4ADDR]); ++ change = true; ++ } else { ++ params.use_4addr = -1; ++ } ++ + if (info->attrs[NL80211_ATTR_MNTR_FLAGS]) { + if (ntype != NL80211_IFTYPE_MONITOR) { + err = -EINVAL; +@@ -1055,6 +1063,9 @@ static int nl80211_new_interface(struct + params.mesh_id_len = nla_len(info->attrs[NL80211_ATTR_MESH_ID]); + } + ++ if (info->attrs[NL80211_ATTR_4ADDR]) ++ params.use_4addr = !!nla_get_u8(info->attrs[NL80211_ATTR_4ADDR]); ++ + err = parse_monitor_flags(type == NL80211_IFTYPE_MONITOR ? + info->attrs[NL80211_ATTR_MNTR_FLAGS] : NULL, + &flags); |