linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ben Greear <greearb@candelatech.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: Problem with sending pkt on a monitor port
Date: Wed, 19 Sep 2018 22:35:35 +0200	[thread overview]
Message-ID: <1537389335.10305.92.camel@sipsolutions.net> (raw)
In-Reply-To: <76ce3d16-dbea-e882-63e7-2337fbc269c6@candelatech.com> (sfid-20180919_223316_460674_F032A088)

On Wed, 2018-09-19 at 13:33 -0700, Ben Greear wrote:
> This is with a modified 4.16.18+ kernel, though the code in question
> is from 2011, so this is not new...
> 
> I am attempting to use radiotap packet injection on a monitor port.
> 
> In the ieee80211_monitor_start_xmit method, before this code below
> runs, sdata is 'moni6a', my monitor port.  But, since I have a
> station wlan1 with the same MAC address, then when this code is
> completed, stdata becomes wlan1.
> 
> Ath10k has all sorts of issues transmitting raw frames, and sending on
> the wrong vdev only makes it even more broken!
> 
> If user-space binds a socket to a monitor vdev and transmits a frame,
> why would we want to change the vdev here?

For one, the driver has no concept of the original vif, since monitor
vifs aren't added to it.

Secondly, the old hostapd code before nl80211 injects frames that way,
and they need to go there.

johannes

  reply	other threads:[~2018-09-20  2:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19 20:33 Problem with sending pkt on a monitor port Ben Greear
2018-09-19 20:35 ` Johannes Berg [this message]
2018-09-19 20:47   ` Ben Greear
2018-09-20  7:31     ` Johannes Berg
2018-09-20 14:26       ` Ben Greear
2018-09-28  7:14         ` Johannes Berg
2018-09-28 15:22           ` Ben Greear

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=1537389335.10305.92.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=greearb@candelatech.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).