diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-09-16 08:58:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-09-16 15:46:07 -0400 |
commit | 2ca27bcff7127da1aa7dd39cd2a6f7cb187e327f (patch) | |
tree | fae1b81c56763a53d432310b8fcbb81b9bb48d7e /net/mac80211/util.c | |
parent | 074ac8df9f93f2a35a356d92fd7f16cd846f0a03 (diff) |
mac80211: add p2p device type support
When a driver advertises p2p device support,
mac80211 will handle it, but internally it will
rewrite the interface type to STA/AP rather than
P2P-STA/GO since otherwise a lot of paths need
to be touched that are otherwise identical. A
p2p boolean tells drivers whether or not a given
interface will be used for p2p or not.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 9f21a69f0917..737f4267c335 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -474,16 +474,10 @@ void ieee80211_iterate_active_interfaces( | |||
474 | 474 | ||
475 | list_for_each_entry(sdata, &local->interfaces, list) { | 475 | list_for_each_entry(sdata, &local->interfaces, list) { |
476 | switch (sdata->vif.type) { | 476 | switch (sdata->vif.type) { |
477 | case NUM_NL80211_IFTYPES: | ||
478 | case NL80211_IFTYPE_UNSPECIFIED: | ||
479 | case NL80211_IFTYPE_MONITOR: | 477 | case NL80211_IFTYPE_MONITOR: |
480 | case NL80211_IFTYPE_AP_VLAN: | 478 | case NL80211_IFTYPE_AP_VLAN: |
481 | continue; | 479 | continue; |
482 | case NL80211_IFTYPE_AP: | 480 | default: |
483 | case NL80211_IFTYPE_STATION: | ||
484 | case NL80211_IFTYPE_ADHOC: | ||
485 | case NL80211_IFTYPE_WDS: | ||
486 | case NL80211_IFTYPE_MESH_POINT: | ||
487 | break; | 481 | break; |
488 | } | 482 | } |
489 | if (ieee80211_sdata_running(sdata)) | 483 | if (ieee80211_sdata_running(sdata)) |
@@ -508,16 +502,10 @@ void ieee80211_iterate_active_interfaces_atomic( | |||
508 | 502 | ||
509 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { | 503 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { |
510 | switch (sdata->vif.type) { | 504 | switch (sdata->vif.type) { |
511 | case NUM_NL80211_IFTYPES: | ||
512 | case NL80211_IFTYPE_UNSPECIFIED: | ||
513 | case NL80211_IFTYPE_MONITOR: | 505 | case NL80211_IFTYPE_MONITOR: |
514 | case NL80211_IFTYPE_AP_VLAN: | 506 | case NL80211_IFTYPE_AP_VLAN: |
515 | continue; | 507 | continue; |
516 | case NL80211_IFTYPE_AP: | 508 | default: |
517 | case NL80211_IFTYPE_STATION: | ||
518 | case NL80211_IFTYPE_ADHOC: | ||
519 | case NL80211_IFTYPE_WDS: | ||
520 | case NL80211_IFTYPE_MESH_POINT: | ||
521 | break; | 509 | break; |
522 | } | 510 | } |
523 | if (ieee80211_sdata_running(sdata)) | 511 | if (ieee80211_sdata_running(sdata)) |
@@ -1193,6 +1181,8 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1193 | break; | 1181 | break; |
1194 | case NL80211_IFTYPE_UNSPECIFIED: | 1182 | case NL80211_IFTYPE_UNSPECIFIED: |
1195 | case NUM_NL80211_IFTYPES: | 1183 | case NUM_NL80211_IFTYPES: |
1184 | case NL80211_IFTYPE_P2P_CLIENT: | ||
1185 | case NL80211_IFTYPE_P2P_GO: | ||
1196 | WARN_ON(1); | 1186 | WARN_ON(1); |
1197 | break; | 1187 | break; |
1198 | } | 1188 | } |