Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135076
b: refs/heads/master
c: 64abd80
h: refs/heads/master
v: v3
  • Loading branch information
Ivo van Doorn authored and John W. Linville committed Mar 5, 2009
1 parent 5e56e04 commit 197afcc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 14d2aac580993ac8faeac0d903207e316c0881c3
refs/heads/master: 64abd80330baba9d87df2b952a7eec5af5158470
20 changes: 15 additions & 5 deletions trunk/drivers/net/wireless/rt2x00/rt2x00link.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,6 @@ static void rt2x00link_precalculate_signal(struct rt2x00_dev *rt2x00dev)
PERCENTAGE(qual->rx_success, qual->rx_failed + qual->rx_success);
link->tx_percentage =
PERCENTAGE(qual->tx_success, qual->tx_failed + qual->tx_success);

qual->rx_success = 0;
qual->rx_failed = 0;
qual->tx_success = 0;
qual->tx_failed = 0;
}

int rt2x00link_calculate_signal(struct rt2x00_dev *rt2x00dev, int rssi)
Expand Down Expand Up @@ -392,6 +387,16 @@ void rt2x00link_reset_tuner(struct rt2x00_dev *rt2x00dev, bool antenna)
rt2x00link_antenna_reset(rt2x00dev);
}

void rt2x00link_reset_qual(struct rt2x00_dev *rt2x00dev)
{
struct link_qual *qual = &rt2x00dev->link.qual;

qual->rx_success = 0;
qual->rx_failed = 0;
qual->tx_success = 0;
qual->tx_failed = 0;
}

static void rt2x00link_tuner(struct work_struct *work)
{
struct rt2x00_dev *rt2x00dev =
Expand Down Expand Up @@ -447,6 +452,11 @@ static void rt2x00link_tuner(struct work_struct *work)
*/
rt2x00lib_antenna_diversity(rt2x00dev);

/*
* Reset the quality counters which recounted during each period.
*/
rt2x00link_reset_qual(rt2x00dev);

/*
* Increase tuner counter, and reschedule the next link tuner run.
*/
Expand Down

0 comments on commit 197afcc

Please sign in to comment.