staging: brcm80211: corrected tx status feedback for non AMPDU packets
Code still contained a 'FIXME' label that said tx status feedback (consumed by the rate control algorithm) was not yet taking RTS/CTS into account. Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
b15c75830d
commit
94daaf708b
|
@ -4370,8 +4370,18 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, tx_status_t *txs, u32 frm_tx2)
|
||||||
if (!lastframe) {
|
if (!lastframe) {
|
||||||
wiphy_err(wlc->wiphy, "Not last frame!\n");
|
wiphy_err(wlc->wiphy, "Not last frame!\n");
|
||||||
} else {
|
} else {
|
||||||
u16 sfbl, lfbl;
|
/*
|
||||||
ieee80211_tx_info_clear_status(tx_info);
|
* Set information to be consumed by Minstrel ht.
|
||||||
|
*
|
||||||
|
* The "fallback limit" is the number of tx attempts a given
|
||||||
|
* MPDU is sent at the "primary" rate. Tx attempts beyond that
|
||||||
|
* limit are sent at the "secondary" rate.
|
||||||
|
* A 'short frame' does not exceed RTS treshold.
|
||||||
|
*/
|
||||||
|
u16 sfbl, /* Short Frame Rate Fallback Limit */
|
||||||
|
lfbl, /* Long Frame Rate Fallback Limit */
|
||||||
|
fbl;
|
||||||
|
|
||||||
if (queue < AC_COUNT) {
|
if (queue < AC_COUNT) {
|
||||||
sfbl = WLC_WME_RETRY_SFB_GET(wlc, wme_fifo2ac[queue]);
|
sfbl = WLC_WME_RETRY_SFB_GET(wlc, wme_fifo2ac[queue]);
|
||||||
lfbl = WLC_WME_RETRY_LFB_GET(wlc, wme_fifo2ac[queue]);
|
lfbl = WLC_WME_RETRY_LFB_GET(wlc, wme_fifo2ac[queue]);
|
||||||
|
@ -4381,14 +4391,20 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, tx_status_t *txs, u32 frm_tx2)
|
||||||
}
|
}
|
||||||
|
|
||||||
txrate = tx_info->status.rates;
|
txrate = tx_info->status.rates;
|
||||||
/* FIXME: this should use a combination of sfbl, lfbl depending on frame length and RTS setting */
|
if (txrate[0].flags & IEEE80211_TX_RC_USE_RTS_CTS)
|
||||||
if ((tx_frame_count > sfbl) && (txrate[1].idx >= 0)) {
|
fbl = lfbl;
|
||||||
|
else
|
||||||
|
fbl = sfbl;
|
||||||
|
|
||||||
|
ieee80211_tx_info_clear_status(tx_info);
|
||||||
|
|
||||||
|
if ((tx_frame_count > fbl) && (txrate[1].idx >= 0)) {
|
||||||
/* rate selection requested a fallback rate and we used it */
|
/* rate selection requested a fallback rate and we used it */
|
||||||
txrate->count = lfbl;
|
txrate[0].count = fbl;
|
||||||
txrate[1].count = tx_frame_count - lfbl;
|
txrate[1].count = tx_frame_count - fbl;
|
||||||
} else {
|
} else {
|
||||||
/* rate selection did not request fallback rate, or we didn't need it */
|
/* rate selection did not request fallback rate, or we didn't need it */
|
||||||
txrate->count = tx_frame_count;
|
txrate[0].count = tx_frame_count;
|
||||||
/* rc80211_minstrel.c:minstrel_tx_status() expects unused rates to be marked with idx = -1 */
|
/* rc80211_minstrel.c:minstrel_tx_status() expects unused rates to be marked with idx = -1 */
|
||||||
txrate[1].idx = -1;
|
txrate[1].idx = -1;
|
||||||
txrate[1].count = 0;
|
txrate[1].count = 0;
|
||||||
|
|
Loading…
Reference in New Issue