From: Bruno Randolf <bruno@einfach.org>
To: linville@tuxdriver.com
Cc: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/5] ath5k: fix injection in monitor mode
Date: Mon, 1 Mar 2010 21:54:55 +0900 [thread overview]
Message-ID: <201003012154.55633.bruno@einfach.org> (raw)
In-Reply-To: <20100301115903.13996.95024.stgit@void>
please ignore this one, sorry ;(
bruno
On Monday 01 March 2010 20:59:03 Bruno Randolf wrote:
> injected frames have to use AR5K_PKT_TYPE_NORMAL, otherwise the hardware
> thinks it can mess with the contents of the frame - e.g. update the TSF of
> an injected beacon. injected frames should be sent as they are provided.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---
>
> drivers/net/wireless/ath/ath5k/base.c | 11 ++++++++++-
> 1 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c
> b/drivers/net/wireless/ath/ath5k/base.c index 2468c64..904d7f0 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -1285,6 +1285,7 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct
> ath5k_buf *bf, u16 cts_rate = 0;
> u16 duration = 0;
> u8 rc_flags;
> + enum ath5k_pkt_type pkt_type;
>
> flags = AR5K_TXDESC_INTREQ | AR5K_TXDESC_CLRDMASK;
>
> @@ -1322,9 +1323,17 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct
> ath5k_buf *bf, duration = le16_to_cpu(ieee80211_ctstoself_duration(sc->hw,
> sc->vif, pktlen, info));
> }
> +
> + /* we don't want the hardware to mess with injected frames in monitor
> + * mode (e.g. update TSF in beacons) */
> + if (sc->opmode == NL80211_IFTYPE_MONITOR)
> + pkt_type = AR5K_PKT_TYPE_NORMAL;
> + else
> + pkt_type = get_hw_packet_type(skb);
> +
> ret = ah->ah_setup_tx_desc(ah, ds, pktlen,
> ieee80211_get_hdrlen_from_skb(skb),
> - get_hw_packet_type(skb),
> + pkt_type,
> (sc->power_level * 2),
> hw_rate,
> info->control.rates[0].count, keyidx, ah->ah_tx_ant, flags,
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless"
> in the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-03-01 13:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-01 11:59 [PATCH 1/5] ath5k: fix injection in monitor mode Bruno Randolf
2010-03-01 11:59 ` [PATCH 2/5] ath5k: add antenna statistics and debugfs file for antenna settings Bruno Randolf
2010-03-01 11:59 ` [PATCH 3/5] ath5k: use fixed antenna for tx descriptors Bruno Randolf
2010-03-01 11:59 ` [PATCH 4/5] ath5k: preserve antenna settings Bruno Randolf
2010-03-01 11:59 ` [PATCH 5/5] ath5k: fix TSF reset Bruno Randolf
2010-03-01 12:54 ` Bruno Randolf [this message]
2010-03-01 21:26 ` [ath5k-devel] [PATCH 1/5] ath5k: fix injection in monitor mode Benoit PAPILLAULT
2010-03-02 1:17 ` Bruno Randolf
2010-03-02 1:29 ` Gábor Stefanik
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=201003012154.55633.bruno@einfach.org \
--to=bruno@einfach.org \
--cc=ath5k-devel@lists.ath5k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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).