linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Drake <dsd@gentoo.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: further plan wrt. monitor interfaces
Date: Fri, 03 Aug 2007 18:56:45 -0400	[thread overview]
Message-ID: <46B3B2AD.1040509@gentoo.org> (raw)
In-Reply-To: <1186178959.13315.30.camel@johannes.berg>

Johannes Berg wrote:
> 1)
> Define new filter flags
>  * FIF_PROMISC_IN_BSS	(BSS filters still on, but otherwise promisc)
>  * FIF_ALLMULTI		(all multicast frames are allowed through)
>  * FIF_BROADCAST	(broadcast frames are allowed through)
>  * FIF_FCSFAIL		(frames with bad FCS are allowed through)
>  * FIF_PLCPFAIL		(frames with bad PLCP checksum are allowed through)
>  * FIF_CONTROL		(control frames are shown)
>  * FIF_OTHER_BSS	(frames from other BSSes are shown, subject to the
> 			 other filters)
> [missing anything?]

Incase this wasn't clear to anyone else, the proposal is that we add a 
bitfield to the set_multicast_list parameters for the above flags. The 
stack would then 'fabricate' some calls to set_multicast_list.

I like the filter flags concept here, but I think this may be better as 
its own callback, or perhaps we should just rename set_multicast_list to 
configure_filter or something like that.

This also sounds nice to implement from a driver standpoint. After 
documenting how I feel the soft/hard monitor interfaces should behave 
should we have such a system, I'm not keen on the idea of actually 
implementing that.


As for the other problems mentioned in followup mails, how about 
something like the following:

A new configure_device callback with these parameters:
  - ieee80211_hw *hw
  - int state: possible values NOCHANGE, ON, OFF
  - int filter_flags: FIF_ flags from above
  - u8 *mac_addr

This would combine the ideas of add_interface, remove_interface and 
open/stop into one.

state: this would become ON when the first interface is brought up, and 
would become OFF when the last interface is brought down. For all other 
calls into this function, state is NOCHANGE

filter_flags: Johannes' proposal above

mac_addr: if NULL, do not do anything. Otherwise, change the device MAC 
address to the one provided. This may be provided as all-zeros in some 
situations.

During a fairly standard session, the callback would be called in the 
following ways:

Device gets plugged in, registers interface. Default managed wlan0 gets 
created.
User brings wlan0 up.
    -> callback called with (hw, ON, default FIF, device MAC)
    -> driver powers up device, sets mac address and filtering
User creates new additional monitor interface and brings it up
    -> callback called with (hw, NOCHANGE, new FIF, NULL)
    -> driver changes filtering params
User deletes managed interface (wlan0)
    -> callback called with(hw, NOCHANGE, maybe new FIF?, 0x000000000000)
    -> driver changes filtering params and writes zero mac addr
User deletes monitor interface
    -> callback called with (hw, OFF, dontcare, dontcare)
    -> driver powers down device

After thinking through the above, I wonder if we should also roll 
config_interface into this: also pass in a BSSID for RX filtering 
purposes (or NULL of no change required).

Also I was wanting to add communication from mac80211 to the driver 
about supported rates in the ESS (softmac does this, zd1211rw uses this 
info). This would also fall in the same category. And maybe we should 
add the multicast list above too.

I feel the above would make life fairly easy for drivers, or am I 
over-designing this? Perhaps I am also missing some considerations for 
IBSS/AP mode...

Daniel

  parent reply	other threads:[~2007-08-03 22:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 22:09 further plan wrt. monitor interfaces Johannes Berg
2007-08-03 22:14 ` Johannes Berg
2007-08-03 22:25 ` Johannes Berg
2007-08-03 22:35   ` Johannes Berg
2007-08-03 22:30 ` Johannes Berg
2007-08-03 22:56 ` Daniel Drake [this message]
2007-08-04  7:46   ` Ulrich Kunitz
2007-08-05 22:34     ` Daniel Drake
2007-08-06 10:11     ` Johannes Berg
2007-08-06 10:17     ` Johannes Berg
2007-08-06 21:23       ` Ulrich Kunitz
2007-08-07  9:46         ` Johannes Berg
2007-08-07 22:03           ` Ulrich Kunitz
2007-08-08  9:20             ` Johannes Berg
2007-08-04  7:59   ` Johannes Berg
2007-08-04  7:54 ` Andy Green
2007-08-04 11:22 ` Ivo van Doorn
2007-08-05  6:58   ` Tomas Winkler
2007-08-05  9:29     ` Ivo van Doorn
2007-08-06 10:09       ` 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=46B3B2AD.1040509@gentoo.org \
    --to=dsd@gentoo.org \
    --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).