8 /* Local Oscillator control value-pair. */
13 /* "Used by hardware" flag. */
15 #ifdef CONFIG_B43_DEBUG
16 /* Is this lo-control-array entry calibrated? */
21 /* Debugging: Poison value for i and q values. */
22 #define B43_LOCTL_POISON 111
24 /* loctl->calibrated debugging mechanism */
25 #ifdef CONFIG_B43_DEBUG
26 static inline void b43_loctl_set_calibrated(struct b43_loctl
*loctl
,
29 loctl
->calibrated
= calibrated
;
31 static inline bool b43_loctl_is_calibrated(struct b43_loctl
*loctl
)
33 return loctl
->calibrated
;
36 static inline void b43_loctl_set_calibrated(struct b43_loctl
*loctl
,
40 static inline bool b43_loctl_is_calibrated(struct b43_loctl
*loctl
)
46 /* TX Power LO Control Array.
47 * Value-pairs to adjust the LocalOscillator are stored
49 * There are two different set of values. One for "Flag is Set"
50 * and one for "Flag is Unset".
51 * By "Flag" the flag in struct b43_rfatt is meant.
52 * The Value arrays are two-dimensional. The first index
53 * is the baseband attenuation and the second index
54 * is the radio attenuation.
55 * Use b43_get_lo_g_ctl() to retrieve a value from the lists.
57 struct b43_txpower_lo_control
{
60 /* LO Control values, with PAD Mixer */
61 struct b43_loctl with_padmix
[B43_NR_BB
][B43_NR_RF
];
62 /* LO Control values, without PAD Mixer */
63 struct b43_loctl no_padmix
[B43_NR_BB
][B43_NR_RF
];
65 /* Flag to indicate a complete rebuild of the two tables above
66 * to the LO measuring code. */
69 /* Lists of valid RF and BB attenuation values for this device. */
70 struct b43_rfatt_list rfatt_list
;
71 struct b43_bbatt_list bbatt_list
;
73 /* Current TX Bias value */
75 /* Current TX Magnification Value (if used by the device) */
78 /* GPHY LO is measured. */
81 /* Saved device PowerVector */
85 /* Measure the BPHY Local Oscillator. */
86 void b43_lo_b_measure(struct b43_wldev
*dev
);
87 /* Measure the BPHY/GPHY Local Oscillator. */
88 void b43_lo_g_measure(struct b43_wldev
*dev
);
90 /* Adjust the Local Oscillator to the saved attenuation
93 void b43_lo_g_adjust(struct b43_wldev
*dev
);
94 /* Adjust to specific values. */
95 void b43_lo_g_adjust_to(struct b43_wldev
*dev
,
96 u16 rfatt
, u16 bbatt
, u16 tx_control
);
98 /* Mark all possible b43_lo_g_ctl as "unused" */
99 void b43_lo_g_ctl_mark_all_unused(struct b43_wldev
*dev
);
100 /* Mark the b43_lo_g_ctl corresponding to the current
101 * attenuation values as used.
103 void b43_lo_g_ctl_mark_cur_used(struct b43_wldev
*dev
);
105 /* Get a reference to a LO Control value pair in the
106 * TX Power LO Control Array.
108 struct b43_loctl
*b43_get_lo_g_ctl(struct b43_wldev
*dev
,
109 const struct b43_rfatt
*rfatt
,
110 const struct b43_bbatt
*bbatt
);
112 #endif /* B43_LO_H_ */