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 3000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3011 done: | 3011 done: |
3012 /* can not perform scan make sure we clear scanning | 3012 /* can not perform scan make sure we clear scanning |
3013 * bits from status so next scan request can be performed. | 3013 * bits from status so next scan request can be performed. |
3014 * if we dont clear scanning status bit here all next scan | 3014 * if we dont clear scanning status bit here all next scan |
3015 * will fail | 3015 * will fail |
3016 */ | 3016 */ |
3017 clear_bit(STATUS_SCAN_HW, &priv->status); | 3017 clear_bit(STATUS_SCAN_HW, &priv->status); |
3018 clear_bit(STATUS_SCANNING, &priv->status); | 3018 clear_bit(STATUS_SCANNING, &priv->status); |
3019 | 3019 |
3020 /* inform mac80211 scan aborted */ | 3020 /* inform mac80211 scan aborted */ |
3021 » queue_work(priv->workqueue, &priv->scan_completed); | 3021 » queue_work(priv->workqueue, &priv->abort_scan); |
3022 } | 3022 } |
3023 | 3023 |
3024 static void iwl3945_bg_restart(struct work_struct *data) | 3024 static void iwl3945_bg_restart(struct work_struct *data) |
3025 { | 3025 { |
3026 struct iwl_priv *priv = container_of(data, struct iwl_priv, restart); | 3026 struct iwl_priv *priv = container_of(data, struct iwl_priv, restart); |
3027 | 3027 |
3028 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 3028 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
3029 return; | 3029 return; |
3030 | 3030 |
3031 if (test_and_clear_bit(STATUS_FW_ERROR, &priv->status)) { | 3031 if (test_and_clear_bit(STATUS_FW_ERROR, &priv->status)) { |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3384 sta_priv->common.sta_id = sta_id; | 3384 sta_priv->common.sta_id = sta_id; |
3385 | 3385 |
3386 /* Initialize rate scaling */ | 3386 /* Initialize rate scaling */ |
3387 IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", | 3387 IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", |
3388 sta->addr); | 3388 sta->addr); |
3389 iwl3945_rs_rate_init(priv, sta, sta_id); | 3389 iwl3945_rs_rate_init(priv, sta, sta_id); |
3390 mutex_unlock(&priv->mutex); | 3390 mutex_unlock(&priv->mutex); |
3391 | 3391 |
3392 return 0; | 3392 return 0; |
3393 } | 3393 } |
| 3394 |
| 3395 static void iwl3945_configure_filter(struct ieee80211_hw *hw, |
| 3396 unsigned int changed_flags, |
| 3397 unsigned int *total_flags, |
| 3398 u64 multicast) |
| 3399 { |
| 3400 struct iwl_priv *priv = hw->priv; |
| 3401 __le32 filter_or = 0, filter_nand = 0; |
| 3402 |
| 3403 #define CHK(test, flag) do { \ |
| 3404 if (*total_flags & (test)) \ |
| 3405 filter_or |= (flag); \ |
| 3406 else \ |
| 3407 filter_nand |= (flag); \ |
| 3408 } while (0) |
| 3409 |
| 3410 IWL_DEBUG_MAC80211(priv, "Enter: changed: 0x%x, total: 0x%x\n", |
| 3411 changed_flags, *total_flags); |
| 3412 |
| 3413 CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK); |
| 3414 CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK); |
| 3415 CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK); |
| 3416 |
| 3417 #undef CHK |
| 3418 |
| 3419 mutex_lock(&priv->mutex); |
| 3420 |
| 3421 priv->staging_rxon.filter_flags &= ~filter_nand; |
| 3422 priv->staging_rxon.filter_flags |= filter_or; |
| 3423 |
| 3424 /* |
| 3425 * Committing directly here breaks for some reason, |
| 3426 * but we'll eventually commit the filter flags |
| 3427 * change anyway. |
| 3428 */ |
| 3429 |
| 3430 mutex_unlock(&priv->mutex); |
| 3431 |
| 3432 /* |
| 3433 * Receiving all multicast frames is always enabled by the |
| 3434 * default flags setup in iwl_connection_init_rx_config() |
| 3435 * since we currently do not support programming multicast |
| 3436 * filters into the device. |
| 3437 */ |
| 3438 *total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS | |
| 3439 FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL; |
| 3440 } |
| 3441 |
| 3442 |
3394 /***************************************************************************** | 3443 /***************************************************************************** |
3395 * | 3444 * |
3396 * sysfs attributes | 3445 * sysfs attributes |
3397 * | 3446 * |
3398 *****************************************************************************/ | 3447 *****************************************************************************/ |
3399 | 3448 |
3400 #ifdef CONFIG_IWLWIFI_DEBUG | 3449 #ifdef CONFIG_IWLWIFI_DEBUG |
3401 | 3450 |
3402 /* | 3451 /* |
3403 * The following adds a new attribute to the sysfs representation | 3452 * The following adds a new attribute to the sysfs representation |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3789 .attrs = iwl3945_sysfs_entries, | 3838 .attrs = iwl3945_sysfs_entries, |
3790 }; | 3839 }; |
3791 | 3840 |
3792 static struct ieee80211_ops iwl3945_hw_ops = { | 3841 static struct ieee80211_ops iwl3945_hw_ops = { |
3793 .tx = iwl3945_mac_tx, | 3842 .tx = iwl3945_mac_tx, |
3794 .start = iwl3945_mac_start, | 3843 .start = iwl3945_mac_start, |
3795 .stop = iwl3945_mac_stop, | 3844 .stop = iwl3945_mac_stop, |
3796 .add_interface = iwl_mac_add_interface, | 3845 .add_interface = iwl_mac_add_interface, |
3797 .remove_interface = iwl_mac_remove_interface, | 3846 .remove_interface = iwl_mac_remove_interface, |
3798 .config = iwl_mac_config, | 3847 .config = iwl_mac_config, |
3799 » .configure_filter = iwl_configure_filter, | 3848 » .configure_filter = iwl3945_configure_filter, |
3800 .set_key = iwl3945_mac_set_key, | 3849 .set_key = iwl3945_mac_set_key, |
3801 .conf_tx = iwl_mac_conf_tx, | 3850 .conf_tx = iwl_mac_conf_tx, |
3802 .reset_tsf = iwl_mac_reset_tsf, | 3851 .reset_tsf = iwl_mac_reset_tsf, |
3803 .bss_info_changed = iwl_bss_info_changed, | 3852 .bss_info_changed = iwl_bss_info_changed, |
3804 .hw_scan = iwl_mac_hw_scan, | 3853 .hw_scan = iwl_mac_hw_scan, |
3805 .sta_add = iwl3945_mac_sta_add, | 3854 .sta_add = iwl3945_mac_sta_add, |
3806 .sta_remove = iwl_mac_sta_remove, | 3855 .sta_remove = iwl_mac_sta_remove, |
3807 }; | 3856 }; |
3808 | 3857 |
3809 static int iwl3945_init_drv(struct iwl_priv *priv) | 3858 static int iwl3945_init_drv(struct iwl_priv *priv) |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4264 MODULE_PARM_DESC(debug, "debug output mask"); | 4313 MODULE_PARM_DESC(debug, "debug output mask"); |
4265 #endif | 4314 #endif |
4266 module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, | 4315 module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, |
4267 int, S_IRUGO); | 4316 int, S_IRUGO); |
4268 MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)"); | 4317 MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)"); |
4269 module_param_named(fw_restart3945, iwl3945_mod_params.restart_fw, int, S_IRUGO); | 4318 module_param_named(fw_restart3945, iwl3945_mod_params.restart_fw, int, S_IRUGO); |
4270 MODULE_PARM_DESC(fw_restart3945, "restart firmware in case of error"); | 4319 MODULE_PARM_DESC(fw_restart3945, "restart firmware in case of error"); |
4271 | 4320 |
4272 module_exit(iwl3945_exit); | 4321 module_exit(iwl3945_exit); |
4273 module_init(iwl3945_init); | 4322 module_init(iwl3945_init); |
OLD | NEW |