diff options
Diffstat (limited to 'drivers/net/wireless/b43/phy_ht.h')
-rw-r--r-- | drivers/net/wireless/b43/phy_ht.h | 77 |
1 files changed, 71 insertions, 6 deletions
diff --git a/drivers/net/wireless/b43/phy_ht.h b/drivers/net/wireless/b43/phy_ht.h index 6544c4293b34..9b2408efb224 100644 --- a/drivers/net/wireless/b43/phy_ht.h +++ b/drivers/net/wireless/b43/phy_ht.h | |||
@@ -12,18 +12,60 @@ | |||
12 | #define B43_PHY_HT_TABLE_ADDR 0x072 /* Table address */ | 12 | #define B43_PHY_HT_TABLE_ADDR 0x072 /* Table address */ |
13 | #define B43_PHY_HT_TABLE_DATALO 0x073 /* Table data low */ | 13 | #define B43_PHY_HT_TABLE_DATALO 0x073 /* Table data low */ |
14 | #define B43_PHY_HT_TABLE_DATAHI 0x074 /* Table data high */ | 14 | #define B43_PHY_HT_TABLE_DATAHI 0x074 /* Table data high */ |
15 | #define B43_PHY_HT_CLASS_CTL 0x0B0 /* Classifier control */ | ||
16 | #define B43_PHY_HT_CLASS_CTL_CCK_EN 0x0001 /* CCK enable */ | ||
17 | #define B43_PHY_HT_CLASS_CTL_OFDM_EN 0x0002 /* OFDM enable */ | ||
18 | #define B43_PHY_HT_CLASS_CTL_WAITED_EN 0x0004 /* Waited enable */ | ||
19 | #define B43_PHY_HT_IQLOCAL_CMDGCTL 0x0C2 /* I/Q LO cal command G control */ | ||
20 | #define B43_PHY_HT_SAMP_CMD 0x0C3 /* Sample command */ | ||
21 | #define B43_PHY_HT_SAMP_CMD_STOP 0x0002 /* Stop */ | ||
22 | #define B43_PHY_HT_SAMP_LOOP_CNT 0x0C4 /* Sample loop count */ | ||
23 | #define B43_PHY_HT_SAMP_WAIT_CNT 0x0C5 /* Sample wait count */ | ||
24 | #define B43_PHY_HT_SAMP_DEP_CNT 0x0C6 /* Sample depth count */ | ||
25 | #define B43_PHY_HT_SAMP_STAT 0x0C7 /* Sample status */ | ||
26 | #define B43_PHY_HT_TSSIMODE 0x122 /* TSSI mode */ | ||
27 | #define B43_PHY_HT_TSSIMODE_EN 0x0001 /* TSSI enable */ | ||
28 | #define B43_PHY_HT_TSSIMODE_PDEN 0x0002 /* Power det enable */ | ||
15 | #define B43_PHY_HT_BW1 0x1CE | 29 | #define B43_PHY_HT_BW1 0x1CE |
16 | #define B43_PHY_HT_BW2 0x1CF | 30 | #define B43_PHY_HT_BW2 0x1CF |
17 | #define B43_PHY_HT_BW3 0x1D0 | 31 | #define B43_PHY_HT_BW3 0x1D0 |
18 | #define B43_PHY_HT_BW4 0x1D1 | 32 | #define B43_PHY_HT_BW4 0x1D1 |
19 | #define B43_PHY_HT_BW5 0x1D2 | 33 | #define B43_PHY_HT_BW5 0x1D2 |
20 | #define B43_PHY_HT_BW6 0x1D3 | 34 | #define B43_PHY_HT_BW6 0x1D3 |
35 | #define B43_PHY_HT_TXPCTL_CMD_C1 0x1E7 /* TX power control command */ | ||
36 | #define B43_PHY_HT_TXPCTL_CMD_C1_INIT 0x007F /* Init */ | ||
37 | #define B43_PHY_HT_TXPCTL_CMD_C1_COEFF 0x2000 /* Power control coefficients */ | ||
38 | #define B43_PHY_HT_TXPCTL_CMD_C1_HWPCTLEN 0x4000 /* Hardware TX power control enable */ | ||
39 | #define B43_PHY_HT_TXPCTL_CMD_C1_PCTLEN 0x8000 /* TX power control enable */ | ||
40 | #define B43_PHY_HT_TXPCTL_N 0x1E8 /* TX power control N num */ | ||
41 | #define B43_PHY_HT_TXPCTL_N_TSSID 0x00FF /* N TSSI delay */ | ||
42 | #define B43_PHY_HT_TXPCTL_N_TSSID_SHIFT 0 | ||
43 | #define B43_PHY_HT_TXPCTL_N_NPTIL2 0x0700 /* N PT integer log2 */ | ||
44 | #define B43_PHY_HT_TXPCTL_N_NPTIL2_SHIFT 8 | ||
45 | #define B43_PHY_HT_TXPCTL_IDLE_TSSI 0x1E9 /* TX power control idle TSSI */ | ||
46 | #define B43_PHY_HT_TXPCTL_IDLE_TSSI_C1 0x003F | ||
47 | #define B43_PHY_HT_TXPCTL_IDLE_TSSI_C1_SHIFT 0 | ||
48 | #define B43_PHY_HT_TXPCTL_IDLE_TSSI_C2 0x3F00 | ||
49 | #define B43_PHY_HT_TXPCTL_IDLE_TSSI_C2_SHIFT 8 | ||
50 | #define B43_PHY_HT_TXPCTL_IDLE_TSSI_BINF 0x8000 /* Raw TSSI offset bin format */ | ||
51 | #define B43_PHY_HT_TXPCTL_TARG_PWR 0x1EA /* TX power control target power */ | ||
52 | #define B43_PHY_HT_TXPCTL_TARG_PWR_C1 0x00FF /* Power 0 */ | ||
53 | #define B43_PHY_HT_TXPCTL_TARG_PWR_C1_SHIFT 0 | ||
54 | #define B43_PHY_HT_TXPCTL_TARG_PWR_C2 0xFF00 /* Power 1 */ | ||
55 | #define B43_PHY_HT_TXPCTL_TARG_PWR_C2_SHIFT 8 | ||
56 | #define B43_PHY_HT_TXPCTL_CMD_C2 0x222 | ||
57 | #define B43_PHY_HT_TXPCTL_CMD_C2_INIT 0x007F | ||
58 | #define B43_PHY_HT_RSSI_C1 0x219 | ||
59 | #define B43_PHY_HT_RSSI_C2 0x21A | ||
60 | #define B43_PHY_HT_RSSI_C3 0x21B | ||
21 | 61 | ||
22 | #define B43_PHY_HT_C1_CLIP1THRES B43_PHY_OFDM(0x00E) | 62 | #define B43_PHY_HT_C1_CLIP1THRES B43_PHY_OFDM(0x00E) |
23 | #define B43_PHY_HT_C2_CLIP1THRES B43_PHY_OFDM(0x04E) | 63 | #define B43_PHY_HT_C2_CLIP1THRES B43_PHY_OFDM(0x04E) |
24 | #define B43_PHY_HT_C3_CLIP1THRES B43_PHY_OFDM(0x08E) | 64 | #define B43_PHY_HT_C3_CLIP1THRES B43_PHY_OFDM(0x08E) |
25 | 65 | ||
26 | #define B43_PHY_HT_RF_SEQ_MODE B43_PHY_EXTG(0x000) | 66 | #define B43_PHY_HT_RF_SEQ_MODE B43_PHY_EXTG(0x000) |
67 | #define B43_PHY_HT_RF_SEQ_MODE_CA_OVER 0x0001 /* Core active override */ | ||
68 | #define B43_PHY_HT_RF_SEQ_MODE_TR_OVER 0x0002 /* Trigger override */ | ||
27 | #define B43_PHY_HT_RF_SEQ_TRIG B43_PHY_EXTG(0x003) | 69 | #define B43_PHY_HT_RF_SEQ_TRIG B43_PHY_EXTG(0x003) |
28 | #define B43_PHY_HT_RF_SEQ_TRIG_RX2TX 0x0001 /* RX2TX */ | 70 | #define B43_PHY_HT_RF_SEQ_TRIG_RX2TX 0x0001 /* RX2TX */ |
29 | #define B43_PHY_HT_RF_SEQ_TRIG_TX2RX 0x0002 /* TX2RX */ | 71 | #define B43_PHY_HT_RF_SEQ_TRIG_TX2RX 0x0002 /* TX2RX */ |
@@ -36,12 +78,27 @@ | |||
36 | 78 | ||
37 | #define B43_PHY_HT_RF_CTL1 B43_PHY_EXTG(0x010) | 79 | #define B43_PHY_HT_RF_CTL1 B43_PHY_EXTG(0x010) |
38 | 80 | ||
39 | #define B43_PHY_HT_AFE_CTL1 B43_PHY_EXTG(0x110) | 81 | #define B43_PHY_HT_RF_CTL_INT_C1 B43_PHY_EXTG(0x04c) |
40 | #define B43_PHY_HT_AFE_CTL2 B43_PHY_EXTG(0x111) | 82 | #define B43_PHY_HT_RF_CTL_INT_C2 B43_PHY_EXTG(0x06c) |
41 | #define B43_PHY_HT_AFE_CTL3 B43_PHY_EXTG(0x114) | 83 | #define B43_PHY_HT_RF_CTL_INT_C3 B43_PHY_EXTG(0x08c) |
42 | #define B43_PHY_HT_AFE_CTL4 B43_PHY_EXTG(0x115) | 84 | |
43 | #define B43_PHY_HT_AFE_CTL5 B43_PHY_EXTG(0x118) | 85 | #define B43_PHY_HT_AFE_C1_OVER B43_PHY_EXTG(0x110) |
44 | #define B43_PHY_HT_AFE_CTL6 B43_PHY_EXTG(0x119) | 86 | #define B43_PHY_HT_AFE_C1 B43_PHY_EXTG(0x111) |
87 | #define B43_PHY_HT_AFE_C2_OVER B43_PHY_EXTG(0x114) | ||
88 | #define B43_PHY_HT_AFE_C2 B43_PHY_EXTG(0x115) | ||
89 | #define B43_PHY_HT_AFE_C3_OVER B43_PHY_EXTG(0x118) | ||
90 | #define B43_PHY_HT_AFE_C3 B43_PHY_EXTG(0x119) | ||
91 | |||
92 | #define B43_PHY_HT_TXPCTL_CMD_C3 B43_PHY_EXTG(0x164) | ||
93 | #define B43_PHY_HT_TXPCTL_CMD_C3_INIT 0x007F | ||
94 | #define B43_PHY_HT_TXPCTL_IDLE_TSSI2 B43_PHY_EXTG(0x165) /* TX power control idle TSSI */ | ||
95 | #define B43_PHY_HT_TXPCTL_IDLE_TSSI2_C3 0x003F | ||
96 | #define B43_PHY_HT_TXPCTL_IDLE_TSSI2_C3_SHIFT 0 | ||
97 | #define B43_PHY_HT_TXPCTL_TARG_PWR2 B43_PHY_EXTG(0x166) /* TX power control target power */ | ||
98 | #define B43_PHY_HT_TXPCTL_TARG_PWR2_C3 0x00FF | ||
99 | #define B43_PHY_HT_TXPCTL_TARG_PWR2_C3_SHIFT 0 | ||
100 | |||
101 | #define B43_PHY_HT_TEST B43_PHY_N_BMODE(0x00A) | ||
45 | 102 | ||
46 | 103 | ||
47 | /* Values for PHY registers used on channel switching */ | 104 | /* Values for PHY registers used on channel switching */ |
@@ -56,6 +113,14 @@ struct b43_phy_ht_channeltab_e_phy { | |||
56 | 113 | ||
57 | 114 | ||
58 | struct b43_phy_ht { | 115 | struct b43_phy_ht { |
116 | u16 rf_ctl_int_save[3]; | ||
117 | |||
118 | bool tx_pwr_ctl; | ||
119 | u8 tx_pwr_idx[3]; | ||
120 | |||
121 | s32 bb_mult_save[3]; | ||
122 | |||
123 | u8 idle_tssi[3]; | ||
59 | }; | 124 | }; |
60 | 125 | ||
61 | 126 | ||