aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt61pci.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-10-13 10:26:12 -0400
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:02:49 -0500
commitebcf26dae9f10e247ea41ef66f89b336ba456097 (patch)
tree27913a0d00a754d37702ec29a979c3ce5d358524 /drivers/net/wireless/rt2x00/rt61pci.c
parent191df5737e3047de8b7d8ea4e17df241cf8eefca (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/rt61pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index ecae968ce09..f893825ce6d 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -792,7 +792,8 @@ static void rt61pci_activity_led(struct rt2x00_dev *rt2x00dev, int rssi)
792/* 792/*
793 * Link tuning 793 * Link tuning
794 */ 794 */
795static void rt61pci_link_stats(struct rt2x00_dev *rt2x00dev) 795static void rt61pci_link_stats(struct rt2x00_dev *rt2x00dev,
796 struct link_qual *qual)
796{ 797{
797 u32 reg; 798 u32 reg;
798 799
@@ -800,14 +801,13 @@ static void rt61pci_link_stats(struct rt2x00_dev *rt2x00dev)
800 * Update FCS error count from register. 801 * Update FCS error count from register.
801 */ 802 */
802 rt2x00pci_register_read(rt2x00dev, STA_CSR0, &reg); 803 rt2x00pci_register_read(rt2x00dev, STA_CSR0, &reg);
803 rt2x00dev->link.rx_failed = rt2x00_get_field32(reg, STA_CSR0_FCS_ERROR); 804 qual->rx_failed = rt2x00_get_field32(reg, STA_CSR0_FCS_ERROR);
804 805
805 /* 806 /*
806 * Update False CCA count from register. 807 * Update False CCA count from register.
807 */ 808 */
808 rt2x00pci_register_read(rt2x00dev, STA_CSR1, &reg); 809 rt2x00pci_register_read(rt2x00dev, STA_CSR1, &reg);
809 rt2x00dev->link.false_cca = 810 qual->false_cca = rt2x00_get_field32(reg, STA_CSR1_FALSE_CCA_ERROR);
810 rt2x00_get_field32(reg, STA_CSR1_FALSE_CCA_ERROR);
811} 811}
812 812
813static void rt61pci_reset_tuner(struct rt2x00_dev *rt2x00dev) 813static void rt61pci_reset_tuner(struct rt2x00_dev *rt2x00dev)
@@ -904,11 +904,11 @@ static void rt61pci_link_tuner(struct rt2x00_dev *rt2x00dev)
904 * r17 does not yet exceed upper limit, continue and base 904 * r17 does not yet exceed upper limit, continue and base
905 * the r17 tuning on the false CCA count. 905 * the r17 tuning on the false CCA count.
906 */ 906 */
907 if (rt2x00dev->link.false_cca > 512 && r17 < up_bound) { 907 if (rt2x00dev->link.qual.false_cca > 512 && r17 < up_bound) {
908 if (++r17 > up_bound) 908 if (++r17 > up_bound)
909 r17 = up_bound; 909 r17 = up_bound;
910 rt61pci_bbp_write(rt2x00dev, 17, r17); 910 rt61pci_bbp_write(rt2x00dev, 17, r17);
911 } else if (rt2x00dev->link.false_cca < 100 && r17 > low_bound) { 911 } else if (rt2x00dev->link.qual.false_cca < 100 && r17 > low_bound) {
912 if (--r17 < low_bound) 912 if (--r17 < low_bound)
913 r17 = low_bound; 913 r17 = low_bound;
914 rt61pci_bbp_write(rt2x00dev, 17, r17); 914 rt61pci_bbp_write(rt2x00dev, 17, r17);