aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800.h43
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c22
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h7
3 files changed, 50 insertions, 22 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 455dc3ffb256..4d5871b01cac 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -1537,6 +1537,15 @@ struct mac_iveiv_entry {
1537 */ 1537 */
1538 1538
1539/* 1539/*
1540 * RFCSR 1:
1541 */
1542#define RFCSR1_RF_BLOCK_EN FIELD8(0x01)
1543#define RFCSR1_RX0_PD FIELD8(0x04)
1544#define RFCSR1_TX0_PD FIELD8(0x08)
1545#define RFCSR1_RX1_PD FIELD8(0x10)
1546#define RFCSR1_TX1_PD FIELD8(0x20)
1547
1548/*
1540 * RFCSR 6: 1549 * RFCSR 6:
1541 */ 1550 */
1542#define RFCSR6_R1 FIELD8(0x03) 1551#define RFCSR6_R1 FIELD8(0x03)
@@ -1553,12 +1562,26 @@ struct mac_iveiv_entry {
1553#define RFCSR12_TX_POWER FIELD8(0x1f) 1562#define RFCSR12_TX_POWER FIELD8(0x1f)
1554 1563
1555/* 1564/*
1565 * RFCSR 15:
1566 */
1567#define RFCSR15_TX_LO2_EN FIELD8(0x08)
1568
1569/*
1556 * RFCSR 17: 1570 * RFCSR 17:
1557 */ 1571 */
1558#define RFCSR17_R1 FIELD8(0x07) 1572#define RFCSR17_TXMIXER_GAIN FIELD8(0x07)
1559#define RFCSR17_R2 FIELD8(0x08) 1573#define RFCSR17_TX_LO1_EN FIELD8(0x08)
1560#define RFCSR17_R3 FIELD8(0x20) 1574#define RFCSR17_R FIELD8(0x20)
1561 1575
1576/*
1577 * RFCSR 20:
1578 */
1579#define RFCSR20_RX_LO1_EN FIELD8(0x08)
1580
1581/*
1582 * RFCSR 21:
1583 */
1584#define RFCSR21_RX_LO2_EN FIELD8(0x08)
1562 1585
1563/* 1586/*
1564 * RFCSR 22: 1587 * RFCSR 22:
@@ -1571,6 +1594,14 @@ struct mac_iveiv_entry {
1571#define RFCSR23_FREQ_OFFSET FIELD8(0x7f) 1594#define RFCSR23_FREQ_OFFSET FIELD8(0x7f)
1572 1595
1573/* 1596/*
1597 * RFCSR 27:
1598 */
1599#define RFCSR27_R1 FIELD8(0x03)
1600#define RFCSR27_R2 FIELD8(0x04)
1601#define RFCSR27_R3 FIELD8(0x30)
1602#define RFCSR27_R4 FIELD8(0x40)
1603
1604/*
1574 * RFCSR 30: 1605 * RFCSR 30:
1575 */ 1606 */
1576#define RFCSR30_RF_CALIBRATION FIELD8(0x80) 1607#define RFCSR30_RF_CALIBRATION FIELD8(0x80)
@@ -1710,6 +1741,12 @@ struct mac_iveiv_entry {
1710#define EEPROM_RSSI_BG2_LNA_A1 FIELD16(0xff00) 1741#define EEPROM_RSSI_BG2_LNA_A1 FIELD16(0xff00)
1711 1742
1712/* 1743/*
1744 * EEPROM TXMIXER GAIN BG offset (note overlaps with EEPROM RSSI BG2).
1745 */
1746#define EEPROM_TXMIXER_GAIN_BG 0x0024
1747#define EEPROM_TXMIXER_GAIN_BG_VAL FIELD16(0x0007)
1748
1749/*
1713 * EEPROM RSSI A offset 1750 * EEPROM RSSI A offset
1714 */ 1751 */
1715#define EEPROM_RSSI_A 0x0025 1752#define EEPROM_RSSI_A 0x0025
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 394c8e490c9a..2ab88840a3e5 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1209,10 +1209,7 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
1209 rt2x00_set_field32(&reg, MAX_LEN_CFG_MAX_MPDU, AGGREGATION_SIZE); 1209 rt2x00_set_field32(&reg, MAX_LEN_CFG_MAX_MPDU, AGGREGATION_SIZE);
1210 if ((rt2x00_rt(rt2x00dev, RT2872) && 1210 if ((rt2x00_rt(rt2x00dev, RT2872) &&
1211 (rt2x00_rev(rt2x00dev) >= RT2880E_VERSION)) || 1211 (rt2x00_rev(rt2x00dev) >= RT2880E_VERSION)) ||
1212 rt2x00_rt(rt2x00dev, RT2880) ||
1213 rt2x00_rt(rt2x00dev, RT2883) || 1212 rt2x00_rt(rt2x00dev, RT2883) ||
1214 rt2x00_rt(rt2x00dev, RT2890) ||
1215 rt2x00_rt(rt2x00dev, RT3052) ||
1216 (rt2x00_rt(rt2x00dev, RT3070) && 1213 (rt2x00_rt(rt2x00dev, RT3070) &&
1217 (rt2x00_rev(rt2x00dev) < RT3070_VERSION))) 1214 (rt2x00_rev(rt2x00dev) < RT3070_VERSION)))
1218 rt2x00_set_field32(&reg, MAX_LEN_CFG_MAX_PSDU, 2); 1215 rt2x00_set_field32(&reg, MAX_LEN_CFG_MAX_PSDU, 2);
@@ -1503,6 +1500,12 @@ int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
1503 (rt2x00_rev(rt2x00dev) > RT2860D_VERSION)) 1500 (rt2x00_rev(rt2x00dev) > RT2860D_VERSION))
1504 rt2800_bbp_write(rt2x00dev, 84, 0x19); 1501 rt2800_bbp_write(rt2x00dev, 84, 0x19);
1505 1502
1503 if (rt2x00_rt(rt2x00dev, RT2872)) {
1504 rt2800_bbp_write(rt2x00dev, 31, 0x08);
1505 rt2800_bbp_write(rt2x00dev, 78, 0x0e);
1506 rt2800_bbp_write(rt2x00dev, 80, 0x08);
1507 }
1508
1506 if (rt2x00_is_usb(rt2x00dev) && 1509 if (rt2x00_is_usb(rt2x00dev) &&
1507 rt2x00_rt(rt2x00dev, RT3070) && 1510 rt2x00_rt(rt2x00dev, RT3070) &&
1508 (rt2x00_rev(rt2x00dev) == RT3070_VERSION)) { 1511 (rt2x00_rev(rt2x00dev) == RT3070_VERSION)) {
@@ -1511,12 +1514,6 @@ int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
1511 rt2800_bbp_write(rt2x00dev, 105, 0x05); 1514 rt2800_bbp_write(rt2x00dev, 105, 0x05);
1512 } 1515 }
1513 1516
1514 if (rt2x00_rt(rt2x00dev, RT3052)) {
1515 rt2800_bbp_write(rt2x00dev, 31, 0x08);
1516 rt2800_bbp_write(rt2x00dev, 78, 0x0e);
1517 rt2800_bbp_write(rt2x00dev, 80, 0x08);
1518 }
1519
1520 for (i = 0; i < EEPROM_BBP_SIZE; i++) { 1517 for (i = 0; i < EEPROM_BBP_SIZE; i++) {
1521 rt2x00_eeprom_read(rt2x00dev, EEPROM_BBP_START + i, &eeprom); 1518 rt2x00_eeprom_read(rt2x00dev, EEPROM_BBP_START + i, &eeprom);
1522 1519
@@ -1772,9 +1769,7 @@ int rt2800_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1772 } else if (rt2x00_rt(rt2x00dev, RT2860) || 1769 } else if (rt2x00_rt(rt2x00dev, RT2860) ||
1773 rt2x00_rt(rt2x00dev, RT2870) || 1770 rt2x00_rt(rt2x00dev, RT2870) ||
1774 rt2x00_rt(rt2x00dev, RT2872) || 1771 rt2x00_rt(rt2x00dev, RT2872) ||
1775 rt2x00_rt(rt2x00dev, RT2880) || 1772 rt2x00_rt(rt2x00dev, RT2872)) {
1776 (rt2x00_rt(rt2x00dev, RT2883) &&
1777 (rt2x00_rev(rt2x00dev) < RT2883_VERSION))) {
1778 /* 1773 /*
1779 * There is a max of 2 RX streams for RT28x0 series 1774 * There is a max of 2 RX streams for RT28x0 series
1780 */ 1775 */
@@ -1879,10 +1874,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
1879 if (!rt2x00_rt(rt2x00dev, RT2860) && 1874 if (!rt2x00_rt(rt2x00dev, RT2860) &&
1880 !rt2x00_rt(rt2x00dev, RT2870) && 1875 !rt2x00_rt(rt2x00dev, RT2870) &&
1881 !rt2x00_rt(rt2x00dev, RT2872) && 1876 !rt2x00_rt(rt2x00dev, RT2872) &&
1882 !rt2x00_rt(rt2x00dev, RT2880) &&
1883 !rt2x00_rt(rt2x00dev, RT2883) && 1877 !rt2x00_rt(rt2x00dev, RT2883) &&
1884 !rt2x00_rt(rt2x00dev, RT2890) &&
1885 !rt2x00_rt(rt2x00dev, RT3052) &&
1886 !rt2x00_rt(rt2x00dev, RT3070) && 1878 !rt2x00_rt(rt2x00dev, RT3070) &&
1887 !rt2x00_rt(rt2x00dev, RT3071) && 1879 !rt2x00_rt(rt2x00dev, RT3071) &&
1888 !rt2x00_rt(rt2x00dev, RT3090) && 1880 !rt2x00_rt(rt2x00dev, RT3090) &&
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index d9daa9c406fa..16aa850d3700 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -177,16 +177,15 @@ struct rt2x00_chip {
177#define RT2573 0x2573 177#define RT2573 0x2573
178#define RT2860 0x2860 /* 2.4GHz PCI/CB */ 178#define RT2860 0x2860 /* 2.4GHz PCI/CB */
179#define RT2870 0x2870 179#define RT2870 0x2870
180#define RT2872 0x2872 180#define RT2872 0x2872 /* WSOC */
181#define RT2880 0x2880 /* WSOC */
182#define RT2883 0x2883 /* WSOC */ 181#define RT2883 0x2883 /* WSOC */
183#define RT2890 0x2890 /* 2.4GHz PCIe */
184#define RT3052 0x3052 /* WSOC */
185#define RT3070 0x3070 182#define RT3070 0x3070
186#define RT3071 0x3071 183#define RT3071 0x3071
187#define RT3090 0x3090 /* 2.4GHz PCIe */ 184#define RT3090 0x3090 /* 2.4GHz PCIe */
188#define RT3390 0x3390 185#define RT3390 0x3390
189#define RT3572 0x3572 186#define RT3572 0x3572
187#define RT3593 0x3593 /* PCIe */
188#define RT3883 0x3883 /* WSOC */
190 189
191 u16 rf; 190 u16 rf;
192 u16 rev; 191 u16 rev;