aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt61pci.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-10-13 10:26:27 -0400
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:02:52 -0500
commit39e75857d08fe35ffad4dd9004580acf0d725b75 (patch)
treeda50bf796ebbabb31d1fa889a396138e8c3ae8ea /drivers/net/wireless/rt2x00/rt61pci.c
parentaddc81bd428f9eb29ed2ab64ad4039c6aed55aea (diff)
[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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt61pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index b644a66dcb50..aebc96344cd8 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -425,7 +425,6 @@ static void rt61pci_config_antenna_5x(struct rt2x00_dev *rt2x00dev,
425 !rt2x00_rf(&rt2x00dev->chip, RF5225)); 425 !rt2x00_rf(&rt2x00dev->chip, RF5225));
426 426
427 switch (ant->rx) { 427 switch (ant->rx) {
428 case ANTENNA_SW_DIVERSITY:
429 case ANTENNA_HW_DIVERSITY: 428 case ANTENNA_HW_DIVERSITY:
430 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 2); 429 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 2);
431 rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 430 rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END,
@@ -440,6 +439,13 @@ static void rt61pci_config_antenna_5x(struct rt2x00_dev *rt2x00dev,
440 else 439 else
441 rt2x00_set_field8(&r77, BBP_R77_PAIR, 3); 440 rt2x00_set_field8(&r77, BBP_R77_PAIR, 3);
442 break; 441 break;
442 case ANTENNA_SW_DIVERSITY:
443 /*
444 * NOTE: We should never come here because rt2x00lib is
445 * supposed to catch this and send us the correct antenna
446 * explicitely. However we are nog going to bug about this.
447 * Instead, just default to antenna B.
448 */
443 case ANTENNA_B: 449 case ANTENNA_B:
444 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 1); 450 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 1);
445 rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0); 451 rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0);
@@ -473,7 +479,6 @@ static void rt61pci_config_antenna_2x(struct rt2x00_dev *rt2x00dev,
473 !test_bit(CONFIG_FRAME_TYPE, &rt2x00dev->flags)); 479 !test_bit(CONFIG_FRAME_TYPE, &rt2x00dev->flags));
474 480
475 switch (ant->rx) { 481 switch (ant->rx) {
476 case ANTENNA_SW_DIVERSITY:
477 case ANTENNA_HW_DIVERSITY: 482 case ANTENNA_HW_DIVERSITY:
478 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 2); 483 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 2);
479 break; 484 break;
@@ -481,6 +486,13 @@ static void rt61pci_config_antenna_2x(struct rt2x00_dev *rt2x00dev,
481 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 1); 486 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 1);
482 rt2x00_set_field8(&r77, BBP_R77_PAIR, 3); 487 rt2x00_set_field8(&r77, BBP_R77_PAIR, 3);
483 break; 488 break;
489 case ANTENNA_SW_DIVERSITY:
490 /*
491 * NOTE: We should never come here because rt2x00lib is
492 * supposed to catch this and send us the correct antenna
493 * explicitely. However we are nog going to bug about this.
494 * Instead, just default to antenna B.
495 */
484 case ANTENNA_B: 496 case ANTENNA_B:
485 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 1); 497 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 1);
486 rt2x00_set_field8(&r77, BBP_R77_PAIR, 0); 498 rt2x00_set_field8(&r77, BBP_R77_PAIR, 0);