diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2007-10-13 10:26:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:02:52 -0500 |
commit | 39e75857d08fe35ffad4dd9004580acf0d725b75 (patch) | |
tree | da50bf796ebbabb31d1fa889a396138e8c3ae8ea /drivers/net/wireless/rt2x00/rt2500usb.c | |
parent | addc81bd428f9eb29ed2ab64ad4039c6aed55aea (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/rt2500usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 31531f7cc125..60f729044427 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -401,7 +401,6 @@ static void rt2500usb_config_antenna(struct rt2x00_dev *rt2x00dev, | |||
401 | * Configure the TX antenna. | 401 | * Configure the TX antenna. |
402 | */ | 402 | */ |
403 | switch (ant->tx) { | 403 | switch (ant->tx) { |
404 | case ANTENNA_SW_DIVERSITY: | ||
405 | case ANTENNA_HW_DIVERSITY: | 404 | case ANTENNA_HW_DIVERSITY: |
406 | rt2x00_set_field8(&r2, BBP_R2_TX_ANTENNA, 1); | 405 | rt2x00_set_field8(&r2, BBP_R2_TX_ANTENNA, 1); |
407 | rt2x00_set_field16(&csr5, PHY_CSR5_CCK, 1); | 406 | rt2x00_set_field16(&csr5, PHY_CSR5_CCK, 1); |
@@ -412,6 +411,13 @@ static void rt2500usb_config_antenna(struct rt2x00_dev *rt2x00dev, | |||
412 | rt2x00_set_field16(&csr5, PHY_CSR5_CCK, 0); | 411 | rt2x00_set_field16(&csr5, PHY_CSR5_CCK, 0); |
413 | rt2x00_set_field16(&csr6, PHY_CSR6_OFDM, 0); | 412 | rt2x00_set_field16(&csr6, PHY_CSR6_OFDM, 0); |
414 | break; | 413 | break; |
414 | case ANTENNA_SW_DIVERSITY: | ||
415 | /* | ||
416 | * NOTE: We should never come here because rt2x00lib is | ||
417 | * supposed to catch this and send us the correct antenna | ||
418 | * explicitely. However we are nog going to bug about this. | ||
419 | * Instead, just default to antenna B. | ||
420 | */ | ||
415 | case ANTENNA_B: | 421 | case ANTENNA_B: |
416 | rt2x00_set_field8(&r2, BBP_R2_TX_ANTENNA, 2); | 422 | rt2x00_set_field8(&r2, BBP_R2_TX_ANTENNA, 2); |
417 | rt2x00_set_field16(&csr5, PHY_CSR5_CCK, 2); | 423 | rt2x00_set_field16(&csr5, PHY_CSR5_CCK, 2); |
@@ -423,13 +429,19 @@ static void rt2500usb_config_antenna(struct rt2x00_dev *rt2x00dev, | |||
423 | * Configure the RX antenna. | 429 | * Configure the RX antenna. |
424 | */ | 430 | */ |
425 | switch (ant->rx) { | 431 | switch (ant->rx) { |
426 | case ANTENNA_SW_DIVERSITY: | ||
427 | case ANTENNA_HW_DIVERSITY: | 432 | case ANTENNA_HW_DIVERSITY: |
428 | rt2x00_set_field8(&r14, BBP_R14_RX_ANTENNA, 1); | 433 | rt2x00_set_field8(&r14, BBP_R14_RX_ANTENNA, 1); |
429 | break; | 434 | break; |
430 | case ANTENNA_A: | 435 | case ANTENNA_A: |
431 | rt2x00_set_field8(&r14, BBP_R14_RX_ANTENNA, 0); | 436 | rt2x00_set_field8(&r14, BBP_R14_RX_ANTENNA, 0); |
432 | break; | 437 | break; |
438 | case ANTENNA_SW_DIVERSITY: | ||
439 | /* | ||
440 | * NOTE: We should never come here because rt2x00lib is | ||
441 | * supposed to catch this and send us the correct antenna | ||
442 | * explicitely. However we are nog going to bug about this. | ||
443 | * Instead, just default to antenna B. | ||
444 | */ | ||
433 | case ANTENNA_B: | 445 | case ANTENNA_B: |
434 | rt2x00_set_field8(&r14, BBP_R14_RX_ANTENNA, 2); | 446 | rt2x00_set_field8(&r14, BBP_R14_RX_ANTENNA, 2); |
435 | break; | 447 | break; |