|
@@ -3356,6 +3356,13 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
|
|
|
rt2800_register_write(rt2x00dev, GPIO_CTRL_CFG, reg);
|
|
|
}
|
|
|
|
|
|
+ /* This chip has hardware antenna diversity*/
|
|
|
+ if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R)) {
|
|
|
+ rt2800_bbp_write(rt2x00dev, 150, 0); /* Disable Antenna Software OFDM */
|
|
|
+ rt2800_bbp_write(rt2x00dev, 151, 0); /* Disable Antenna Software CCK */
|
|
|
+ rt2800_bbp_write(rt2x00dev, 154, 0); /* Clear previously selected antenna */
|
|
|
+ }
|
|
|
+
|
|
|
rt2800_bbp_read(rt2x00dev, 152, &value);
|
|
|
if (ant == 0)
|
|
|
rt2x00_set_field8(&value, BBP152_RX_DEFAULT_ANT, 1);
|
|
@@ -4291,6 +4298,11 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
|
|
|
rt2x00dev->default_ant.rx = ANTENNA_A;
|
|
|
}
|
|
|
|
|
|
+ if (rt2x00_rt_rev_gte(rt2x00dev, RT5390, REV_RT5390R)) {
|
|
|
+ rt2x00dev->default_ant.tx = ANTENNA_HW_DIVERSITY; /* Unused */
|
|
|
+ rt2x00dev->default_ant.rx = ANTENNA_HW_DIVERSITY; /* Unused */
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* Determine external LNA informations.
|
|
|
*/
|