diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-01-24 14:09:07 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-27 20:57:00 +0100 |
commit | 4ed1dd2a7ec880b301beb61cbc1e08811ec340e4 (patch) | |
tree | 87e63a98c4f8bff38fbe9450da7fec5faa3ae21c /drivers | |
parent | rt2800usb: initialize H2M_INT_SRC register (diff) | |
download | linux-4ed1dd2a7ec880b301beb61cbc1e08811ec340e4.tar.xz linux-4ed1dd2a7ec880b301beb61cbc1e08811ec340e4.zip |
rt2800: disable DMA after firmware load
We can receive frames just after firmware load with current code, so
disable DMA just after firmware is loaded, not before.
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 3e194b7e9bbe..165535cc5072 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c @@ -412,18 +412,6 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev, } /* - * Disable DMA, will be reenabled later when enabling - * the radio. - */ - rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, ®); - rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_TX_DMA, 0); - rt2x00_set_field32(®, WPDMA_GLO_CFG_TX_DMA_BUSY, 0); - rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_RX_DMA, 0); - rt2x00_set_field32(®, WPDMA_GLO_CFG_RX_DMA_BUSY, 0); - rt2x00_set_field32(®, WPDMA_GLO_CFG_TX_WRITEBACK_DONE, 1); - rt2800_register_write(rt2x00dev, WPDMA_GLO_CFG, reg); - - /* * Write firmware to the device. */ rt2800_drv_write_firmware(rt2x00dev, data, len); @@ -444,6 +432,15 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev, } /* + * Disable DMA, will be reenabled later when enabling + * the radio. + */ + rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, ®); + rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_TX_DMA, 0); + rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_RX_DMA, 0); + rt2800_register_write(rt2x00dev, WPDMA_GLO_CFG, reg); + + /* * Initialize firmware. */ rt2800_register_write(rt2x00dev, H2M_BBP_AGENT, 0); |