rt2x00: Fix vgc_level_reg handling
Currently vgc_level_reg and vgc_level are equal to eachother, while the purpose of vgc_level_reg is the value last written to the register and is remembered through link tuning resets. The vgc_level is the currently active level, which is reset during link tuning resets. The usage of these variables depends on the drivers, some drivers need both, while others need only one of the two. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
d8147f9d9e
commit
223dcc2659
3 changed files with 16 additions and 8 deletions
|
@ -586,9 +586,11 @@ static void rt2400pci_link_stats(struct rt2x00_dev *rt2x00dev,
|
|||
static inline void rt2400pci_set_vgc(struct rt2x00_dev *rt2x00dev,
|
||||
struct link_qual *qual, u8 vgc_level)
|
||||
{
|
||||
rt2400pci_bbp_write(rt2x00dev, 13, vgc_level);
|
||||
qual->vgc_level = vgc_level;
|
||||
qual->vgc_level_reg = vgc_level;
|
||||
if (qual->vgc_level_reg != vgc_level) {
|
||||
rt2400pci_bbp_write(rt2x00dev, 13, vgc_level);
|
||||
qual->vgc_level = vgc_level;
|
||||
qual->vgc_level_reg = vgc_level;
|
||||
}
|
||||
}
|
||||
|
||||
static void rt2400pci_reset_tuner(struct rt2x00_dev *rt2x00dev,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue