aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/b43legacy.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-09-17 01:29:23 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:57 -0400
commit4150c57212ad134765dd78c654a4b9906252b66d (patch)
treec37ab7a3f75532a623ed00339782d769514422d2 /drivers/net/wireless/b43legacy/b43legacy.h
parent070ac3a2651e3c1c4d277c5f1981517427c386a7 (diff)
[PATCH] mac80211: revamp interface and filter configuration
Drivers are currently supposed to keep track of monitor interfaces if they allow so-called "hard" monitor, and they are also supposed to keep track of multicast etc. This patch changes that, replaces the set_multicast_list() callback with a new configure_filter() callback that takes filter flags (FIF_*) instead of interface flags (IFF_*). For a driver, this means it should open the filter as much as necessary to get all frames requested by the filter flags. Accordingly, the filter flags are named "positively", e.g. FIF_ALLMULTI. Multicast filtering is a bit special in that drivers that have no multicast address filters need to allow multicast frames through when either the FIF_ALLMULTI flag is set or when the mc_count value is positive. At the same time, drivers are no longer notified about monitor interfaces at all, this means they now need to implement the start() and stop() callbacks and the new change_filter_flags() callback. Also, the start()/stop() ordering changed, start() is now called *before* any add_interface() as it really should be, and stop() after any remove_interface(). The patch also changes the behaviour of setting the bssid to multicast for scanning when IEEE80211_HW_NO_PROBE_FILTERING is set; the IEEE80211_HW_NO_PROBE_FILTERING flag is removed and the filter flag FIF_BCN_PRBRESP_PROMISC introduced. This is a lot more efficient for hardware like b43 that supports it and other hardware can still set the BSSID to all-ones. Driver modifications by Johannes Berg (b43 & iwlwifi), Michael Wu (rtl8187, adm8211, and p54), Larry Finger (b43legacy), and Ivo van Doorn (rt2x00). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy/b43legacy.h')
-rw-r--r--drivers/net/wireless/b43legacy/b43legacy.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/wireless/b43legacy/b43legacy.h
index 746de2ff498c..afe145cec067 100644
--- a/drivers/net/wireless/b43legacy/b43legacy.h
+++ b/drivers/net/wireless/b43legacy/b43legacy.h
@@ -179,6 +179,7 @@
179#define B43legacy_MACCTL_IHR_ENABLED 0x00000400 /* IHR Region Enabled */ 179#define B43legacy_MACCTL_IHR_ENABLED 0x00000400 /* IHR Region Enabled */
180#define B43legacy_MACCTL_INFRA 0x00020000 /* Infrastructure mode */ 180#define B43legacy_MACCTL_INFRA 0x00020000 /* Infrastructure mode */
181#define B43legacy_MACCTL_AP 0x00040000 /* AccessPoint mode */ 181#define B43legacy_MACCTL_AP 0x00040000 /* AccessPoint mode */
182#define B43legacy_MACCTL_BEACPROMISC 0x00100000 /* Beacon Promiscuous */
182#define B43legacy_MACCTL_KEEP_BADPLCP 0x00200000 /* Keep bad PLCP frames */ 183#define B43legacy_MACCTL_KEEP_BADPLCP 0x00200000 /* Keep bad PLCP frames */
183#define B43legacy_MACCTL_KEEP_CTL 0x00400000 /* Keep control frames */ 184#define B43legacy_MACCTL_KEEP_CTL 0x00400000 /* Keep control frames */
184#define B43legacy_MACCTL_KEEP_BAD 0x00800000 /* Keep bad frames (FCS) */ 185#define B43legacy_MACCTL_KEEP_BAD 0x00800000 /* Keep bad frames (FCS) */
@@ -570,25 +571,20 @@ struct b43legacy_wl {
570 * at a time. General information about this interface follows. 571 * at a time. General information about this interface follows.
571 */ 572 */
572 573
573 /* Opaque ID of the operating interface (!= monitor 574 /* Opaque ID of the operating interface from the ieee80211
574 * interface) from the ieee80211 subsystem. 575 * subsystem. Do not modify.
575 * Do not modify.
576 */ 576 */
577 int if_id; 577 int if_id;
578 /* MAC address (can be NULL). */ 578 /* MAC address (can be NULL). */
579 const u8 *mac_addr; 579 u8 mac_addr[ETH_ALEN];
580 /* Current BSSID (can be NULL). */ 580 /* Current BSSID (can be NULL). */
581 const u8 *bssid; 581 u8 bssid[ETH_ALEN];
582 /* Interface type. (IEEE80211_IF_TYPE_XXX) */ 582 /* Interface type. (IEEE80211_IF_TYPE_XXX) */
583 int if_type; 583 int if_type;
584 /* Counter of active monitor interfaces. */
585 int monitor;
586 /* Is the card operating in AP, STA or IBSS mode? */ 584 /* Is the card operating in AP, STA or IBSS mode? */
587 bool operating; 585 bool operating;
588 /* Promisc mode active? 586 /* filter flags */
589 * Note that (monitor != 0) implies promisc. 587 unsigned int filter_flags;
590 */
591 bool promisc;
592 /* Stats about the wireless interface */ 588 /* Stats about the wireless interface */
593 struct ieee80211_low_level_stats ieee_stats; 589 struct ieee80211_low_level_stats ieee_stats;
594 590
@@ -753,8 +749,6 @@ struct b43legacy_wldev *dev_to_b43legacy_wldev(struct device *dev)
753static inline 749static inline
754int b43legacy_is_mode(struct b43legacy_wl *wl, int type) 750int b43legacy_is_mode(struct b43legacy_wl *wl, int type)
755{ 751{
756 if (type == IEEE80211_IF_TYPE_MNTR)
757 return !!(wl->monitor);
758 return (wl->operating && 752 return (wl->operating &&
759 wl->if_type == type); 753 wl->if_type == type);
760} 754}