From 9b029964bb2a49635e74ee4c780cf11b8c91c9f9 Mon Sep 17 00:00:00 2001 From: Roland Vossen Date: Wed, 29 Jun 2011 16:46:47 -0700 Subject: [PATCH] --- yaml --- r: 259755 b: refs/heads/master c: 94daaf708bf9d9e642a142b64852f8e60154a890 h: refs/heads/master i: 259753: 84a4e01799141cbe174ed0ebab30601452bd880f 259751: 85d80f3a1c1e6e254e3810ffbcc86c715058094b v: v3 --- [refs] | 2 +- .../drivers/staging/brcm80211/brcmsmac/main.c | 30 ++++++++++++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 2f15ea1a9e44..1c43f665aaca 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b15c75830d235fce61d0ee8e326e758cd50e7af4 +refs/heads/master: 94daaf708bf9d9e642a142b64852f8e60154a890 diff --git a/trunk/drivers/staging/brcm80211/brcmsmac/main.c b/trunk/drivers/staging/brcm80211/brcmsmac/main.c index f7ebaf18d044..3063ba599921 100644 --- a/trunk/drivers/staging/brcm80211/brcmsmac/main.c +++ b/trunk/drivers/staging/brcm80211/brcmsmac/main.c @@ -4370,8 +4370,18 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, tx_status_t *txs, u32 frm_tx2) if (!lastframe) { wiphy_err(wlc->wiphy, "Not last frame!\n"); } 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) { sfbl = WLC_WME_RETRY_SFB_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; - /* FIXME: this should use a combination of sfbl, lfbl depending on frame length and RTS setting */ - if ((tx_frame_count > sfbl) && (txrate[1].idx >= 0)) { + if (txrate[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) + 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 */ - txrate->count = lfbl; - txrate[1].count = tx_frame_count - lfbl; + txrate[0].count = fbl; + txrate[1].count = tx_frame_count - fbl; } else { /* 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 */ txrate[1].idx = -1; txrate[1].count = 0;