diff options
author | Rostislav Lisovy <lisovy@gmail.com> | 2014-11-03 04:33:19 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-11-04 07:18:21 -0500 |
commit | 239281f803e2efdb77d906ef296086b6917e5d71 (patch) | |
tree | 11f753fd0c27d518d0f11e07bc359143a85b00bd /net/mac80211/iface.c | |
parent | 6e0bd6c35b021dc73a81ebd1ef79761233c48b50 (diff) |
mac80211: 802.11p OCB mode support
This patch adds 802.11p OCB (Outside the Context of a BSS) mode
support.
When communicating in OCB mode a mandatory wildcard BSSID
(48 '1' bits) is used.
The EDCA parameters handling function was changed to support
802.11p specific values.
The insertion of a newly discovered STAs is done in the similar way
as in the IBSS mode -- through the deferred insertion.
The OCB mode uses a periodic 'housekeeping task' for expiration of
disconnected STAs (in the similar manner as in the MESH mode).
New Kconfig option for verbose OCB debugging outputs is added.
Signed-off-by: Rostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index d69e7532095f..6b631c049eba 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -259,6 +259,15 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata, | |||
259 | list_for_each_entry(nsdata, &local->interfaces, list) { | 259 | list_for_each_entry(nsdata, &local->interfaces, list) { |
260 | if (nsdata != sdata && ieee80211_sdata_running(nsdata)) { | 260 | if (nsdata != sdata && ieee80211_sdata_running(nsdata)) { |
261 | /* | 261 | /* |
262 | * Only OCB and monitor mode may coexist | ||
263 | */ | ||
264 | if ((sdata->vif.type == NL80211_IFTYPE_OCB && | ||
265 | nsdata->vif.type != NL80211_IFTYPE_MONITOR) || | ||
266 | (sdata->vif.type != NL80211_IFTYPE_MONITOR && | ||
267 | nsdata->vif.type == NL80211_IFTYPE_OCB)) | ||
268 | return -EBUSY; | ||
269 | |||
270 | /* | ||
262 | * Allow only a single IBSS interface to be up at any | 271 | * Allow only a single IBSS interface to be up at any |
263 | * time. This is restricted because beacon distribution | 272 | * time. This is restricted because beacon distribution |
264 | * cannot work properly if both are in the same IBSS. | 273 | * cannot work properly if both are in the same IBSS. |
@@ -1283,6 +1292,9 @@ static void ieee80211_iface_work(struct work_struct *work) | |||
1283 | break; | 1292 | break; |
1284 | ieee80211_mesh_work(sdata); | 1293 | ieee80211_mesh_work(sdata); |
1285 | break; | 1294 | break; |
1295 | case NL80211_IFTYPE_OCB: | ||
1296 | ieee80211_ocb_work(sdata); | ||
1297 | break; | ||
1286 | default: | 1298 | default: |
1287 | break; | 1299 | break; |
1288 | } | 1300 | } |
@@ -1302,6 +1314,9 @@ static void ieee80211_recalc_smps_work(struct work_struct *work) | |||
1302 | static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata, | 1314 | static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata, |
1303 | enum nl80211_iftype type) | 1315 | enum nl80211_iftype type) |
1304 | { | 1316 | { |
1317 | static const u8 bssid_wildcard[ETH_ALEN] = {0xff, 0xff, 0xff, | ||
1318 | 0xff, 0xff, 0xff}; | ||
1319 | |||
1305 | /* clear type-dependent union */ | 1320 | /* clear type-dependent union */ |
1306 | memset(&sdata->u, 0, sizeof(sdata->u)); | 1321 | memset(&sdata->u, 0, sizeof(sdata->u)); |
1307 | 1322 | ||
@@ -1354,7 +1369,8 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata, | |||
1354 | ieee80211_sta_setup_sdata(sdata); | 1369 | ieee80211_sta_setup_sdata(sdata); |
1355 | break; | 1370 | break; |
1356 | case NL80211_IFTYPE_OCB: | 1371 | case NL80211_IFTYPE_OCB: |
1357 | /* to be implemented in the future */ | 1372 | sdata->vif.bss_conf.bssid = bssid_wildcard; |
1373 | ieee80211_ocb_setup_sdata(sdata); | ||
1358 | break; | 1374 | break; |
1359 | case NL80211_IFTYPE_ADHOC: | 1375 | case NL80211_IFTYPE_ADHOC: |
1360 | sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid; | 1376 | sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid; |
@@ -1403,6 +1419,7 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata, | |||
1403 | case NL80211_IFTYPE_AP: | 1419 | case NL80211_IFTYPE_AP: |
1404 | case NL80211_IFTYPE_STATION: | 1420 | case NL80211_IFTYPE_STATION: |
1405 | case NL80211_IFTYPE_ADHOC: | 1421 | case NL80211_IFTYPE_ADHOC: |
1422 | case NL80211_IFTYPE_OCB: | ||
1406 | /* | 1423 | /* |
1407 | * Could maybe also all others here? | 1424 | * Could maybe also all others here? |
1408 | * Just not sure how that interacts | 1425 | * Just not sure how that interacts |
@@ -1418,6 +1435,7 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata, | |||
1418 | case NL80211_IFTYPE_AP: | 1435 | case NL80211_IFTYPE_AP: |
1419 | case NL80211_IFTYPE_STATION: | 1436 | case NL80211_IFTYPE_STATION: |
1420 | case NL80211_IFTYPE_ADHOC: | 1437 | case NL80211_IFTYPE_ADHOC: |
1438 | case NL80211_IFTYPE_OCB: | ||
1421 | /* | 1439 | /* |
1422 | * Could probably support everything | 1440 | * Could probably support everything |
1423 | * but WDS here (WDS do_open can fail | 1441 | * but WDS here (WDS do_open can fail |