rt2800: zero MAC_SYS_CTRL bits during BBP and MAC reset
authorStanislaw Gruszka <sgruszka@redhat.com>
Tue, 24 Jan 2012 13:09:08 +0000 (14:09 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 27 Jan 2012 19:57:00 +0000 (14:57 -0500)
Zero all other bits than RESET_CSR and RESET_BBP when want to do the
reset, that the vendor driver behaviour.

Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
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>
drivers/net/wireless/rt2x00/rt2800pci.c
drivers/net/wireless/rt2x00/rt2800usb.c

index dc88baefa72e88bd2b2f60b3ea2e8f7174ff34ed..4e985026985cd21e0eee1644a2016adba89d6397 100644 (file)
@@ -489,7 +489,7 @@ static int rt2800pci_init_registers(struct rt2x00_dev *rt2x00dev)
 
        rt2x00pci_register_write(rt2x00dev, PWR_PIN_CFG, 0x00000003);
 
-       rt2x00pci_register_read(rt2x00dev, MAC_SYS_CTRL, &reg);
+       reg = 0;
        rt2x00_set_field32(&reg, MAC_SYS_CTRL_RESET_CSR, 1);
        rt2x00_set_field32(&reg, MAC_SYS_CTRL_RESET_BBP, 1);
        rt2x00pci_register_write(rt2x00dev, MAC_SYS_CTRL, reg);
index 262ee9eefb6f08dc7d8b404c3f1f143060951633..425267af6106db996cb54bbf40fb694b8e8db255 100644 (file)
@@ -228,7 +228,7 @@ static int rt2800usb_init_registers(struct rt2x00_dev *rt2x00dev)
 
        rt2x00usb_register_write(rt2x00dev, PWR_PIN_CFG, 0x00000003);
 
-       rt2x00usb_register_read(rt2x00dev, MAC_SYS_CTRL, &reg);
+       reg = 0;
        rt2x00_set_field32(&reg, MAC_SYS_CTRL_RESET_CSR, 1);
        rt2x00_set_field32(&reg, MAC_SYS_CTRL_RESET_BBP, 1);
        rt2x00usb_register_write(rt2x00dev, MAC_SYS_CTRL, reg);