diff options
author | Johannes Stezenbach <js@sig21.net> | 2010-12-27 09:04:54 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-04 14:35:13 -0500 |
commit | 5235189c8edddf2eb32982f814bc858b55e6350a (patch) | |
tree | 18ca41ae181c398d9cf9ad94fb5c36a11231e663 /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | c4d63244218bf93d1f0cdf4389e0906df8f506c1 (diff) |
rt2x00: allow txstatus_fifo w/o txstatus_tasklet
When DRIVER_REQUIRE_TXSTATUS_FIFO is set, intialize the
txstatus_fifo, but initialize rt2x00dev->txstatus_tasklet
only when both DRIVER_REQUIRE_TXSTATUS_FIFO and
rt2x00dev->ops->lib->txstatus_tasklet are set.
This allows the txstatus_fifo to be used by rt2800usb which
does not use txstatus_tasklet.
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index fa74acdd271f..97a8911571ce 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -813,8 +813,7 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
813 | /* | 813 | /* |
814 | * Allocate tx status FIFO for driver use. | 814 | * Allocate tx status FIFO for driver use. |
815 | */ | 815 | */ |
816 | if (test_bit(DRIVER_REQUIRE_TXSTATUS_FIFO, &rt2x00dev->flags) && | 816 | if (test_bit(DRIVER_REQUIRE_TXSTATUS_FIFO, &rt2x00dev->flags)) { |
817 | rt2x00dev->ops->lib->txstatus_tasklet) { | ||
818 | /* | 817 | /* |
819 | * Allocate txstatus fifo and tasklet, we use a size of 512 | 818 | * Allocate txstatus fifo and tasklet, we use a size of 512 |
820 | * for the kfifo which is big enough to store 512/4=128 tx | 819 | * for the kfifo which is big enough to store 512/4=128 tx |
@@ -828,9 +827,10 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
828 | return status; | 827 | return status; |
829 | 828 | ||
830 | /* tasklet for processing the tx status reports. */ | 829 | /* tasklet for processing the tx status reports. */ |
831 | tasklet_init(&rt2x00dev->txstatus_tasklet, | 830 | if (rt2x00dev->ops->lib->txstatus_tasklet) |
832 | rt2x00dev->ops->lib->txstatus_tasklet, | 831 | tasklet_init(&rt2x00dev->txstatus_tasklet, |
833 | (unsigned long)rt2x00dev); | 832 | rt2x00dev->ops->lib->txstatus_tasklet, |
833 | (unsigned long)rt2x00dev); | ||
834 | 834 | ||
835 | } | 835 | } |
836 | 836 | ||