Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203291
b: refs/heads/master
c: ca369eb
h: refs/heads/master
i:
  203289: d08c433
  203287: 1f3978a
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and John W. Linville committed Jun 24, 2010
1 parent a3d1ed0 commit e59d03e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 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: 75f64dd54a185150ebfc45e99351c890d4a2252f
refs/heads/master: ca369eb494e45a3e3b8960775f88125fe1fbb0f2
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ struct ath_buf_state {
int bfs_retries;
u8 bf_type;
u8 bfs_paprd;
unsigned long bfs_paprd_timestamp;
u32 bfs_keyix;
enum ath9k_key_type bfs_keytype;
};
Expand Down Expand Up @@ -425,6 +426,8 @@ int ath_beaconq_config(struct ath_softc *sc);
#define ATH_LONG_CALINTERVAL 30000 /* 30 seconds */
#define ATH_RESTART_CALINTERVAL 1200000 /* 20 minutes */

#define ATH_PAPRD_TIMEOUT 100 /* msecs */

void ath_paprd_calibrate(struct work_struct *work);
void ath_ani_calibrate(unsigned long data);

Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,13 @@ void ath_paprd_calibrate(struct work_struct *work)
break;

time_left = wait_for_completion_timeout(&sc->paprd_complete,
100);
msecs_to_jiffies(ATH_PAPRD_TIMEOUT));
if (!time_left) {
ath_print(ath9k_hw_common(ah), ATH_DBG_CALIBRATE,
"Timeout waiting for paprd training on "
"TX chain %d\n",
chain);
break;
goto fail_paprd;
}

if (!ar9003_paprd_is_done(ah))
Expand All @@ -334,6 +334,7 @@ void ath_paprd_calibrate(struct work_struct *work)
ath_paprd_activate(sc);
}

fail_paprd:
ath9k_ps_restore(sc);
}

Expand Down
12 changes: 10 additions & 2 deletions trunk/drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1644,6 +1644,8 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf,
}

bf->bf_state.bfs_paprd = txctl->paprd;
if (txctl->paprd)
bf->bf_state.bfs_paprd_timestamp = jiffies;
bf->bf_flags = setup_tx_flags(skb, use_ldpc);

bf->bf_keytype = get_hw_crypto_keytype(skb);
Expand Down Expand Up @@ -1944,8 +1946,14 @@ static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
dma_unmap_single(sc->dev, bf->bf_dmacontext, skb->len, DMA_TO_DEVICE);

if (bf->bf_state.bfs_paprd) {
sc->paprd_txok = txok;
complete(&sc->paprd_complete);
if (time_after(jiffies,
bf->bf_state.bfs_paprd_timestamp +
msecs_to_jiffies(ATH_PAPRD_TIMEOUT))) {
dev_kfree_skb_any(skb);
} else {
sc->paprd_txok = txok;
complete(&sc->paprd_complete);
}
} else {
ath_tx_complete(sc, skb, bf->aphy, tx_flags);
ath_debug_stat_tx(sc, txq, bf, ts);
Expand Down

0 comments on commit e59d03e

Please sign in to comment.