Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224603
b: refs/heads/master
c: 82259b7
h: refs/heads/master
i:
  224601: 7e0e999
  224599: a1c96bd
v: v3
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Nov 17, 2010
1 parent 269b475 commit 0f70933
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 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: 952cd693718d8ac796d5323fe7876241cf15ecfa
refs/heads/master: 82259b77f6e55c5b81f5f4a2852f6216c196ef30
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ struct ath_buf_state {
int bfs_retries;
u8 bf_type;
u8 bfs_paprd;
unsigned long bfs_paprd_timestamp;
u32 bfs_keyix;
enum ath9k_internal_frame_type bfs_ftype;
};
Expand Down Expand Up @@ -598,6 +597,7 @@ struct ath_softc {
struct work_struct paprd_work;
struct work_struct hw_check_work;
struct completion paprd_complete;
bool paprd_pending;

u32 intrstatus;
u32 sc_flags; /* SC_OP_* */
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,15 @@ void ath_paprd_calibrate(struct work_struct *work)
}

init_completion(&sc->paprd_complete);
sc->paprd_pending = true;
ar9003_paprd_setup_gain_table(ah, chain);
txctl.paprd = BIT(chain);
if (ath_tx_start(hw, skb, &txctl) != 0)
break;

time_left = wait_for_completion_timeout(&sc->paprd_complete,
msecs_to_jiffies(ATH_PAPRD_TIMEOUT));
sc->paprd_pending = false;
if (!time_left) {
ath_print(ath9k_hw_common(ah), ATH_DBG_CALIBRATE,
"Timeout waiting for paprd training on "
Expand Down
7 changes: 1 addition & 6 deletions trunk/drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1698,9 +1698,6 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
if (bf->bf_state.bfs_paprd)
ar9003_hw_set_paprd_txdesc(ah, ds, bf->bf_state.bfs_paprd);

if (txctl->paprd)
bf->bf_state.bfs_paprd_timestamp = jiffies;

ath_tx_send_normal(sc, txctl->txq, NULL, &bf_head);
}

Expand Down Expand Up @@ -1874,9 +1871,7 @@ static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
bf->bf_buf_addr = 0;

if (bf->bf_state.bfs_paprd) {
if (time_after(jiffies,
bf->bf_state.bfs_paprd_timestamp +
msecs_to_jiffies(ATH_PAPRD_TIMEOUT)))
if (!sc->paprd_pending)
dev_kfree_skb_any(skb);
else
complete(&sc->paprd_complete);
Expand Down

0 comments on commit 0f70933

Please sign in to comment.