diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-12-20 04:54:22 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:58:34 -0500 |
commit | eb20b4e8a6998ca68d9ac0963ee36a1a36fe241d (patch) | |
tree | cf35161f1f7573f73b9e2da74fc562a77169e459 /drivers/net/wireless/rt2x00/rt2x00.h | |
parent | 84e3196ff867c623056eea02c11a45e046490d89 (diff) |
rt2x00: Reduce calls to bbp_read()
The link_tuner() function will always call bbp_read()
at the start of the function. Because this is an
indirect register access has some costs attached
to it (especially for USB hardware).
We already store the value read from the register
into the vgc_level value inside the link structure.
Instead of reading from the register we can read that
field directly and base the tuner on that value.
This reduces the time the registers are locked with
the csr_mutex and speeds up the link_tuner processing.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 19c068727a85..8935f2c005ce 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -286,9 +286,14 @@ struct link { | |||
286 | struct link_ant ant; | 286 | struct link_ant ant; |
287 | 287 | ||
288 | /* | 288 | /* |
289 | * Active VGC level | 289 | * Active VGC level (for false cca tuning) |
290 | */ | 290 | */ |
291 | int vgc_level; | 291 | u8 vgc_level; |
292 | |||
293 | /* | ||
294 | * VGC level as configured in register | ||
295 | */ | ||
296 | u8 vgc_level_reg; | ||
292 | 297 | ||
293 | /* | 298 | /* |
294 | * Work structure for scheduling periodic link tuning. | 299 | * Work structure for scheduling periodic link tuning. |