![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 #ifndef B43_LO_H_ 0003 #define B43_LO_H_ 0004 0005 /* G-PHY Local Oscillator */ 0006 0007 #include "phy_g.h" 0008 0009 struct b43_wldev; 0010 0011 /* Local Oscillator control value-pair. */ 0012 struct b43_loctl { 0013 /* Control values. */ 0014 s8 i; 0015 s8 q; 0016 }; 0017 /* Debugging: Poison value for i and q values. */ 0018 #define B43_LOCTL_POISON 111 0019 0020 /* This struct holds calibrated LO settings for a set of 0021 * Baseband and RF attenuation settings. */ 0022 struct b43_lo_calib { 0023 /* The set of attenuation values this set of LO 0024 * control values is calibrated for. */ 0025 struct b43_bbatt bbatt; 0026 struct b43_rfatt rfatt; 0027 /* The set of control values for the LO. */ 0028 struct b43_loctl ctl; 0029 /* The time when these settings were calibrated (in jiffies) */ 0030 unsigned long calib_time; 0031 /* List. */ 0032 struct list_head list; 0033 }; 0034 0035 /* Size of the DC Lookup Table in 16bit words. */ 0036 #define B43_DC_LT_SIZE 32 0037 0038 /* Local Oscillator calibration information */ 0039 struct b43_txpower_lo_control { 0040 /* Lists of RF and BB attenuation values for this device. 0041 * Used for building hardware power control tables. */ 0042 struct b43_rfatt_list rfatt_list; 0043 struct b43_bbatt_list bbatt_list; 0044 0045 /* The DC Lookup Table is cached in memory here. 0046 * Note that this is only used for Hardware Power Control. */ 0047 u16 dc_lt[B43_DC_LT_SIZE]; 0048 0049 /* List of calibrated control values (struct b43_lo_calib). */ 0050 struct list_head calib_list; 0051 /* Last time the power vector was read (jiffies). */ 0052 unsigned long pwr_vec_read_time; 0053 /* Last time the txctl values were measured (jiffies). */ 0054 unsigned long txctl_measured_time; 0055 0056 /* Current TX Bias value */ 0057 u8 tx_bias; 0058 /* Current TX Magnification Value (if used by the device) */ 0059 u8 tx_magn; 0060 0061 /* Saved device PowerVector */ 0062 u64 power_vector; 0063 }; 0064 0065 /* Calibration expire timeouts. 0066 * Timeouts must be multiple of 15 seconds. To make sure 0067 * the item really expired when the 15 second timer hits, we 0068 * subtract two additional seconds from the timeout. */ 0069 #define B43_LO_CALIB_EXPIRE (HZ * (30 - 2)) 0070 #define B43_LO_PWRVEC_EXPIRE (HZ * (30 - 2)) 0071 #define B43_LO_TXCTL_EXPIRE (HZ * (180 - 4)) 0072 0073 0074 /* Adjust the Local Oscillator to the saved attenuation 0075 * and txctl values. 0076 */ 0077 void b43_lo_g_adjust(struct b43_wldev *dev); 0078 /* Adjust to specific values. */ 0079 void b43_lo_g_adjust_to(struct b43_wldev *dev, 0080 u16 rfatt, u16 bbatt, u16 tx_control); 0081 0082 void b43_gphy_dc_lt_init(struct b43_wldev *dev, bool update_all); 0083 0084 void b43_lo_g_maintenance_work(struct b43_wldev *dev); 0085 void b43_lo_g_cleanup(struct b43_wldev *dev); 0086 void b43_lo_g_init(struct b43_wldev *dev); 0087 0088 #endif /* B43_LO_H_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |