phy_ht.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #ifndef B43_PHY_HT_H_
  2. #define B43_PHY_HT_H_
  3. #include "phy_common.h"
  4. #define B43_PHY_HT_BBCFG 0x001 /* BB config */
  5. #define B43_PHY_HT_BBCFG_RSTCCA 0x4000 /* Reset CCA */
  6. #define B43_PHY_HT_BBCFG_RSTRX 0x8000 /* Reset RX */
  7. #define B43_PHY_HT_BANDCTL 0x009 /* Band control */
  8. #define B43_PHY_HT_BANDCTL_5GHZ 0x0001 /* Use the 5GHz band */
  9. #define B43_PHY_HT_TABLE_ADDR 0x072 /* Table address */
  10. #define B43_PHY_HT_TABLE_DATALO 0x073 /* Table data low */
  11. #define B43_PHY_HT_TABLE_DATAHI 0x074 /* Table data high */
  12. #define B43_PHY_HT_CLASS_CTL 0x0B0 /* Classifier control */
  13. #define B43_PHY_HT_CLASS_CTL_CCK_EN 0x0001 /* CCK enable */
  14. #define B43_PHY_HT_CLASS_CTL_OFDM_EN 0x0002 /* OFDM enable */
  15. #define B43_PHY_HT_CLASS_CTL_WAITED_EN 0x0004 /* Waited enable */
  16. #define B43_PHY_HT_IQLOCAL_CMDGCTL 0x0C2 /* I/Q LO cal command G control */
  17. #define B43_PHY_HT_SAMP_CMD 0x0C3 /* Sample command */
  18. #define B43_PHY_HT_SAMP_CMD_STOP 0x0002 /* Stop */
  19. #define B43_PHY_HT_SAMP_LOOP_CNT 0x0C4 /* Sample loop count */
  20. #define B43_PHY_HT_SAMP_WAIT_CNT 0x0C5 /* Sample wait count */
  21. #define B43_PHY_HT_SAMP_DEP_CNT 0x0C6 /* Sample depth count */
  22. #define B43_PHY_HT_SAMP_STAT 0x0C7 /* Sample status */
  23. #define B43_PHY_HT_BW1 0x1CE
  24. #define B43_PHY_HT_BW2 0x1CF
  25. #define B43_PHY_HT_BW3 0x1D0
  26. #define B43_PHY_HT_BW4 0x1D1
  27. #define B43_PHY_HT_BW5 0x1D2
  28. #define B43_PHY_HT_BW6 0x1D3
  29. #define B43_PHY_HT_TXPCTL_CMD_C1 0x1E7 /* TX power control command */
  30. #define B43_PHY_HT_TXPCTL_CMD_C1_INIT 0x007F /* Init */
  31. #define B43_PHY_HT_TXPCTL_CMD_C1_COEFF 0x2000 /* Power control coefficients */
  32. #define B43_PHY_HT_TXPCTL_CMD_C1_HWPCTLEN 0x4000 /* Hardware TX power control enable */
  33. #define B43_PHY_HT_TXPCTL_CMD_C1_PCTLEN 0x8000 /* TX power control enable */
  34. #define B43_PHY_HT_TXPCTL_CMD_C2 0x222
  35. #define B43_PHY_HT_TXPCTL_CMD_C2_INIT 0x007F
  36. #define B43_PHY_HT_RSSI_C1 0x219
  37. #define B43_PHY_HT_RSSI_C2 0x21A
  38. #define B43_PHY_HT_RSSI_C3 0x21B
  39. #define B43_PHY_HT_C1_CLIP1THRES B43_PHY_OFDM(0x00E)
  40. #define B43_PHY_HT_C2_CLIP1THRES B43_PHY_OFDM(0x04E)
  41. #define B43_PHY_HT_C3_CLIP1THRES B43_PHY_OFDM(0x08E)
  42. #define B43_PHY_HT_RF_SEQ_MODE B43_PHY_EXTG(0x000)
  43. #define B43_PHY_HT_RF_SEQ_MODE_CA_OVER 0x0001 /* Core active override */
  44. #define B43_PHY_HT_RF_SEQ_MODE_TR_OVER 0x0002 /* Trigger override */
  45. #define B43_PHY_HT_RF_SEQ_TRIG B43_PHY_EXTG(0x003)
  46. #define B43_PHY_HT_RF_SEQ_TRIG_RX2TX 0x0001 /* RX2TX */
  47. #define B43_PHY_HT_RF_SEQ_TRIG_TX2RX 0x0002 /* TX2RX */
  48. #define B43_PHY_HT_RF_SEQ_TRIG_UPGH 0x0004 /* Update gain H */
  49. #define B43_PHY_HT_RF_SEQ_TRIG_UPGL 0x0008 /* Update gain L */
  50. #define B43_PHY_HT_RF_SEQ_TRIG_UPGU 0x0010 /* Update gain U */
  51. #define B43_PHY_HT_RF_SEQ_TRIG_RST2RX 0x0020 /* Reset to RX */
  52. #define B43_PHY_HT_RF_SEQ_STATUS B43_PHY_EXTG(0x004)
  53. /* Values for the status are the same as for the trigger */
  54. #define B43_PHY_HT_RF_CTL1 B43_PHY_EXTG(0x010)
  55. #define B43_PHY_HT_RF_CTL_INT_C1 B43_PHY_EXTG(0x04c)
  56. #define B43_PHY_HT_RF_CTL_INT_C2 B43_PHY_EXTG(0x06c)
  57. #define B43_PHY_HT_RF_CTL_INT_C3 B43_PHY_EXTG(0x08c)
  58. #define B43_PHY_HT_AFE_C1_OVER B43_PHY_EXTG(0x110)
  59. #define B43_PHY_HT_AFE_C1 B43_PHY_EXTG(0x111)
  60. #define B43_PHY_HT_AFE_C2_OVER B43_PHY_EXTG(0x114)
  61. #define B43_PHY_HT_AFE_C2 B43_PHY_EXTG(0x115)
  62. #define B43_PHY_HT_AFE_C3_OVER B43_PHY_EXTG(0x118)
  63. #define B43_PHY_HT_AFE_C3 B43_PHY_EXTG(0x119)
  64. #define B43_PHY_HT_TXPCTL_CMD_C3 B43_PHY_EXTG(0x164)
  65. #define B43_PHY_HT_TXPCTL_CMD_C3_INIT 0x007F
  66. #define B43_PHY_HT_TEST B43_PHY_N_BMODE(0x00A)
  67. /* Values for PHY registers used on channel switching */
  68. struct b43_phy_ht_channeltab_e_phy {
  69. u16 bw1;
  70. u16 bw2;
  71. u16 bw3;
  72. u16 bw4;
  73. u16 bw5;
  74. u16 bw6;
  75. };
  76. struct b43_phy_ht {
  77. u16 rf_ctl_int_save[3];
  78. bool tx_pwr_ctl;
  79. u8 tx_pwr_idx[3];
  80. s32 bb_mult_save[3];
  81. u8 idle_tssi[3];
  82. };
  83. struct b43_phy_operations;
  84. extern const struct b43_phy_operations b43_phyops_ht;
  85. #endif /* B43_PHY_HT_H_ */