diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2007-10-13 10:26:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:02:49 -0500 |
commit | ebcf26dae9f10e247ea41ef66f89b336ba456097 (patch) | |
tree | 27913a0d00a754d37702ec29a979c3ce5d358524 /drivers/net/wireless/rt2x00/rt2500pci.c | |
parent | 191df5737e3047de8b7d8ea4e17df241cf8eefca (diff) |
[PATCH] rt2x00: Move quality statistics into seperate structure
Move all link quality statistics variables into
the link_qual structure. This cleans up the link
structure and allows us to use it for more then
just statistics.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 702321c30164..e66a9429fd48 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -587,7 +587,8 @@ static void rt2500pci_disable_led(struct rt2x00_dev *rt2x00dev) | |||
587 | /* | 587 | /* |
588 | * Link tuning | 588 | * Link tuning |
589 | */ | 589 | */ |
590 | static void rt2500pci_link_stats(struct rt2x00_dev *rt2x00dev) | 590 | static void rt2500pci_link_stats(struct rt2x00_dev *rt2x00dev, |
591 | struct link_qual *qual) | ||
591 | { | 592 | { |
592 | u32 reg; | 593 | u32 reg; |
593 | 594 | ||
@@ -595,13 +596,13 @@ static void rt2500pci_link_stats(struct rt2x00_dev *rt2x00dev) | |||
595 | * Update FCS error count from register. | 596 | * Update FCS error count from register. |
596 | */ | 597 | */ |
597 | rt2x00pci_register_read(rt2x00dev, CNT0, ®); | 598 | rt2x00pci_register_read(rt2x00dev, CNT0, ®); |
598 | rt2x00dev->link.rx_failed = rt2x00_get_field32(reg, CNT0_FCS_ERROR); | 599 | qual->rx_failed = rt2x00_get_field32(reg, CNT0_FCS_ERROR); |
599 | 600 | ||
600 | /* | 601 | /* |
601 | * Update False CCA count from register. | 602 | * Update False CCA count from register. |
602 | */ | 603 | */ |
603 | rt2x00pci_register_read(rt2x00dev, CNT3, ®); | 604 | rt2x00pci_register_read(rt2x00dev, CNT3, ®); |
604 | rt2x00dev->link.false_cca = rt2x00_get_field32(reg, CNT3_FALSE_CCA); | 605 | qual->false_cca = rt2x00_get_field32(reg, CNT3_FALSE_CCA); |
605 | } | 606 | } |
606 | 607 | ||
607 | static void rt2500pci_reset_tuner(struct rt2x00_dev *rt2x00dev) | 608 | static void rt2500pci_reset_tuner(struct rt2x00_dev *rt2x00dev) |
@@ -679,10 +680,10 @@ dynamic_cca_tune: | |||
679 | * R17 is inside the dynamic tuning range, | 680 | * R17 is inside the dynamic tuning range, |
680 | * start tuning the link based on the false cca counter. | 681 | * start tuning the link based on the false cca counter. |
681 | */ | 682 | */ |
682 | if (rt2x00dev->link.false_cca > 512 && r17 < 0x40) { | 683 | if (rt2x00dev->link.qual.false_cca > 512 && r17 < 0x40) { |
683 | rt2500pci_bbp_write(rt2x00dev, 17, ++r17); | 684 | rt2500pci_bbp_write(rt2x00dev, 17, ++r17); |
684 | rt2x00dev->link.vgc_level = r17; | 685 | rt2x00dev->link.vgc_level = r17; |
685 | } else if (rt2x00dev->link.false_cca < 100 && r17 > 0x32) { | 686 | } else if (rt2x00dev->link.qual.false_cca < 100 && r17 > 0x32) { |
686 | rt2500pci_bbp_write(rt2x00dev, 17, --r17); | 687 | rt2500pci_bbp_write(rt2x00dev, 17, --r17); |
687 | rt2x00dev->link.vgc_level = r17; | 688 | rt2x00dev->link.vgc_level = r17; |
688 | } | 689 | } |