iwl-6000.c 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2008 - 2010 Intel Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. * The full GNU General Public License is included in this distribution in the
  19. * file called LICENSE.
  20. *
  21. * Contact Information:
  22. * Intel Linux Wireless <ilw@linux.intel.com>
  23. * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  24. *
  25. *****************************************************************************/
  26. #include <linux/kernel.h>
  27. #include <linux/module.h>
  28. #include <linux/init.h>
  29. #include <linux/pci.h>
  30. #include <linux/dma-mapping.h>
  31. #include <linux/delay.h>
  32. #include <linux/skbuff.h>
  33. #include <linux/netdevice.h>
  34. #include <linux/wireless.h>
  35. #include <net/mac80211.h>
  36. #include <linux/etherdevice.h>
  37. #include <asm/unaligned.h>
  38. #include "iwl-eeprom.h"
  39. #include "iwl-dev.h"
  40. #include "iwl-core.h"
  41. #include "iwl-io.h"
  42. #include "iwl-sta.h"
  43. #include "iwl-agn.h"
  44. #include "iwl-helpers.h"
  45. #include "iwl-agn-hw.h"
  46. #include "iwl-6000-hw.h"
  47. #include "iwl-agn-led.h"
  48. #include "iwl-agn-debugfs.h"
  49. /* Highest firmware API version supported */
  50. #define IWL6000_UCODE_API_MAX 4
  51. #define IWL6050_UCODE_API_MAX 4
  52. #define IWL6000G2_UCODE_API_MAX 5
  53. /* Lowest firmware API version supported */
  54. #define IWL6000_UCODE_API_MIN 4
  55. #define IWL6050_UCODE_API_MIN 4
  56. #define IWL6000G2_UCODE_API_MIN 4
  57. #define IWL6000_FW_PRE "iwlwifi-6000-"
  58. #define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode"
  59. #define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api)
  60. #define IWL6050_FW_PRE "iwlwifi-6050-"
  61. #define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
  62. #define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api)
  63. #define IWL6000G2A_FW_PRE "iwlwifi-6000g2a-"
  64. #define _IWL6000G2A_MODULE_FIRMWARE(api) IWL6000G2A_FW_PRE #api ".ucode"
  65. #define IWL6000G2A_MODULE_FIRMWARE(api) _IWL6000G2A_MODULE_FIRMWARE(api)
  66. #define IWL6000G2B_FW_PRE "iwlwifi-6000g2b-"
  67. #define _IWL6000G2B_MODULE_FIRMWARE(api) IWL6000G2B_FW_PRE #api ".ucode"
  68. #define IWL6000G2B_MODULE_FIRMWARE(api) _IWL6000G2B_MODULE_FIRMWARE(api)
  69. static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
  70. {
  71. /* want Celsius */
  72. priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
  73. priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
  74. }
  75. /* Indicate calibration version to uCode. */
  76. static void iwl6000_set_calib_version(struct iwl_priv *priv)
  77. {
  78. if (priv->cfg->need_dc_calib &&
  79. (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6))
  80. iwl_set_bit(priv, CSR_GP_DRIVER_REG,
  81. CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
  82. }
  83. /* NIC configuration for 6000 series */
  84. static void iwl6000_nic_config(struct iwl_priv *priv)
  85. {
  86. u16 radio_cfg;
  87. radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
  88. /* write radio config values to register */
  89. if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX)
  90. iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
  91. EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
  92. EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
  93. EEPROM_RF_CFG_DASH_MSK(radio_cfg));
  94. /* set CSR_HW_CONFIG_REG for uCode use */
  95. iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
  96. CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
  97. CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
  98. /* no locking required for register write */
  99. if (priv->cfg->pa_type == IWL_PA_INTERNAL) {
  100. /* 2x2 IPA phy type */
  101. iwl_write32(priv, CSR_GP_DRIVER_REG,
  102. CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
  103. }
  104. /* else do nothing, uCode configured */
  105. if (priv->cfg->ops->lib->temp_ops.set_calib_version)
  106. priv->cfg->ops->lib->temp_ops.set_calib_version(priv);
  107. }
  108. /*
  109. * Macros to access the lookup table.
  110. *
  111. * The lookup table has 7 inputs: bt3_prio, bt3_txrx, bt_rf_act, wifi_req,
  112. * wifi_prio, wifi_txrx and wifi_sh_ant_req.
  113. *
  114. * It has three outputs: WLAN_ACTIVE, WLAN_KILL and ANT_SWITCH
  115. *
  116. * The format is that "registers" 8 through 11 contain the WLAN_ACTIVE bits
  117. * one after another in 32-bit registers, and "registers" 0 through 7 contain
  118. * the WLAN_KILL and ANT_SWITCH bits interleaved (in that order).
  119. *
  120. * These macros encode that format.
  121. */
  122. #define LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, wifi_req, wifi_prio, \
  123. wifi_txrx, wifi_sh_ant_req) \
  124. (bt3_prio | (bt3_txrx << 1) | (bt_rf_act << 2) | (wifi_req << 3) | \
  125. (wifi_prio << 4) | (wifi_txrx << 5) | (wifi_sh_ant_req << 6))
  126. #define LUT_PTA_WLAN_ACTIVE_OP(lut, op, val) \
  127. lut[8 + ((val) >> 5)] op (cpu_to_le32(BIT((val) & 0x1f)))
  128. #define LUT_TEST_PTA_WLAN_ACTIVE(lut, bt3_prio, bt3_txrx, bt_rf_act, \
  129. wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req) \
  130. (!!(LUT_PTA_WLAN_ACTIVE_OP(lut, &, LUT_VALUE(bt3_prio, bt3_txrx,\
  131. bt_rf_act, wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))))
  132. #define LUT_SET_PTA_WLAN_ACTIVE(lut, bt3_prio, bt3_txrx, bt_rf_act, \
  133. wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req) \
  134. LUT_PTA_WLAN_ACTIVE_OP(lut, |=, LUT_VALUE(bt3_prio, bt3_txrx, \
  135. bt_rf_act, wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))
  136. #define LUT_CLEAR_PTA_WLAN_ACTIVE(lut, bt3_prio, bt3_txrx, bt_rf_act, \
  137. wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req) \
  138. LUT_PTA_WLAN_ACTIVE_OP(lut, &= ~, LUT_VALUE(bt3_prio, bt3_txrx, \
  139. bt_rf_act, wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))
  140. #define LUT_WLAN_KILL_OP(lut, op, val) \
  141. lut[(val) >> 4] op (cpu_to_le32(BIT(((val) << 1) & 0x1e)))
  142. #define LUT_TEST_WLAN_KILL(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \
  143. wifi_prio, wifi_txrx, wifi_sh_ant_req) \
  144. (!!(LUT_WLAN_KILL_OP(lut, &, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \
  145. wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))))
  146. #define LUT_SET_WLAN_KILL(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \
  147. wifi_prio, wifi_txrx, wifi_sh_ant_req) \
  148. LUT_WLAN_KILL_OP(lut, |=, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \
  149. wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))
  150. #define LUT_CLEAR_WLAN_KILL(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \
  151. wifi_prio, wifi_txrx, wifi_sh_ant_req) \
  152. LUT_WLAN_KILL_OP(lut, &= ~, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \
  153. wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))
  154. #define LUT_ANT_SWITCH_OP(lut, op, val) \
  155. lut[(val) >> 4] op (cpu_to_le32(BIT((((val) << 1) & 0x1e) + 1)))
  156. #define LUT_TEST_ANT_SWITCH(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \
  157. wifi_prio, wifi_txrx, wifi_sh_ant_req) \
  158. (!!(LUT_ANT_SWITCH_OP(lut, &, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \
  159. wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))))
  160. #define LUT_SET_ANT_SWITCH(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \
  161. wifi_prio, wifi_txrx, wifi_sh_ant_req) \
  162. LUT_ANT_SWITCH_OP(lut, |=, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \
  163. wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))
  164. #define LUT_CLEAR_ANT_SWITCH(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \
  165. wifi_prio, wifi_txrx, wifi_sh_ant_req) \
  166. LUT_ANT_SWITCH_OP(lut, &= ~, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \
  167. wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req))
  168. static const __le32 iwl6000g2b_def_3w_lookup[12] = {
  169. cpu_to_le32(0xaaaaaaaa),
  170. cpu_to_le32(0xaaaaaaaa),
  171. cpu_to_le32(0xaeaaaaaa),
  172. cpu_to_le32(0xaaaaaaaa),
  173. cpu_to_le32(0xcc00ff28),
  174. cpu_to_le32(0x0000aaaa),
  175. cpu_to_le32(0xcc00aaaa),
  176. cpu_to_le32(0x0000aaaa),
  177. cpu_to_le32(0xc0004000),
  178. cpu_to_le32(0x00004000),
  179. cpu_to_le32(0xf0005000),
  180. cpu_to_le32(0xf0004000),
  181. };
  182. static void iwl6000g2b_send_bt_config(struct iwl_priv *priv)
  183. {
  184. struct iwl6000g2b_bt_cmd bt_cmd = {
  185. .prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
  186. .max_kill = IWL6000G2B_BT_MAX_KILL_DEFAULT,
  187. .bt3_timer_t7_value = IWL6000G2B_BT3_T7_DEFAULT,
  188. .kill_ack_mask = IWL6000G2B_BT_KILL_ACK_MASK_DEFAULT,
  189. .kill_cts_mask = IWL6000G2B_BT_KILL_CTS_MASK_DEFAULT,
  190. .bt3_prio_sample_time = IWL6000G2B_BT3_PRIO_SAMPLE_DEFAULT,
  191. .bt3_timer_t2_value = IWL6000G2B_BT3_T2_DEFAULT,
  192. .valid = IWL6000G2B_BT_VALID_ENABLE_FLAGS,
  193. };
  194. BUILD_BUG_ON(sizeof(iwl6000g2b_def_3w_lookup) !=
  195. sizeof(bt_cmd.bt3_lookup_table));
  196. /*
  197. * Configure BT coex mode to "no coexistence" when the
  198. * user disabled BT coexistence, we have no interface
  199. * (might be in monitor mode), or the interface is in
  200. * IBSS mode (no proper uCode support for coex then).
  201. */
  202. if (!bt_coex_active || !priv->vif ||
  203. priv->iw_mode == NL80211_IFTYPE_ADHOC) {
  204. bt_cmd.flags = 0;
  205. } else {
  206. bt_cmd.flags = IWL6000G2B_BT_FLAG_CHANNEL_INHIBITION |
  207. IWL6000G2B_BT_FLAG_COEX_MODE_3W <<
  208. IWL6000G2B_BT_FLAG_COEX_MODE_SHIFT;
  209. bt_cmd.valid |= IWL6000G2B_BT_ALL_VALID_MSK;
  210. }
  211. memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_def_3w_lookup,
  212. sizeof(iwl6000g2b_def_3w_lookup));
  213. IWL_DEBUG_INFO(priv, "BT coex %s\n",
  214. bt_cmd.flags ? "active" : "disabled");
  215. if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, sizeof(bt_cmd), &bt_cmd))
  216. IWL_ERR(priv, "failed to send BT Coex Config\n");
  217. /*
  218. * When we are doing a restart, need to also reconfigure BT
  219. * SCO to the device. If not doing a restart, bt_sco_active
  220. * will always be false, so there's no need to have an extra
  221. * variable to check for it.
  222. */
  223. if (priv->bt_sco_active) {
  224. struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 };
  225. if (priv->bt_sco_active)
  226. sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
  227. if (iwl_send_cmd_pdu(priv, REPLY_BT_COEX_SCO,
  228. sizeof(sco_cmd), &sco_cmd))
  229. IWL_ERR(priv, "failed to send BT SCO command\n");
  230. }
  231. }
  232. static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
  233. .min_nrg_cck = 97,
  234. .max_nrg_cck = 0, /* not used, set to 0 */
  235. .auto_corr_min_ofdm = 80,
  236. .auto_corr_min_ofdm_mrc = 128,
  237. .auto_corr_min_ofdm_x1 = 105,
  238. .auto_corr_min_ofdm_mrc_x1 = 192,
  239. .auto_corr_max_ofdm = 145,
  240. .auto_corr_max_ofdm_mrc = 232,
  241. .auto_corr_max_ofdm_x1 = 110,
  242. .auto_corr_max_ofdm_mrc_x1 = 232,
  243. .auto_corr_min_cck = 125,
  244. .auto_corr_max_cck = 175,
  245. .auto_corr_min_cck_mrc = 160,
  246. .auto_corr_max_cck_mrc = 310,
  247. .nrg_th_cck = 97,
  248. .nrg_th_ofdm = 100,
  249. .barker_corr_th_min = 190,
  250. .barker_corr_th_min_mrc = 390,
  251. .nrg_th_cca = 62,
  252. };
  253. static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
  254. {
  255. if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
  256. priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
  257. priv->cfg->num_of_queues =
  258. priv->cfg->mod_params->num_of_queues;
  259. priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
  260. priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
  261. priv->hw_params.scd_bc_tbls_size =
  262. priv->cfg->num_of_queues *
  263. sizeof(struct iwlagn_scd_bc_tbl);
  264. priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
  265. priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
  266. priv->hw_params.bcast_sta_id = IWLAGN_BROADCAST_ID;
  267. priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
  268. priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
  269. priv->hw_params.max_bsm_size = 0;
  270. priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
  271. BIT(IEEE80211_BAND_5GHZ);
  272. priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
  273. priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
  274. priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
  275. priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
  276. priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
  277. if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
  278. priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
  279. /* Set initial sensitivity parameters */
  280. /* Set initial calibration set */
  281. priv->hw_params.sens = &iwl6000_sensitivity;
  282. priv->hw_params.calib_init_cfg =
  283. BIT(IWL_CALIB_XTAL) |
  284. BIT(IWL_CALIB_LO) |
  285. BIT(IWL_CALIB_TX_IQ) |
  286. BIT(IWL_CALIB_BASE_BAND);
  287. if (priv->cfg->need_dc_calib)
  288. priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC);
  289. priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
  290. return 0;
  291. }
  292. static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
  293. struct ieee80211_channel_switch *ch_switch)
  294. {
  295. struct iwl6000_channel_switch_cmd cmd;
  296. const struct iwl_channel_info *ch_info;
  297. u32 switch_time_in_usec, ucode_switch_time;
  298. u16 ch;
  299. u32 tsf_low;
  300. u8 switch_count;
  301. u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval);
  302. struct ieee80211_vif *vif = priv->vif;
  303. struct iwl_host_cmd hcmd = {
  304. .id = REPLY_CHANNEL_SWITCH,
  305. .len = sizeof(cmd),
  306. .flags = CMD_SYNC,
  307. .data = &cmd,
  308. };
  309. cmd.band = priv->band == IEEE80211_BAND_2GHZ;
  310. ch = ch_switch->channel->hw_value;
  311. IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
  312. priv->active_rxon.channel, ch);
  313. cmd.channel = cpu_to_le16(ch);
  314. cmd.rxon_flags = priv->staging_rxon.flags;
  315. cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
  316. switch_count = ch_switch->count;
  317. tsf_low = ch_switch->timestamp & 0x0ffffffff;
  318. /*
  319. * calculate the ucode channel switch time
  320. * adding TSF as one of the factor for when to switch
  321. */
  322. if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
  323. if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
  324. beacon_interval)) {
  325. switch_count -= (priv->ucode_beacon_time -
  326. tsf_low) / beacon_interval;
  327. } else
  328. switch_count = 0;
  329. }
  330. if (switch_count <= 1)
  331. cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
  332. else {
  333. switch_time_in_usec =
  334. vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
  335. ucode_switch_time = iwl_usecs_to_beacons(priv,
  336. switch_time_in_usec,
  337. beacon_interval);
  338. cmd.switch_time = iwl_add_beacon_time(priv,
  339. priv->ucode_beacon_time,
  340. ucode_switch_time,
  341. beacon_interval);
  342. }
  343. IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
  344. cmd.switch_time);
  345. ch_info = iwl_get_channel_info(priv, priv->band, ch);
  346. if (ch_info)
  347. cmd.expect_beacon = is_channel_radar(ch_info);
  348. else {
  349. IWL_ERR(priv, "invalid channel switch from %u to %u\n",
  350. priv->active_rxon.channel, ch);
  351. return -EFAULT;
  352. }
  353. priv->switch_rxon.channel = cmd.channel;
  354. priv->switch_rxon.switch_in_progress = true;
  355. return iwl_send_cmd_sync(priv, &hcmd);
  356. }
  357. static void iwl6000g2b_bt_traffic_change_work(struct work_struct *work)
  358. {
  359. struct iwl_priv *priv =
  360. container_of(work, struct iwl_priv, bt_traffic_change_work);
  361. int smps_request = -1;
  362. switch (priv->bt_traffic_load) {
  363. case IWL_BT_COEX_TRAFFIC_LOAD_NONE:
  364. smps_request = IEEE80211_SMPS_AUTOMATIC;
  365. break;
  366. case IWL_BT_COEX_TRAFFIC_LOAD_LOW:
  367. smps_request = IEEE80211_SMPS_DYNAMIC;
  368. break;
  369. case IWL_BT_COEX_TRAFFIC_LOAD_HIGH:
  370. case IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS:
  371. smps_request = IEEE80211_SMPS_STATIC;
  372. break;
  373. default:
  374. IWL_ERR(priv, "Invalid BT traffic load: %d\n",
  375. priv->bt_traffic_load);
  376. break;
  377. }
  378. mutex_lock(&priv->mutex);
  379. if (smps_request != -1 &&
  380. priv->vif && priv->vif->type == NL80211_IFTYPE_STATION)
  381. ieee80211_request_smps(priv->vif, smps_request);
  382. mutex_unlock(&priv->mutex);
  383. }
  384. static void iwl6000g2b_bt_coex_profile_notif(struct iwl_priv *priv,
  385. struct iwl_rx_mem_buffer *rxb)
  386. {
  387. struct iwl_rx_packet *pkt = rxb_addr(rxb);
  388. struct iwl_bt_coex_profile_notif *coex = &pkt->u.bt_coex_profile_notif;
  389. struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 };
  390. IWL_DEBUG_NOTIF(priv, "BT Coex notification:\n");
  391. IWL_DEBUG_NOTIF(priv, " status: %d\n", coex->bt_status);
  392. IWL_DEBUG_NOTIF(priv, " traffic load: %d\n", coex->bt_traffic_load);
  393. IWL_DEBUG_NOTIF(priv, " CI compliance: %d\n", coex->bt_ci_compliance);
  394. IWL_DEBUG_NOTIF(priv, " UART msg: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x:"
  395. "%.2x:%.2x\n",
  396. coex->uart_msg[0], coex->uart_msg[1], coex->uart_msg[2],
  397. coex->uart_msg[3], coex->uart_msg[4], coex->uart_msg[5],
  398. coex->uart_msg[6], coex->uart_msg[7]);
  399. priv->notif_bt_traffic_load = coex->bt_traffic_load;
  400. if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
  401. if (coex->bt_traffic_load != priv->bt_traffic_load) {
  402. priv->bt_traffic_load = coex->bt_traffic_load;
  403. queue_work(priv->workqueue,
  404. &priv->bt_traffic_change_work);
  405. }
  406. /* FIXME: add defines for this check */
  407. priv->bt_sco_active = coex->uart_msg[3] & 1;
  408. if (priv->bt_sco_active)
  409. sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
  410. iwl_send_cmd_pdu_async(priv, REPLY_BT_COEX_SCO,
  411. sizeof(sco_cmd), &sco_cmd, NULL);
  412. }
  413. }
  414. void iwl6000g2b_rx_handler_setup(struct iwl_priv *priv)
  415. {
  416. iwlagn_rx_handler_setup(priv);
  417. priv->rx_handlers[REPLY_BT_COEX_PROFILE_NOTIF] =
  418. iwl6000g2b_bt_coex_profile_notif;
  419. }
  420. static void iwl6000g2b_bt_setup_deferred_work(struct iwl_priv *priv)
  421. {
  422. iwlagn_setup_deferred_work(priv);
  423. INIT_WORK(&priv->bt_traffic_change_work,
  424. iwl6000g2b_bt_traffic_change_work);
  425. }
  426. static void iwl6000g2b_bt_cancel_deferred_work(struct iwl_priv *priv)
  427. {
  428. cancel_work_sync(&priv->bt_traffic_change_work);
  429. }
  430. static struct iwl_lib_ops iwl6000_lib = {
  431. .set_hw_params = iwl6000_hw_set_hw_params,
  432. .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
  433. .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
  434. .txq_set_sched = iwlagn_txq_set_sched,
  435. .txq_agg_enable = iwlagn_txq_agg_enable,
  436. .txq_agg_disable = iwlagn_txq_agg_disable,
  437. .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
  438. .txq_free_tfd = iwl_hw_txq_free_tfd,
  439. .txq_init = iwl_hw_tx_queue_init,
  440. .rx_handler_setup = iwlagn_rx_handler_setup,
  441. .setup_deferred_work = iwlagn_setup_deferred_work,
  442. .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
  443. .load_ucode = iwlagn_load_ucode,
  444. .dump_nic_event_log = iwl_dump_nic_event_log,
  445. .dump_nic_error_log = iwl_dump_nic_error_log,
  446. .dump_csr = iwl_dump_csr,
  447. .dump_fh = iwl_dump_fh,
  448. .init_alive_start = iwlagn_init_alive_start,
  449. .alive_notify = iwlagn_alive_notify,
  450. .send_tx_power = iwlagn_send_tx_power,
  451. .update_chain_flags = iwl_update_chain_flags,
  452. .set_channel_switch = iwl6000_hw_channel_switch,
  453. .apm_ops = {
  454. .init = iwl_apm_init,
  455. .stop = iwl_apm_stop,
  456. .config = iwl6000_nic_config,
  457. .set_pwr_src = iwl_set_pwr_src,
  458. },
  459. .eeprom_ops = {
  460. .regulatory_bands = {
  461. EEPROM_REG_BAND_1_CHANNELS,
  462. EEPROM_REG_BAND_2_CHANNELS,
  463. EEPROM_REG_BAND_3_CHANNELS,
  464. EEPROM_REG_BAND_4_CHANNELS,
  465. EEPROM_REG_BAND_5_CHANNELS,
  466. EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
  467. EEPROM_REG_BAND_52_HT40_CHANNELS
  468. },
  469. .verify_signature = iwlcore_eeprom_verify_signature,
  470. .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
  471. .release_semaphore = iwlcore_eeprom_release_semaphore,
  472. .calib_version = iwlagn_eeprom_calib_version,
  473. .query_addr = iwlagn_eeprom_query_addr,
  474. .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
  475. },
  476. .post_associate = iwl_post_associate,
  477. .isr = iwl_isr_ict,
  478. .config_ap = iwl_config_ap,
  479. .temp_ops = {
  480. .temperature = iwlagn_temperature,
  481. .set_ct_kill = iwl6000_set_ct_threshold,
  482. .set_calib_version = iwl6000_set_calib_version,
  483. },
  484. .manage_ibss_station = iwlagn_manage_ibss_station,
  485. .update_bcast_station = iwl_update_bcast_station,
  486. .debugfs_ops = {
  487. .rx_stats_read = iwl_ucode_rx_stats_read,
  488. .tx_stats_read = iwl_ucode_tx_stats_read,
  489. .general_stats_read = iwl_ucode_general_stats_read,
  490. .bt_stats_read = iwl_ucode_bt_stats_read,
  491. },
  492. .recover_from_tx_stall = iwl_bg_monitor_recover,
  493. .check_plcp_health = iwl_good_plcp_health,
  494. .check_ack_health = iwl_good_ack_health,
  495. .txfifo_flush = iwlagn_txfifo_flush,
  496. .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
  497. .tt_ops = {
  498. .lower_power_detection = iwl_tt_is_low_power_state,
  499. .tt_power_mode = iwl_tt_current_power_mode,
  500. .ct_kill_check = iwl_check_for_ct_kill,
  501. }
  502. };
  503. static struct iwl_lib_ops iwl6000g2b_lib = {
  504. .set_hw_params = iwl6000_hw_set_hw_params,
  505. .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
  506. .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
  507. .txq_set_sched = iwlagn_txq_set_sched,
  508. .txq_agg_enable = iwlagn_txq_agg_enable,
  509. .txq_agg_disable = iwlagn_txq_agg_disable,
  510. .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
  511. .txq_free_tfd = iwl_hw_txq_free_tfd,
  512. .txq_init = iwl_hw_tx_queue_init,
  513. .rx_handler_setup = iwl6000g2b_rx_handler_setup,
  514. .setup_deferred_work = iwl6000g2b_bt_setup_deferred_work,
  515. .cancel_deferred_work = iwl6000g2b_bt_cancel_deferred_work,
  516. .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
  517. .load_ucode = iwlagn_load_ucode,
  518. .dump_nic_event_log = iwl_dump_nic_event_log,
  519. .dump_nic_error_log = iwl_dump_nic_error_log,
  520. .dump_csr = iwl_dump_csr,
  521. .dump_fh = iwl_dump_fh,
  522. .init_alive_start = iwlagn_init_alive_start,
  523. .alive_notify = iwlagn_alive_notify,
  524. .send_tx_power = iwlagn_send_tx_power,
  525. .update_chain_flags = iwl_update_chain_flags,
  526. .set_channel_switch = iwl6000_hw_channel_switch,
  527. .apm_ops = {
  528. .init = iwl_apm_init,
  529. .stop = iwl_apm_stop,
  530. .config = iwl6000_nic_config,
  531. .set_pwr_src = iwl_set_pwr_src,
  532. },
  533. .eeprom_ops = {
  534. .regulatory_bands = {
  535. EEPROM_REG_BAND_1_CHANNELS,
  536. EEPROM_REG_BAND_2_CHANNELS,
  537. EEPROM_REG_BAND_3_CHANNELS,
  538. EEPROM_REG_BAND_4_CHANNELS,
  539. EEPROM_REG_BAND_5_CHANNELS,
  540. EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
  541. EEPROM_REG_BAND_52_HT40_CHANNELS
  542. },
  543. .verify_signature = iwlcore_eeprom_verify_signature,
  544. .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
  545. .release_semaphore = iwlcore_eeprom_release_semaphore,
  546. .calib_version = iwlagn_eeprom_calib_version,
  547. .query_addr = iwlagn_eeprom_query_addr,
  548. .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
  549. },
  550. .post_associate = iwl_post_associate,
  551. .isr = iwl_isr_ict,
  552. .config_ap = iwl_config_ap,
  553. .temp_ops = {
  554. .temperature = iwlagn_temperature,
  555. .set_ct_kill = iwl6000_set_ct_threshold,
  556. .set_calib_version = iwl6000_set_calib_version,
  557. },
  558. .manage_ibss_station = iwlagn_manage_ibss_station,
  559. .update_bcast_station = iwl_update_bcast_station,
  560. .debugfs_ops = {
  561. .rx_stats_read = iwl_ucode_rx_stats_read,
  562. .tx_stats_read = iwl_ucode_tx_stats_read,
  563. .general_stats_read = iwl_ucode_general_stats_read,
  564. .bt_stats_read = iwl_ucode_bt_stats_read,
  565. },
  566. .recover_from_tx_stall = iwl_bg_monitor_recover,
  567. .check_plcp_health = iwl_good_plcp_health,
  568. .check_ack_health = iwl_good_ack_health,
  569. .txfifo_flush = iwlagn_txfifo_flush,
  570. .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
  571. .tt_ops = {
  572. .lower_power_detection = iwl_tt_is_low_power_state,
  573. .tt_power_mode = iwl_tt_current_power_mode,
  574. .ct_kill_check = iwl_check_for_ct_kill,
  575. }
  576. };
  577. static const struct iwl_ops iwl6000_ops = {
  578. .lib = &iwl6000_lib,
  579. .hcmd = &iwlagn_hcmd,
  580. .utils = &iwlagn_hcmd_utils,
  581. .led = &iwlagn_led_ops,
  582. };
  583. static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
  584. .rxon_assoc = iwlagn_send_rxon_assoc,
  585. .commit_rxon = iwl_commit_rxon,
  586. .set_rxon_chain = iwl_set_rxon_chain,
  587. .set_tx_ant = iwlagn_send_tx_ant_config,
  588. .send_bt_config = iwl6000g2b_send_bt_config,
  589. };
  590. static const struct iwl_ops iwl6000g2b_ops = {
  591. .lib = &iwl6000g2b_lib,
  592. .hcmd = &iwl6000g2b_hcmd,
  593. .utils = &iwlagn_hcmd_utils,
  594. .led = &iwlagn_led_ops,
  595. };
  596. struct iwl_cfg iwl6000g2a_2agn_cfg = {
  597. .name = "6000 Series 2x2 AGN Gen2a",
  598. .fw_name_pre = IWL6000G2A_FW_PRE,
  599. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  600. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  601. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  602. .ops = &iwl6000_ops,
  603. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  604. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  605. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  606. .num_of_queues = IWLAGN_NUM_QUEUES,
  607. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  608. .mod_params = &iwlagn_mod_params,
  609. .valid_tx_ant = ANT_AB,
  610. .valid_rx_ant = ANT_AB,
  611. .pll_cfg_val = 0,
  612. .set_l0s = true,
  613. .use_bsm = false,
  614. .pa_type = IWL_PA_SYSTEM,
  615. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  616. .shadow_ram_support = true,
  617. .ht_greenfield_support = true,
  618. .led_compensation = 51,
  619. .use_rts_for_aggregation = true, /* use rts/cts protection */
  620. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  621. .supports_idle = true,
  622. .adv_thermal_throttle = true,
  623. .support_ct_kill_exit = true,
  624. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  625. .chain_noise_scale = 1000,
  626. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  627. .max_event_log_size = 512,
  628. .ucode_tracing = true,
  629. .sensitivity_calib_by_driver = true,
  630. .chain_noise_calib_by_driver = true,
  631. .need_dc_calib = true,
  632. };
  633. struct iwl_cfg iwl6000g2a_2abg_cfg = {
  634. .name = "6000 Series 2x2 ABG Gen2a",
  635. .fw_name_pre = IWL6000G2A_FW_PRE,
  636. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  637. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  638. .sku = IWL_SKU_A|IWL_SKU_G,
  639. .ops = &iwl6000_ops,
  640. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  641. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  642. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  643. .num_of_queues = IWLAGN_NUM_QUEUES,
  644. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  645. .mod_params = &iwlagn_mod_params,
  646. .valid_tx_ant = ANT_AB,
  647. .valid_rx_ant = ANT_AB,
  648. .pll_cfg_val = 0,
  649. .set_l0s = true,
  650. .use_bsm = false,
  651. .pa_type = IWL_PA_SYSTEM,
  652. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  653. .shadow_ram_support = true,
  654. .led_compensation = 51,
  655. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  656. .supports_idle = true,
  657. .adv_thermal_throttle = true,
  658. .support_ct_kill_exit = true,
  659. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  660. .chain_noise_scale = 1000,
  661. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  662. .max_event_log_size = 512,
  663. .sensitivity_calib_by_driver = true,
  664. .chain_noise_calib_by_driver = true,
  665. .need_dc_calib = true,
  666. };
  667. struct iwl_cfg iwl6000g2a_2bg_cfg = {
  668. .name = "6000 Series 2x2 BG Gen2a",
  669. .fw_name_pre = IWL6000G2A_FW_PRE,
  670. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  671. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  672. .sku = IWL_SKU_G,
  673. .ops = &iwl6000_ops,
  674. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  675. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  676. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  677. .num_of_queues = IWLAGN_NUM_QUEUES,
  678. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  679. .mod_params = &iwlagn_mod_params,
  680. .valid_tx_ant = ANT_AB,
  681. .valid_rx_ant = ANT_AB,
  682. .pll_cfg_val = 0,
  683. .set_l0s = true,
  684. .use_bsm = false,
  685. .pa_type = IWL_PA_SYSTEM,
  686. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  687. .shadow_ram_support = true,
  688. .led_compensation = 51,
  689. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  690. .supports_idle = true,
  691. .adv_thermal_throttle = true,
  692. .support_ct_kill_exit = true,
  693. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  694. .chain_noise_scale = 1000,
  695. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  696. .max_event_log_size = 512,
  697. .sensitivity_calib_by_driver = true,
  698. .chain_noise_calib_by_driver = true,
  699. .need_dc_calib = true,
  700. };
  701. struct iwl_cfg iwl6000g2b_2agn_cfg = {
  702. .name = "6000 Series 2x2 AGN Gen2b",
  703. .fw_name_pre = IWL6000G2B_FW_PRE,
  704. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  705. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  706. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  707. .ops = &iwl6000g2b_ops,
  708. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  709. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  710. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  711. .num_of_queues = IWLAGN_NUM_QUEUES,
  712. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  713. .mod_params = &iwlagn_mod_params,
  714. .valid_tx_ant = ANT_AB,
  715. .valid_rx_ant = ANT_AB,
  716. .pll_cfg_val = 0,
  717. .set_l0s = true,
  718. .use_bsm = false,
  719. .pa_type = IWL_PA_SYSTEM,
  720. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  721. .shadow_ram_support = true,
  722. .ht_greenfield_support = true,
  723. .led_compensation = 51,
  724. .use_rts_for_aggregation = true, /* use rts/cts protection */
  725. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  726. .supports_idle = true,
  727. .adv_thermal_throttle = true,
  728. .support_ct_kill_exit = true,
  729. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
  730. .chain_noise_scale = 1000,
  731. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  732. .max_event_log_size = 512,
  733. .sensitivity_calib_by_driver = true,
  734. .chain_noise_calib_by_driver = true,
  735. .need_dc_calib = true,
  736. .bt_statistics = true,
  737. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  738. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  739. .advanced_bt_coexist = true,
  740. };
  741. struct iwl_cfg iwl6000g2b_2abg_cfg = {
  742. .name = "6000 Series 2x2 ABG Gen2b",
  743. .fw_name_pre = IWL6000G2B_FW_PRE,
  744. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  745. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  746. .sku = IWL_SKU_A|IWL_SKU_G,
  747. .ops = &iwl6000g2b_ops,
  748. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  749. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  750. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  751. .num_of_queues = IWLAGN_NUM_QUEUES,
  752. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  753. .mod_params = &iwlagn_mod_params,
  754. .valid_tx_ant = ANT_AB,
  755. .valid_rx_ant = ANT_AB,
  756. .pll_cfg_val = 0,
  757. .set_l0s = true,
  758. .use_bsm = false,
  759. .pa_type = IWL_PA_SYSTEM,
  760. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  761. .shadow_ram_support = true,
  762. .led_compensation = 51,
  763. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  764. .supports_idle = true,
  765. .adv_thermal_throttle = true,
  766. .support_ct_kill_exit = true,
  767. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
  768. .chain_noise_scale = 1000,
  769. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  770. .max_event_log_size = 512,
  771. .sensitivity_calib_by_driver = true,
  772. .chain_noise_calib_by_driver = true,
  773. .need_dc_calib = true,
  774. .bt_statistics = true,
  775. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  776. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  777. .advanced_bt_coexist = true,
  778. };
  779. struct iwl_cfg iwl6000g2b_2bgn_cfg = {
  780. .name = "6000 Series 2x2 BGN Gen2b",
  781. .fw_name_pre = IWL6000G2B_FW_PRE,
  782. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  783. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  784. .sku = IWL_SKU_G|IWL_SKU_N,
  785. .ops = &iwl6000g2b_ops,
  786. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  787. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  788. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  789. .num_of_queues = IWLAGN_NUM_QUEUES,
  790. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  791. .mod_params = &iwlagn_mod_params,
  792. .valid_tx_ant = ANT_AB,
  793. .valid_rx_ant = ANT_AB,
  794. .pll_cfg_val = 0,
  795. .set_l0s = true,
  796. .use_bsm = false,
  797. .pa_type = IWL_PA_SYSTEM,
  798. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  799. .shadow_ram_support = true,
  800. .ht_greenfield_support = true,
  801. .led_compensation = 51,
  802. .use_rts_for_aggregation = true, /* use rts/cts protection */
  803. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  804. .supports_idle = true,
  805. .adv_thermal_throttle = true,
  806. .support_ct_kill_exit = true,
  807. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
  808. .chain_noise_scale = 1000,
  809. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  810. .max_event_log_size = 512,
  811. .sensitivity_calib_by_driver = true,
  812. .chain_noise_calib_by_driver = true,
  813. .need_dc_calib = true,
  814. .bt_statistics = true,
  815. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  816. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  817. .advanced_bt_coexist = true,
  818. };
  819. struct iwl_cfg iwl6000g2b_2bg_cfg = {
  820. .name = "6000 Series 2x2 BG Gen2b",
  821. .fw_name_pre = IWL6000G2B_FW_PRE,
  822. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  823. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  824. .sku = IWL_SKU_G,
  825. .ops = &iwl6000g2b_ops,
  826. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  827. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  828. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  829. .num_of_queues = IWLAGN_NUM_QUEUES,
  830. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  831. .mod_params = &iwlagn_mod_params,
  832. .valid_tx_ant = ANT_AB,
  833. .valid_rx_ant = ANT_AB,
  834. .pll_cfg_val = 0,
  835. .set_l0s = true,
  836. .use_bsm = false,
  837. .pa_type = IWL_PA_SYSTEM,
  838. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  839. .shadow_ram_support = true,
  840. .led_compensation = 51,
  841. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  842. .supports_idle = true,
  843. .adv_thermal_throttle = true,
  844. .support_ct_kill_exit = true,
  845. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
  846. .chain_noise_scale = 1000,
  847. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  848. .max_event_log_size = 512,
  849. .sensitivity_calib_by_driver = true,
  850. .chain_noise_calib_by_driver = true,
  851. .need_dc_calib = true,
  852. .bt_statistics = true,
  853. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  854. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  855. .advanced_bt_coexist = true,
  856. };
  857. struct iwl_cfg iwl6000g2b_bgn_cfg = {
  858. .name = "6000 Series 1x2 BGN Gen2b",
  859. .fw_name_pre = IWL6000G2B_FW_PRE,
  860. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  861. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  862. .sku = IWL_SKU_G|IWL_SKU_N,
  863. .ops = &iwl6000g2b_ops,
  864. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  865. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  866. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  867. .num_of_queues = IWLAGN_NUM_QUEUES,
  868. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  869. .mod_params = &iwlagn_mod_params,
  870. .valid_tx_ant = ANT_A,
  871. .valid_rx_ant = ANT_AB,
  872. .pll_cfg_val = 0,
  873. .set_l0s = true,
  874. .use_bsm = false,
  875. .pa_type = IWL_PA_SYSTEM,
  876. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  877. .shadow_ram_support = true,
  878. .ht_greenfield_support = true,
  879. .led_compensation = 51,
  880. .use_rts_for_aggregation = true, /* use rts/cts protection */
  881. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  882. .supports_idle = true,
  883. .adv_thermal_throttle = true,
  884. .support_ct_kill_exit = true,
  885. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
  886. .chain_noise_scale = 1000,
  887. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  888. .max_event_log_size = 512,
  889. .sensitivity_calib_by_driver = true,
  890. .chain_noise_calib_by_driver = true,
  891. .need_dc_calib = true,
  892. .bt_statistics = true,
  893. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  894. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  895. .advanced_bt_coexist = true,
  896. };
  897. struct iwl_cfg iwl6000g2b_bg_cfg = {
  898. .name = "6000 Series 1x2 BG Gen2b",
  899. .fw_name_pre = IWL6000G2B_FW_PRE,
  900. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  901. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  902. .sku = IWL_SKU_G,
  903. .ops = &iwl6000g2b_ops,
  904. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  905. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  906. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  907. .num_of_queues = IWLAGN_NUM_QUEUES,
  908. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  909. .mod_params = &iwlagn_mod_params,
  910. .valid_tx_ant = ANT_A,
  911. .valid_rx_ant = ANT_AB,
  912. .pll_cfg_val = 0,
  913. .set_l0s = true,
  914. .use_bsm = false,
  915. .pa_type = IWL_PA_SYSTEM,
  916. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  917. .shadow_ram_support = true,
  918. .led_compensation = 51,
  919. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  920. .supports_idle = true,
  921. .adv_thermal_throttle = true,
  922. .support_ct_kill_exit = true,
  923. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
  924. .chain_noise_scale = 1000,
  925. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  926. .max_event_log_size = 512,
  927. .sensitivity_calib_by_driver = true,
  928. .chain_noise_calib_by_driver = true,
  929. .need_dc_calib = true,
  930. .bt_statistics = true,
  931. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  932. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  933. .advanced_bt_coexist = true,
  934. };
  935. /*
  936. * "i": Internal configuration, use internal Power Amplifier
  937. */
  938. struct iwl_cfg iwl6000i_2agn_cfg = {
  939. .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
  940. .fw_name_pre = IWL6000_FW_PRE,
  941. .ucode_api_max = IWL6000_UCODE_API_MAX,
  942. .ucode_api_min = IWL6000_UCODE_API_MIN,
  943. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  944. .ops = &iwl6000_ops,
  945. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  946. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  947. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  948. .num_of_queues = IWLAGN_NUM_QUEUES,
  949. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  950. .mod_params = &iwlagn_mod_params,
  951. .valid_tx_ant = ANT_BC,
  952. .valid_rx_ant = ANT_BC,
  953. .pll_cfg_val = 0,
  954. .set_l0s = true,
  955. .use_bsm = false,
  956. .pa_type = IWL_PA_INTERNAL,
  957. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  958. .shadow_ram_support = true,
  959. .ht_greenfield_support = true,
  960. .led_compensation = 51,
  961. .use_rts_for_aggregation = true, /* use rts/cts protection */
  962. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  963. .supports_idle = true,
  964. .adv_thermal_throttle = true,
  965. .support_ct_kill_exit = true,
  966. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  967. .chain_noise_scale = 1000,
  968. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  969. .max_event_log_size = 1024,
  970. .ucode_tracing = true,
  971. .sensitivity_calib_by_driver = true,
  972. .chain_noise_calib_by_driver = true,
  973. };
  974. struct iwl_cfg iwl6000i_2abg_cfg = {
  975. .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
  976. .fw_name_pre = IWL6000_FW_PRE,
  977. .ucode_api_max = IWL6000_UCODE_API_MAX,
  978. .ucode_api_min = IWL6000_UCODE_API_MIN,
  979. .sku = IWL_SKU_A|IWL_SKU_G,
  980. .ops = &iwl6000_ops,
  981. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  982. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  983. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  984. .num_of_queues = IWLAGN_NUM_QUEUES,
  985. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  986. .mod_params = &iwlagn_mod_params,
  987. .valid_tx_ant = ANT_BC,
  988. .valid_rx_ant = ANT_BC,
  989. .pll_cfg_val = 0,
  990. .set_l0s = true,
  991. .use_bsm = false,
  992. .pa_type = IWL_PA_INTERNAL,
  993. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  994. .shadow_ram_support = true,
  995. .led_compensation = 51,
  996. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  997. .supports_idle = true,
  998. .adv_thermal_throttle = true,
  999. .support_ct_kill_exit = true,
  1000. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1001. .chain_noise_scale = 1000,
  1002. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1003. .max_event_log_size = 1024,
  1004. .ucode_tracing = true,
  1005. .sensitivity_calib_by_driver = true,
  1006. .chain_noise_calib_by_driver = true,
  1007. };
  1008. struct iwl_cfg iwl6000i_2bg_cfg = {
  1009. .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
  1010. .fw_name_pre = IWL6000_FW_PRE,
  1011. .ucode_api_max = IWL6000_UCODE_API_MAX,
  1012. .ucode_api_min = IWL6000_UCODE_API_MIN,
  1013. .sku = IWL_SKU_G,
  1014. .ops = &iwl6000_ops,
  1015. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1016. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  1017. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  1018. .num_of_queues = IWLAGN_NUM_QUEUES,
  1019. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  1020. .mod_params = &iwlagn_mod_params,
  1021. .valid_tx_ant = ANT_BC,
  1022. .valid_rx_ant = ANT_BC,
  1023. .pll_cfg_val = 0,
  1024. .set_l0s = true,
  1025. .use_bsm = false,
  1026. .pa_type = IWL_PA_INTERNAL,
  1027. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  1028. .shadow_ram_support = true,
  1029. .led_compensation = 51,
  1030. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1031. .supports_idle = true,
  1032. .adv_thermal_throttle = true,
  1033. .support_ct_kill_exit = true,
  1034. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1035. .chain_noise_scale = 1000,
  1036. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1037. .max_event_log_size = 1024,
  1038. .ucode_tracing = true,
  1039. .sensitivity_calib_by_driver = true,
  1040. .chain_noise_calib_by_driver = true,
  1041. };
  1042. struct iwl_cfg iwl6050_2agn_cfg = {
  1043. .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
  1044. .fw_name_pre = IWL6050_FW_PRE,
  1045. .ucode_api_max = IWL6050_UCODE_API_MAX,
  1046. .ucode_api_min = IWL6050_UCODE_API_MIN,
  1047. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  1048. .ops = &iwl6000_ops,
  1049. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1050. .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
  1051. .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
  1052. .num_of_queues = IWLAGN_NUM_QUEUES,
  1053. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  1054. .mod_params = &iwlagn_mod_params,
  1055. .valid_tx_ant = ANT_AB,
  1056. .valid_rx_ant = ANT_AB,
  1057. .pll_cfg_val = 0,
  1058. .set_l0s = true,
  1059. .use_bsm = false,
  1060. .pa_type = IWL_PA_SYSTEM,
  1061. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  1062. .shadow_ram_support = true,
  1063. .ht_greenfield_support = true,
  1064. .led_compensation = 51,
  1065. .use_rts_for_aggregation = true, /* use rts/cts protection */
  1066. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1067. .supports_idle = true,
  1068. .adv_thermal_throttle = true,
  1069. .support_ct_kill_exit = true,
  1070. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1071. .chain_noise_scale = 1500,
  1072. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1073. .max_event_log_size = 1024,
  1074. .ucode_tracing = true,
  1075. .sensitivity_calib_by_driver = true,
  1076. .chain_noise_calib_by_driver = true,
  1077. .need_dc_calib = true,
  1078. };
  1079. struct iwl_cfg iwl6050g2_bgn_cfg = {
  1080. .name = "6050 Series 1x2 BGN Gen2",
  1081. .fw_name_pre = IWL6050_FW_PRE,
  1082. .ucode_api_max = IWL6050_UCODE_API_MAX,
  1083. .ucode_api_min = IWL6050_UCODE_API_MIN,
  1084. .sku = IWL_SKU_G|IWL_SKU_N,
  1085. .ops = &iwl6000_ops,
  1086. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1087. .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
  1088. .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,
  1089. .num_of_queues = IWLAGN_NUM_QUEUES,
  1090. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  1091. .mod_params = &iwlagn_mod_params,
  1092. .valid_tx_ant = ANT_A,
  1093. .valid_rx_ant = ANT_AB,
  1094. .pll_cfg_val = 0,
  1095. .set_l0s = true,
  1096. .use_bsm = false,
  1097. .pa_type = IWL_PA_SYSTEM,
  1098. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  1099. .shadow_ram_support = true,
  1100. .ht_greenfield_support = true,
  1101. .led_compensation = 51,
  1102. .use_rts_for_aggregation = true, /* use rts/cts protection */
  1103. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1104. .supports_idle = true,
  1105. .adv_thermal_throttle = true,
  1106. .support_ct_kill_exit = true,
  1107. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1108. .chain_noise_scale = 1500,
  1109. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1110. .max_event_log_size = 1024,
  1111. .ucode_tracing = true,
  1112. .sensitivity_calib_by_driver = true,
  1113. .chain_noise_calib_by_driver = true,
  1114. .need_dc_calib = true,
  1115. };
  1116. struct iwl_cfg iwl6050_2abg_cfg = {
  1117. .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
  1118. .fw_name_pre = IWL6050_FW_PRE,
  1119. .ucode_api_max = IWL6050_UCODE_API_MAX,
  1120. .ucode_api_min = IWL6050_UCODE_API_MIN,
  1121. .sku = IWL_SKU_A|IWL_SKU_G,
  1122. .ops = &iwl6000_ops,
  1123. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1124. .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
  1125. .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
  1126. .num_of_queues = IWLAGN_NUM_QUEUES,
  1127. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  1128. .mod_params = &iwlagn_mod_params,
  1129. .valid_tx_ant = ANT_AB,
  1130. .valid_rx_ant = ANT_AB,
  1131. .pll_cfg_val = 0,
  1132. .set_l0s = true,
  1133. .use_bsm = false,
  1134. .pa_type = IWL_PA_SYSTEM,
  1135. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  1136. .shadow_ram_support = true,
  1137. .led_compensation = 51,
  1138. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1139. .supports_idle = true,
  1140. .adv_thermal_throttle = true,
  1141. .support_ct_kill_exit = true,
  1142. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1143. .chain_noise_scale = 1500,
  1144. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1145. .max_event_log_size = 1024,
  1146. .ucode_tracing = true,
  1147. .sensitivity_calib_by_driver = true,
  1148. .chain_noise_calib_by_driver = true,
  1149. .need_dc_calib = true,
  1150. };
  1151. struct iwl_cfg iwl6000_3agn_cfg = {
  1152. .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
  1153. .fw_name_pre = IWL6000_FW_PRE,
  1154. .ucode_api_max = IWL6000_UCODE_API_MAX,
  1155. .ucode_api_min = IWL6000_UCODE_API_MIN,
  1156. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  1157. .ops = &iwl6000_ops,
  1158. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1159. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  1160. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  1161. .num_of_queues = IWLAGN_NUM_QUEUES,
  1162. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  1163. .mod_params = &iwlagn_mod_params,
  1164. .valid_tx_ant = ANT_ABC,
  1165. .valid_rx_ant = ANT_ABC,
  1166. .pll_cfg_val = 0,
  1167. .set_l0s = true,
  1168. .use_bsm = false,
  1169. .pa_type = IWL_PA_SYSTEM,
  1170. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  1171. .shadow_ram_support = true,
  1172. .ht_greenfield_support = true,
  1173. .led_compensation = 51,
  1174. .use_rts_for_aggregation = true, /* use rts/cts protection */
  1175. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1176. .supports_idle = true,
  1177. .adv_thermal_throttle = true,
  1178. .support_ct_kill_exit = true,
  1179. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1180. .chain_noise_scale = 1000,
  1181. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1182. .max_event_log_size = 1024,
  1183. .ucode_tracing = true,
  1184. .sensitivity_calib_by_driver = true,
  1185. .chain_noise_calib_by_driver = true,
  1186. };
  1187. MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
  1188. MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
  1189. MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
  1190. MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));