aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/main.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-08-11 04:33:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-29 16:23:56 -0400
commit7dcfdcd908a4540512aaf06b2b35e8c8a084fb69 (patch)
tree1a86f888c4868c37b64bbd5e26bf0eb22553e1fa /drivers/net/wireless/ath9k/main.c
parentf45144ef412422edf8018825328768e3db3ea45b (diff)
ath9k: RX Filter cleanup
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath9k/main.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 2888778040e4..262fd7a8cd9a 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -549,10 +549,6 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
549 /* Update ratectrl about the new state */ 549 /* Update ratectrl about the new state */
550 ath_rate_newstate(sc, avp); 550 ath_rate_newstate(sc, avp);
551 551
552 /* Set rx filter */
553 rfilt = ath_calcrxfilter(sc);
554 ath9k_hw_setrxfilter(sc->sc_ah, rfilt);
555
556 /* Set BSSID */ 552 /* Set BSSID */
557 memcpy(sc->sc_curbssid, conf->bssid, ETH_ALEN); 553 memcpy(sc->sc_curbssid, conf->bssid, ETH_ALEN);
558 sc->sc_curaid = 0; 554 sc->sc_curaid = 0;
@@ -636,8 +632,7 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
636 FIF_BCN_PRBRESP_PROMISC | \ 632 FIF_BCN_PRBRESP_PROMISC | \
637 FIF_FCSFAIL) 633 FIF_FCSFAIL)
638 634
639/* Accept unicast, bcast and mcast frames */ 635/* FIXME: sc->sc_full_reset ? */
640
641static void ath9k_configure_filter(struct ieee80211_hw *hw, 636static void ath9k_configure_filter(struct ieee80211_hw *hw,
642 unsigned int changed_flags, 637 unsigned int changed_flags,
643 unsigned int *total_flags, 638 unsigned int *total_flags,
@@ -645,16 +640,22 @@ static void ath9k_configure_filter(struct ieee80211_hw *hw,
645 struct dev_mc_list *mclist) 640 struct dev_mc_list *mclist)
646{ 641{
647 struct ath_softc *sc = hw->priv; 642 struct ath_softc *sc = hw->priv;
643 u32 rfilt;
648 644
649 changed_flags &= SUPPORTED_FILTERS; 645 changed_flags &= SUPPORTED_FILTERS;
650 *total_flags &= SUPPORTED_FILTERS; 646 *total_flags &= SUPPORTED_FILTERS;
651 647
648 sc->rx_filter = *total_flags;
649 rfilt = ath_calcrxfilter(sc);
650 ath9k_hw_setrxfilter(sc->sc_ah, rfilt);
651
652 if (changed_flags & FIF_BCN_PRBRESP_PROMISC) { 652 if (changed_flags & FIF_BCN_PRBRESP_PROMISC) {
653 if (*total_flags & FIF_BCN_PRBRESP_PROMISC) 653 if (*total_flags & FIF_BCN_PRBRESP_PROMISC)
654 ath_scan_start(sc); 654 ath9k_hw_write_associd(sc->sc_ah, ath_bcast_mac, 0);
655 else
656 ath_scan_end(sc);
657 } 655 }
656
657 DPRINTF(sc, ATH_DBG_CONFIG, "%s: Set HW RX filter: 0x%x\n",
658 __func__, sc->rx_filter);
658} 659}
659 660
660static void ath9k_sta_notify(struct ieee80211_hw *hw, 661static void ath9k_sta_notify(struct ieee80211_hw *hw,