aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2400pci.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/rt2400pci.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/rt2400pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 2284cb308971..5b3adbae4820 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -409,13 +409,19 @@ static void rt2400pci_config_antenna(struct rt2x00_dev *rt2x00dev,
409 * Configure the TX antenna. 409 * Configure the TX antenna.
410 */ 410 */
411 switch (ant->tx) { 411 switch (ant->tx) {
412 case ANTENNA_SW_DIVERSITY:
413 case ANTENNA_HW_DIVERSITY: 412 case ANTENNA_HW_DIVERSITY:
414 rt2x00_set_field8(&r1, BBP_R1_TX_ANTENNA, 1); 413 rt2x00_set_field8(&r1, BBP_R1_TX_ANTENNA, 1);
415 break; 414 break;
416 case ANTENNA_A: 415 case ANTENNA_A:
417 rt2x00_set_field8(&r1, BBP_R1_TX_ANTENNA, 0); 416 rt2x00_set_field8(&r1, BBP_R1_TX_ANTENNA, 0);
418 break; 417 break;
418 case ANTENNA_SW_DIVERSITY:
419 /*
420 * NOTE: We should never come here because rt2x00lib is
421 * supposed to catch this and send us the correct antenna
422 * explicitely. However we are nog going to bug about this.
423 * Instead, just default to antenna B.
424 */
419 case ANTENNA_B: 425 case ANTENNA_B:
420 rt2x00_set_field8(&r1, BBP_R1_TX_ANTENNA, 2); 426 rt2x00_set_field8(&r1, BBP_R1_TX_ANTENNA, 2);
421 break; 427 break;
@@ -425,13 +431,19 @@ static void rt2400pci_config_antenna(struct rt2x00_dev *rt2x00dev,
425 * Configure the RX antenna. 431 * Configure the RX antenna.
426 */ 432 */
427 switch (ant->rx) { 433 switch (ant->rx) {
428 case ANTENNA_SW_DIVERSITY:
429 case ANTENNA_HW_DIVERSITY: 434 case ANTENNA_HW_DIVERSITY:
430 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 1); 435 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 1);
431 break; 436 break;
432 case ANTENNA_A: 437 case ANTENNA_A:
433 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 0); 438 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 0);
434 break; 439 break;
440 case ANTENNA_SW_DIVERSITY:
441 /*
442 * NOTE: We should never come here because rt2x00lib is
443 * supposed to catch this and send us the correct antenna
444 * explicitely. However we are nog going to bug about this.
445 * Instead, just default to antenna B.
446 */
435 case ANTENNA_B: 447 case ANTENNA_B:
436 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 2); 448 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA, 2);
437 break; 449 break;