Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1028)

Side by Side Diff: chromeos/compat-wireless/drivers/net/wireless/iwlwifi/iwl-core.c

Issue 5326002: Update compat-wireless to 2.6.36-5-spn (Closed) Base URL: http://git.chromium.org/git/kernel.git@master
Patch Set: Fixes for !ACK handling, missing local changes, log message fixes Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /****************************************************************************** 1 /******************************************************************************
2 * 2 *
3 * GPL LICENSE SUMMARY 3 * GPL LICENSE SUMMARY
4 * 4 *
5 * Copyright(c) 2008 - 2010 Intel Corporation. All rights reserved. 5 * Copyright(c) 2008 - 2010 Intel Corporation. All rights reserved.
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of version 2 of the GNU General Public License as 8 * it under the terms of version 2 of the GNU General Public License as
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 * 10 *
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 /* Disable L1-Active */ 1321 /* Disable L1-Active */
1322 iwl_set_bits_prph(priv, APMG_PCIDEV_STT_REG, 1322 iwl_set_bits_prph(priv, APMG_PCIDEV_STT_REG,
1323 APMG_PCIDEV_STT_VAL_L1_ACT_DIS); 1323 APMG_PCIDEV_STT_VAL_L1_ACT_DIS);
1324 1324
1325 out: 1325 out:
1326 return ret; 1326 return ret;
1327 } 1327 }
1328 EXPORT_SYMBOL(iwl_apm_init); 1328 EXPORT_SYMBOL(iwl_apm_init);
1329 1329
1330 1330
1331
1332 void iwl_configure_filter(struct ieee80211_hw *hw,
1333 unsigned int changed_flags,
1334 unsigned int *total_flags,
1335 u64 multicast)
1336 {
1337 struct iwl_priv *priv = hw->priv;
1338 __le32 filter_or = 0, filter_nand = 0;
1339
1340 #define CHK(test, flag) do { \
1341 if (*total_flags & (test)) \
1342 filter_or |= (flag); \
1343 else \
1344 filter_nand |= (flag); \
1345 } while (0)
1346
1347 IWL_DEBUG_MAC80211(priv, "Enter: changed: 0x%x, total: 0x%x\n",
1348 changed_flags, *total_flags);
1349
1350 CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK);
1351 CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK);
1352 CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK);
1353
1354 #undef CHK
1355
1356 mutex_lock(&priv->mutex);
1357
1358 priv->staging_rxon.filter_flags &= ~filter_nand;
1359 priv->staging_rxon.filter_flags |= filter_or;
1360
1361 iwlcore_commit_rxon(priv);
1362
1363 mutex_unlock(&priv->mutex);
1364
1365 /*
1366 * Receiving all multicast frames is always enabled by the
1367 * default flags setup in iwl_connection_init_rx_config()
1368 * since we currently do not support programming multicast
1369 * filters into the device.
1370 */
1371 *total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS |
1372 FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL;
1373 }
1374 EXPORT_SYMBOL(iwl_configure_filter);
1375
1376 int iwl_set_hw_params(struct iwl_priv *priv) 1331 int iwl_set_hw_params(struct iwl_priv *priv)
1377 { 1332 {
1378 priv->hw_params.max_rxq_size = RX_QUEUE_SIZE; 1333 priv->hw_params.max_rxq_size = RX_QUEUE_SIZE;
1379 priv->hw_params.max_rxq_log = RX_QUEUE_SIZE_LOG; 1334 priv->hw_params.max_rxq_log = RX_QUEUE_SIZE_LOG;
1380 if (priv->cfg->mod_params->amsdu_size_8K) 1335 if (priv->cfg->mod_params->amsdu_size_8K)
1381 priv->hw_params.rx_page_order = get_order(IWL_RX_BUF_SIZE_8K); 1336 priv->hw_params.rx_page_order = get_order(IWL_RX_BUF_SIZE_8K);
1382 else 1337 else
1383 priv->hw_params.rx_page_order = get_order(IWL_RX_BUF_SIZE_4K); 1338 priv->hw_params.rx_page_order = get_order(IWL_RX_BUF_SIZE_4K);
1384 1339
1385 priv->hw_params.max_beacon_itrvl = IWL_MAX_UCODE_BEACON_INTERVAL; 1340 priv->hw_params.max_beacon_itrvl = IWL_MAX_UCODE_BEACON_INTERVAL;
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
2651 } 2606 }
2652 2607
2653 2608
2654 int iwl_force_reset(struct iwl_priv *priv, int mode, bool external) 2609 int iwl_force_reset(struct iwl_priv *priv, int mode, bool external)
2655 { 2610 {
2656 struct iwl_force_reset *force_reset; 2611 struct iwl_force_reset *force_reset;
2657 2612
2658 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 2613 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
2659 return -EINVAL; 2614 return -EINVAL;
2660 2615
2616 if (test_bit(STATUS_SCANNING, &priv->status)) {
2617 IWL_DEBUG_INFO(priv, "scan in progress.\n");
2618 return -EINVAL;
2619 }
2620
2661 if (mode >= IWL_MAX_FORCE_RESET) { 2621 if (mode >= IWL_MAX_FORCE_RESET) {
2662 IWL_DEBUG_INFO(priv, "invalid reset request.\n"); 2622 IWL_DEBUG_INFO(priv, "invalid reset request.\n");
2663 return -EINVAL; 2623 return -EINVAL;
2664 } 2624 }
2665 force_reset = &priv->force_reset[mode]; 2625 force_reset = &priv->force_reset[mode];
2666 force_reset->reset_request_count++; 2626 force_reset->reset_request_count++;
2667 if (!external) { 2627 if (!external) {
2668 if (force_reset->last_force_reset_jiffies && 2628 if (force_reset->last_force_reset_jiffies &&
2669 time_after(force_reset->last_force_reset_jiffies + 2629 time_after(force_reset->last_force_reset_jiffies +
2670 force_reset->reset_duration, jiffies)) { 2630 force_reset->reset_duration, jiffies)) {
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
2908 else 2868 else
2909 clear_bit(STATUS_RF_KILL_HW, &priv->status); 2869 clear_bit(STATUS_RF_KILL_HW, &priv->status);
2910 2870
2911 wiphy_rfkill_set_hw_state(priv->hw->wiphy, hw_rfkill); 2871 wiphy_rfkill_set_hw_state(priv->hw->wiphy, hw_rfkill);
2912 2872
2913 return 0; 2873 return 0;
2914 } 2874 }
2915 EXPORT_SYMBOL(iwl_pci_resume); 2875 EXPORT_SYMBOL(iwl_pci_resume);
2916 2876
2917 #endif /* CONFIG_PM */ 2877 #endif /* CONFIG_PM */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698