All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Sven Eckelmann <sven@narfation.org>, linux-wireless@vger.kernel.org
Cc: Simon Wunderlich <sw@simonwunderlich.de>
Subject: Re: [PATCH v2] mac80211: Parse legacy and HT rate in injected frames
Date: Tue, 26 Jan 2016 14:27:20 +0100	[thread overview]
Message-ID: <1453814840.2759.52.camel@sipsolutions.net> (raw)
In-Reply-To: <1453728154-20070-1-git-send-email-sven@narfation.org>

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?

> +		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()?

>  	/* 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.


johannes

  reply	other threads:[~2016-01-26 13:27 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 [this message]
2016-01-26 16:12   ` Sven Eckelmann

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=1453814840.2759.52.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sven@narfation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.