Sfoglia il codice sorgente

rt2x00: Always enable TSF ticking

Whatever mode we are in, according to the legacy drivers
we should always enable TSF ticking/counting.
We should also always enable the TBCN/TBTT field,
this field is only disabled during beacon regeneration.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn 17 anni fa
parent
commit
fd3c91c5e5

+ 2 - 0
drivers/net/wireless/rt2x00/rt2400pci.c

@@ -291,7 +291,9 @@ static void rt2400pci_config_intf(struct rt2x00_dev *rt2x00dev,
 		 * Enable synchronisation.
 		 * Enable synchronisation.
 		 */
 		 */
 		rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
 		rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
+		rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 1);
 		rt2x00_set_field32(&reg, CSR14_TSF_SYNC, conf->sync);
 		rt2x00_set_field32(&reg, CSR14_TSF_SYNC, conf->sync);
+		rt2x00_set_field32(&reg, CSR14_TBCN, 1);
 		rt2x00pci_register_write(rt2x00dev, CSR14, reg);
 		rt2x00pci_register_write(rt2x00dev, CSR14, reg);
 	}
 	}
 
 

+ 2 - 0
drivers/net/wireless/rt2x00/rt2500pci.c

@@ -294,7 +294,9 @@ static void rt2500pci_config_intf(struct rt2x00_dev *rt2x00dev,
 		 * Enable synchronisation.
 		 * Enable synchronisation.
 		 */
 		 */
 		rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
 		rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
+		rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 1);
 		rt2x00_set_field32(&reg, CSR14_TSF_SYNC, conf->sync);
 		rt2x00_set_field32(&reg, CSR14_TSF_SYNC, conf->sync);
+		rt2x00_set_field32(&reg, CSR14_TBCN, 1);
 		rt2x00pci_register_write(rt2x00dev, CSR14, reg);
 		rt2x00pci_register_write(rt2x00dev, CSR14, reg);
 	}
 	}
 
 

+ 2 - 0
drivers/net/wireless/rt2x00/rt2500usb.c

@@ -343,7 +343,9 @@ static void rt2500usb_config_intf(struct rt2x00_dev *rt2x00dev,
 		rt2500usb_register_write(rt2x00dev, TXRX_CSR18, reg);
 		rt2500usb_register_write(rt2x00dev, TXRX_CSR18, reg);
 
 
 		rt2500usb_register_read(rt2x00dev, TXRX_CSR19, &reg);
 		rt2500usb_register_read(rt2x00dev, TXRX_CSR19, &reg);
+		rt2x00_set_field16(&reg, TXRX_CSR19_TSF_COUNT, 1);
 		rt2x00_set_field16(&reg, TXRX_CSR19_TSF_SYNC, conf->sync);
 		rt2x00_set_field16(&reg, TXRX_CSR19_TSF_SYNC, conf->sync);
+		rt2x00_set_field16(&reg, TXRX_CSR19_TBCN, 1);
 		rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg);
 		rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg);
 	}
 	}
 
 

+ 2 - 0
drivers/net/wireless/rt2x00/rt61pci.c

@@ -343,7 +343,9 @@ static void rt61pci_config_intf(struct rt2x00_dev *rt2x00dev,
 		 * Enable synchronisation.
 		 * Enable synchronisation.
 		 */
 		 */
 		rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, &reg);
 		rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, &reg);
+		rt2x00_set_field32(&reg, TXRX_CSR9_TSF_TICKING, 1);
 		rt2x00_set_field32(&reg, TXRX_CSR9_TSF_SYNC, conf->sync);
 		rt2x00_set_field32(&reg, TXRX_CSR9_TSF_SYNC, conf->sync);
+		rt2x00_set_field32(&reg, TXRX_CSR9_TBTT_ENABLE, 1);
 		rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg);
 		rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg);
 	}
 	}
 
 

+ 2 - 0
drivers/net/wireless/rt2x00/rt73usb.c

@@ -355,7 +355,9 @@ static void rt73usb_config_intf(struct rt2x00_dev *rt2x00dev,
 		 * Enable synchronisation.
 		 * Enable synchronisation.
 		 */
 		 */
 		rt73usb_register_read(rt2x00dev, TXRX_CSR9, &reg);
 		rt73usb_register_read(rt2x00dev, TXRX_CSR9, &reg);
+		rt2x00_set_field32(&reg, TXRX_CSR9_TSF_TICKING, 1);
 		rt2x00_set_field32(&reg, TXRX_CSR9_TSF_SYNC, conf->sync);
 		rt2x00_set_field32(&reg, TXRX_CSR9_TSF_SYNC, conf->sync);
+		rt2x00_set_field32(&reg, TXRX_CSR9_TBTT_ENABLE, 1);
 		rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg);
 		rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg);
 	}
 	}