OLD | NEW |
1 /****************************************************************************** | 1 /****************************************************************************** |
2 * | 2 * |
3 * Copyright(c) 2003 - 2010 Intel Corporation. All rights reserved. | 3 * Copyright(c) 2003 - 2010 Intel Corporation. All rights reserved. |
4 * | 4 * |
5 * Portions of this file are derived from the ipw3945 project, as well | 5 * Portions of this file are derived from the ipw3945 project, as well |
6 * as portions of the ieee80211 subsystem header files. | 6 * as portions of the ieee80211 subsystem header files. |
7 * | 7 * |
8 * This program is free software; you can redistribute it and/or modify it | 8 * This program is free software; you can redistribute it and/or modify it |
9 * under the terms of version 2 of the GNU General Public License as | 9 * under the terms of version 2 of the GNU General Public License as |
10 * published by the Free Software Foundation. | 10 * published by the Free Software Foundation. |
(...skipping 3649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3660 } | 3660 } |
3661 } | 3661 } |
3662 out: | 3662 out: |
3663 mutex_unlock(&priv->mutex); | 3663 mutex_unlock(&priv->mutex); |
3664 out_exit: | 3664 out_exit: |
3665 if (!priv->switch_rxon.switch_in_progress) | 3665 if (!priv->switch_rxon.switch_in_progress) |
3666 ieee80211_chswitch_done(priv->vif, false); | 3666 ieee80211_chswitch_done(priv->vif, false); |
3667 IWL_DEBUG_MAC80211(priv, "leave\n"); | 3667 IWL_DEBUG_MAC80211(priv, "leave\n"); |
3668 } | 3668 } |
3669 | 3669 |
| 3670 static 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 |
3670 static void iwl_mac_flush(struct ieee80211_hw *hw, bool drop) | 3713 static 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; |
3673 | 3716 |
3674 mutex_lock(&priv->mutex); | 3717 mutex_lock(&priv->mutex); |
3675 IWL_DEBUG_MAC80211(priv, "enter\n"); | 3718 IWL_DEBUG_MAC80211(priv, "enter\n"); |
3676 | 3719 |
3677 /* do not support "flush" */ | 3720 /* do not support "flush" */ |
3678 if (!priv->cfg->ops->lib->txfifo_flush) | 3721 if (!priv->cfg->ops->lib->txfifo_flush) |
3679 goto done; | 3722 goto done; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3860 kfree(priv->scan_cmd); | 3903 kfree(priv->scan_cmd); |
3861 } | 3904 } |
3862 | 3905 |
3863 static struct ieee80211_ops iwl_hw_ops = { | 3906 static struct ieee80211_ops iwl_hw_ops = { |
3864 .tx = iwl_mac_tx, | 3907 .tx = iwl_mac_tx, |
3865 .start = iwl_mac_start, | 3908 .start = iwl_mac_start, |
3866 .stop = iwl_mac_stop, | 3909 .stop = iwl_mac_stop, |
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, |
3874 .reset_tsf = iwl_mac_reset_tsf, | 3917 .reset_tsf = iwl_mac_reset_tsf, |
3875 .bss_info_changed = iwl_bss_info_changed, | 3918 .bss_info_changed = iwl_bss_info_changed, |
3876 .ampdu_action = iwl_mac_ampdu_action, | 3919 .ampdu_action = iwl_mac_ampdu_action, |
3877 .hw_scan = iwl_mac_hw_scan, | 3920 .hw_scan = iwl_mac_hw_scan, |
3878 .sta_notify = iwl_mac_sta_notify, | 3921 .sta_notify = iwl_mac_sta_notify, |
3879 .sta_add = iwlagn_mac_sta_add, | 3922 .sta_add = iwlagn_mac_sta_add, |
3880 .sta_remove = iwl_mac_sta_remove, | 3923 .sta_remove = iwl_mac_sta_remove, |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4442 module_param_named(fw_restart, iwlagn_mod_params.restart_fw, int, S_IRUGO); | 4485 module_param_named(fw_restart, iwlagn_mod_params.restart_fw, int, S_IRUGO); |
4443 MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); | 4486 MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); |
4444 module_param_named( | 4487 module_param_named( |
4445 disable_hw_scan, iwlagn_mod_params.disable_hw_scan, int, S_IRUGO); | 4488 disable_hw_scan, iwlagn_mod_params.disable_hw_scan, int, S_IRUGO); |
4446 MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)"); | 4489 MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)"); |
4447 | 4490 |
4448 module_param_named(ucode_alternative, iwlagn_wanted_ucode_alternative, int, | 4491 module_param_named(ucode_alternative, iwlagn_wanted_ucode_alternative, int, |
4449 S_IRUGO); | 4492 S_IRUGO); |
4450 MODULE_PARM_DESC(ucode_alternative, | 4493 MODULE_PARM_DESC(ucode_alternative, |
4451 "specify ucode alternative to use from ucode file"); | 4494 "specify ucode alternative to use from ucode file"); |
OLD | NEW |