ppr.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef LINUX_B43_PPR_H_
  3. #define LINUX_B43_PPR_H_
  4. #include <linux/types.h>
  5. #define B43_PPR_CCK_RATES_NUM 4
  6. #define B43_PPR_OFDM_RATES_NUM 8
  7. #define B43_PPR_MCS_RATES_NUM 8
  8. #define B43_PPR_RATES_NUM (B43_PPR_CCK_RATES_NUM + \
  9. B43_PPR_OFDM_RATES_NUM * 2 + \
  10. B43_PPR_MCS_RATES_NUM * 4)
  11. struct b43_ppr_rates {
  12. u8 cck[B43_PPR_CCK_RATES_NUM];
  13. u8 ofdm[B43_PPR_OFDM_RATES_NUM];
  14. u8 ofdm_20_cdd[B43_PPR_OFDM_RATES_NUM];
  15. u8 mcs_20[B43_PPR_MCS_RATES_NUM]; /* SISO */
  16. u8 mcs_20_cdd[B43_PPR_MCS_RATES_NUM];
  17. u8 mcs_20_stbc[B43_PPR_MCS_RATES_NUM];
  18. u8 mcs_20_sdm[B43_PPR_MCS_RATES_NUM];
  19. };
  20. struct b43_ppr {
  21. /* All powers are in qdbm (Q5.2) */
  22. union {
  23. u8 __all_rates[B43_PPR_RATES_NUM];
  24. struct b43_ppr_rates rates;
  25. };
  26. };
  27. struct b43_wldev;
  28. enum b43_band;
  29. void b43_ppr_clear(struct b43_wldev *dev, struct b43_ppr *ppr);
  30. void b43_ppr_add(struct b43_wldev *dev, struct b43_ppr *ppr, int diff);
  31. void b43_ppr_apply_max(struct b43_wldev *dev, struct b43_ppr *ppr, u8 max);
  32. void b43_ppr_apply_min(struct b43_wldev *dev, struct b43_ppr *ppr, u8 min);
  33. u8 b43_ppr_get_max(struct b43_wldev *dev, struct b43_ppr *ppr);
  34. bool b43_ppr_load_max_from_sprom(struct b43_wldev *dev, struct b43_ppr *ppr,
  35. enum b43_band band);
  36. #endif /* LINUX_B43_PPR_H_ */