182b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler/****************************************************************************** 282b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 382b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * This file is provided under a dual BSD/GPLv2 license. When using or 482b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * redistributing this file, you may do so under either license. 582b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 682b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * GPL LICENSE SUMMARY 782b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 84e3182626a914443a5e0fbe014813f03e51a75dfWey-Yi Guy * Copyright(c) 2008 - 2012 Intel Corporation. All rights reserved. 982b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 1082b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * This program is free software; you can redistribute it and/or modify 1182b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * it under the terms of version 2 of the GNU General Public License as 1282b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * published by the Free Software Foundation. 1382b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 1482b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * This program is distributed in the hope that it will be useful, but 1582b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * WITHOUT ANY WARRANTY; without even the implied warranty of 1682b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1782b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * General Public License for more details. 1882b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 1982b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * You should have received a copy of the GNU General Public License 2082b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * along with this program; if not, write to the Free Software 2182b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, 2282b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * USA 2382b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 2482b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * The full GNU General Public License is included in this distribution 2582b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * in the file called LICENSE.GPL. 2682b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 2782b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * Contact Information: 28759ef89fb096c4a6ef078d3cfd5682ac037bd789Winkler, Tomas * Intel Linux Wireless <ilw@linux.intel.com> 2982b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 3082b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 3182b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * BSD LICENSE 3282b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 334e3182626a914443a5e0fbe014813f03e51a75dfWey-Yi Guy * Copyright(c) 2005 - 2012 Intel Corporation. All rights reserved. 3482b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * All rights reserved. 3582b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 3682b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * Redistribution and use in source and binary forms, with or without 3782b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * modification, are permitted provided that the following conditions 3882b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * are met: 3982b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 4082b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * * Redistributions of source code must retain the above copyright 4182b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * notice, this list of conditions and the following disclaimer. 4282b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * * Redistributions in binary form must reproduce the above copyright 4382b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * notice, this list of conditions and the following disclaimer in 4482b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * the documentation and/or other materials provided with the 4582b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * distribution. 4682b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * * Neither the name Intel Corporation nor the names of its 4782b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * contributors may be used to endorse or promote products derived 4882b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * from this software without specific prior written permission. 4982b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * 5082b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 5182b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 5282b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 5382b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 5482b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 5582b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 5682b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 5782b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 5882b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 5982b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 6082b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 6182b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler *****************************************************************************/ 6282b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler 6382b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler#ifndef __iwl_core_h__ 6482b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler#define __iwl_core_h__ 6582b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler 66266af4c745952e9bebf687dd68af58df553cb59dJohannes Berg#include "iwl-dev.h" 676a686c600268b71619f93d35f9373e2b6ab5947bEmmanuel Grumbach#include "iwl-io.h" 68266af4c745952e9bebf687dd68af58df553cb59dJohannes Berg 69857485c0c46ceee5c658c1761bba4d9a5ddf433fTomas Winkler/************************ 70857485c0c46ceee5c658c1761bba4d9a5ddf433fTomas Winkler * forward declarations * 71857485c0c46ceee5c658c1761bba4d9a5ddf433fTomas Winkler ************************/ 72857485c0c46ceee5c658c1761bba4d9a5ddf433fTomas Winklerstruct iwl_host_cmd; 73857485c0c46ceee5c658c1761bba4d9a5ddf433fTomas Winklerstruct iwl_cmd; 74857485c0c46ceee5c658c1761bba4d9a5ddf433fTomas Winkler 75a0ee74cf080389aee4fbf198ffa7e85b3480b661Wey-Yi Guy#define TIME_UNIT 1024 76a0ee74cf080389aee4fbf198ffa7e85b3480b661Wey-Yi Guy 776bc913bd965e03b5273a5366eecce5c28c9b01daAssaf Kraussstruct iwl_lib_ops { 78a96a27f97f2bbfc1fca54bc3c0b0d41484152740Tomas Winkler /* set hw dependent parameters */ 796d4dec7ba4b0275c97c39b694cfe60e9aeafdf60Emmanuel Grumbach void (*set_hw_params)(struct iwl_priv *priv); 8079d07325502e73508f917475bc1617b60979dd94Wey-Yi Guy int (*set_channel_switch)(struct iwl_priv *priv, 8179d07325502e73508f917475bc1617b60979dd94Wey-Yi Guy struct ieee80211_channel_switch *ch_switch); 82e4c598b7ce36f4416f7672617265bc1fa92e5a5fFry, Donald H /* device specific configuration */ 83e4c598b7ce36f4416f7672617265bc1fa92e5a5fFry, Donald H void (*nic_config)(struct iwl_priv *priv); 8462161aefa403a3f8d603b061f5688cf00928a2ccWey-Yi Guy 856bc913bd965e03b5273a5366eecce5c28c9b01daAssaf Krauss /* eeprom operations (as defined in iwl-eeprom.h) */ 866bc913bd965e03b5273a5366eecce5c28c9b01daAssaf Krauss struct iwl_eeprom_ops eeprom_ops; 8762161aefa403a3f8d603b061f5688cf00928a2ccWey-Yi Guy 8862161aefa403a3f8d603b061f5688cf00928a2ccWey-Yi Guy /* temperature */ 89909fc3cba374560ada33a7dc3ab242d0f1d2a135Wey-Yi Guy void (*temperature)(struct iwl_priv *priv); 906bc913bd965e03b5273a5366eecce5c28c9b01daAssaf Krauss}; 916bc913bd965e03b5273a5366eecce5c28c9b01daAssaf Krauss 921d0a082d38decb62ceb3e26a4bb1a3ca78843a23Assaf Krauss/*************************** 931d0a082d38decb62ceb3e26a4bb1a3ca78843a23Assaf Krauss * L i b * 941d0a082d38decb62ceb3e26a4bb1a3ca78843a23Assaf Krauss ***************************/ 951d0a082d38decb62ceb3e26a4bb1a3ca78843a23Assaf Krauss 96246ed355221076884d225f9d8a4c30a048be8162Johannes Bergvoid iwl_set_rxon_hwcrypto(struct iwl_priv *priv, struct iwl_rxon_context *ctx, 97246ed355221076884d225f9d8a4c30a048be8162Johannes Berg int hw_decrypt); 98246ed355221076884d225f9d8a4c30a048be8162Johannes Bergint iwl_check_rxon_cmd(struct iwl_priv *priv, struct iwl_rxon_context *ctx); 99246ed355221076884d225f9d8a4c30a048be8162Johannes Bergint iwl_full_rxon_required(struct iwl_priv *priv, struct iwl_rxon_context *ctx); 100dd63b84eb44ba4e34daa83cf535a8bb79bc7f2e2Wey-Yi Guyvoid iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, 101246ed355221076884d225f9d8a4c30a048be8162Johannes Berg struct iwl_rxon_context *ctx); 10279d07325502e73508f917475bc1617b60979dd94Wey-Yi Guyvoid iwl_set_flags_for_band(struct iwl_priv *priv, 103246ed355221076884d225f9d8a4c30a048be8162Johannes Berg struct iwl_rxon_context *ctx, 10479d07325502e73508f917475bc1617b60979dd94Wey-Yi Guy enum ieee80211_band band, 10579d07325502e73508f917475bc1617b60979dd94Wey-Yi Guy struct ieee80211_vif *vif); 1061402364162afbaac1b8a74ee21aeb013e817ac7dAbhijeet Kolekaru8 iwl_get_single_channel_number(struct iwl_priv *priv, 1071402364162afbaac1b8a74ee21aeb013e817ac7dAbhijeet Kolekar enum ieee80211_band band); 108fad95bf59bf14f72e7d45d3887044e88b8584637Johannes Bergvoid iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf); 1097e6a588601eb85feb10c7e8898f1f69c3b229a20Johannes Bergbool iwl_is_ht40_tx_allowed(struct iwl_priv *priv, 1107e6a588601eb85feb10c7e8898f1f69c3b229a20Johannes Berg struct iwl_rxon_context *ctx, 1117e6a588601eb85feb10c7e8898f1f69c3b229a20Johannes Berg struct ieee80211_sta_ht_cap *ht_cap); 1121dda6d28377bec52f96767e8d4a59aa95102b9ddJohannes Bergvoid iwl_connection_init_rx_config(struct iwl_priv *priv, 113d0fe478c9f42dbc4916aa8d1d7a05d7f669d2209Johannes Berg struct iwl_rxon_context *ctx); 11479d07325502e73508f917475bc1617b60979dd94Wey-Yi Guyvoid iwl_set_rate(struct iwl_priv *priv); 115317d09f76976c5a0b1e758fe45474a47cbea1aefWey-Yi Guyint iwl_cmd_echo_test(struct iwl_priv *priv); 11620594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy#ifdef CONFIG_IWLWIFI_DEBUGFS 11720594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guyint iwl_alloc_traffic_mem(struct iwl_priv *priv); 11820594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guyvoid iwl_free_traffic_mem(struct iwl_priv *priv); 11920594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guyvoid iwl_dbg_log_tx_data_frame(struct iwl_priv *priv, 12020594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy u16 length, struct ieee80211_hdr *header); 12120594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guyvoid iwl_dbg_log_rx_data_frame(struct iwl_priv *priv, 12220594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy u16 length, struct ieee80211_hdr *header); 12322fdf3c9e19dce6d66bcfdbed547a5aa52b89933Wey-Yi Guyconst char *get_mgmt_string(int cmd); 12422fdf3c9e19dce6d66bcfdbed547a5aa52b89933Wey-Yi Guyconst char *get_ctrl_string(int cmd); 1257163b8a4ec995dabda3e92c6fed7b8600060618cWey-Yi Guyvoid iwl_clear_traffic_stats(struct iwl_priv *priv); 126450ccb36b4d8a18c34643335d3305ec1a781e717Reinette Chatrevoid iwl_update_stats(struct iwl_priv *priv, bool is_tx, __le16 fc, 127450ccb36b4d8a18c34643335d3305ec1a781e717Reinette Chatre u16 len); 1284d660ce52e27957f7181ef662889eec67686c7b5Emmanuel Grumbachvoid iwl_reset_traffic_log(struct iwl_priv *priv); 1294d660ce52e27957f7181ef662889eec67686c7b5Emmanuel Grumbach 13020594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy#else 13120594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guystatic inline int iwl_alloc_traffic_mem(struct iwl_priv *priv) 13220594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy{ 13320594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy return 0; 13420594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy} 13520594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guystatic inline void iwl_free_traffic_mem(struct iwl_priv *priv) 13620594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy{ 13720594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy} 13820594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guystatic inline void iwl_reset_traffic_log(struct iwl_priv *priv) 13920594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy{ 14020594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy} 14120594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guystatic inline void iwl_dbg_log_tx_data_frame(struct iwl_priv *priv, 14220594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy u16 length, struct ieee80211_hdr *header) 14320594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy{ 14420594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy} 14520594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guystatic inline void iwl_dbg_log_rx_data_frame(struct iwl_priv *priv, 14620594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy u16 length, struct ieee80211_hdr *header) 14720594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy{ 14820594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy} 149450ccb36b4d8a18c34643335d3305ec1a781e717Reinette Chatrestatic inline void iwl_update_stats(struct iwl_priv *priv, bool is_tx, 150450ccb36b4d8a18c34643335d3305ec1a781e717Reinette Chatre __le16 fc, u16 len) 151450ccb36b4d8a18c34643335d3305ec1a781e717Reinette Chatre{ 152450ccb36b4d8a18c34643335d3305ec1a781e717Reinette Chatre} 15320594eb0daa67f7a0cc19d74a1bafceb1bb09f4aWey-Yi Guy#endif 154030f05eda6ee4d0ed63a93f4f9ebae42c46fb8b6Abhijeet Kolekar 155030f05eda6ee4d0ed63a93f4f9ebae42c46fb8b6Abhijeet Kolekar/***************************************************** 156a55360e458551b0add4ec147ef786d71e163bf50Tomas Winkler* RX 157a55360e458551b0add4ec147ef786d71e163bf50Tomas Winkler******************************************************/ 15879d07325502e73508f917475bc1617b60979dd94Wey-Yi Guyvoid iwl_chswitch_done(struct iwl_priv *priv, bool is_success); 159a55360e458551b0add4ec147ef786d71e163bf50Tomas Winkler 16022de94de7de78b8de2fb1f2df5aa85b5556cfcfdStanislaw Gruszkavoid iwl_setup_watchdog(struct iwl_priv *priv); 1611053d35f4ed6876ad9d3a14cdae363db0a7e9b0aRon Rindjunsky/***************************************************** 162630fe9b6f774dd55b71fe94392101eb00df58762Tomas Winkler * TX power 163630fe9b6f774dd55b71fe94392101eb00df58762Tomas Winkler ****************************************************/ 164630fe9b6f774dd55b71fe94392101eb00df58762Tomas Winklerint iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force); 165630fe9b6f774dd55b71fe94392101eb00df58762Tomas Winkler 1662a421b91d6fe89e27ded7544a25449c0b050098fTomas Winkler/******************************************************************************* 1672a421b91d6fe89e27ded7544a25449c0b050098fTomas Winkler * Scanning 1682a421b91d6fe89e27ded7544a25449c0b050098fTomas Winkler ******************************************************************************/ 169f53696de6722a4aac00b76e25a5321c01e88a55fTomas Winklervoid iwl_init_scan_params(struct iwl_priv *priv); 1702a421b91d6fe89e27ded7544a25449c0b050098fTomas Winklerint iwl_scan_cancel(struct iwl_priv *priv); 17198efb4a52b5c64c79647ea4fdb2c6a3f3db6e743Johannes Bergvoid iwl_scan_cancel_timeout(struct iwl_priv *priv, unsigned long ms); 172e7e16b90b477a07d17af37dceb2e8af1ddbd9712Stanislaw Gruszkavoid iwl_force_scan_end(struct iwl_priv *priv); 17388be026490ed89c2ffead81a52531fbac5507e01Johannes Bergvoid iwl_internal_short_hw_scan(struct iwl_priv *priv); 174c04f9f220300da83f71698fa7be24714152faf0dWey-Yi Guyint iwl_force_reset(struct iwl_priv *priv, int mode, bool external); 1752a421b91d6fe89e27ded7544a25449c0b050098fTomas Winklervoid iwl_setup_rx_scan_handlers(struct iwl_priv *priv); 1762a421b91d6fe89e27ded7544a25449c0b050098fTomas Winklervoid iwl_setup_scan_deferred_work(struct iwl_priv *priv); 177e7e16b90b477a07d17af37dceb2e8af1ddbd9712Stanislaw Gruszkavoid iwl_cancel_scan_deferred_work(struct iwl_priv *priv); 178266af4c745952e9bebf687dd68af58df553cb59dJohannes Bergint __must_check iwl_scan_initiate(struct iwl_priv *priv, 179266af4c745952e9bebf687dd68af58df553cb59dJohannes Berg struct ieee80211_vif *vif, 180266af4c745952e9bebf687dd68af58df553cb59dJohannes Berg enum iwl_scan_type scan_type, 181266af4c745952e9bebf687dd68af58df553cb59dJohannes Berg enum ieee80211_band band); 1822a421b91d6fe89e27ded7544a25449c0b050098fTomas Winkler 18377fecfb88f8ad64420e06a96f1bd3b38498bfb4fSamuel Ortiz/* For faster active scanning, scan will move to the next channel if fewer than 18477fecfb88f8ad64420e06a96f1bd3b38498bfb4fSamuel Ortiz * PLCP_QUIET_THRESH packets are heard on this channel within 18577fecfb88f8ad64420e06a96f1bd3b38498bfb4fSamuel Ortiz * ACTIVE_QUIET_TIME after sending probe request. This shortens the dwell 18677fecfb88f8ad64420e06a96f1bd3b38498bfb4fSamuel Ortiz * time if it's a quiet channel (nothing responded to our probe, and there's 18777fecfb88f8ad64420e06a96f1bd3b38498bfb4fSamuel Ortiz * no other traffic). 18877fecfb88f8ad64420e06a96f1bd3b38498bfb4fSamuel Ortiz * Disable "quiet" feature by setting PLCP_QUIET_THRESH to 0. */ 189c1b4aa3fb619782213af2af6652663c8f9cef373Harvey Harrison#define IWL_ACTIVE_QUIET_TIME cpu_to_le16(10) /* msec */ 190c1b4aa3fb619782213af2af6652663c8f9cef373Harvey Harrison#define IWL_PLCP_QUIET_THRESH cpu_to_le16(1) /* packets */ 19177fecfb88f8ad64420e06a96f1bd3b38498bfb4fSamuel Ortiz 192b6e4c55aaee4fd40526a6816e60c68dd62e565c4Johannes Berg#define IWL_SCAN_CHECK_WATCHDOG (HZ * 7) 19377fecfb88f8ad64420e06a96f1bd3b38498bfb4fSamuel Ortiz 19461f0439277abb4f65d99b362b62cbabbde7032a0Johannes Berg/* traffic log definitions */ 19561f0439277abb4f65d99b362b62cbabbde7032a0Johannes Berg#define IWL_TRAFFIC_ENTRIES (256) 19661f0439277abb4f65d99b362b62cbabbde7032a0Johannes Berg#define IWL_TRAFFIC_ENTRY_SIZE (64) 19761f0439277abb4f65d99b362b62cbabbde7032a0Johannes Berg 198630fe9b6f774dd55b71fe94392101eb00df58762Tomas Winkler/***************************************************** 199857485c0c46ceee5c658c1761bba4d9a5ddf433fTomas Winkler * S e n d i n g H o s t C o m m a n d s * 200857485c0c46ceee5c658c1761bba4d9a5ddf433fTomas Winkler *****************************************************/ 201857485c0c46ceee5c658c1761bba4d9a5ddf433fTomas Winkler 20222de94de7de78b8de2fb1f2df5aa85b5556cfcfdStanislaw Gruszkavoid iwl_bg_watchdog(unsigned long data); 203a0ee74cf080389aee4fbf198ffa7e85b3480b661Wey-Yi Guyu32 iwl_usecs_to_beacons(struct iwl_priv *priv, u32 usec, u32 beacon_interval); 204a0ee74cf080389aee4fbf198ffa7e85b3480b661Wey-Yi Guy__le32 iwl_add_beacon_time(struct iwl_priv *priv, u32 base, 205a0ee74cf080389aee4fbf198ffa7e85b3480b661Wey-Yi Guy u32 addon, u32 beacon_interval); 206b74e31a9bc1013e69b85b139072485dc153453ddWey-Yi Guy 207c1c81401de30448baf35ec2f689ad21faffb0536Emmanuel Grumbach 2080ad91a35bcb6dd993ad7d34f159afae929b4743dWinkler, Tomas/***************************************************** 209534166dedaa9a660c7221b145b5e4088a2d9ac69Samuel Ortiz* GEOS 210534166dedaa9a660c7221b145b5e4088a2d9ac69Samuel Ortiz******************************************************/ 211b39488a9bd00c520e46682bf75ba484aadc82af7Wey-Yi Guyint iwl_init_geos(struct iwl_priv *priv); 212b39488a9bd00c520e46682bf75ba484aadc82af7Wey-Yi Guyvoid iwl_free_geos(struct iwl_priv *priv); 21376eff18bdc5feaa53f1be33709b67df02f1d55e9Tomas Winkler 21465b52bde687b609dc9cfc63eaf31da24b4f5663aJohannes Bergextern void iwl_send_bt_config(struct iwl_priv *priv); 215ef8d5529b015d4c5db7fad1adfc91edfd5abad56Wey-Yi Guyextern int iwl_send_statistics_request(struct iwl_priv *priv, 216ef8d5529b015d4c5db7fad1adfc91edfd5abad56Wey-Yi Guy u8 flags, bool clear); 2177e8c519ecbd44cbe017f1749eb1f0f87d86d6ea2Tomas Winkler 21847313e340ee6faa43d8ad8a509a00ed1584fb34dJohannes Bergint iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx); 219805a3b810708db3261cc8c1183ffb2703a5ce243Wey-Yi Guy 2203c57601d0a1993cfc12a27cc6652b750bb44c523Ron Rindjunskystatic inline const struct ieee80211_supported_band *iwl_get_hw_mode( 2213c57601d0a1993cfc12a27cc6652b750bb44c523Ron Rindjunsky struct iwl_priv *priv, enum ieee80211_band band) 2223c57601d0a1993cfc12a27cc6652b750bb44c523Ron Rindjunsky{ 2233c57601d0a1993cfc12a27cc6652b750bb44c523Ron Rindjunsky return priv->hw->wiphy->bands[band]; 2243c57601d0a1993cfc12a27cc6652b750bb44c523Ron Rindjunsky} 225670245ed4515cbc5e39e39d44965cb7add2c8aa9Johannes Berg 22688e58fc5d940c3463c7070a2a7a8a0ce65af3fdcStanislaw Gruszkastatic inline bool iwl_advanced_bt_coexist(struct iwl_priv *priv) 22788e58fc5d940c3463c7070a2a7a8a0ce65af3fdcStanislaw Gruszka{ 2283862241945026a8fa165ab73c57739df77b8e1fbDon Fry return cfg(priv)->bt_params && 2293862241945026a8fa165ab73c57739df77b8e1fbDon Fry cfg(priv)->bt_params->advanced_bt_coexist; 23088e58fc5d940c3463c7070a2a7a8a0ce65af3fdcStanislaw Gruszka} 23188e58fc5d940c3463c7070a2a7a8a0ce65af3fdcStanislaw Gruszka 232bee008b78307ccc2e17c7ec152dd2098d5f2e1faWey-Yi Guyextern bool bt_siso_mode; 233670245ed4515cbc5e39e39d44965cb7add2c8aa9Johannes Berg 23482b9a1213132aa53ddbcc459ed77a335d031cd2eTomas Winkler#endif /* __iwl_core_h__ */ 235