tables_lpphy.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef B43_TABLES_LPPHY_H_
  2. #define B43_TABLES_LPPHY_H_
  3. #define B43_LPTAB_TYPEMASK 0xF0000000
  4. #define B43_LPTAB_8BIT 0x10000000
  5. #define B43_LPTAB_16BIT 0x20000000
  6. #define B43_LPTAB_32BIT 0x30000000
  7. #define B43_LPTAB8(table, offset) (((table) << 10) | (offset) | B43_LPTAB_8BIT)
  8. #define B43_LPTAB16(table, offset) (((table) << 10) | (offset) | B43_LPTAB_16BIT)
  9. #define B43_LPTAB32(table, offset) (((table) << 10) | (offset) | B43_LPTAB_32BIT)
  10. /* Table definitions */
  11. #define B43_LPTAB_TXPWR_R2PLUS B43_LPTAB32(0x07, 0) /* TX power lookup table (rev >= 2) */
  12. #define B43_LPTAB_TXPWR_R0_1 B43_LPTAB32(0xA0, 0) /* TX power lookup table (rev < 2) */
  13. u32 b43_lptab_read(struct b43_wldev *dev, u32 offset);
  14. void b43_lptab_write(struct b43_wldev *dev, u32 offset, u32 value);
  15. /* Bulk table access. Note that these functions return the bulk data in
  16. * host endianness! The returned data is _not_ a bytearray, but an array
  17. * consisting of nr_elements of the data type. */
  18. void b43_lptab_read_bulk(struct b43_wldev *dev, u32 offset,
  19. unsigned int nr_elements, void *data);
  20. void b43_lptab_write_bulk(struct b43_wldev *dev, u32 offset,
  21. unsigned int nr_elements, const void *data);
  22. void b2062_upload_init_table(struct b43_wldev *dev);
  23. void b2063_upload_init_table(struct b43_wldev *dev);
  24. struct lpphy_tx_gain_table_entry {
  25. u8 gm, pga, pad, dac, bb_mult;
  26. };
  27. void lpphy_write_gain_table(struct b43_wldev *dev, int offset,
  28. struct lpphy_tx_gain_table_entry data);
  29. void lpphy_write_gain_table_bulk(struct b43_wldev *dev, int offset, int count,
  30. struct lpphy_tx_gain_table_entry *table);
  31. void lpphy_rev0_1_table_init(struct b43_wldev *dev);
  32. void lpphy_rev2plus_table_init(struct b43_wldev *dev);
  33. void lpphy_init_tx_gain_table(struct b43_wldev *dev);
  34. #endif /* B43_TABLES_LPPHY_H_ */