aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-18 14:07:15 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-08-20 07:58:22 -0400
commitf142c6b906da451ded2c7a8e17b2a0e6fee3e891 (patch)
treeed23b88e0cc23cb15fa28563d27965421ed47dd7 /net/mac80211/util.c
parent98104fdeda63d57631c9f89e90a7b83b58fcee40 (diff)
mac80211: support P2P Device abstraction
After cfg80211 got a P2P Device abstraction, add support to mac80211. Whether it really is supported or not will depend on whether or not the driver has support for it, but mac80211 needs to change to be able to support drivers that need a P2P Device. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 9a4e4e30ea6..79bce870ad7 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -276,6 +276,9 @@ void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue)
276 list_for_each_entry_rcu(sdata, &local->interfaces, list) { 276 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
277 int ac; 277 int ac;
278 278
279 if (!sdata->dev)
280 continue;
281
279 if (test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state)) 282 if (test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state))
280 continue; 283 continue;
281 284
@@ -364,6 +367,9 @@ static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,
364 list_for_each_entry_rcu(sdata, &local->interfaces, list) { 367 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
365 int ac; 368 int ac;
366 369
370 if (!sdata->dev)
371 continue;
372
367 for (ac = 0; ac < n_acs; ac++) { 373 for (ac = 0; ac < n_acs; ac++) {
368 if (sdata->vif.hw_queue[ac] == queue || 374 if (sdata->vif.hw_queue[ac] == queue ||
369 sdata->vif.cab_queue == queue) 375 sdata->vif.cab_queue == queue)
@@ -902,7 +908,8 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata,
902 drv_conf_tx(local, sdata, ac, &qparam); 908 drv_conf_tx(local, sdata, ac, &qparam);
903 } 909 }
904 910
905 if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { 911 if (sdata->vif.type != NL80211_IFTYPE_MONITOR &&
912 sdata->vif.type != NL80211_IFTYPE_P2P_DEVICE) {
906 sdata->vif.bss_conf.qos = enable_qos; 913 sdata->vif.bss_conf.qos = enable_qos;
907 if (bss_notify) 914 if (bss_notify)
908 ieee80211_bss_info_change_notify(sdata, 915 ieee80211_bss_info_change_notify(sdata,
@@ -1391,7 +1398,8 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1391 /* ignore virtual */ 1398 /* ignore virtual */
1392 break; 1399 break;
1393 case NL80211_IFTYPE_P2P_DEVICE: 1400 case NL80211_IFTYPE_P2P_DEVICE:
1394 /* not yet supported */ 1401 changed = BSS_CHANGED_IDLE;
1402 break;
1395 case NL80211_IFTYPE_UNSPECIFIED: 1403 case NL80211_IFTYPE_UNSPECIFIED:
1396 case NUM_NL80211_IFTYPES: 1404 case NUM_NL80211_IFTYPES:
1397 case NL80211_IFTYPE_P2P_CLIENT: 1405 case NL80211_IFTYPE_P2P_CLIENT:
@@ -1578,6 +1586,8 @@ void ieee80211_recalc_smps(struct ieee80211_local *local)
1578 list_for_each_entry(sdata, &local->interfaces, list) { 1586 list_for_each_entry(sdata, &local->interfaces, list) {
1579 if (!ieee80211_sdata_running(sdata)) 1587 if (!ieee80211_sdata_running(sdata))
1580 continue; 1588 continue;
1589 if (sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE)
1590 continue;
1581 if (sdata->vif.type != NL80211_IFTYPE_STATION) 1591 if (sdata->vif.type != NL80211_IFTYPE_STATION)
1582 goto set; 1592 goto set;
1583 1593