diff options
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 42 |
1 files changed, 13 insertions, 29 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 8664111d0566..87aeb4f21ffd 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -58,7 +58,7 @@ static int ieee80211_change_mtu(struct net_device *dev, int new_mtu) | |||
58 | } | 58 | } |
59 | 59 | ||
60 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 60 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
61 | printk(KERN_DEBUG "%s: setting MTU %d\n", dev->name, new_mtu); | 61 | pr_debug("%s: setting MTU %d\n", dev->name, new_mtu); |
62 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ | 62 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ |
63 | dev->mtu = new_mtu; | 63 | dev->mtu = new_mtu; |
64 | return 0; | 64 | return 0; |
@@ -528,10 +528,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
528 | */ | 528 | */ |
529 | netif_tx_stop_all_queues(sdata->dev); | 529 | netif_tx_stop_all_queues(sdata->dev); |
530 | 530 | ||
531 | /* | 531 | ieee80211_roc_purge(sdata); |
532 | * Purge work for this interface. | ||
533 | */ | ||
534 | ieee80211_work_purge(sdata); | ||
535 | 532 | ||
536 | /* | 533 | /* |
537 | * Remove all stations associated with this interface. | 534 | * Remove all stations associated with this interface. |
@@ -637,18 +634,6 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
637 | ieee80211_configure_filter(local); | 634 | ieee80211_configure_filter(local); |
638 | break; | 635 | break; |
639 | default: | 636 | default: |
640 | mutex_lock(&local->mtx); | ||
641 | if (local->hw_roc_dev == sdata->dev && | ||
642 | local->hw_roc_channel) { | ||
643 | /* ignore return value since this is racy */ | ||
644 | drv_cancel_remain_on_channel(local); | ||
645 | ieee80211_queue_work(&local->hw, &local->hw_roc_done); | ||
646 | } | ||
647 | mutex_unlock(&local->mtx); | ||
648 | |||
649 | flush_work(&local->hw_roc_start); | ||
650 | flush_work(&local->hw_roc_done); | ||
651 | |||
652 | flush_work(&sdata->work); | 637 | flush_work(&sdata->work); |
653 | /* | 638 | /* |
654 | * When we get here, the interface is marked down. | 639 | * When we get here, the interface is marked down. |
@@ -1238,7 +1223,7 @@ static void ieee80211_assign_perm_addr(struct ieee80211_local *local, | |||
1238 | 1223 | ||
1239 | if (__ffs64(mask) + hweight64(mask) != fls64(mask)) { | 1224 | if (__ffs64(mask) + hweight64(mask) != fls64(mask)) { |
1240 | /* not a contiguous mask ... not handled now! */ | 1225 | /* not a contiguous mask ... not handled now! */ |
1241 | printk(KERN_DEBUG "not contiguous\n"); | 1226 | pr_debug("not contiguous\n"); |
1242 | break; | 1227 | break; |
1243 | } | 1228 | } |
1244 | 1229 | ||
@@ -1364,6 +1349,8 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, | |||
1364 | sdata->u.mgd.use_4addr = params->use_4addr; | 1349 | sdata->u.mgd.use_4addr = params->use_4addr; |
1365 | } | 1350 | } |
1366 | 1351 | ||
1352 | ndev->features |= local->hw.netdev_features; | ||
1353 | |||
1367 | ret = register_netdevice(ndev); | 1354 | ret = register_netdevice(ndev); |
1368 | if (ret) | 1355 | if (ret) |
1369 | goto fail; | 1356 | goto fail; |
@@ -1454,9 +1441,9 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
1454 | { | 1441 | { |
1455 | struct ieee80211_sub_if_data *sdata; | 1442 | struct ieee80211_sub_if_data *sdata; |
1456 | int count = 0; | 1443 | int count = 0; |
1457 | bool working = false, scanning = false, hw_roc = false; | 1444 | bool working = false, scanning = false; |
1458 | struct ieee80211_work *wk; | ||
1459 | unsigned int led_trig_start = 0, led_trig_stop = 0; | 1445 | unsigned int led_trig_start = 0, led_trig_stop = 0; |
1446 | struct ieee80211_roc_work *roc; | ||
1460 | 1447 | ||
1461 | #ifdef CONFIG_PROVE_LOCKING | 1448 | #ifdef CONFIG_PROVE_LOCKING |
1462 | WARN_ON(debug_locks && !lockdep_rtnl_is_held() && | 1449 | WARN_ON(debug_locks && !lockdep_rtnl_is_held() && |
@@ -1491,9 +1478,11 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
1491 | count++; | 1478 | count++; |
1492 | } | 1479 | } |
1493 | 1480 | ||
1494 | list_for_each_entry(wk, &local->work_list, list) { | 1481 | if (!local->ops->remain_on_channel) { |
1495 | working = true; | 1482 | list_for_each_entry(roc, &local->roc_list, list) { |
1496 | wk->sdata->vif.bss_conf.idle = false; | 1483 | working = true; |
1484 | roc->sdata->vif.bss_conf.idle = false; | ||
1485 | } | ||
1497 | } | 1486 | } |
1498 | 1487 | ||
1499 | if (local->scan_sdata && | 1488 | if (local->scan_sdata && |
@@ -1502,9 +1491,6 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
1502 | local->scan_sdata->vif.bss_conf.idle = false; | 1491 | local->scan_sdata->vif.bss_conf.idle = false; |
1503 | } | 1492 | } |
1504 | 1493 | ||
1505 | if (local->hw_roc_channel) | ||
1506 | hw_roc = true; | ||
1507 | |||
1508 | list_for_each_entry(sdata, &local->interfaces, list) { | 1494 | list_for_each_entry(sdata, &local->interfaces, list) { |
1509 | if (sdata->vif.type == NL80211_IFTYPE_MONITOR || | 1495 | if (sdata->vif.type == NL80211_IFTYPE_MONITOR || |
1510 | sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | 1496 | sdata->vif.type == NL80211_IFTYPE_AP_VLAN) |
@@ -1516,7 +1502,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
1516 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE); | 1502 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE); |
1517 | } | 1503 | } |
1518 | 1504 | ||
1519 | if (working || scanning || hw_roc) | 1505 | if (working || scanning) |
1520 | led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK; | 1506 | led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK; |
1521 | else | 1507 | else |
1522 | led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK; | 1508 | led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK; |
@@ -1528,8 +1514,6 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) | |||
1528 | 1514 | ||
1529 | ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop); | 1515 | ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop); |
1530 | 1516 | ||
1531 | if (hw_roc) | ||
1532 | return ieee80211_idle_off(local, "hw remain-on-channel"); | ||
1533 | if (working) | 1517 | if (working) |
1534 | return ieee80211_idle_off(local, "working"); | 1518 | return ieee80211_idle_off(local, "working"); |
1535 | if (scanning) | 1519 | if (scanning) |