From: Stanislaw Gruszka Date: Tue, 24 Jan 2012 13:09:07 +0000 (+0100) Subject: rt2800: disable DMA after firmware load X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4ed1dd2a7ec880b301beb61cbc1e08811ec340e4;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: Stanislaw Gruszka Signed-off-by: John W. Linville --- 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 @@ -411,18 +411,6 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev, rt2800_register_write(rt2x00dev, PWR_PIN_CFG, 0x00000002); } - /* - * 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. */ @@ -443,6 +431,15 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev, return -EBUSY; } + /* + * 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. */