Linux wireless drivers development
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	johannes@sipsolutions.net, mickflemm@gmail.com,
	mcgrof@qca.qualcomm.com, rmanohar@qca.qualcomm.com,
	adrian@freebsd.org, ath5k-devel@lists.ath5k.org,
	bvahl@net.t-labs.tu-berlin.de
Subject: Re: [PATCH] ath5k: make use of the new rate control API
Date: Thu, 06 Jun 2013 12:26:15 +0200	[thread overview]
Message-ID: <51B063C7.5040509@openwrt.org> (raw)
In-Reply-To: <1370509492-24293-1-git-send-email-thomas@net.t-labs.tu-berlin.de>

On 2013-06-06 11:04 AM, Thomas Huehn wrote:
> This patch enabels ath5k to use the new rate table to lookup each
> mrr rate and retry information per packet.
> 
> Signed-off-by: Benjamin Vahl <bvahl@net.t-labs.tu-berlin.de>
> Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
This patch is missing changes in the tx status path. At tx completion,
info->status.rates needs to be filled with the contents of bf->rates
before filling in retry counts.

> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
>  static int
>  ath5k_txbuf_setup(struct ath5k_hw *ah, struct ath5k_buf *bf,
> -		  struct ath5k_txq *txq, int padsize)
> +		  struct ath5k_txq *txq, int padsize,
> +		  struct ieee80211_tx_control *control)
>  {
>  	struct ath5k_desc *ds = bf->desc;
>  	struct sk_buff *skb = bf->skb;
>  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
>  	unsigned int pktlen, flags, keyidx = AR5K_TXKEYIX_INVALID;
>  	struct ieee80211_rate *rate;
> +	struct ieee80211_tx_rate txrate;
>  	unsigned int mrr_rate[3], mrr_tries[3];
>  	int i, ret;
>  	u16 hw_rate;
> @@ -722,12 +765,15 @@ ath5k_txbuf_setup(struct ath5k_hw *ah, struct ath5k_buf *bf,
>  		duration = le16_to_cpu(ieee80211_ctstoself_duration(ah->hw,
>  			info->control.vif, pktlen, info));
>  	}
> +
> +	txrate.count = bf->rates[0].count;
> +
>  	ret = ah->ah_setup_tx_desc(ah, ds, pktlen,
>  		ieee80211_get_hdrlen_from_skb(skb), padsize,
>  		get_hw_packet_type(skb),
>  		(ah->ah_txpower.txp_requested * 2),
>  		hw_rate,
> -		info->control.rates[0].count, keyidx, ah->ah_tx_ant, flags,
> +		txrate.count, keyidx, ah->ah_tx_ant, flags,
>  		cts_rate, duration);
>  	if (ret)
>  		goto err_unmap;
The txrate variable is pointless, you only use txrate.count where you
could also just use bf->rates[0].count directly.

- Felix

  reply	other threads:[~2013-06-06 10:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06  9:04 [PATCH] ath5k: make use of the new rate control API Thomas Huehn
2013-06-06 10:26 ` Felix Fietkau [this message]
2013-06-06 10:33   ` Thomas Hühn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51B063C7.5040509@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=adrian@freebsd.org \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=bvahl@net.t-labs.tu-berlin.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@qca.qualcomm.com \
    --cc=mickflemm@gmail.com \
    --cc=rmanohar@qca.qualcomm.com \
    --cc=thomas@net.t-labs.tu-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox