diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-11-19 11:55:19 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-19 17:08:53 +0100 |
commit | 9bc383de37090ba7ca3ff32a12c9d809dc5867f0 (patch) | |
tree | 2b502b918f585427b45357e5a9a781ea9f06c263 /net/wireless/util.c | |
parent | cfg80211: convert bools into flags (diff) | |
download | linux-9bc383de37090ba7ca3ff32a12c9d809dc5867f0.tar.xz linux-9bc383de37090ba7ca3ff32a12c9d809dc5867f0.zip |
cfg80211: introduce capability for 4addr mode
It's very likely that not many devices will support
four-address mode in station or AP mode so introduce
capability bits for both modes, set them in mac80211
and check them when userspace tries to use the mode.
Also, keep track of 4addr in cfg80211 (wireless_dev)
and not in mac80211 any more. mac80211 can also be
improved for the VLAN case by not looking at the
4addr flag but maintaining the station pointer for
it correctly. However, keep track of use_4addr for
station mode in mac80211 to avoid all the derefs.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 5aa39f7cf9b9..17a7a4cfc617 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -659,6 +659,8 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, return -EOPNOTSUPP; if (ntype != otype) { + dev->ieee80211_ptr->use_4addr = false; + switch (otype) { case NL80211_IFTYPE_ADHOC: cfg80211_leave_ibss(rdev, dev, false); @@ -682,5 +684,8 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, WARN_ON(!err && dev->ieee80211_ptr->iftype != ntype); + if (!err && params && params->use_4addr != -1) + dev->ieee80211_ptr->use_4addr = params->use_4addr; + return err; } |