[PATCH] rt2x00: SW diversity should default to antenna B
Although ANTENNA_SW_DIVERSITY should never be send to the driver, we should still handle it to prevent bugs. But instead of defaulting to ANTENNA_HW_DIVERSITY we should default to ANTENNA_B instead. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
addc81bd42
commit
39e75857d0
@@ -409,7 +409,6 @@ static void rt73usb_config_antenna_5x(struct rt2x00_dev *rt2x00dev,
|
||||
rt2x00_set_field8(&r3, BBP_R3_SMART_MODE, 0);
|
||||
|
||||
switch (ant->rx) {
|
||||
case ANTENNA_SW_DIVERSITY:
|
||||
case ANTENNA_HW_DIVERSITY:
|
||||
rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 2);
|
||||
rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END,
|
||||
@@ -424,6 +423,13 @@ static void rt73usb_config_antenna_5x(struct rt2x00_dev *rt2x00dev,
|
||||
else
|
||||
rt2x00_set_field8(&r77, BBP_R77_PAIR, 3);
|
||||
break;
|
||||
case ANTENNA_SW_DIVERSITY:
|
||||
/*
|
||||
* NOTE: We should never come here because rt2x00lib is
|
||||
* supposed to catch this and send us the correct antenna
|
||||
* explicitely. However we are nog going to bug about this.
|
||||
* Instead, just default to antenna B.
|
||||
*/
|
||||
case ANTENNA_B:
|
||||
rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 1);
|
||||
rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0);
|
||||
@@ -456,7 +462,6 @@ static void rt73usb_config_antenna_2x(struct rt2x00_dev *rt2x00dev,
|
||||
!test_bit(CONFIG_FRAME_TYPE, &rt2x00dev->flags));
|
||||
|
||||
switch (ant->rx) {
|
||||
case ANTENNA_SW_DIVERSITY:
|
||||
case ANTENNA_HW_DIVERSITY:
|
||||
rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 2);
|
||||
break;
|
||||
@@ -464,6 +469,13 @@ static void rt73usb_config_antenna_2x(struct rt2x00_dev *rt2x00dev,
|
||||
rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 1);
|
||||
rt2x00_set_field8(&r77, BBP_R77_PAIR, 3);
|
||||
break;
|
||||
case ANTENNA_SW_DIVERSITY:
|
||||
/*
|
||||
* NOTE: We should never come here because rt2x00lib is
|
||||
* supposed to catch this and send us the correct antenna
|
||||
* explicitely. However we are nog going to bug about this.
|
||||
* Instead, just default to antenna B.
|
||||
*/
|
||||
case ANTENNA_B:
|
||||
rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 1);
|
||||
rt2x00_set_field8(&r77, BBP_R77_PAIR, 0);
|
||||
|
||||
Reference in New Issue
Block a user