aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-19 05:55:19 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-19 11:08:53 -0500
commit9bc383de37090ba7ca3ff32a12c9d809dc5867f0 (patch)
tree2b502b918f585427b45357e5a9a781ea9f06c263 /include
parent5be83de54c16944dea9c16c6a5a53c1fa75ed304 (diff)
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 'include')
-rw-r--r--include/net/cfg80211.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index eca36abca8f5..d1e05aeb0c09 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1134,6 +1134,9 @@ struct cfg80211_ops {
1134 * by default -- this flag will be set depending on the kernel's default 1134 * by default -- this flag will be set depending on the kernel's default
1135 * on wiphy_new(), but can be changed by the driver if it has a good 1135 * on wiphy_new(), but can be changed by the driver if it has a good
1136 * reason to override the default 1136 * reason to override the default
1137 * @WIPHY_FLAG_4ADDR_AP: supports 4addr mode even on AP (with a single station
1138 * on a VLAN interface)
1139 * @WIPHY_FLAG_4ADDR_STATION: supports 4addr mode even as a station
1137 */ 1140 */
1138enum wiphy_flags { 1141enum wiphy_flags {
1139 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), 1142 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
@@ -1141,6 +1144,8 @@ enum wiphy_flags {
1141 WIPHY_FLAG_DISABLE_BEACON_HINTS = BIT(2), 1144 WIPHY_FLAG_DISABLE_BEACON_HINTS = BIT(2),
1142 WIPHY_FLAG_NETNS_OK = BIT(3), 1145 WIPHY_FLAG_NETNS_OK = BIT(3),
1143 WIPHY_FLAG_PS_ON_BY_DEFAULT = BIT(4), 1146 WIPHY_FLAG_PS_ON_BY_DEFAULT = BIT(4),
1147 WIPHY_FLAG_4ADDR_AP = BIT(5),
1148 WIPHY_FLAG_4ADDR_STATION = BIT(6),
1144}; 1149};
1145 1150
1146/** 1151/**
@@ -1366,6 +1371,10 @@ struct cfg80211_cached_keys;
1366 * @ssid_len: (private) Used by the internal configuration code 1371 * @ssid_len: (private) Used by the internal configuration code
1367 * @wext: (private) Used by the internal wireless extensions compat code 1372 * @wext: (private) Used by the internal wireless extensions compat code
1368 * @wext_bssid: (private) Used by the internal wireless extensions compat code 1373 * @wext_bssid: (private) Used by the internal wireless extensions compat code
1374 * @use_4addr: indicates 4addr mode is used on this interface, must be
1375 * set by driver (if supported) on add_interface BEFORE registering the
1376 * netdev and may otherwise be used by driver read-only, will be update
1377 * by cfg80211 on change_interface
1369 */ 1378 */
1370struct wireless_dev { 1379struct wireless_dev {
1371 struct wiphy *wiphy; 1380 struct wiphy *wiphy;
@@ -1379,6 +1388,8 @@ struct wireless_dev {
1379 1388
1380 struct work_struct cleanup_work; 1389 struct work_struct cleanup_work;
1381 1390
1391 bool use_4addr;
1392
1382 /* currently used for IBSS and SME - might be rearranged later */ 1393 /* currently used for IBSS and SME - might be rearranged later */
1383 u8 ssid[IEEE80211_MAX_SSID_LEN]; 1394 u8 ssid[IEEE80211_MAX_SSID_LEN];
1384 u8 ssid_len; 1395 u8 ssid_len;