aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_g.h
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-08-28 13:33:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-29 16:24:13 -0400
commit18c8adeb0244f823ba78a51e23f813fe68bc3c54 (patch)
tree1b294669d04c207d8e90b5807780fe4eb81778d9 /drivers/net/wireless/b43/phy_g.h
parentef1a628d83fc0423c36e773281162be790503168 (diff)
b43: Rewrite TX power adjustment
This patch rewrites the TX power recalculation algorithms to scale better with changed enviromnent. If there's low TX traffic, the power will be checked against the desired values every 60 seconds. If there is high TX traffic, the check is redone every 2 seconds. This improves the reaction times a lot and confuses the rate control less. It will also reduce the time it initially takes to tune to a new TX power value. With the old algorithm it could take about 30 to 45 seconds to settle to a new power value. This will happen in about two to four seconds now. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_g.h')
-rw-r--r--drivers/net/wireless/b43/phy_g.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/net/wireless/b43/phy_g.h b/drivers/net/wireless/b43/phy_g.h
index 1f0daebd6eb6..7f95edea1c63 100644
--- a/drivers/net/wireless/b43/phy_g.h
+++ b/drivers/net/wireless/b43/phy_g.h
@@ -115,7 +115,6 @@ struct b43_txpower_lo_control;
115 115
116struct b43_phy_g { 116struct b43_phy_g {
117 bool initialised; 117 bool initialised;
118 bool dyn_tssi_tbl; /* tssi2dbm is kmalloc()ed. */
119 118
120 /* ACI (adjacent channel interference) flags. */ 119 /* ACI (adjacent channel interference) flags. */
121 bool aci_enable; 120 bool aci_enable;
@@ -135,12 +134,26 @@ struct b43_phy_g {
135 u16 minlowsig[2]; 134 u16 minlowsig[2];
136 u16 minlowsigpos[2]; 135 u16 minlowsigpos[2];
137 136
138 /* TSSI to dBm table in use */ 137 /* Pointer to the table used to convert a
138 * TSSI value to dBm-Q5.2 */
139 const s8 *tssi2dbm; 139 const s8 *tssi2dbm;
140 /* tssi2dbm is kmalloc()ed. Only used for free()ing. */
141 bool dyn_tssi_tbl;
140 /* Target idle TSSI */ 142 /* Target idle TSSI */
141 int tgt_idle_tssi; 143 int tgt_idle_tssi;
142 /* Current idle TSSI */ 144 /* Current idle TSSI */
143 int cur_idle_tssi; 145 int cur_idle_tssi;
146 /* The current average TSSI.
147 * Needs irq_lock, as it's updated in the IRQ path. */
148 u8 average_tssi;
149 /* Current TX power level attenuation control values */
150 struct b43_bbatt bbatt;
151 struct b43_rfatt rfatt;
152 u8 tx_control; /* B43_TXCTL_XXX */
153 /* The calculated attenuation deltas that are used later
154 * when adjusting the actual power output. */
155 int bbatt_delta;
156 int rfatt_delta;
144 157
145 /* LocalOscillator control values. */ 158 /* LocalOscillator control values. */
146 struct b43_txpower_lo_control *lo_control; 159 struct b43_txpower_lo_control *lo_control;
@@ -151,11 +164,6 @@ struct b43_phy_g {
151 s16 lna_gain; /* LNA */ 164 s16 lna_gain; /* LNA */
152 s16 pga_gain; /* PGA */ 165 s16 pga_gain; /* PGA */
153 166
154 /* Current TX power level attenuation control values */
155 struct b43_bbatt bbatt;
156 struct b43_rfatt rfatt;
157 u8 tx_control; /* B43_TXCTL_XXX */
158
159 /* Current Interference Mitigation mode */ 167 /* Current Interference Mitigation mode */
160 int interfmode; 168 int interfmode;
161 /* Stack of saved values from the Interference Mitigation code. 169 /* Stack of saved values from the Interference Mitigation code.