1e705c121SKalle Valo /****************************************************************************** 2e705c121SKalle Valo * 3e705c121SKalle Valo * This file is provided under a dual BSD/GPLv2 license. When using or 4e705c121SKalle Valo * redistributing this file, you may do so under either license. 5e705c121SKalle Valo * 6e705c121SKalle Valo * GPL LICENSE SUMMARY 7e705c121SKalle Valo * 8e705c121SKalle Valo * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. 9e705c121SKalle Valo * 10e705c121SKalle Valo * This program is free software; you can redistribute it and/or modify 11e705c121SKalle Valo * it under the terms of version 2 of the GNU General Public License as 12e705c121SKalle Valo * published by the Free Software Foundation. 13e705c121SKalle Valo * 14e705c121SKalle Valo * This program is distributed in the hope that it will be useful, but 15e705c121SKalle Valo * WITHOUT ANY WARRANTY; without even the implied warranty of 16e705c121SKalle Valo * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17e705c121SKalle Valo * General Public License for more details. 18e705c121SKalle Valo * 19e705c121SKalle Valo * You should have received a copy of the GNU General Public License 20e705c121SKalle Valo * along with this program; if not, write to the Free Software 21e705c121SKalle Valo * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, 22e705c121SKalle Valo * USA 23e705c121SKalle Valo * 24e705c121SKalle Valo * The full GNU General Public License is included in this distribution 25e705c121SKalle Valo * in the file called COPYING. 26e705c121SKalle Valo * 27e705c121SKalle Valo * Contact Information: 28cb2f8277SEmmanuel Grumbach * Intel Linux Wireless <linuxwifi@intel.com> 29e705c121SKalle Valo * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 30e705c121SKalle Valo * 31e705c121SKalle Valo * BSD LICENSE 32e705c121SKalle Valo * 33e705c121SKalle Valo * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. 34e705c121SKalle Valo * All rights reserved. 35e705c121SKalle Valo * 36e705c121SKalle Valo * Redistribution and use in source and binary forms, with or without 37e705c121SKalle Valo * modification, are permitted provided that the following conditions 38e705c121SKalle Valo * are met: 39e705c121SKalle Valo * 40e705c121SKalle Valo * * Redistributions of source code must retain the above copyright 41e705c121SKalle Valo * notice, this list of conditions and the following disclaimer. 42e705c121SKalle Valo * * Redistributions in binary form must reproduce the above copyright 43e705c121SKalle Valo * notice, this list of conditions and the following disclaimer in 44e705c121SKalle Valo * the documentation and/or other materials provided with the 45e705c121SKalle Valo * distribution. 46e705c121SKalle Valo * * Neither the name Intel Corporation nor the names of its 47e705c121SKalle Valo * contributors may be used to endorse or promote products derived 48e705c121SKalle Valo * from this software without specific prior written permission. 49e705c121SKalle Valo * 50e705c121SKalle Valo * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 51e705c121SKalle Valo * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 52e705c121SKalle Valo * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 53e705c121SKalle Valo * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 54e705c121SKalle Valo * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 55e705c121SKalle Valo * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 56e705c121SKalle Valo * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 57e705c121SKalle Valo * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 58e705c121SKalle Valo * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 59e705c121SKalle Valo * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 60e705c121SKalle Valo * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 61e705c121SKalle Valo * 62e705c121SKalle Valo *****************************************************************************/ 63e705c121SKalle Valo #ifndef __iwl_modparams_h__ 64e705c121SKalle Valo #define __iwl_modparams_h__ 65e705c121SKalle Valo 66e705c121SKalle Valo #include <linux/types.h> 67e705c121SKalle Valo #include <linux/spinlock.h> 68e705c121SKalle Valo #include <linux/gfp.h> 69e705c121SKalle Valo #include <net/mac80211.h> 70e705c121SKalle Valo 71e705c121SKalle Valo extern struct iwl_mod_params iwlwifi_mod_params; 72e705c121SKalle Valo 73e705c121SKalle Valo enum iwl_power_level { 74e705c121SKalle Valo IWL_POWER_INDEX_1, 75e705c121SKalle Valo IWL_POWER_INDEX_2, 76e705c121SKalle Valo IWL_POWER_INDEX_3, 77e705c121SKalle Valo IWL_POWER_INDEX_4, 78e705c121SKalle Valo IWL_POWER_INDEX_5, 79e705c121SKalle Valo IWL_POWER_NUM 80e705c121SKalle Valo }; 81e705c121SKalle Valo 82e705c121SKalle Valo enum iwl_disable_11n { 83e705c121SKalle Valo IWL_DISABLE_HT_ALL = BIT(0), 84e705c121SKalle Valo IWL_DISABLE_HT_TXAGG = BIT(1), 85e705c121SKalle Valo IWL_DISABLE_HT_RXAGG = BIT(2), 86e705c121SKalle Valo IWL_ENABLE_HT_TXAGG = BIT(3), 87e705c121SKalle Valo }; 88e705c121SKalle Valo 896c4fbcbcSEmmanuel Grumbach enum iwl_amsdu_size { 906c4fbcbcSEmmanuel Grumbach IWL_AMSDU_4K = 0, 916c4fbcbcSEmmanuel Grumbach IWL_AMSDU_8K = 1, 926c4fbcbcSEmmanuel Grumbach IWL_AMSDU_12K = 2, 936c4fbcbcSEmmanuel Grumbach }; 946c4fbcbcSEmmanuel Grumbach 95e705c121SKalle Valo /** 96e705c121SKalle Valo * struct iwl_mod_params 97e705c121SKalle Valo * 98e705c121SKalle Valo * Holds the module parameters 99e705c121SKalle Valo * 100e705c121SKalle Valo * @sw_crypto: using hardware encryption, default = 0 101e705c121SKalle Valo * @disable_11n: disable 11n capabilities, default = 0, 102e705c121SKalle Valo * use IWL_[DIS,EN]ABLE_HT_* constants 1036c4fbcbcSEmmanuel Grumbach * @amsdu_size: enable 8K amsdu size, default = 4K. enum iwl_amsdu_size. 104e705c121SKalle Valo * @restart_fw: restart firmware, default = 1 105e705c121SKalle Valo * @bt_coex_active: enable bt coex, default = true 106e705c121SKalle Valo * @led_mode: system default, default = 0 107e705c121SKalle Valo * @power_save: enable power save, default = false 108e705c121SKalle Valo * @power_level: power level, default = 1 109e705c121SKalle Valo * @debug_level: levels are IWL_DL_* 110e705c121SKalle Valo * @ant_coupling: antenna coupling in dB, default = 0 111*d1cae0fdSRodrigo Freire * @nvm_file: specifies a external NVM file 112*d1cae0fdSRodrigo Freire * @uapsd_disable: disable U-APSD, default = 1 113e705c121SKalle Valo * @d0i3_disable: disable d0i3, default = 1, 114b2c5d3a8SLuca Coelho * @d0i3_entry_delay: time to wait after no refs are taken before 115b2c5d3a8SLuca Coelho * entering D0i3 (in msecs) 116e705c121SKalle Valo * @lar_disable: disable LAR (regulatory), default = 0 117e705c121SKalle Valo * @fw_monitor: allow to use firmware monitor 118e705c121SKalle Valo */ 119e705c121SKalle Valo struct iwl_mod_params { 120e705c121SKalle Valo int sw_crypto; 121e705c121SKalle Valo unsigned int disable_11n; 1226c4fbcbcSEmmanuel Grumbach int amsdu_size; 123e705c121SKalle Valo bool restart_fw; 124e705c121SKalle Valo bool bt_coex_active; 125e705c121SKalle Valo int led_mode; 126e705c121SKalle Valo bool power_save; 127e705c121SKalle Valo int power_level; 128e705c121SKalle Valo #ifdef CONFIG_IWLWIFI_DEBUG 129e705c121SKalle Valo u32 debug_level; 130e705c121SKalle Valo #endif 131e705c121SKalle Valo int ant_coupling; 132e705c121SKalle Valo char *nvm_file; 133e705c121SKalle Valo bool uapsd_disable; 134e705c121SKalle Valo bool d0i3_disable; 135b2c5d3a8SLuca Coelho unsigned int d0i3_entry_delay; 136e705c121SKalle Valo bool lar_disable; 137e705c121SKalle Valo bool fw_monitor; 138e705c121SKalle Valo }; 139e705c121SKalle Valo 140e705c121SKalle Valo #endif /* #__iwl_modparams_h__ */ 141