183553d3ccb64286165474ef82e553be2ee0d0c2
[openwrt.git] / package / mac80211 / patches / 568-ath9k_fix_stale_pointer.patch
1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -312,6 +312,7 @@ static struct ath_buf *ath_tx_get_buffer
4         }
5  
6         bf = list_first_entry(&sc->tx.txbuf, struct ath_buf, list);
7 +       bf->bf_next = NULL;
8         list_del(&bf->list);
9  
10         spin_unlock_bh(&sc->tx.txbuflock);
11 @@ -1778,6 +1779,7 @@ static void ath_tx_send_normal(struct at
12         list_add_tail(&bf->list, &bf_head);
13         bf->bf_state.bf_type = 0;
14  
15 +       bf->bf_next = NULL;
16         bf->bf_lastbf = bf;
17         ath_tx_fill_desc(sc, bf, txq, fi->framelen);
18         ath_tx_txqaddbuf(sc, txq, &bf_head, false);