aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-10-07 03:43:11 -0400
committerIngo Molnar <mingo@elte.hu>2010-10-07 03:43:11 -0400
commitd4f8f217b8a5d5bd02af979650418dca4caec472 (patch)
treeaf047bfa9729c975e24cb7624107574e884d3a57 /drivers/net/wireless/iwlwifi/iwl-agn.c
parent2dfbf4dfbe47a484bae20456c12b40763b9b6af7 (diff)
parent773e3f93577ffb493fb7c39b1a6ecf39b5748e87 (diff)
Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-2.6-rcu into core/rcu
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c45
1 files changed, 44 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index c1882fd8345d..10d7b9b7f064 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3667,6 +3667,49 @@ out_exit:
3667 IWL_DEBUG_MAC80211(priv, "leave\n"); 3667 IWL_DEBUG_MAC80211(priv, "leave\n");
3668} 3668}
3669 3669
3670static void iwlagn_configure_filter(struct ieee80211_hw *hw,
3671 unsigned int changed_flags,
3672 unsigned int *total_flags,
3673 u64 multicast)
3674{
3675 struct iwl_priv *priv = hw->priv;
3676 __le32 filter_or = 0, filter_nand = 0;
3677
3678#define CHK(test, flag) do { \
3679 if (*total_flags & (test)) \
3680 filter_or |= (flag); \
3681 else \
3682 filter_nand |= (flag); \
3683 } while (0)
3684
3685 IWL_DEBUG_MAC80211(priv, "Enter: changed: 0x%x, total: 0x%x\n",
3686 changed_flags, *total_flags);
3687
3688 CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK);
3689 CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK);
3690 CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK);
3691
3692#undef CHK
3693
3694 mutex_lock(&priv->mutex);
3695
3696 priv->staging_rxon.filter_flags &= ~filter_nand;
3697 priv->staging_rxon.filter_flags |= filter_or;
3698
3699 iwlcore_commit_rxon(priv);
3700
3701 mutex_unlock(&priv->mutex);
3702
3703 /*
3704 * Receiving all multicast frames is always enabled by the
3705 * default flags setup in iwl_connection_init_rx_config()
3706 * since we currently do not support programming multicast
3707 * filters into the device.
3708 */
3709 *total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS |
3710 FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL;
3711}
3712
3670static void iwl_mac_flush(struct ieee80211_hw *hw, bool drop) 3713static void iwl_mac_flush(struct ieee80211_hw *hw, bool drop)
3671{ 3714{
3672 struct iwl_priv *priv = hw->priv; 3715 struct iwl_priv *priv = hw->priv;
@@ -3867,7 +3910,7 @@ static struct ieee80211_ops iwl_hw_ops = {
3867 .add_interface = iwl_mac_add_interface, 3910 .add_interface = iwl_mac_add_interface,
3868 .remove_interface = iwl_mac_remove_interface, 3911 .remove_interface = iwl_mac_remove_interface,
3869 .config = iwl_mac_config, 3912 .config = iwl_mac_config,
3870 .configure_filter = iwl_configure_filter, 3913 .configure_filter = iwlagn_configure_filter,
3871 .set_key = iwl_mac_set_key, 3914 .set_key = iwl_mac_set_key,
3872 .update_tkip_key = iwl_mac_update_tkip_key, 3915 .update_tkip_key = iwl_mac_update_tkip_key,
3873 .conf_tx = iwl_mac_conf_tx, 3916 .conf_tx = iwl_mac_conf_tx,