spinlock_t txbuflock;
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1288,6 +1288,10 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1341,6 +1341,10 @@ int ath9k_init_debug(struct ath_hw *ah)
sc, &fops_wiphy);
debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc,
&fops_xmit);
while (bf) {
txfail = txpending = sendbar = 0;
bf_next = bf->bf_next;
-@@ -789,6 +799,7 @@ static enum ATH_AGGR_STATUS ath_tx_form_
+@@ -799,6 +809,7 @@ static enum ATH_AGGR_STATUS ath_tx_form_
ath_tx_addto_baw(sc, tid, fi->seqno);
ath9k_hw_set11n_aggr_middle(sc->sc_ah, bf->bf_desc, ndelim);
__skb_unlink(skb, &tid->buf_q);
list_add_tail(&bf->list, bf_q);
if (bf_prev) {
-@@ -1441,6 +1452,8 @@ static void ath_tx_send_ampdu(struct ath
+@@ -1451,6 +1462,8 @@ static void ath_tx_send_ampdu(struct ath
if (!fi->retries)
ath_tx_addto_baw(sc, tid, fi->seqno);
/* Queue to h/w without aggregation */
TX_STAT_INC(txctl->txq->axq_qnum, a_queued_hw);
bf->bf_lastbf = bf;
-@@ -1505,7 +1518,6 @@ static void setup_frame_info(struct ieee
+@@ -1515,7 +1528,6 @@ static void setup_frame_info(struct ieee
struct ath_atx_tid *tid;
enum ath9k_key_type keytype;
u16 seqno = 0;
keytype = ath9k_cmn_get_hw_crypto_keytype(skb);
-@@ -1516,13 +1528,11 @@ static void setup_frame_info(struct ieee
+@@ -1526,13 +1538,11 @@ static void setup_frame_info(struct ieee
if (an && ieee80211_is_data_qos(hdr->frame_control) &&
conf_is_ht(&hw->conf) && (sc->sc_flags & SC_OP_TXAGGR)) {
seqno = tid->seq_next;
hdr->seq_ctrl = cpu_to_le16(seqno << IEEE80211_SEQ_SEQ_SHIFT);
INCR(tid->seq_next, IEEE80211_SEQ_MAX);
-@@ -1766,24 +1776,14 @@ static struct ath_buf *ath_tx_setup_buff
+@@ -1776,24 +1786,14 @@ static struct ath_buf *ath_tx_setup_buff
/* FIXME: tx power */
static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && tid) {
/*
-@@ -1823,6 +1823,7 @@ int ath_tx_start(struct ieee80211_hw *hw
+@@ -1833,6 +1833,7 @@ int ath_tx_start(struct ieee80211_hw *hw
struct ieee80211_vif *vif = info->control.vif;
struct ath_softc *sc = hw->priv;
struct ath_txq *txq = txctl->txq;
struct ath_buf *bf;
int padpos, padsize;
int frmlen = skb->len + FCS_LEN;
-@@ -1856,6 +1857,7 @@ int ath_tx_start(struct ieee80211_hw *hw
+@@ -1866,6 +1867,7 @@ int ath_tx_start(struct ieee80211_hw *hw
skb_push(skb, padsize);
memmove(skb->data, skb->data + padsize, padpos);
}
if ((vif && vif->type != NL80211_IFTYPE_AP &&
-@@ -1865,6 +1867,24 @@ int ath_tx_start(struct ieee80211_hw *hw
+@@ -1875,6 +1877,24 @@ int ath_tx_start(struct ieee80211_hw *hw
setup_frame_info(hw, skb, frmlen);
/*
* At this point, the vif, hw_key and sta pointers in the tx control
* info are no longer valid (overwritten by the ath_frame_info data.
-@@ -1883,7 +1903,7 @@ int ath_tx_start(struct ieee80211_hw *hw
+@@ -1893,7 +1913,7 @@ int ath_tx_start(struct ieee80211_hw *hw
}
spin_unlock_bh(&txq->axq_lock);