Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / net / wireless / broadcom / b43 / ppr.h
blob094389f9f4775dd1a465e2a2685897341a2ecf74
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef LINUX_B43_PPR_H_
3 #define LINUX_B43_PPR_H_
5 #include <linux/types.h>
7 #define B43_PPR_CCK_RATES_NUM 4
8 #define B43_PPR_OFDM_RATES_NUM 8
9 #define B43_PPR_MCS_RATES_NUM 8
11 #define B43_PPR_RATES_NUM (B43_PPR_CCK_RATES_NUM + \
12 B43_PPR_OFDM_RATES_NUM * 2 + \
13 B43_PPR_MCS_RATES_NUM * 4)
15 struct b43_ppr_rates {
16 u8 cck[B43_PPR_CCK_RATES_NUM];
17 u8 ofdm[B43_PPR_OFDM_RATES_NUM];
18 u8 ofdm_20_cdd[B43_PPR_OFDM_RATES_NUM];
19 u8 mcs_20[B43_PPR_MCS_RATES_NUM]; /* SISO */
20 u8 mcs_20_cdd[B43_PPR_MCS_RATES_NUM];
21 u8 mcs_20_stbc[B43_PPR_MCS_RATES_NUM];
22 u8 mcs_20_sdm[B43_PPR_MCS_RATES_NUM];
25 struct b43_ppr {
26 /* All powers are in qdbm (Q5.2) */
27 union {
28 u8 __all_rates[B43_PPR_RATES_NUM];
29 struct b43_ppr_rates rates;
33 struct b43_wldev;
34 enum b43_band;
36 void b43_ppr_clear(struct b43_wldev *dev, struct b43_ppr *ppr);
38 void b43_ppr_add(struct b43_wldev *dev, struct b43_ppr *ppr, int diff);
39 void b43_ppr_apply_max(struct b43_wldev *dev, struct b43_ppr *ppr, u8 max);
40 void b43_ppr_apply_min(struct b43_wldev *dev, struct b43_ppr *ppr, u8 min);
41 u8 b43_ppr_get_max(struct b43_wldev *dev, struct b43_ppr *ppr);
43 bool b43_ppr_load_max_from_sprom(struct b43_wldev *dev, struct b43_ppr *ppr,
44 enum b43_band band);
46 #endif /* LINUX_B43_PPR_H_ */