Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194107
b: refs/heads/master
c: e65e1d7
h: refs/heads/master
i:
  194105: f0ca647
  194103: 3074aa6
v: v3
  • Loading branch information
Bruno Randolf authored and John W. Linville committed Mar 31, 2010
1 parent 95686dd commit 95a5bbe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 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: 1063b176c072b936c43d0e6270168b19881ecb72
refs/heads/master: e65e1d7713da89d98f01c3f4267b2c9ecb03c16f
12 changes: 6 additions & 6 deletions trunk/drivers/net/wireless/ath/ath5k/ath5k.h
Original file line number Diff line number Diff line change
Expand Up @@ -890,10 +890,10 @@ enum ath5k_int {
AR5K_INT_NOCARD = 0xffffffff
};

/* Software interrupts used for calibration */
enum ath5k_software_interrupt {
AR5K_SWI_FULL_CALIBRATION = 0x01,
AR5K_SWI_SHORT_CALIBRATION = 0x02,
/* mask which calibration is active at the moment */
enum ath5k_calibration_mask {
AR5K_CALIBRATION_FULL = 0x01,
AR5K_CALIBRATION_SHORT = 0x02,
};

/*
Expand Down Expand Up @@ -1102,8 +1102,8 @@ struct ath5k_hw {
/* Calibration timestamp */
unsigned long ah_cal_tstamp;

/* Software interrupt mask */
u8 ah_swi_mask;
/* Calibration mask */
u8 ah_cal_mask;

/*
* Function pointers
Expand Down
11 changes: 3 additions & 8 deletions trunk/drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2507,7 +2507,7 @@ ath5k_init(struct ath5k_softc *sc)
sc->curband = &sc->sbands[sc->curchan->band];
sc->imask = AR5K_INT_RXOK | AR5K_INT_RXERR | AR5K_INT_RXEOL |
AR5K_INT_RXORN | AR5K_INT_TXDESC | AR5K_INT_TXEOL |
AR5K_INT_FATAL | AR5K_INT_GLOBAL | AR5K_INT_SWI;
AR5K_INT_FATAL | AR5K_INT_GLOBAL;
ret = ath5k_reset(sc, NULL);
if (ret)
goto done;
Expand Down Expand Up @@ -2673,9 +2673,6 @@ ath5k_intr(int irq, void *dev_id)
if (status & AR5K_INT_BMISS) {
/* TODO */
}
if (status & AR5K_INT_SWI) {
tasklet_schedule(&sc->calib);
}
if (status & AR5K_INT_MIB) {
/*
* These stats are also used for ANI i think
Expand Down Expand Up @@ -2716,8 +2713,7 @@ ath5k_tasklet_calibrate(unsigned long data)
struct ath5k_hw *ah = sc->ah;

/* Only full calibration for now */
if (ah->ah_swi_mask != AR5K_SWI_FULL_CALIBRATION)
return;
ah->ah_cal_mask |= AR5K_CALIBRATION_FULL;

/* Stop queues so that calibration
* doesn't interfere with tx */
Expand All @@ -2740,11 +2736,10 @@ ath5k_tasklet_calibrate(unsigned long data)
ieee80211_frequency_to_channel(
sc->curchan->center_freq));

ah->ah_swi_mask = 0;

/* Wake queues */
ieee80211_wake_queues(sc->hw);

ah->ah_cal_mask &= ~AR5K_CALIBRATION_FULL;
}


Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/wireless/ath/ath5k/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1119,8 +1119,7 @@ ath5k_hw_calibration_poll(struct ath5k_hw *ah)
* interrupt (bit gets auto-cleared) */
if (time_is_before_eq_jiffies(ah->ah_cal_tstamp + cal_intval)) {
ah->ah_cal_tstamp = jiffies;
ah->ah_swi_mask = AR5K_SWI_FULL_CALIBRATION;
AR5K_REG_ENABLE_BITS(ah, AR5K_CR, AR5K_CR_SWI);
tasklet_schedule(&ah->ah_sc->calib);
}
}

Expand Down

0 comments on commit 95a5bbe

Please sign in to comment.