diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-05-05 13:56:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-05 13:56:27 -0400 |
commit | 890641b2512f491f28e4ef7536dca1ea93dae997 (patch) | |
tree | 4dec378be564731945e033aca438e41324a3a522 /drivers/net/wireless/wl12xx/tx.c | |
parent | eaef6a93bd52a2cc47b9fce201310010707afdb4 (diff) | |
parent | 25eaea30cd7b009ba2ca693708330d2f395cbc4d (diff) |
Merge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx
Diffstat (limited to 'drivers/net/wireless/wl12xx/tx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c index 7a3339fd341..ca3ab1c1ace 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/tx.c | |||
@@ -65,6 +65,9 @@ static int wl1271_alloc_tx_id(struct wl1271 *wl, struct sk_buff *skb) | |||
65 | static void wl1271_free_tx_id(struct wl1271 *wl, int id) | 65 | static void wl1271_free_tx_id(struct wl1271 *wl, int id) |
66 | { | 66 | { |
67 | if (__test_and_clear_bit(id, wl->tx_frames_map)) { | 67 | if (__test_and_clear_bit(id, wl->tx_frames_map)) { |
68 | if (unlikely(wl->tx_frames_cnt == ACX_TX_DESCRIPTORS)) | ||
69 | clear_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags); | ||
70 | |||
68 | wl->tx_frames[id] = NULL; | 71 | wl->tx_frames[id] = NULL; |
69 | wl->tx_frames_cnt--; | 72 | wl->tx_frames_cnt--; |
70 | } | 73 | } |
@@ -630,7 +633,7 @@ void wl1271_tx_work(struct work_struct *work) | |||
630 | 633 | ||
631 | wl1271_tx_work_locked(wl); | 634 | wl1271_tx_work_locked(wl); |
632 | 635 | ||
633 | wl1271_ps_elp_wakeup(wl); | 636 | wl1271_ps_elp_sleep(wl); |
634 | out: | 637 | out: |
635 | mutex_unlock(&wl->mutex); | 638 | mutex_unlock(&wl->mutex); |
636 | } | 639 | } |
@@ -766,8 +769,8 @@ void wl1271_tx_reset_link_queues(struct wl1271 *wl, u8 hlid) | |||
766 | wl1271_handle_tx_low_watermark(wl); | 769 | wl1271_handle_tx_low_watermark(wl); |
767 | } | 770 | } |
768 | 771 | ||
769 | /* caller must hold wl->mutex */ | 772 | /* caller must hold wl->mutex and TX must be stopped */ |
770 | void wl1271_tx_reset(struct wl1271 *wl) | 773 | void wl1271_tx_reset(struct wl1271 *wl, bool reset_tx_queues) |
771 | { | 774 | { |
772 | int i; | 775 | int i; |
773 | struct sk_buff *skb; | 776 | struct sk_buff *skb; |
@@ -803,8 +806,10 @@ void wl1271_tx_reset(struct wl1271 *wl) | |||
803 | /* | 806 | /* |
804 | * Make sure the driver is at a consistent state, in case this | 807 | * Make sure the driver is at a consistent state, in case this |
805 | * function is called from a context other than interface removal. | 808 | * function is called from a context other than interface removal. |
809 | * This call will always wake the TX queues. | ||
806 | */ | 810 | */ |
807 | wl1271_handle_tx_low_watermark(wl); | 811 | if (reset_tx_queues) |
812 | wl1271_handle_tx_low_watermark(wl); | ||
808 | 813 | ||
809 | for (i = 0; i < ACX_TX_DESCRIPTORS; i++) { | 814 | for (i = 0; i < ACX_TX_DESCRIPTORS; i++) { |
810 | if (wl->tx_frames[i] == NULL) | 815 | if (wl->tx_frames[i] == NULL) |