diff options
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac/main.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index f7ed34034f88..f6affc6fd12a 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -7981,13 +7981,21 @@ int brcms_c_get_curband(struct brcms_c_info *wlc) | |||
7981 | 7981 | ||
7982 | void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc, bool drop) | 7982 | void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc, bool drop) |
7983 | { | 7983 | { |
7984 | int timeout = 20; | ||
7985 | |||
7984 | /* flush packet queue when requested */ | 7986 | /* flush packet queue when requested */ |
7985 | if (drop) | 7987 | if (drop) |
7986 | brcmu_pktq_flush(&wlc->pkt_queue->q, false, NULL, NULL); | 7988 | brcmu_pktq_flush(&wlc->pkt_queue->q, false, NULL, NULL); |
7987 | 7989 | ||
7988 | /* wait for queue and DMA fifos to run dry */ | 7990 | /* wait for queue and DMA fifos to run dry */ |
7989 | while (!pktq_empty(&wlc->pkt_queue->q) || brcms_txpktpendtot(wlc) > 0) | 7991 | while (!pktq_empty(&wlc->pkt_queue->q) || brcms_txpktpendtot(wlc) > 0) { |
7990 | brcms_msleep(wlc->wl, 1); | 7992 | brcms_msleep(wlc->wl, 1); |
7993 | |||
7994 | if (--timeout == 0) | ||
7995 | break; | ||
7996 | } | ||
7997 | |||
7998 | WARN_ON_ONCE(timeout == 0); | ||
7991 | } | 7999 | } |
7992 | 8000 | ||
7993 | void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, u8 interval) | 8001 | void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, u8 interval) |