From e78c9d285709f535caae405f1da5b2936f51f0b5 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 23 Jan 2008 14:48:50 +0100 Subject: b43legacy: fix MAC control and microcode init This zeros out all microcode related memory before loading the microcode. This also fixes initialization of the MAC control register. The _only_ place where we overwrite the contents of the MAC control register is at the beginning of b43_chip_init(). All other places must do read() -> mask/set -> write() to not overwrite existing bits. This also adds a longer delay for waiting for the microcode to initialize itself. It seems that the current timeout is sufficient on all available devices, but there's no real reason why we shouldn't wait for up to one second. Slow embedded devices might exist. Better safe than sorry. While at it, fix naming of MACCTL values. This patch by Michael Buesch has been ported to b43legacy. Signed-off-by: Stefano Brivio Acked-by: Michael Buesch Signed-off-by: John W. Linville Signed-off-by: David S. Miller --- drivers/net/wireless/b43legacy/pio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/net/wireless/b43legacy/pio.c') diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireless/b43legacy/pio.c index de843ac147ae..e4f4c5c39e33 100644 --- a/drivers/net/wireless/b43legacy/pio.c +++ b/drivers/net/wireless/b43legacy/pio.c @@ -334,9 +334,9 @@ struct b43legacy_pioqueue *b43legacy_setup_pioqueue(struct b43legacy_wldev *dev, tasklet_init(&queue->txtask, tx_tasklet, (unsigned long)queue); - value = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); - value &= ~B43legacy_SBF_XFER_REG_BYTESWAP; - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, value); + value = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); + value &= ~B43legacy_MACCTL_BE; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, value); qsize = b43legacy_read16(dev, queue->mmio_base + B43legacy_PIO_TXQBUFSIZE); -- cgit v1.2.2