ath9k: Configure RX filter for multi-BSSID broadcast
authorJouni Malinen <jouni.malinen@atheros.com>
Tue, 3 Mar 2009 17:23:30 +0000 (19:23 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 5 Mar 2009 19:39:45 +0000 (14:39 -0500)
Allow RX filter to pass through all broadcast/multicast frames (i.e.,
no BSSID filtering) if virtual interfaces are used. Software filtering
will be used in this case to drop broadcast/multicast frames for
foreign BSSIDs.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath9k/mac.h
drivers/net/wireless/ath9k/recv.c

index fbd2d6ad2a53de16b841ffe209083442c5a07696..37e3948ddc2587105d9de03fc0397250c2cd1b6b 100644 (file)
@@ -570,6 +570,7 @@ enum ath9k_rx_filter {
        ATH9K_RX_FILTER_MYBEACON = 0x00000200,
        ATH9K_RX_FILTER_PSPOLL = 0x00004000,
        ATH9K_RX_FILTER_PHYRADAR = 0x00002000,
+       ATH9K_RX_FILTER_MCAST_BCAST_ALL = 0x00008000,
 };
 
 #define ATH9K_RATESERIES_RTS_CTS  0x0001
index a9a55df500a430581448439d5ea2117a9c02b09b..3df5c7824360f658bf35f634aaf14b6ef02a9e68 100644 (file)
@@ -407,6 +407,14 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
        if (sc->sc_ah->opmode == NL80211_IFTYPE_AP)
                rfilt |= ATH9K_RX_FILTER_PSPOLL;
 
+       if (sc->sec_wiphy) {
+               /* TODO: only needed if more than one BSSID is in use in
+                * station/adhoc mode */
+               /* TODO: for older chips, may need to add ATH9K_RX_FILTER_PROM
+                */
+               rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
+       }
+
        return rfilt;
 
 #undef RX_FILTER_PRESERVE