|
|
@ -243,7 +243,7 @@ |
|
|
|
+ if ((ds->ds_txstat.ts_status & ATH9K_TXERR_XRETRY) ||
|
|
|
|
+ if ((ds->ds_txstat.ts_status & ATH9K_TXERR_XRETRY) ||
|
|
|
|
+ (ds->ds_txstat.ts_status & ATH9K_TXERR_FIFO))
|
|
|
|
+ (ds->ds_txstat.ts_status & ATH9K_TXERR_FIFO))
|
|
|
|
+ tx_info->driver_flags |= ATH_TX_INFO_XRETRY;
|
|
|
|
+ tx_info->driver_flags |= ATH_TX_INFO_XRETRY;
|
|
|
|
+ tx_info->ampdu_len = bf->bf_nframes;
|
|
|
|
+ tx_info->status.ampdu_len = bf->bf_nframes;
|
|
|
|
+ tx_info->status.ampdu_ack_len = bf->bf_nframes - nbad;
|
|
|
|
+ tx_info->status.ampdu_ack_len = bf->bf_nframes - nbad;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -293,7 +293,7 @@ |
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
last_per = ath_rc_priv->per[tx_rate];
|
|
|
|
last_per = ath_rc_priv->per[tx_rate];
|
|
|
|
+ n_bad_frames = tx_info->ampdu_len - tx_info->status.ampdu_ack_len;
|
|
|
|
+ n_bad_frames = tx_info->status.ampdu_len - tx_info->status.ampdu_ack_len;
|
|
|
|
|
|
|
|
|
|
|
|
if (xretries) {
|
|
|
|
if (xretries) {
|
|
|
|
if (xretries == 1) {
|
|
|
|
if (xretries == 1) {
|
|
|
@ -312,7 +312,7 @@ |
|
|
|
*/
|
|
|
|
*/
|
|
|
|
- if (tx_info_priv->n_frames > 0) {
|
|
|
|
- if (tx_info_priv->n_frames > 0) {
|
|
|
|
- int n_frames, n_bad_frames;
|
|
|
|
- int n_frames, n_bad_frames;
|
|
|
|
+ if (tx_info->ampdu_len > 0) {
|
|
|
|
+ if (tx_info->status.ampdu_len > 0) {
|
|
|
|
+ int n_frames, n_bad_tries;
|
|
|
|
+ int n_frames, n_bad_tries;
|
|
|
|
u8 cur_per, new_per;
|
|
|
|
u8 cur_per, new_per;
|
|
|
|
|
|
|
|
|
|
|
@ -320,9 +320,9 @@ |
|
|
|
- tx_info_priv->n_bad_frames;
|
|
|
|
- tx_info_priv->n_bad_frames;
|
|
|
|
- n_frames = tx_info_priv->n_frames * (retries + 1);
|
|
|
|
- n_frames = tx_info_priv->n_frames * (retries + 1);
|
|
|
|
- cur_per = (100 * n_bad_frames / n_frames) >> 3;
|
|
|
|
- cur_per = (100 * n_bad_frames / n_frames) >> 3;
|
|
|
|
+ n_bad_tries = retries * tx_info->ampdu_len +
|
|
|
|
+ n_bad_tries = retries * tx_info->status.ampdu_len +
|
|
|
|
+ n_bad_frames;
|
|
|
|
+ n_bad_frames;
|
|
|
|
+ n_frames = tx_info->ampdu_len * (retries + 1);
|
|
|
|
+ n_frames = tx_info->status.ampdu_len * (retries + 1);
|
|
|
|
+ cur_per = (100 * n_bad_tries / n_frames) >> 3;
|
|
|
|
+ cur_per = (100 * n_bad_tries / n_frames) >> 3;
|
|
|
|
new_per = (u8)(last_per - (last_per >> 3) + cur_per);
|
|
|
|
new_per = (u8)(last_per - (last_per >> 3) + cur_per);
|
|
|
|
ath_rc_priv->per[tx_rate] = new_per;
|
|
|
|
ath_rc_priv->per[tx_rate] = new_per;
|
|
|
@ -333,7 +333,7 @@ |
|
|
|
if (ath_rc_priv->probe_rate && ath_rc_priv->probe_rate == tx_rate) {
|
|
|
|
if (ath_rc_priv->probe_rate && ath_rc_priv->probe_rate == tx_rate) {
|
|
|
|
- if (retries > 0 || 2 * tx_info_priv->n_bad_frames >
|
|
|
|
- if (retries > 0 || 2 * tx_info_priv->n_bad_frames >
|
|
|
|
- tx_info_priv->n_frames) {
|
|
|
|
- tx_info_priv->n_frames) {
|
|
|
|
+ if (retries > 0 || 2 * n_bad_frames > tx_info->ampdu_len) {
|
|
|
|
+ if (retries > 0 || 2 * n_bad_frames > tx_info->status.ampdu_len) {
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Since we probed with just a single attempt,
|
|
|
|
* Since we probed with just a single attempt,
|
|
|
|
* any retries means the probe failed. Also,
|
|
|
|
* any retries means the probe failed. Also,
|
|
|
|