From: Sven Eckelmann <sven@narfation.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, Simon Wunderlich <sw@simonwunderlich.de>
Subject: Re: [PATCH v2] mac80211: Parse legacy and HT rate in injected frames
Date: Tue, 26 Jan 2016 17:12:54 +0100 [thread overview]
Message-ID: <3115157.Jv6HjPNhNp@bentobox> (raw)
In-Reply-To: <1453814840.2759.52.camel@sipsolutions.net>
[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]
On Tuesday 26 January 2016 14:27:20 Johannes Berg wrote:
> Hi,
> > CALL_TXH(ieee80211_tx_h_select_key);
> > - if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL))
> > + if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL) &&
> > + !(info->control.flags & IEEE80211_TX_CTRL_RATE_INJECT))
> > CALL_TXH(ieee80211_tx_h_rate_ctrl);
>
> This seems a bit problematic. ieee80211_tx_h_rate_ctrl() also sets up
> some protection, e.g.
>
> info->control.use_rts = txrc.rts;
> info->control.use_cts_prot = tx->sdata->vif.bss_conf.use_cts_prot;
>
> and preamble settings
>
> info->control.short_preamble = txrc.short_preamble;
>
> Are you sure you want to skip that entirely?
You are correct, these should be set but rate_control_get_rate should be
skipped.
>
> > + info->control.rates[0].flags = rate_flags;
> > + if (rate_retries + 1 > local->hw.max_rate_tries)
> > + info->control.rates[0].count = local-
> > >hw.max_rate_tries;
> > + else
> > + info->control.rates[0].count = rate_retries
> > + 1;
>
> max() or max_t()?
min_t - but yes, you are right.
Btw. we can also change it when you prefer that by default injected frames
with rates but without DATA_RETRIES should get local->hw.max_rate_tries as
retries.
>
> > /* process and remove the injection radiotap header */
> > - if (!ieee80211_parse_tx_radiotap(skb))
> > + if (!ieee80211_parse_tx_radiotap(skb, local))
> > goto fail;
>
> I'd prefer adding "local" as the first argument since that's far more
> commonly done in mac80211.
Ok, will be changed.
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-01-26 16:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 13:22 [PATCH v2] mac80211: Parse legacy and HT rate in injected frames Sven Eckelmann
2016-01-26 13:27 ` Johannes Berg
2016-01-26 16:12 ` Sven Eckelmann [this message]
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=3115157.Jv6HjPNhNp@bentobox \
--to=sven@narfation.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=sw@simonwunderlich.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