diff options
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h index 1c4d75004627..d91f4f628f65 100644 --- a/drivers/net/wireless/rt2x00/rt2800.h +++ b/drivers/net/wireless/rt2x00/rt2800.h | |||
@@ -83,6 +83,7 @@ | |||
83 | #define REV_RT3090E 0x0211 | 83 | #define REV_RT3090E 0x0211 |
84 | #define REV_RT3390E 0x0211 | 84 | #define REV_RT3390E 0x0211 |
85 | #define REV_RT5390F 0x0502 | 85 | #define REV_RT5390F 0x0502 |
86 | #define REV_RT5390R 0x1502 | ||
86 | 87 | ||
87 | /* | 88 | /* |
88 | * Signal information. | 89 | * Signal information. |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index bd1980202f19..1cd16b416024 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -3356,6 +3356,13 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev) | |||
3356 | rt2800_register_write(rt2x00dev, GPIO_CTRL_CFG, reg); | 3356 | rt2800_register_write(rt2x00dev, GPIO_CTRL_CFG, reg); |
3357 | } | 3357 | } |
3358 | 3358 | ||
3359 | /* This chip has hardware antenna diversity*/ | ||
3360 | if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R)) { | ||
3361 | rt2800_bbp_write(rt2x00dev, 150, 0); /* Disable Antenna Software OFDM */ | ||
3362 | rt2800_bbp_write(rt2x00dev, 151, 0); /* Disable Antenna Software CCK */ | ||
3363 | rt2800_bbp_write(rt2x00dev, 154, 0); /* Clear previously selected antenna */ | ||
3364 | } | ||
3365 | |||
3359 | rt2800_bbp_read(rt2x00dev, 152, &value); | 3366 | rt2800_bbp_read(rt2x00dev, 152, &value); |
3360 | if (ant == 0) | 3367 | if (ant == 0) |
3361 | rt2x00_set_field8(&value, BBP152_RX_DEFAULT_ANT, 1); | 3368 | rt2x00_set_field8(&value, BBP152_RX_DEFAULT_ANT, 1); |
@@ -4291,6 +4298,11 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
4291 | rt2x00dev->default_ant.rx = ANTENNA_A; | 4298 | rt2x00dev->default_ant.rx = ANTENNA_A; |
4292 | } | 4299 | } |
4293 | 4300 | ||
4301 | if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R)) { | ||
4302 | rt2x00dev->default_ant.tx = ANTENNA_HW_DIVERSITY; /* Unused */ | ||
4303 | rt2x00dev->default_ant.rx = ANTENNA_HW_DIVERSITY; /* Unused */ | ||
4304 | } | ||
4305 | |||
4294 | /* | 4306 | /* |
4295 | * Determine external LNA informations. | 4307 | * Determine external LNA informations. |
4296 | */ | 4308 | */ |