aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorRostislav Lisovy <lisovy@gmail.com>2014-11-03 04:33:18 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-11-04 07:18:17 -0500
commit6e0bd6c35b021dc73a81ebd1ef79761233c48b50 (patch)
treef3da02d8006a5ff98f3dd33a37dc1eddafd7b85c /net/mac80211/iface.c
parent5b3dc42b1b0db0264bbbe4ae44c15ab97bfd1e93 (diff)
cfg80211: 802.11p OCB mode handling
This patch adds new iface type (NL80211_IFTYPE_OCB) representing the OCB (Outside the Context of a BSS) mode. When establishing a connection to the network a cfg80211_join_ocb function is called (particular nl80211_command is added as well). A mandatory parameters during the ocb_join operation are 'center frequency' and 'channel width (5/10 MHz)'. Changes done in mac80211 are minimal possible required to avoid many warnings (warning: enumeration value 'NL80211_IFTYPE_OCB' not handled in switch) during compilation. Full functionality (where needed) is added in the following patch. 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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 1ffcc0701244..d69e7532095f 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -521,6 +521,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
521 case NL80211_IFTYPE_MONITOR: 521 case NL80211_IFTYPE_MONITOR:
522 case NL80211_IFTYPE_ADHOC: 522 case NL80211_IFTYPE_ADHOC:
523 case NL80211_IFTYPE_P2P_DEVICE: 523 case NL80211_IFTYPE_P2P_DEVICE:
524 case NL80211_IFTYPE_OCB:
524 /* no special treatment */ 525 /* no special treatment */
525 break; 526 break;
526 case NL80211_IFTYPE_UNSPECIFIED: 527 case NL80211_IFTYPE_UNSPECIFIED:
@@ -631,6 +632,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
631 case NL80211_IFTYPE_ADHOC: 632 case NL80211_IFTYPE_ADHOC:
632 case NL80211_IFTYPE_AP: 633 case NL80211_IFTYPE_AP:
633 case NL80211_IFTYPE_MESH_POINT: 634 case NL80211_IFTYPE_MESH_POINT:
635 case NL80211_IFTYPE_OCB:
634 netif_carrier_off(dev); 636 netif_carrier_off(dev);
635 break; 637 break;
636 case NL80211_IFTYPE_WDS: 638 case NL80211_IFTYPE_WDS:
@@ -1351,6 +1353,9 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
1351 sdata->vif.bss_conf.bssid = sdata->u.mgd.bssid; 1353 sdata->vif.bss_conf.bssid = sdata->u.mgd.bssid;
1352 ieee80211_sta_setup_sdata(sdata); 1354 ieee80211_sta_setup_sdata(sdata);
1353 break; 1355 break;
1356 case NL80211_IFTYPE_OCB:
1357 /* to be implemented in the future */
1358 break;
1354 case NL80211_IFTYPE_ADHOC: 1359 case NL80211_IFTYPE_ADHOC:
1355 sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid; 1360 sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid;
1356 ieee80211_ibss_setup_sdata(sdata); 1361 ieee80211_ibss_setup_sdata(sdata);