@@ -141,8 +141,8 @@ static struct ath_frame_info *get_frame_info(struct sk_buff *skb)
141141{
142142 struct ieee80211_tx_info * tx_info = IEEE80211_SKB_CB (skb );
143143 BUILD_BUG_ON (sizeof (struct ath_frame_info ) >
144- sizeof (tx_info -> rate_driver_data ));
145- return (struct ath_frame_info * ) & tx_info -> rate_driver_data [0 ];
144+ sizeof (tx_info -> status . status_driver_data ));
145+ return (struct ath_frame_info * ) & tx_info -> status . status_driver_data [0 ];
146146}
147147
148148static void ath_send_bar (struct ath_atx_tid * tid , u16 seqno )
@@ -2542,6 +2542,16 @@ static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
25422542 spin_unlock_irqrestore (& sc -> tx .txbuflock , flags );
25432543}
25442544
2545+ static void ath_clear_tx_status (struct ieee80211_tx_info * tx_info )
2546+ {
2547+ void * ptr = & tx_info -> status ;
2548+
2549+ memset (ptr + sizeof (tx_info -> status .rates ), 0 ,
2550+ sizeof (tx_info -> status ) -
2551+ sizeof (tx_info -> status .rates ) -
2552+ sizeof (tx_info -> status .status_driver_data ));
2553+ }
2554+
25452555static void ath_tx_rc_status (struct ath_softc * sc , struct ath_buf * bf ,
25462556 struct ath_tx_status * ts , int nframes , int nbad ,
25472557 int txok )
@@ -2553,6 +2563,8 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
25532563 struct ath_hw * ah = sc -> sc_ah ;
25542564 u8 i , tx_rateindex ;
25552565
2566+ ath_clear_tx_status (tx_info );
2567+
25562568 if (txok )
25572569 tx_info -> status .ack_signal = ts -> ts_rssi ;
25582570
@@ -2567,6 +2579,13 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
25672579 tx_info -> status .ampdu_len = nframes ;
25682580 tx_info -> status .ampdu_ack_len = nframes - nbad ;
25692581
2582+ tx_info -> status .rates [tx_rateindex ].count = ts -> ts_longretry + 1 ;
2583+
2584+ for (i = tx_rateindex + 1 ; i < hw -> max_rates ; i ++ ) {
2585+ tx_info -> status .rates [i ].count = 0 ;
2586+ tx_info -> status .rates [i ].idx = -1 ;
2587+ }
2588+
25702589 if ((ts -> ts_status & ATH9K_TXERR_FILT ) == 0 &&
25712590 (tx_info -> flags & IEEE80211_TX_CTL_NO_ACK ) == 0 ) {
25722591 /*
@@ -2588,16 +2607,6 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
25882607 tx_info -> status .rates [tx_rateindex ].count =
25892608 hw -> max_rate_tries ;
25902609 }
2591-
2592- for (i = tx_rateindex + 1 ; i < hw -> max_rates ; i ++ ) {
2593- tx_info -> status .rates [i ].count = 0 ;
2594- tx_info -> status .rates [i ].idx = -1 ;
2595- }
2596-
2597- tx_info -> status .rates [tx_rateindex ].count = ts -> ts_longretry + 1 ;
2598-
2599- /* we report airtime in ath_tx_count_airtime(), don't report twice */
2600- tx_info -> status .tx_time = 0 ;
26012610}
26022611
26032612static void ath_tx_processq (struct ath_softc * sc , struct ath_txq * txq )
0 commit comments