aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/rfbuffer.h
diff options
context:
space:
mode:
authorNick Kossifidis <mickflemm@gmail.com>2011-11-25 13:40:25 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-11-28 14:44:16 -0500
commitc47faa364cfb249d5d7670fb7293a6f9acd8aa9e (patch)
tree6b81c368508e94966efec2ddcc412c6b2154a97e /drivers/net/wireless/ath/ath5k/rfbuffer.h
parent1846ac3dbec0894095520b2756b68c4fd81e3fbb (diff)
ath5k: Cleanups v2 + add kerneldoc on all hw functions
No functional changes Add kernel doc for all ath5k_hw_* functions and strcucts. Also do some cleanup, rename ath5k_hw_init_beacon to ath5k_hw_init_beacon_timers, remove an unused variable from ath5k_hw_pcu_init and a few obsolete macros, mostly related to XR. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/rfbuffer.h')
-rw-r--r--drivers/net/wireless/ath/ath5k/rfbuffer.h59
1 files changed, 42 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath5k/rfbuffer.h b/drivers/net/wireless/ath/ath5k/rfbuffer.h
index 5d11c23b429..aed34d9954c 100644
--- a/drivers/net/wireless/ath/ath5k/rfbuffer.h
+++ b/drivers/net/wireless/ath/ath5k/rfbuffer.h
@@ -18,7 +18,9 @@
18 */ 18 */
19 19
20 20
21/* 21/**
22 * DOC: RF Buffer registers
23 *
22 * There are some special registers on the RF chip 24 * There are some special registers on the RF chip
23 * that control various operation settings related mostly to 25 * that control various operation settings related mostly to
24 * the analog parts (channel, gain adjustment etc). 26 * the analog parts (channel, gain adjustment etc).
@@ -44,40 +46,63 @@
44 */ 46 */
45 47
46 48
47/* 49/**
50 * struct ath5k_ini_rfbuffer - Initial RF Buffer settings
51 * @rfb_bank: RF Bank number
52 * @rfb_ctrl_register: RF Buffer control register
53 * @rfb_mode_data: RF Buffer data for each mode
54 *
48 * Struct to hold default mode specific RF 55 * Struct to hold default mode specific RF
49 * register values (RF Banks) 56 * register values (RF Banks) for each chip.
50 */ 57 */
51struct ath5k_ini_rfbuffer { 58struct ath5k_ini_rfbuffer {
52 u8 rfb_bank; /* RF Bank number */ 59 u8 rfb_bank;
53 u16 rfb_ctrl_register; /* RF Buffer control register */ 60 u16 rfb_ctrl_register;
54 u32 rfb_mode_data[3]; /* RF Buffer data for each mode */ 61 u32 rfb_mode_data[3];
55}; 62};
56 63
57/* 64/**
65 * struct ath5k_rfb_field - An RF Buffer field (register/value)
66 * @len: Field length
67 * @pos: Offset on the raw packet
68 * @col: Used for shifting
69 *
58 * Struct to hold RF Buffer field 70 * Struct to hold RF Buffer field
59 * infos used to access certain RF 71 * infos used to access certain RF
60 * analog registers 72 * analog registers
61 */ 73 */
62struct ath5k_rfb_field { 74struct ath5k_rfb_field {
63 u8 len; /* Field length */ 75 u8 len;
64 u16 pos; /* Offset on the raw packet */ 76 u16 pos;
65 u8 col; /* Column -used for shifting */ 77 u8 col;
66}; 78};
67 79
68/* 80/**
69 * RF analog register definition 81 * struct ath5k_rf_reg - RF analog register definition
82 * @bank: RF Buffer Bank number
83 * @index: Register's index on ath5k_rf_regx_idx
84 * @field: The &struct ath5k_rfb_field
85 *
86 * We use this struct to define the set of RF registers
87 * on each chip that we want to tweak. Some RF registers
88 * are common between different chip versions so this saves
89 * us space and complexity because we can refer to an rf
90 * register by it's index no matter what chip we work with
91 * as long as it has that register.
70 */ 92 */
71struct ath5k_rf_reg { 93struct ath5k_rf_reg {
72 u8 bank; /* RF Buffer Bank number */ 94 u8 bank;
73 u8 index; /* Register's index on rf_regs_idx */ 95 u8 index;
74 struct ath5k_rfb_field field; /* RF Buffer field for this register */ 96 struct ath5k_rfb_field field;
75}; 97};
76 98
77/* Map RF registers to indexes 99/**
100 * enum ath5k_rf_regs_idx - Map RF registers to indexes
101 *
78 * We do this to handle common bits and make our 102 * We do this to handle common bits and make our
79 * life easier by using an index for each register 103 * life easier by using an index for each register
80 * instead of a full rfb_field */ 104 * instead of a full rfb_field
105 */
81enum ath5k_rf_regs_idx { 106enum ath5k_rf_regs_idx {
82 /* BANK 2 */ 107 /* BANK 2 */
83 AR5K_RF_TURBO = 0, 108 AR5K_RF_TURBO = 0,