621-rt2x00-ht20_40_fix.patch 1.2 KB

1234567891011121314151617181920212223242526272829
  1. --- a/drivers/net/wireless/ralink/rt2x00/rt2800.h
  2. +++ b/drivers/net/wireless/ralink/rt2x00/rt2800.h
  3. @@ -2321,6 +2321,8 @@ struct mac_iveiv_entry {
  4. #define RFCSR30_RX_H20M FIELD8(0x04)
  5. #define RFCSR30_RX_VCM FIELD8(0x18)
  6. #define RFCSR30_RF_CALIBRATION FIELD8(0x80)
  7. +#define RF3322_RFCSR30_TX_H20M FIELD8(0x01)
  8. +#define RF3322_RFCSR30_RX_H20M FIELD8(0x02)
  9. /*
  10. * RFCSR 31:
  11. --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  12. +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  13. @@ -3528,8 +3528,13 @@ static void rt2800_config_channel(struct
  14. rt2x00_rf(rt2x00dev, RF5390) ||
  15. rt2x00_rf(rt2x00dev, RF5392)) {
  16. rt2800_rfcsr_read(rt2x00dev, 30, &rfcsr);
  17. - rt2x00_set_field8(&rfcsr, RFCSR30_TX_H20M, 0);
  18. - rt2x00_set_field8(&rfcsr, RFCSR30_RX_H20M, 0);
  19. + if(rt2x00_rf(rt2x00dev, RF3322)) {
  20. + rt2x00_set_field8(&rfcsr, RF3322_RFCSR30_TX_H20M, conf_is_ht40(conf));
  21. + rt2x00_set_field8(&rfcsr, RF3322_RFCSR30_RX_H20M, conf_is_ht40(conf));
  22. + } else {
  23. + rt2x00_set_field8(&rfcsr, RFCSR30_TX_H20M, conf_is_ht40(conf));
  24. + rt2x00_set_field8(&rfcsr, RFCSR30_RX_H20M, conf_is_ht40(conf));
  25. + }
  26. rt2800_rfcsr_write(rt2x00dev, 30, rfcsr);
  27. rt2800_rfcsr_read(rt2x00dev, 3, &rfcsr);