All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Baker <linux@baker-net.org.uk>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, rt2400-devel@lists.sourceforge.net
Subject: Re: FIF_ filter flags
Date: Sat, 1 Mar 2008 11:55:57 +0000	[thread overview]
Message-ID: <200803011155.57958.linux@baker-net.org.uk> (raw)
In-Reply-To: <1204330161.3938.55.camel@johannes.berg>

On Saturday 01 March 2008 00:09, Johannes Berg wrote:
> Hi,
>
> > For example rt2x00 devices only have one promiscuous mode that covers
> > traffic in the same and other BSSes therefore if either of
> > FIF_PROMISC_IN_BSS or FIF_OTHER_BSS are set then the driver will set both
> > of them in the returned flags value.
> >
> > It will also for some devices set the FIF_ALLMULTI flag if mc_count is
> > non zero.
> >
> > If this behaviour is considered desirable then I'll keep it working when
> > making the change but if not I'll remove it.
>
> Interesting. I don't think I have an opinion right now. I wanted to be
> strict about clearing the flags so that you don't end up with a flag
> that we never get traffic for, but I can't imagine any check where you'd
> want to know "do I get traffic XY".

The only way I think it might be useful is if it allows mac80211 to not bother 
with checks that it would otherwise do, for example if mac80211 didn't want 
to pass multicast packets that were not for us up to the higher stack layers 
it would know that if FIF_ALLMULTI got set it needed to do some filtering but 
if it wasn't set the hardware had a working multicast address filter.

>
> How do you keep track of that anyway? Say somebody enables
> FIF_PROMISC_IN_BSS and you also set FIF_OTHER_BSS, then when
> FIF_PROMISC_IN_BSS is disabled again FIF_OTHER_BSS should be disabled
> too but how know that it wasn't set in the meantime? I think that says
> that you shouldn't do that...
>

rt2x00 ignores the changed_flags passed from mac80211 and keeps track for 
itself of what filter it is applying so it will always recalculate it's own 
filter based on total_flags and reconfigure the hardware if it changes. This 
does assume that mac80211 recalculates what it wants total_flags to be each 
time configure_filter is called rather than just changing the value it got 
back last time but that appears to be a valid assumption.

Adam 

  reply	other threads:[~2008-03-01 11:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29 23:39 FIF_ filter flags Adam Baker
2008-03-01  0:09 ` Johannes Berg
2008-03-01 11:55   ` Adam Baker [this message]
2008-03-01 12:47     ` 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=200803011155.57958.linux@baker-net.org.uk \
    --to=linux@baker-net.org.uk \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rt2400-devel@lists.sourceforge.net \
    /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.