aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt73usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt73usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 72c2827ee57c..d0e97e1dfaf6 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -497,14 +497,8 @@ static void rt73usb_config_antenna_5x(struct rt2x00_dev *rt2x00dev,
497 else 497 else
498 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3); 498 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3);
499 break; 499 break;
500 case ANTENNA_SW_DIVERSITY:
501 /*
502 * NOTE: We should never come here because rt2x00lib is
503 * supposed to catch this and send us the correct antenna
504 * explicitely. However we are nog going to bug about this.
505 * Instead, just default to antenna B.
506 */
507 case ANTENNA_B: 500 case ANTENNA_B:
501 default:
508 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); 502 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1);
509 rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0); 503 rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0);
510 if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) 504 if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ)
@@ -545,14 +539,8 @@ static void rt73usb_config_antenna_2x(struct rt2x00_dev *rt2x00dev,
545 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3); 539 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3);
546 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); 540 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1);
547 break; 541 break;
548 case ANTENNA_SW_DIVERSITY:
549 /*
550 * NOTE: We should never come here because rt2x00lib is
551 * supposed to catch this and send us the correct antenna
552 * explicitely. However we are nog going to bug about this.
553 * Instead, just default to antenna B.
554 */
555 case ANTENNA_B: 542 case ANTENNA_B:
543 default:
556 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0); 544 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0);
557 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); 545 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1);
558 break; 546 break;
@@ -602,6 +590,13 @@ static void rt73usb_config_antenna(struct rt2x00_dev *rt2x00dev,
602 unsigned int i; 590 unsigned int i;
603 u32 reg; 591 u32 reg;
604 592
593 /*
594 * We should never come here because rt2x00lib is supposed
595 * to catch this and send us the correct antenna explicitely.
596 */
597 BUG_ON(ant->rx == ANTENNA_SW_DIVERSITY ||
598 ant->tx == ANTENNA_SW_DIVERSITY);
599
605 if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { 600 if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) {
606 sel = antenna_sel_a; 601 sel = antenna_sel_a;
607 lna = test_bit(CONFIG_EXTERNAL_LNA_A, &rt2x00dev->flags); 602 lna = test_bit(CONFIG_EXTERNAL_LNA_A, &rt2x00dev->flags);