linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Karl Beldan <karl.beldan@gmail.com>
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net
Subject: Re: [PATCH v2 3/5] mac80211: improve the rate control API
Date: Wed, 17 Apr 2013 17:39:23 +0200	[thread overview]
Message-ID: <516EC22B.6080403@openwrt.org> (raw)
In-Reply-To: <20130417152339.GA4319@magnum.frso.rivierawaves.com>

On 2013-04-17 5:23 PM, Karl Beldan wrote:
> On Tue, Apr 16, 2013 at 01:38:44PM +0200, Felix Fietkau wrote:
>> @@ -692,16 +692,38 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
>>  	 */
>>  	rate_control_get_rate(tx->sdata, tx->sta, &txrc);
>>  
>> -	if (unlikely(info->control.rates[0].idx < 0))
>> -		return TX_DROP;
>> +	if (tx->sta)
>> +		ratetbl = rcu_dereference(tx->sta->sta.rates);
>> +
>> +	if (unlikely(info->control.rates[0].idx < 0)) {
>> +		if (ratetbl) {
>> +			struct ieee80211_tx_rate rate = {
>> +				.idx = ratetbl->rate[0].idx,
>> +				.flags = ratetbl->rate[0].flags,
>> +				.count = ratetbl->rate[0].count
>> +			};
>> +
>> +			if (ratetbl->rate[0].idx < 0)
>> +				return TX_DROP;
>> +
>> +			tx->rate = rate;
> tx->rate = ratetbl->rate[0];
No, the data structure in ratetbl->rate is not compatible.

- Felix


  reply	other threads:[~2013-04-17 15:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 11:38 [PATCH v2 1/5] mac80211: fix and optimize MCS mask handling Felix Fietkau
2013-04-16 11:38 ` [PATCH v2 2/5] mac80211: fix CTS protection handling Felix Fietkau
2013-04-16 14:20   ` Johannes Berg
2013-04-16 14:54     ` Karl Beldan
2013-04-16 11:38 ` [PATCH v2 3/5] mac80211: improve the rate control API Felix Fietkau
2013-04-17 15:23   ` Karl Beldan
2013-04-17 15:39     ` Felix Fietkau [this message]
2013-04-17 15:43       ` Karl Beldan
2013-04-17 15:46   ` Karl Beldan
2013-04-17 16:02     ` Felix Fietkau
2013-04-16 11:38 ` [PATCH v2 4/5] mac80211/minstrel_ht: use the new " Felix Fietkau
2013-04-16 11:38 ` [PATCH v2 5/5] mac80211/minstrel: " Felix Fietkau
2013-04-18 16:17   ` Karl Beldan
2013-04-18 18:22     ` Felix Fietkau
2013-04-19 13:02       ` Karl Beldan

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=516EC22B.6080403@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=johannes@sipsolutions.net \
    --cc=karl.beldan@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).