Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef LINUX_B43_PPR_H_
0003 #define LINUX_B43_PPR_H_
0004 
0005 #include <linux/types.h>
0006 
0007 #define B43_PPR_CCK_RATES_NUM       4
0008 #define B43_PPR_OFDM_RATES_NUM      8
0009 #define B43_PPR_MCS_RATES_NUM       8
0010 
0011 #define B43_PPR_RATES_NUM   (B43_PPR_CCK_RATES_NUM +    \
0012                  B43_PPR_OFDM_RATES_NUM * 2 +   \
0013                  B43_PPR_MCS_RATES_NUM * 4)
0014 
0015 struct b43_ppr_rates {
0016     u8 cck[B43_PPR_CCK_RATES_NUM];
0017     u8 ofdm[B43_PPR_OFDM_RATES_NUM];
0018     u8 ofdm_20_cdd[B43_PPR_OFDM_RATES_NUM];
0019     u8 mcs_20[B43_PPR_MCS_RATES_NUM]; /* SISO */
0020     u8 mcs_20_cdd[B43_PPR_MCS_RATES_NUM];
0021     u8 mcs_20_stbc[B43_PPR_MCS_RATES_NUM];
0022     u8 mcs_20_sdm[B43_PPR_MCS_RATES_NUM];
0023 };
0024 
0025 struct b43_ppr {
0026     /* All powers are in qdbm (Q5.2) */
0027     union {
0028         u8 __all_rates[B43_PPR_RATES_NUM];
0029         struct b43_ppr_rates rates;
0030     };
0031 };
0032 
0033 struct b43_wldev;
0034 enum b43_band;
0035 
0036 void b43_ppr_clear(struct b43_wldev *dev, struct b43_ppr *ppr);
0037 
0038 void b43_ppr_add(struct b43_wldev *dev, struct b43_ppr *ppr, int diff);
0039 void b43_ppr_apply_max(struct b43_wldev *dev, struct b43_ppr *ppr, u8 max);
0040 void b43_ppr_apply_min(struct b43_wldev *dev, struct b43_ppr *ppr, u8 min);
0041 u8 b43_ppr_get_max(struct b43_wldev *dev, struct b43_ppr *ppr);
0042 
0043 bool b43_ppr_load_max_from_sprom(struct b43_wldev *dev, struct b43_ppr *ppr,
0044                  enum b43_band band);
0045 
0046 #endif /* LINUX_B43_PPR_H_ */