File: ppr.h

package info (click to toggle)
linux 6.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,532,052 kB
  • sloc: ansic: 23,400,063; asm: 266,720; sh: 108,896; makefile: 49,712; python: 36,925; perl: 36,810; cpp: 6,044; yacc: 4,904; lex: 2,722; awk: 1,440; ruby: 25; sed: 5
file content (46 lines) | stat: -rw-r--r-- 1,297 bytes parent folder | download | duplicates (25)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef LINUX_B43_PPR_H_
#define LINUX_B43_PPR_H_

#include <linux/types.h>

#define B43_PPR_CCK_RATES_NUM		4
#define B43_PPR_OFDM_RATES_NUM		8
#define B43_PPR_MCS_RATES_NUM		8

#define B43_PPR_RATES_NUM	(B43_PPR_CCK_RATES_NUM +	\
				 B43_PPR_OFDM_RATES_NUM * 2 +	\
				 B43_PPR_MCS_RATES_NUM * 4)

struct b43_ppr_rates {
	u8 cck[B43_PPR_CCK_RATES_NUM];
	u8 ofdm[B43_PPR_OFDM_RATES_NUM];
	u8 ofdm_20_cdd[B43_PPR_OFDM_RATES_NUM];
	u8 mcs_20[B43_PPR_MCS_RATES_NUM]; /* SISO */
	u8 mcs_20_cdd[B43_PPR_MCS_RATES_NUM];
	u8 mcs_20_stbc[B43_PPR_MCS_RATES_NUM];
	u8 mcs_20_sdm[B43_PPR_MCS_RATES_NUM];
};

struct b43_ppr {
	/* All powers are in qdbm (Q5.2) */
	union {
		u8 __all_rates[B43_PPR_RATES_NUM];
		struct b43_ppr_rates rates;
	};
};

struct b43_wldev;
enum b43_band;

void b43_ppr_clear(struct b43_wldev *dev, struct b43_ppr *ppr);

void b43_ppr_add(struct b43_wldev *dev, struct b43_ppr *ppr, int diff);
void b43_ppr_apply_max(struct b43_wldev *dev, struct b43_ppr *ppr, u8 max);
void b43_ppr_apply_min(struct b43_wldev *dev, struct b43_ppr *ppr, u8 min);
u8 b43_ppr_get_max(struct b43_wldev *dev, struct b43_ppr *ppr);

bool b43_ppr_load_max_from_sprom(struct b43_wldev *dev, struct b43_ppr *ppr,
				 enum b43_band band);

#endif /* LINUX_B43_PPR_H_ */