aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500pci.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/rt2500pci.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/rt2500pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index a9872f95361b..958b148d8f50 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -438,17 +438,19 @@ static void rt2500pci_config_antenna(struct rt2x00_dev *rt2x00dev,
438 * Configure the TX antenna. 438 * Configure the TX antenna.
439 */ 439 */
440 switch (ant->tx) { 440 switch (ant->tx) {
441 case ANTENNA_SW_DIVERSITY:
442 case ANTENNA_HW_DIVERSITY:
443 rt2x00_set_field8(&r2, BBP_R2_TX_ANTENNA, 2);
444 rt2x00_set_field32(&reg, BBPCSR1_CCK, 2);
445 rt2x00_set_field32(&reg, BBPCSR1_OFDM, 2);
446 break;
447 case ANTENNA_A: 441 case ANTENNA_A:
448 rt2x00_set_field8(&r2, BBP_R2_TX_ANTENNA, 0); 442 rt2x00_set_field8(&r2, BBP_R2_TX_ANTENNA, 0);
449 rt2x00_set_field32(&reg, BBPCSR1_CCK, 0); 443 rt2x00_set_field32(&reg, BBPCSR1_CCK, 0);
450 rt2x00_set_field32(&reg, BBPCSR1_OFDM, 0); 444 rt2x00_set_field32(&reg, BBPCSR1_OFDM, 0);
451 break; 445 break;
446 case ANTENNA_HW_DIVERSITY:
447 case ANTENNA_SW_DIVERSITY:
448 /*
449 * NOTE: We should never come here because rt2x00lib is
450 * supposed to catch this and send us the correct antenna
451 * explicitely. However we are nog going to bug about this.
452 * Instead, just default to antenna B.
453 */
452 case ANTENNA_B: 454 case ANTENNA_B:
453 rt2x00_set_field8(&r2, BBP_R2_TX_ANTENNA, 2); 455 rt2x00_set_field8(&r2, BBP_R2_TX_ANTENNA, 2);
454 rt2x00_set_field32(&reg, BBPCSR1_CCK, 2); 456 rt2x00_set_field32(&reg, BBPCSR1_CCK, 2);
@@ -460,13 +462,17 @@ static void rt2500pci_config_antenna(struct rt2x00_dev *rt2x00dev,
460 * Configure the RX antenna. 462 * Configure the RX antenna.
461 */ 463 */
462 switch (ant->rx) { 464 switch (ant->rx) {
463 case ANTENNA_SW_DIVERSITY:
464 case ANTENNA_HW_DIVERSITY:
465 rt2x00_set_field8(&r14, BBP_R14_RX_ANTENNA, 2);
466 break;
467 case ANTENNA_A: 465 case ANTENNA_A:
468 rt2x00_set_field8(&r14, BBP_R14_RX_ANTENNA, 0); 466 rt2x00_set_field8(&r14, BBP_R14_RX_ANTENNA, 0);
469 break; 467 break;
468 case ANTENNA_HW_DIVERSITY:
469 case ANTENNA_SW_DIVERSITY:
470 /*
471 * NOTE: We should never come here because rt2x00lib is
472 * supposed to catch this and send us the correct antenna
473 * explicitely. However we are nog going to bug about this.
474 * Instead, just default to antenna B.
475 */
470 case ANTENNA_B: 476 case ANTENNA_B:
471 rt2x00_set_field8(&r14, BBP_R14_RX_ANTENNA, 2); 477 rt2x00_set_field8(&r14, BBP_R14_RX_ANTENNA, 2);
472 break; 478 break;