linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@googlemail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Janusz Dziedzic <janusz.dziedzic@gmail.com>,
	"linux-wireless" <linux-wireless@vger.kernel.org>
Subject: Re: carl9170 - monitor mode TP drop
Date: Thu, 3 May 2012 23:44:17 +0200	[thread overview]
Message-ID: <201205032344.17313.chunkeey@googlemail.com> (raw)
In-Reply-To: <1336031908.3459.4.camel@jlt3.sipsolutions.net>

On Thursday, May 03, 2012 09:58:28 AM Johannes Berg wrote:
> On Wed, 2012-04-25 at 19:28 +0200, Christian Lamparter wrote:
> > On Wednesday, April 25, 2012 07:28:18 AM Janusz Dziedzic wrote:
> > > W dniu 23 kwietnia 2012 19:45 użytkownik Christian Lamparter
> > > <chunkeey@googlemail.com> napisał:
> > > >> This is what I can see on STA1:
> > > >> # iperf -c 192.168.254.1 -t 100 -i 5
> > > >> [ 3] 10.0-15.0 sec  20.4 MBytes  34.2 Mbits/sec
> > > >>
> > > >> =====> here I setup carl monitor on second PC, like this:
> > > >> =====> iw dev wlan0 set type monitor
> > > >> =====> iw dev wlan0 set freq 2437
> > > >> =====> ifconfig wlan0 up
> > > >>
> > > >> [  3] 40.0-45.0 sec  2.38 MBytes  3.98 Mbits/sec
> > > > Well, there's the "AR9170_MAC_RX_CTRL_ACK_IN_SNIFFER = bit (30)"
> > > > in "AR9170_MAC_REG_RX_CONTROL = (0x1c3c40)".
> > > I disabled this in code.
> > > 
> > > -               rx_ctrl |= AR9170_MAC_RX_CTRL_ACK_IN_SNIFFER;
> > > +//             rx_ctrl |= AR9170_MAC_RX_CTRL_ACK_IN_SNIFFER;
> > > 
> > > After that I don't see any TP drop and can see all packets in
> > > wireshark (as expected).
> > > 
> > > Why carl try to ACK rx packets in monitor mode?
> > > Is that a correct behaviour?
> > Well, it depends.
> > 
> > You see without the BIT set, the hardware won't sent any ACKs
> > (Not even those which are directed at this interface - which of
> > course is also bad, or even worse?) and with the BIT set (and if
> > the HW is in Sniffer Mode) then the hardware acks every frames,
> > even if they are for a different stations.
> > So your fix might break someone else's setup.
> 
> You may want to implement the new monitor-mode-vif-to-driver thing in
> mac80211 which tells you when you're in *pure* monitor mode.

"the new monitor-mode-vif-to-driver"?
Do you mean like adding a new IFTYPE flag? Or more like a FIF_* flag
(probably)? for the "pure" monitor/sniffer mode?

Regards,
	Chr

  reply	other threads:[~2012-05-03 21:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20  7:41 carl9170 - monitor mode TP drop Janusz Dziedzic
2012-04-20 17:59 ` Christian Lamparter
2012-04-23  4:27   ` Janusz Dziedzic
2012-04-23  6:47     ` Johannes Berg
2012-04-23 17:45     ` Christian Lamparter
2012-04-25  5:28       ` Janusz Dziedzic
2012-04-25 17:28         ` Christian Lamparter
2012-04-25 18:24           ` Janusz Dziedzic
2012-04-25 18:54             ` Christian Lamparter
2012-04-26  7:45               ` Janusz Dziedzic
2012-04-26 18:25                 ` Christian Lamparter
2012-05-03  7:58           ` Johannes Berg
2012-05-03 21:44             ` Christian Lamparter [this message]
2012-05-07  7:00               ` Johannes Berg

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=201205032344.17313.chunkeey@googlemail.com \
    --to=chunkeey@googlemail.com \
    --cc=janusz.dziedzic@gmail.com \
    --cc=johannes@sipsolutions.net \
    --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).