ath9k_htc: Fix RX filter calculation
authorSujith Manoharan <Sujith.Manoharan@atheros.com>
Tue, 17 May 2011 07:11:52 +0000 (12:41 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 19 May 2011 17:54:01 +0000 (13:54 -0400)
Choose the MY_BEACON filter only in case of a single interface.
Also, set the ATH9K_RX_FILTER_MCAST_BCAST_ALL filter in case
of interfaces.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c

index a898dac22337e559cf46b7f53d2743f2a1341904..0ecc2428d71cd1401efafb806e3ad3c353e26dc8 100644 (file)
@@ -875,6 +875,7 @@ u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv)
                rfilt |= ATH9K_RX_FILTER_CONTROL;
 
        if ((ah->opmode == NL80211_IFTYPE_STATION) &&
+           (priv->nvifs <= 1) &&
            !(priv->rxfilter & FIF_BCN_PRBRESP_PROMISC))
                rfilt |= ATH9K_RX_FILTER_MYBEACON;
        else
@@ -888,6 +889,9 @@ u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv)
        if (priv->rxfilter & FIF_PSPOLL)
                rfilt |= ATH9K_RX_FILTER_PSPOLL;
 
+       if (priv->nvifs > 1)
+               rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
+
        return rfilt;
 
 #undef RX_FILTER_PRESERVE