diff options
author | Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> | 2012-02-29 15:14:48 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:06:42 +0200 |
commit | 88b90e1122df39fc93de8d61bb89deb40cad3906 (patch) | |
tree | 6c620ad64154e0203202538e40fc43f72a4e674c | |
parent | bf884cb20fd7ce85b7a86365ad2d417d00b7af9c (diff) |
cw1200: fix initial rate settings for inverted ratesets.
Fault description:
1. Minstrel sets rate chain as 48-54-6.
2. It is not supported by device and driver converts
it to 54-48-6 and uploads the rate to firmware,
but (wrongly) takes the initial transmission rate as 48.
3. Devices confirms TX at second attempt (6), but driver
sends 48 to the rate control.
Fix gets initial rate after rate control rules are getting reordered.
ST-Ericsson ID: 355221
Change-Id: I335f4e8333520aa0d7f3b8259fffc58ca7e3137e
Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/38264
Reviewed-by: QABUILD
Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com>
Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com>
-rw-r--r-- | drivers/staging/cw1200/txrx.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/staging/cw1200/txrx.c b/drivers/staging/cw1200/txrx.c index db333afc444..f9065f474c6 100644 --- a/drivers/staging/cw1200/txrx.c +++ b/drivers/staging/cw1200/txrx.c @@ -645,6 +645,16 @@ cw1200_tx_h_rate_policy(struct cw1200_common *priv, { bool tx_policy_renew = false; + t->txpriv.rate_id = tx_policy_get(priv, + t->tx_info->control.rates, IEEE80211_TX_MAX_RATES, + &tx_policy_renew); + if (t->txpriv.rate_id == CW1200_INVALID_RATE_ID) + return -EFAULT; + + wsm->flags |= t->txpriv.rate_id << 4; + + t->rate = cw1200_get_tx_rate(priv, + &t->tx_info->control.rates[0]), wsm->maxTxRate = t->rate->hw_value; if (t->rate->flags & IEEE80211_TX_RC_MCS) { if (cw1200_ht_greenfield(&priv->ht_info)) @@ -655,13 +665,6 @@ cw1200_tx_h_rate_policy(struct cw1200_common *priv, __cpu_to_le32(WSM_HT_TX_MIXED); } - t->txpriv.rate_id = tx_policy_get(priv, - t->tx_info->control.rates, IEEE80211_TX_MAX_RATES, - &tx_policy_renew); - if (t->txpriv.rate_id == CW1200_INVALID_RATE_ID) - return -EFAULT; - wsm->flags |= t->txpriv.rate_id << 4; - if (tx_policy_renew) { tx_policy_printk(KERN_DEBUG "[TX] TX policy renew.\n"); /* It's not so optimal to stop TX queues every now and then. @@ -719,14 +722,12 @@ void cw1200_tx(struct ieee80211_hw *dev, struct sk_buff *skb) u8 flags = 0; int ret; - t.rate = cw1200_get_tx_rate(priv, - &t.tx_info->control.rates[0]), t.hdrlen = ieee80211_hdrlen(t.hdr->frame_control); t.da = ieee80211_get_DA(t.hdr); t.sta_priv = (struct cw1200_sta_priv *)&t.tx_info->control.sta->drv_priv; - if (WARN_ON(t.queue >= 4 || !t.rate)) + if (WARN_ON(t.queue >= 4)) goto drop; /* Temporary change*/ |