aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800.h48
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt2800pci.h19
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.h37
4 files changed, 51 insertions, 59 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 35afe6376a4d..16bfaa8c4477 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -98,6 +98,21 @@
98 */ 98 */
99 99
100/* 100/*
101 * E2PROM_CSR: PCI EEPROM control register.
102 * RELOAD: Write 1 to reload eeprom content.
103 * TYPE: 0: 93c46, 1:93c66.
104 * LOAD_STATUS: 1:loading, 0:done.
105 */
106#define E2PROM_CSR 0x0004
107#define E2PROM_CSR_DATA_CLOCK FIELD32(0x00000001)
108#define E2PROM_CSR_CHIP_SELECT FIELD32(0x00000002)
109#define E2PROM_CSR_DATA_IN FIELD32(0x00000004)
110#define E2PROM_CSR_DATA_OUT FIELD32(0x00000008)
111#define E2PROM_CSR_TYPE FIELD32(0x00000030)
112#define E2PROM_CSR_LOAD_STATUS FIELD32(0x00000040)
113#define E2PROM_CSR_RELOAD FIELD32(0x00000080)
114
115/*
101 * OPT_14: Unknown register used by rt3xxx devices. 116 * OPT_14: Unknown register used by rt3xxx devices.
102 */ 117 */
103#define OPT_14_CSR 0x0114 118#define OPT_14_CSR 0x0114
@@ -321,6 +336,39 @@
321#define RX_DRX_IDX 0x029c 336#define RX_DRX_IDX 0x029c
322 337
323/* 338/*
339 * USB_DMA_CFG
340 * RX_BULK_AGG_TIMEOUT: Rx Bulk Aggregation TimeOut in unit of 33ns.
341 * RX_BULK_AGG_LIMIT: Rx Bulk Aggregation Limit in unit of 256 bytes.
342 * PHY_CLEAR: phy watch dog enable.
343 * TX_CLEAR: Clear USB DMA TX path.
344 * TXOP_HALT: Halt TXOP count down when TX buffer is full.
345 * RX_BULK_AGG_EN: Enable Rx Bulk Aggregation.
346 * RX_BULK_EN: Enable USB DMA Rx.
347 * TX_BULK_EN: Enable USB DMA Tx.
348 * EP_OUT_VALID: OUT endpoint data valid.
349 * RX_BUSY: USB DMA RX FSM busy.
350 * TX_BUSY: USB DMA TX FSM busy.
351 */
352#define USB_DMA_CFG 0x02a0
353#define USB_DMA_CFG_RX_BULK_AGG_TIMEOUT FIELD32(0x000000ff)
354#define USB_DMA_CFG_RX_BULK_AGG_LIMIT FIELD32(0x0000ff00)
355#define USB_DMA_CFG_PHY_CLEAR FIELD32(0x00010000)
356#define USB_DMA_CFG_TX_CLEAR FIELD32(0x00080000)
357#define USB_DMA_CFG_TXOP_HALT FIELD32(0x00100000)
358#define USB_DMA_CFG_RX_BULK_AGG_EN FIELD32(0x00200000)
359#define USB_DMA_CFG_RX_BULK_EN FIELD32(0x00400000)
360#define USB_DMA_CFG_TX_BULK_EN FIELD32(0x00800000)
361#define USB_DMA_CFG_EP_OUT_VALID FIELD32(0x3f000000)
362#define USB_DMA_CFG_RX_BUSY FIELD32(0x40000000)
363#define USB_DMA_CFG_TX_BUSY FIELD32(0x80000000)
364
365/*
366 * US_CYC_CNT
367 */
368#define US_CYC_CNT 0x02a4
369#define US_CYC_CNT_CLOCK_CYCLE FIELD32(0x000000ff)
370
371/*
324 * PBF_SYS_CTRL 372 * PBF_SYS_CTRL
325 * HOST_RAM_WRITE: enable Host program ram write selection 373 * HOST_RAM_WRITE: enable Host program ram write selection
326 */ 374 */
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 1bf973475f1d..4a01f2a5ce6b 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1620,9 +1620,9 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
1620 rt2800_register_write(rt2x00dev, HW_BEACON_BASE7, 0); 1620 rt2800_register_write(rt2x00dev, HW_BEACON_BASE7, 0);
1621 1621
1622 if (rt2x00_is_usb(rt2x00dev)) { 1622 if (rt2x00_is_usb(rt2x00dev)) {
1623 rt2800_register_read(rt2x00dev, USB_CYC_CFG, &reg); 1623 rt2800_register_read(rt2x00dev, US_CYC_CNT, &reg);
1624 rt2x00_set_field32(&reg, USB_CYC_CFG_CLOCK_CYCLE, 30); 1624 rt2x00_set_field32(&reg, US_CYC_CNT_CLOCK_CYCLE, 30);
1625 rt2800_register_write(rt2x00dev, USB_CYC_CFG, reg); 1625 rt2800_register_write(rt2x00dev, US_CYC_CNT, reg);
1626 } 1626 }
1627 1627
1628 rt2800_register_read(rt2x00dev, HT_FBK_CFG0, &reg); 1628 rt2800_register_read(rt2x00dev, HT_FBK_CFG0, &reg);
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.h b/drivers/net/wireless/rt2x00/rt2800pci.h
index afc8e7da27cb..5a8dda9b5b5a 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.h
+++ b/drivers/net/wireless/rt2x00/rt2800pci.h
@@ -35,25 +35,6 @@
35#define RT2800PCI_H 35#define RT2800PCI_H
36 36
37/* 37/*
38 * PCI registers.
39 */
40
41/*
42 * E2PROM_CSR: EEPROM control register.
43 * RELOAD: Write 1 to reload eeprom content.
44 * TYPE: 0: 93c46, 1:93c66.
45 * LOAD_STATUS: 1:loading, 0:done.
46 */
47#define E2PROM_CSR 0x0004
48#define E2PROM_CSR_DATA_CLOCK FIELD32(0x00000001)
49#define E2PROM_CSR_CHIP_SELECT FIELD32(0x00000002)
50#define E2PROM_CSR_DATA_IN FIELD32(0x00000004)
51#define E2PROM_CSR_DATA_OUT FIELD32(0x00000008)
52#define E2PROM_CSR_TYPE FIELD32(0x00000030)
53#define E2PROM_CSR_LOAD_STATUS FIELD32(0x00000040)
54#define E2PROM_CSR_RELOAD FIELD32(0x00000080)
55
56/*
57 * Queue register offset macros 38 * Queue register offset macros
58 */ 39 */
59#define TX_QUEUE_REG_OFFSET 0x10 40#define TX_QUEUE_REG_OFFSET 0x10
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.h b/drivers/net/wireless/rt2x00/rt2800usb.h
index 2bca6a71a7f5..0722badccf86 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.h
+++ b/drivers/net/wireless/rt2x00/rt2800usb.h
@@ -32,43 +32,6 @@
32#define RT2800USB_H 32#define RT2800USB_H
33 33
34/* 34/*
35 * USB registers.
36 */
37
38/*
39 * USB_DMA_CFG
40 * RX_BULK_AGG_TIMEOUT: Rx Bulk Aggregation TimeOut in unit of 33ns.
41 * RX_BULK_AGG_LIMIT: Rx Bulk Aggregation Limit in unit of 256 bytes.
42 * PHY_CLEAR: phy watch dog enable.
43 * TX_CLEAR: Clear USB DMA TX path.
44 * TXOP_HALT: Halt TXOP count down when TX buffer is full.
45 * RX_BULK_AGG_EN: Enable Rx Bulk Aggregation.
46 * RX_BULK_EN: Enable USB DMA Rx.
47 * TX_BULK_EN: Enable USB DMA Tx.
48 * EP_OUT_VALID: OUT endpoint data valid.
49 * RX_BUSY: USB DMA RX FSM busy.
50 * TX_BUSY: USB DMA TX FSM busy.
51 */
52#define USB_DMA_CFG 0x02a0
53#define USB_DMA_CFG_RX_BULK_AGG_TIMEOUT FIELD32(0x000000ff)
54#define USB_DMA_CFG_RX_BULK_AGG_LIMIT FIELD32(0x0000ff00)
55#define USB_DMA_CFG_PHY_CLEAR FIELD32(0x00010000)
56#define USB_DMA_CFG_TX_CLEAR FIELD32(0x00080000)
57#define USB_DMA_CFG_TXOP_HALT FIELD32(0x00100000)
58#define USB_DMA_CFG_RX_BULK_AGG_EN FIELD32(0x00200000)
59#define USB_DMA_CFG_RX_BULK_EN FIELD32(0x00400000)
60#define USB_DMA_CFG_TX_BULK_EN FIELD32(0x00800000)
61#define USB_DMA_CFG_EP_OUT_VALID FIELD32(0x3f000000)
62#define USB_DMA_CFG_RX_BUSY FIELD32(0x40000000)
63#define USB_DMA_CFG_TX_BUSY FIELD32(0x80000000)
64
65/*
66 * USB_CYC_CFG
67 */
68#define USB_CYC_CFG 0x02a4
69#define USB_CYC_CFG_CLOCK_CYCLE FIELD32(0x000000ff)
70
71/*
72 * 8051 firmware image. 35 * 8051 firmware image.
73 */ 36 */
74#define FIRMWARE_RT2870 "rt2870.bin" 37#define FIRMWARE_RT2870 "rt2870.bin"