diff options
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index cf961a5f3aa9..d2125a37014a 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -2628,6 +2628,18 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local, | |||
2628 | if (!roc) | 2628 | if (!roc) |
2629 | return -ENOMEM; | 2629 | return -ENOMEM; |
2630 | 2630 | ||
2631 | /* | ||
2632 | * If the duration is zero, then the driver | ||
2633 | * wouldn't actually do anything. Set it to | ||
2634 | * 10 for now. | ||
2635 | * | ||
2636 | * TODO: cancel the off-channel operation | ||
2637 | * when we get the SKB's TX status and | ||
2638 | * the wait time was zero before. | ||
2639 | */ | ||
2640 | if (!duration) | ||
2641 | duration = 10; | ||
2642 | |||
2631 | roc->chan = channel; | 2643 | roc->chan = channel; |
2632 | roc->duration = duration; | 2644 | roc->duration = duration; |
2633 | roc->req_duration = duration; | 2645 | roc->req_duration = duration; |
@@ -2651,18 +2663,6 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local, | |||
2651 | 2663 | ||
2652 | /* otherwise actually kick it off here (for error handling) */ | 2664 | /* otherwise actually kick it off here (for error handling) */ |
2653 | 2665 | ||
2654 | /* | ||
2655 | * If the duration is zero, then the driver | ||
2656 | * wouldn't actually do anything. Set it to | ||
2657 | * 10 for now. | ||
2658 | * | ||
2659 | * TODO: cancel the off-channel operation | ||
2660 | * when we get the SKB's TX status and | ||
2661 | * the wait time was zero before. | ||
2662 | */ | ||
2663 | if (!duration) | ||
2664 | duration = 10; | ||
2665 | |||
2666 | ret = drv_remain_on_channel(local, sdata, channel, duration, type); | 2666 | ret = drv_remain_on_channel(local, sdata, channel, duration, type); |
2667 | if (ret) { | 2667 | if (ret) { |
2668 | kfree(roc); | 2668 | kfree(roc); |