iwl-6000.c 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401
  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 const __le32 iwl6000g2b_concurrent_lookup[12] = {
  183. cpu_to_le32(0xaaaaaaaa),
  184. cpu_to_le32(0xaaaaaaaa),
  185. cpu_to_le32(0xaaaaaaaa),
  186. cpu_to_le32(0xaaaaaaaa),
  187. cpu_to_le32(0xaaaaaaaa),
  188. cpu_to_le32(0xaaaaaaaa),
  189. cpu_to_le32(0xaaaaaaaa),
  190. cpu_to_le32(0xaaaaaaaa),
  191. cpu_to_le32(0x00000000),
  192. cpu_to_le32(0x00000000),
  193. cpu_to_le32(0x00000000),
  194. cpu_to_le32(0x00000000),
  195. };
  196. static void iwl6000g2b_send_bt_config(struct iwl_priv *priv)
  197. {
  198. struct iwl6000g2b_bt_cmd bt_cmd = {
  199. .max_kill = IWL6000G2B_BT_MAX_KILL_DEFAULT,
  200. .bt3_timer_t7_value = IWL6000G2B_BT3_T7_DEFAULT,
  201. .bt3_prio_sample_time = IWL6000G2B_BT3_PRIO_SAMPLE_DEFAULT,
  202. .bt3_timer_t2_value = IWL6000G2B_BT3_T2_DEFAULT,
  203. };
  204. BUILD_BUG_ON(sizeof(iwl6000g2b_def_3w_lookup) !=
  205. sizeof(bt_cmd.bt3_lookup_table));
  206. bt_cmd.prio_boost = priv->cfg->bt_prio_boost;
  207. bt_cmd.kill_ack_mask = priv->kill_ack_mask;
  208. bt_cmd.kill_cts_mask = priv->kill_cts_mask;
  209. bt_cmd.valid = priv->bt_valid;
  210. /*
  211. * Configure BT coex mode to "no coexistence" when the
  212. * user disabled BT coexistence, we have no interface
  213. * user disabled BT coexistence, or the interface is in
  214. * IBSS mode (no proper uCode support for coex then).
  215. */
  216. if (!bt_coex_active || priv->iw_mode == NL80211_IFTYPE_ADHOC) {
  217. bt_cmd.flags = 0;
  218. } else {
  219. bt_cmd.flags = IWL6000G2B_BT_FLAG_CHANNEL_INHIBITION |
  220. IWL6000G2B_BT_FLAG_COEX_MODE_3W <<
  221. IWL6000G2B_BT_FLAG_COEX_MODE_SHIFT;
  222. }
  223. if (priv->bt_full_concurrent)
  224. memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_concurrent_lookup,
  225. sizeof(iwl6000g2b_concurrent_lookup));
  226. else
  227. memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_def_3w_lookup,
  228. sizeof(iwl6000g2b_def_3w_lookup));
  229. IWL_DEBUG_INFO(priv, "BT coex %s in %s mode\n",
  230. bt_cmd.flags ? "active" : "disabled",
  231. priv->bt_full_concurrent ?
  232. "full concurrency" : "3-wire");
  233. if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, sizeof(bt_cmd), &bt_cmd))
  234. IWL_ERR(priv, "failed to send BT Coex Config\n");
  235. /*
  236. * When we are doing a restart, need to also reconfigure BT
  237. * SCO to the device. If not doing a restart, bt_sco_active
  238. * will always be false, so there's no need to have an extra
  239. * variable to check for it.
  240. */
  241. if (priv->bt_sco_active) {
  242. struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 };
  243. if (priv->bt_sco_active)
  244. sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
  245. if (iwl_send_cmd_pdu(priv, REPLY_BT_COEX_SCO,
  246. sizeof(sco_cmd), &sco_cmd))
  247. IWL_ERR(priv, "failed to send BT SCO command\n");
  248. }
  249. }
  250. static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
  251. .min_nrg_cck = 97,
  252. .max_nrg_cck = 0, /* not used, set to 0 */
  253. .auto_corr_min_ofdm = 80,
  254. .auto_corr_min_ofdm_mrc = 128,
  255. .auto_corr_min_ofdm_x1 = 105,
  256. .auto_corr_min_ofdm_mrc_x1 = 192,
  257. .auto_corr_max_ofdm = 145,
  258. .auto_corr_max_ofdm_mrc = 232,
  259. .auto_corr_max_ofdm_x1 = 110,
  260. .auto_corr_max_ofdm_mrc_x1 = 232,
  261. .auto_corr_min_cck = 125,
  262. .auto_corr_max_cck = 175,
  263. .auto_corr_min_cck_mrc = 160,
  264. .auto_corr_max_cck_mrc = 310,
  265. .nrg_th_cck = 97,
  266. .nrg_th_ofdm = 100,
  267. .barker_corr_th_min = 190,
  268. .barker_corr_th_min_mrc = 390,
  269. .nrg_th_cca = 62,
  270. };
  271. static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
  272. {
  273. if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
  274. priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
  275. priv->cfg->num_of_queues =
  276. priv->cfg->mod_params->num_of_queues;
  277. priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
  278. priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
  279. priv->hw_params.scd_bc_tbls_size =
  280. priv->cfg->num_of_queues *
  281. sizeof(struct iwlagn_scd_bc_tbl);
  282. priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
  283. priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
  284. priv->hw_params.bcast_sta_id = IWLAGN_BROADCAST_ID;
  285. priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
  286. priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
  287. priv->hw_params.max_bsm_size = 0;
  288. priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
  289. BIT(IEEE80211_BAND_5GHZ);
  290. priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
  291. priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
  292. priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
  293. priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
  294. priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
  295. if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
  296. priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
  297. /* Set initial sensitivity parameters */
  298. /* Set initial calibration set */
  299. priv->hw_params.sens = &iwl6000_sensitivity;
  300. priv->hw_params.calib_init_cfg =
  301. BIT(IWL_CALIB_XTAL) |
  302. BIT(IWL_CALIB_LO) |
  303. BIT(IWL_CALIB_TX_IQ) |
  304. BIT(IWL_CALIB_BASE_BAND);
  305. if (priv->cfg->need_dc_calib)
  306. priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC);
  307. priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
  308. return 0;
  309. }
  310. static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
  311. struct ieee80211_channel_switch *ch_switch)
  312. {
  313. struct iwl6000_channel_switch_cmd cmd;
  314. const struct iwl_channel_info *ch_info;
  315. u32 switch_time_in_usec, ucode_switch_time;
  316. u16 ch;
  317. u32 tsf_low;
  318. u8 switch_count;
  319. u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval);
  320. struct ieee80211_vif *vif = priv->vif;
  321. struct iwl_host_cmd hcmd = {
  322. .id = REPLY_CHANNEL_SWITCH,
  323. .len = sizeof(cmd),
  324. .flags = CMD_SYNC,
  325. .data = &cmd,
  326. };
  327. cmd.band = priv->band == IEEE80211_BAND_2GHZ;
  328. ch = ch_switch->channel->hw_value;
  329. IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
  330. priv->active_rxon.channel, ch);
  331. cmd.channel = cpu_to_le16(ch);
  332. cmd.rxon_flags = priv->staging_rxon.flags;
  333. cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
  334. switch_count = ch_switch->count;
  335. tsf_low = ch_switch->timestamp & 0x0ffffffff;
  336. /*
  337. * calculate the ucode channel switch time
  338. * adding TSF as one of the factor for when to switch
  339. */
  340. if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
  341. if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
  342. beacon_interval)) {
  343. switch_count -= (priv->ucode_beacon_time -
  344. tsf_low) / beacon_interval;
  345. } else
  346. switch_count = 0;
  347. }
  348. if (switch_count <= 1)
  349. cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
  350. else {
  351. switch_time_in_usec =
  352. vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
  353. ucode_switch_time = iwl_usecs_to_beacons(priv,
  354. switch_time_in_usec,
  355. beacon_interval);
  356. cmd.switch_time = iwl_add_beacon_time(priv,
  357. priv->ucode_beacon_time,
  358. ucode_switch_time,
  359. beacon_interval);
  360. }
  361. IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
  362. cmd.switch_time);
  363. ch_info = iwl_get_channel_info(priv, priv->band, ch);
  364. if (ch_info)
  365. cmd.expect_beacon = is_channel_radar(ch_info);
  366. else {
  367. IWL_ERR(priv, "invalid channel switch from %u to %u\n",
  368. priv->active_rxon.channel, ch);
  369. return -EFAULT;
  370. }
  371. priv->switch_rxon.channel = cmd.channel;
  372. priv->switch_rxon.switch_in_progress = true;
  373. return iwl_send_cmd_sync(priv, &hcmd);
  374. }
  375. static void iwl6000g2b_bt_traffic_change_work(struct work_struct *work)
  376. {
  377. struct iwl_priv *priv =
  378. container_of(work, struct iwl_priv, bt_traffic_change_work);
  379. int smps_request = -1;
  380. switch (priv->bt_traffic_load) {
  381. case IWL_BT_COEX_TRAFFIC_LOAD_NONE:
  382. smps_request = IEEE80211_SMPS_AUTOMATIC;
  383. break;
  384. case IWL_BT_COEX_TRAFFIC_LOAD_LOW:
  385. smps_request = IEEE80211_SMPS_DYNAMIC;
  386. break;
  387. case IWL_BT_COEX_TRAFFIC_LOAD_HIGH:
  388. case IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS:
  389. smps_request = IEEE80211_SMPS_STATIC;
  390. break;
  391. default:
  392. IWL_ERR(priv, "Invalid BT traffic load: %d\n",
  393. priv->bt_traffic_load);
  394. break;
  395. }
  396. mutex_lock(&priv->mutex);
  397. if (smps_request != -1 &&
  398. priv->vif && priv->vif->type == NL80211_IFTYPE_STATION)
  399. ieee80211_request_smps(priv->vif, smps_request);
  400. mutex_unlock(&priv->mutex);
  401. }
  402. static void iwlagn_print_uartmsg(struct iwl_priv *priv,
  403. struct iwl_bt_uart_msg *uart_msg)
  404. {
  405. IWL_DEBUG_NOTIF(priv, "Message Type = 0x%X, SSN = 0x%X, "
  406. "Update Req = 0x%X",
  407. (BT_UART_MSG_FRAME1MSGTYPE_MSK & uart_msg->frame1) >>
  408. BT_UART_MSG_FRAME1MSGTYPE_POS,
  409. (BT_UART_MSG_FRAME1SSN_MSK & uart_msg->frame1) >>
  410. BT_UART_MSG_FRAME1SSN_POS,
  411. (BT_UART_MSG_FRAME1UPDATEREQ_MSK & uart_msg->frame1) >>
  412. BT_UART_MSG_FRAME1UPDATEREQ_POS);
  413. IWL_DEBUG_NOTIF(priv, "Open connections = 0x%X, Traffic load = 0x%X, "
  414. "Chl_SeqN = 0x%X, In band = 0x%X",
  415. (BT_UART_MSG_FRAME2OPENCONNECTIONS_MSK & uart_msg->frame2) >>
  416. BT_UART_MSG_FRAME2OPENCONNECTIONS_POS,
  417. (BT_UART_MSG_FRAME2TRAFFICLOAD_MSK & uart_msg->frame2) >>
  418. BT_UART_MSG_FRAME2TRAFFICLOAD_POS,
  419. (BT_UART_MSG_FRAME2CHLSEQN_MSK & uart_msg->frame2) >>
  420. BT_UART_MSG_FRAME2CHLSEQN_POS,
  421. (BT_UART_MSG_FRAME2INBAND_MSK & uart_msg->frame2) >>
  422. BT_UART_MSG_FRAME2INBAND_POS);
  423. IWL_DEBUG_NOTIF(priv, "SCO/eSCO = 0x%X, Sniff = 0x%X, A2DP = 0x%X, "
  424. "ACL = 0x%X, Master = 0x%X, OBEX = 0x%X",
  425. (BT_UART_MSG_FRAME3SCOESCO_MSK & uart_msg->frame3) >>
  426. BT_UART_MSG_FRAME3SCOESCO_POS,
  427. (BT_UART_MSG_FRAME3SNIFF_MSK & uart_msg->frame3) >>
  428. BT_UART_MSG_FRAME3SNIFF_POS,
  429. (BT_UART_MSG_FRAME3A2DP_MSK & uart_msg->frame3) >>
  430. BT_UART_MSG_FRAME3A2DP_POS,
  431. (BT_UART_MSG_FRAME3ACL_MSK & uart_msg->frame3) >>
  432. BT_UART_MSG_FRAME3ACL_POS,
  433. (BT_UART_MSG_FRAME3MASTER_MSK & uart_msg->frame3) >>
  434. BT_UART_MSG_FRAME3MASTER_POS,
  435. (BT_UART_MSG_FRAME3OBEX_MSK & uart_msg->frame3) >>
  436. BT_UART_MSG_FRAME3OBEX_POS);
  437. IWL_DEBUG_NOTIF(priv, "Idle duration = 0x%X",
  438. (BT_UART_MSG_FRAME4IDLEDURATION_MSK & uart_msg->frame4) >>
  439. BT_UART_MSG_FRAME4IDLEDURATION_POS);
  440. IWL_DEBUG_NOTIF(priv, "Tx Activity = 0x%X, Rx Activity = 0x%X, "
  441. "eSCO Retransmissions = 0x%X",
  442. (BT_UART_MSG_FRAME5TXACTIVITY_MSK & uart_msg->frame5) >>
  443. BT_UART_MSG_FRAME5TXACTIVITY_POS,
  444. (BT_UART_MSG_FRAME5RXACTIVITY_MSK & uart_msg->frame5) >>
  445. BT_UART_MSG_FRAME5RXACTIVITY_POS,
  446. (BT_UART_MSG_FRAME5ESCORETRANSMIT_MSK & uart_msg->frame5) >>
  447. BT_UART_MSG_FRAME5ESCORETRANSMIT_POS);
  448. IWL_DEBUG_NOTIF(priv, "Sniff Interval = 0x%X, Discoverable = 0x%X",
  449. (BT_UART_MSG_FRAME6SNIFFINTERVAL_MSK & uart_msg->frame6) >>
  450. BT_UART_MSG_FRAME6SNIFFINTERVAL_POS,
  451. (BT_UART_MSG_FRAME6DISCOVERABLE_MSK & uart_msg->frame6) >>
  452. BT_UART_MSG_FRAME6DISCOVERABLE_POS);
  453. IWL_DEBUG_NOTIF(priv, "Sniff Activity = 0x%X, Inquiry/Page SR Mode = "
  454. "0x%X, Connectable = 0x%X",
  455. (BT_UART_MSG_FRAME7SNIFFACTIVITY_MSK & uart_msg->frame7) >>
  456. BT_UART_MSG_FRAME7SNIFFACTIVITY_POS,
  457. (BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_MSK & uart_msg->frame7) >>
  458. BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_POS,
  459. (BT_UART_MSG_FRAME7CONNECTABLE_MSK & uart_msg->frame7) >>
  460. BT_UART_MSG_FRAME7CONNECTABLE_POS);
  461. }
  462. static void iwl6000g2b_set_kill_ack_msk(struct iwl_priv *priv,
  463. struct iwl_bt_uart_msg *uart_msg)
  464. {
  465. u8 kill_ack_msk;
  466. __le32 bt_kill_ack_msg[2] = {
  467. cpu_to_le32(0xFFFFFFF), cpu_to_le32(0xFFFFFC00) };
  468. kill_ack_msk = (((BT_UART_MSG_FRAME3A2DP_MSK |
  469. BT_UART_MSG_FRAME3SNIFF_MSK |
  470. BT_UART_MSG_FRAME3SCOESCO_MSK) &
  471. uart_msg->frame3) == 0) ? 1 : 0;
  472. if (priv->kill_ack_mask != bt_kill_ack_msg[kill_ack_msk]) {
  473. priv->bt_valid |= IWL6000G2B_BT_VALID_KILL_ACK_MASK;
  474. priv->kill_ack_mask = bt_kill_ack_msg[kill_ack_msk];
  475. /* schedule to send runtime bt_config */
  476. queue_work(priv->workqueue, &priv->bt_runtime_config);
  477. }
  478. }
  479. static void iwl6000g2b_bt_coex_profile_notif(struct iwl_priv *priv,
  480. struct iwl_rx_mem_buffer *rxb)
  481. {
  482. unsigned long flags;
  483. struct iwl_rx_packet *pkt = rxb_addr(rxb);
  484. struct iwl_bt_coex_profile_notif *coex = &pkt->u.bt_coex_profile_notif;
  485. struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 };
  486. struct iwl_bt_uart_msg *uart_msg = &coex->last_bt_uart_msg;
  487. IWL_DEBUG_NOTIF(priv, "BT Coex notification:\n");
  488. IWL_DEBUG_NOTIF(priv, " status: %d\n", coex->bt_status);
  489. IWL_DEBUG_NOTIF(priv, " traffic load: %d\n", coex->bt_traffic_load);
  490. IWL_DEBUG_NOTIF(priv, " CI compliance: %d\n", coex->bt_ci_compliance);
  491. iwlagn_print_uartmsg(priv, uart_msg);
  492. priv->notif_bt_traffic_load = coex->bt_traffic_load;
  493. if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
  494. if (coex->bt_traffic_load != priv->bt_traffic_load) {
  495. priv->bt_traffic_load = coex->bt_traffic_load;
  496. queue_work(priv->workqueue,
  497. &priv->bt_traffic_change_work);
  498. }
  499. if (priv->bt_sco_active !=
  500. (uart_msg->frame3 & BT_UART_MSG_FRAME3SCOESCO_MSK)) {
  501. priv->bt_sco_active = uart_msg->frame3 &
  502. BT_UART_MSG_FRAME3SCOESCO_MSK;
  503. if (priv->bt_sco_active)
  504. sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
  505. iwl_send_cmd_pdu_async(priv, REPLY_BT_COEX_SCO,
  506. sizeof(sco_cmd), &sco_cmd, NULL);
  507. }
  508. }
  509. iwl6000g2b_set_kill_ack_msk(priv, uart_msg);
  510. /* FIXME: based on notification, adjust the prio_boost */
  511. spin_lock_irqsave(&priv->lock, flags);
  512. priv->bt_ci_compliance = coex->bt_ci_compliance;
  513. spin_unlock_irqrestore(&priv->lock, flags);
  514. }
  515. void iwl6000g2b_rx_handler_setup(struct iwl_priv *priv)
  516. {
  517. iwlagn_rx_handler_setup(priv);
  518. priv->rx_handlers[REPLY_BT_COEX_PROFILE_NOTIF] =
  519. iwl6000g2b_bt_coex_profile_notif;
  520. }
  521. static void iwl6000g2b_bt_setup_deferred_work(struct iwl_priv *priv)
  522. {
  523. iwlagn_setup_deferred_work(priv);
  524. INIT_WORK(&priv->bt_traffic_change_work,
  525. iwl6000g2b_bt_traffic_change_work);
  526. }
  527. static void iwl6000g2b_bt_cancel_deferred_work(struct iwl_priv *priv)
  528. {
  529. cancel_work_sync(&priv->bt_traffic_change_work);
  530. }
  531. static struct iwl_lib_ops iwl6000_lib = {
  532. .set_hw_params = iwl6000_hw_set_hw_params,
  533. .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
  534. .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
  535. .txq_set_sched = iwlagn_txq_set_sched,
  536. .txq_agg_enable = iwlagn_txq_agg_enable,
  537. .txq_agg_disable = iwlagn_txq_agg_disable,
  538. .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
  539. .txq_free_tfd = iwl_hw_txq_free_tfd,
  540. .txq_init = iwl_hw_tx_queue_init,
  541. .rx_handler_setup = iwlagn_rx_handler_setup,
  542. .setup_deferred_work = iwlagn_setup_deferred_work,
  543. .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
  544. .load_ucode = iwlagn_load_ucode,
  545. .dump_nic_event_log = iwl_dump_nic_event_log,
  546. .dump_nic_error_log = iwl_dump_nic_error_log,
  547. .dump_csr = iwl_dump_csr,
  548. .dump_fh = iwl_dump_fh,
  549. .init_alive_start = iwlagn_init_alive_start,
  550. .alive_notify = iwlagn_alive_notify,
  551. .send_tx_power = iwlagn_send_tx_power,
  552. .update_chain_flags = iwl_update_chain_flags,
  553. .set_channel_switch = iwl6000_hw_channel_switch,
  554. .apm_ops = {
  555. .init = iwl_apm_init,
  556. .stop = iwl_apm_stop,
  557. .config = iwl6000_nic_config,
  558. .set_pwr_src = iwl_set_pwr_src,
  559. },
  560. .eeprom_ops = {
  561. .regulatory_bands = {
  562. EEPROM_REG_BAND_1_CHANNELS,
  563. EEPROM_REG_BAND_2_CHANNELS,
  564. EEPROM_REG_BAND_3_CHANNELS,
  565. EEPROM_REG_BAND_4_CHANNELS,
  566. EEPROM_REG_BAND_5_CHANNELS,
  567. EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
  568. EEPROM_REG_BAND_52_HT40_CHANNELS
  569. },
  570. .verify_signature = iwlcore_eeprom_verify_signature,
  571. .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
  572. .release_semaphore = iwlcore_eeprom_release_semaphore,
  573. .calib_version = iwlagn_eeprom_calib_version,
  574. .query_addr = iwlagn_eeprom_query_addr,
  575. .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
  576. },
  577. .post_associate = iwl_post_associate,
  578. .isr = iwl_isr_ict,
  579. .config_ap = iwl_config_ap,
  580. .temp_ops = {
  581. .temperature = iwlagn_temperature,
  582. .set_ct_kill = iwl6000_set_ct_threshold,
  583. .set_calib_version = iwl6000_set_calib_version,
  584. },
  585. .manage_ibss_station = iwlagn_manage_ibss_station,
  586. .update_bcast_station = iwl_update_bcast_station,
  587. .debugfs_ops = {
  588. .rx_stats_read = iwl_ucode_rx_stats_read,
  589. .tx_stats_read = iwl_ucode_tx_stats_read,
  590. .general_stats_read = iwl_ucode_general_stats_read,
  591. .bt_stats_read = iwl_ucode_bt_stats_read,
  592. },
  593. .recover_from_tx_stall = iwl_bg_monitor_recover,
  594. .check_plcp_health = iwl_good_plcp_health,
  595. .check_ack_health = iwl_good_ack_health,
  596. .txfifo_flush = iwlagn_txfifo_flush,
  597. .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
  598. .tt_ops = {
  599. .lower_power_detection = iwl_tt_is_low_power_state,
  600. .tt_power_mode = iwl_tt_current_power_mode,
  601. .ct_kill_check = iwl_check_for_ct_kill,
  602. }
  603. };
  604. static struct iwl_lib_ops iwl6000g2b_lib = {
  605. .set_hw_params = iwl6000_hw_set_hw_params,
  606. .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
  607. .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
  608. .txq_set_sched = iwlagn_txq_set_sched,
  609. .txq_agg_enable = iwlagn_txq_agg_enable,
  610. .txq_agg_disable = iwlagn_txq_agg_disable,
  611. .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
  612. .txq_free_tfd = iwl_hw_txq_free_tfd,
  613. .txq_init = iwl_hw_tx_queue_init,
  614. .rx_handler_setup = iwl6000g2b_rx_handler_setup,
  615. .setup_deferred_work = iwl6000g2b_bt_setup_deferred_work,
  616. .cancel_deferred_work = iwl6000g2b_bt_cancel_deferred_work,
  617. .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
  618. .load_ucode = iwlagn_load_ucode,
  619. .dump_nic_event_log = iwl_dump_nic_event_log,
  620. .dump_nic_error_log = iwl_dump_nic_error_log,
  621. .dump_csr = iwl_dump_csr,
  622. .dump_fh = iwl_dump_fh,
  623. .init_alive_start = iwlagn_init_alive_start,
  624. .alive_notify = iwlagn_alive_notify,
  625. .send_tx_power = iwlagn_send_tx_power,
  626. .update_chain_flags = iwl_update_chain_flags,
  627. .set_channel_switch = iwl6000_hw_channel_switch,
  628. .apm_ops = {
  629. .init = iwl_apm_init,
  630. .stop = iwl_apm_stop,
  631. .config = iwl6000_nic_config,
  632. .set_pwr_src = iwl_set_pwr_src,
  633. },
  634. .eeprom_ops = {
  635. .regulatory_bands = {
  636. EEPROM_REG_BAND_1_CHANNELS,
  637. EEPROM_REG_BAND_2_CHANNELS,
  638. EEPROM_REG_BAND_3_CHANNELS,
  639. EEPROM_REG_BAND_4_CHANNELS,
  640. EEPROM_REG_BAND_5_CHANNELS,
  641. EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
  642. EEPROM_REG_BAND_52_HT40_CHANNELS
  643. },
  644. .verify_signature = iwlcore_eeprom_verify_signature,
  645. .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
  646. .release_semaphore = iwlcore_eeprom_release_semaphore,
  647. .calib_version = iwlagn_eeprom_calib_version,
  648. .query_addr = iwlagn_eeprom_query_addr,
  649. .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
  650. },
  651. .post_associate = iwl_post_associate,
  652. .isr = iwl_isr_ict,
  653. .config_ap = iwl_config_ap,
  654. .temp_ops = {
  655. .temperature = iwlagn_temperature,
  656. .set_ct_kill = iwl6000_set_ct_threshold,
  657. .set_calib_version = iwl6000_set_calib_version,
  658. },
  659. .manage_ibss_station = iwlagn_manage_ibss_station,
  660. .update_bcast_station = iwl_update_bcast_station,
  661. .debugfs_ops = {
  662. .rx_stats_read = iwl_ucode_rx_stats_read,
  663. .tx_stats_read = iwl_ucode_tx_stats_read,
  664. .general_stats_read = iwl_ucode_general_stats_read,
  665. .bt_stats_read = iwl_ucode_bt_stats_read,
  666. },
  667. .recover_from_tx_stall = iwl_bg_monitor_recover,
  668. .check_plcp_health = iwl_good_plcp_health,
  669. .check_ack_health = iwl_good_ack_health,
  670. .txfifo_flush = iwlagn_txfifo_flush,
  671. .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
  672. .tt_ops = {
  673. .lower_power_detection = iwl_tt_is_low_power_state,
  674. .tt_power_mode = iwl_tt_current_power_mode,
  675. .ct_kill_check = iwl_check_for_ct_kill,
  676. }
  677. };
  678. static const struct iwl_ops iwl6000_ops = {
  679. .lib = &iwl6000_lib,
  680. .hcmd = &iwlagn_hcmd,
  681. .utils = &iwlagn_hcmd_utils,
  682. .led = &iwlagn_led_ops,
  683. };
  684. static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
  685. .rxon_assoc = iwlagn_send_rxon_assoc,
  686. .commit_rxon = iwl_commit_rxon,
  687. .set_rxon_chain = iwl_set_rxon_chain,
  688. .set_tx_ant = iwlagn_send_tx_ant_config,
  689. .send_bt_config = iwl6000g2b_send_bt_config,
  690. };
  691. static const struct iwl_ops iwl6000g2b_ops = {
  692. .lib = &iwl6000g2b_lib,
  693. .hcmd = &iwl6000g2b_hcmd,
  694. .utils = &iwlagn_hcmd_utils,
  695. .led = &iwlagn_led_ops,
  696. };
  697. struct iwl_cfg iwl6000g2a_2agn_cfg = {
  698. .name = "6000 Series 2x2 AGN Gen2a",
  699. .fw_name_pre = IWL6000G2A_FW_PRE,
  700. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  701. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  702. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  703. .ops = &iwl6000_ops,
  704. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  705. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  706. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  707. .num_of_queues = IWLAGN_NUM_QUEUES,
  708. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  709. .mod_params = &iwlagn_mod_params,
  710. .valid_tx_ant = ANT_AB,
  711. .valid_rx_ant = ANT_AB,
  712. .pll_cfg_val = 0,
  713. .set_l0s = true,
  714. .use_bsm = false,
  715. .pa_type = IWL_PA_SYSTEM,
  716. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  717. .shadow_ram_support = true,
  718. .ht_greenfield_support = true,
  719. .led_compensation = 51,
  720. .use_rts_for_aggregation = true, /* use rts/cts protection */
  721. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  722. .supports_idle = true,
  723. .adv_thermal_throttle = true,
  724. .support_ct_kill_exit = true,
  725. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  726. .chain_noise_scale = 1000,
  727. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  728. .max_event_log_size = 512,
  729. .ucode_tracing = true,
  730. .sensitivity_calib_by_driver = true,
  731. .chain_noise_calib_by_driver = true,
  732. .need_dc_calib = true,
  733. };
  734. struct iwl_cfg iwl6000g2a_2abg_cfg = {
  735. .name = "6000 Series 2x2 ABG Gen2a",
  736. .fw_name_pre = IWL6000G2A_FW_PRE,
  737. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  738. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  739. .sku = IWL_SKU_A|IWL_SKU_G,
  740. .ops = &iwl6000_ops,
  741. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  742. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  743. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  744. .num_of_queues = IWLAGN_NUM_QUEUES,
  745. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  746. .mod_params = &iwlagn_mod_params,
  747. .valid_tx_ant = ANT_AB,
  748. .valid_rx_ant = ANT_AB,
  749. .pll_cfg_val = 0,
  750. .set_l0s = true,
  751. .use_bsm = false,
  752. .pa_type = IWL_PA_SYSTEM,
  753. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  754. .shadow_ram_support = true,
  755. .led_compensation = 51,
  756. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  757. .supports_idle = true,
  758. .adv_thermal_throttle = true,
  759. .support_ct_kill_exit = true,
  760. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  761. .chain_noise_scale = 1000,
  762. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  763. .max_event_log_size = 512,
  764. .sensitivity_calib_by_driver = true,
  765. .chain_noise_calib_by_driver = true,
  766. .need_dc_calib = true,
  767. };
  768. struct iwl_cfg iwl6000g2a_2bg_cfg = {
  769. .name = "6000 Series 2x2 BG Gen2a",
  770. .fw_name_pre = IWL6000G2A_FW_PRE,
  771. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  772. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  773. .sku = IWL_SKU_G,
  774. .ops = &iwl6000_ops,
  775. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  776. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  777. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  778. .num_of_queues = IWLAGN_NUM_QUEUES,
  779. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  780. .mod_params = &iwlagn_mod_params,
  781. .valid_tx_ant = ANT_AB,
  782. .valid_rx_ant = ANT_AB,
  783. .pll_cfg_val = 0,
  784. .set_l0s = true,
  785. .use_bsm = false,
  786. .pa_type = IWL_PA_SYSTEM,
  787. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  788. .shadow_ram_support = true,
  789. .led_compensation = 51,
  790. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  791. .supports_idle = true,
  792. .adv_thermal_throttle = true,
  793. .support_ct_kill_exit = true,
  794. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  795. .chain_noise_scale = 1000,
  796. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  797. .max_event_log_size = 512,
  798. .sensitivity_calib_by_driver = true,
  799. .chain_noise_calib_by_driver = true,
  800. .need_dc_calib = true,
  801. };
  802. struct iwl_cfg iwl6000g2b_2agn_cfg = {
  803. .name = "6000 Series 2x2 AGN Gen2b",
  804. .fw_name_pre = IWL6000G2B_FW_PRE,
  805. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  806. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  807. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  808. .ops = &iwl6000g2b_ops,
  809. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  810. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  811. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  812. .num_of_queues = IWLAGN_NUM_QUEUES,
  813. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  814. .mod_params = &iwlagn_mod_params,
  815. .valid_tx_ant = ANT_AB,
  816. .valid_rx_ant = ANT_AB,
  817. .pll_cfg_val = 0,
  818. .set_l0s = true,
  819. .use_bsm = false,
  820. .pa_type = IWL_PA_SYSTEM,
  821. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  822. .shadow_ram_support = true,
  823. .ht_greenfield_support = true,
  824. .led_compensation = 51,
  825. .use_rts_for_aggregation = true, /* use rts/cts protection */
  826. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  827. .supports_idle = true,
  828. .adv_thermal_throttle = true,
  829. .support_ct_kill_exit = true,
  830. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
  831. .chain_noise_scale = 1000,
  832. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  833. .max_event_log_size = 512,
  834. .sensitivity_calib_by_driver = true,
  835. .chain_noise_calib_by_driver = true,
  836. .need_dc_calib = true,
  837. .bt_statistics = true,
  838. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  839. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  840. .advanced_bt_coexist = true,
  841. .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
  842. .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
  843. };
  844. struct iwl_cfg iwl6000g2b_2abg_cfg = {
  845. .name = "6000 Series 2x2 ABG Gen2b",
  846. .fw_name_pre = IWL6000G2B_FW_PRE,
  847. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  848. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  849. .sku = IWL_SKU_A|IWL_SKU_G,
  850. .ops = &iwl6000g2b_ops,
  851. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  852. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  853. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  854. .num_of_queues = IWLAGN_NUM_QUEUES,
  855. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  856. .mod_params = &iwlagn_mod_params,
  857. .valid_tx_ant = ANT_AB,
  858. .valid_rx_ant = ANT_AB,
  859. .pll_cfg_val = 0,
  860. .set_l0s = true,
  861. .use_bsm = false,
  862. .pa_type = IWL_PA_SYSTEM,
  863. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  864. .shadow_ram_support = true,
  865. .led_compensation = 51,
  866. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  867. .supports_idle = true,
  868. .adv_thermal_throttle = true,
  869. .support_ct_kill_exit = true,
  870. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
  871. .chain_noise_scale = 1000,
  872. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  873. .max_event_log_size = 512,
  874. .sensitivity_calib_by_driver = true,
  875. .chain_noise_calib_by_driver = true,
  876. .need_dc_calib = true,
  877. .bt_statistics = true,
  878. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  879. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  880. .advanced_bt_coexist = true,
  881. .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
  882. .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
  883. };
  884. struct iwl_cfg iwl6000g2b_2bgn_cfg = {
  885. .name = "6000 Series 2x2 BGN Gen2b",
  886. .fw_name_pre = IWL6000G2B_FW_PRE,
  887. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  888. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  889. .sku = IWL_SKU_G|IWL_SKU_N,
  890. .ops = &iwl6000g2b_ops,
  891. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  892. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  893. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  894. .num_of_queues = IWLAGN_NUM_QUEUES,
  895. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  896. .mod_params = &iwlagn_mod_params,
  897. .valid_tx_ant = ANT_AB,
  898. .valid_rx_ant = ANT_AB,
  899. .pll_cfg_val = 0,
  900. .set_l0s = true,
  901. .use_bsm = false,
  902. .pa_type = IWL_PA_SYSTEM,
  903. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  904. .shadow_ram_support = true,
  905. .ht_greenfield_support = true,
  906. .led_compensation = 51,
  907. .use_rts_for_aggregation = true, /* use rts/cts protection */
  908. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  909. .supports_idle = true,
  910. .adv_thermal_throttle = true,
  911. .support_ct_kill_exit = true,
  912. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
  913. .chain_noise_scale = 1000,
  914. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  915. .max_event_log_size = 512,
  916. .sensitivity_calib_by_driver = true,
  917. .chain_noise_calib_by_driver = true,
  918. .need_dc_calib = true,
  919. .bt_statistics = true,
  920. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  921. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  922. .advanced_bt_coexist = true,
  923. .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
  924. .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
  925. };
  926. struct iwl_cfg iwl6000g2b_2bg_cfg = {
  927. .name = "6000 Series 2x2 BG Gen2b",
  928. .fw_name_pre = IWL6000G2B_FW_PRE,
  929. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  930. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  931. .sku = IWL_SKU_G,
  932. .ops = &iwl6000g2b_ops,
  933. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  934. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  935. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  936. .num_of_queues = IWLAGN_NUM_QUEUES,
  937. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  938. .mod_params = &iwlagn_mod_params,
  939. .valid_tx_ant = ANT_AB,
  940. .valid_rx_ant = ANT_AB,
  941. .pll_cfg_val = 0,
  942. .set_l0s = true,
  943. .use_bsm = false,
  944. .pa_type = IWL_PA_SYSTEM,
  945. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  946. .shadow_ram_support = true,
  947. .led_compensation = 51,
  948. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  949. .supports_idle = true,
  950. .adv_thermal_throttle = true,
  951. .support_ct_kill_exit = true,
  952. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
  953. .chain_noise_scale = 1000,
  954. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  955. .max_event_log_size = 512,
  956. .sensitivity_calib_by_driver = true,
  957. .chain_noise_calib_by_driver = true,
  958. .need_dc_calib = true,
  959. .bt_statistics = true,
  960. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  961. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  962. .advanced_bt_coexist = true,
  963. .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
  964. .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
  965. };
  966. struct iwl_cfg iwl6000g2b_bgn_cfg = {
  967. .name = "6000 Series 1x2 BGN Gen2b",
  968. .fw_name_pre = IWL6000G2B_FW_PRE,
  969. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  970. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  971. .sku = IWL_SKU_G|IWL_SKU_N,
  972. .ops = &iwl6000g2b_ops,
  973. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  974. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  975. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  976. .num_of_queues = IWLAGN_NUM_QUEUES,
  977. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  978. .mod_params = &iwlagn_mod_params,
  979. .valid_tx_ant = ANT_A,
  980. .valid_rx_ant = ANT_AB,
  981. .pll_cfg_val = 0,
  982. .set_l0s = true,
  983. .use_bsm = false,
  984. .pa_type = IWL_PA_SYSTEM,
  985. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  986. .shadow_ram_support = true,
  987. .ht_greenfield_support = true,
  988. .led_compensation = 51,
  989. .use_rts_for_aggregation = true, /* use rts/cts protection */
  990. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  991. .supports_idle = true,
  992. .adv_thermal_throttle = true,
  993. .support_ct_kill_exit = true,
  994. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE,
  995. .chain_noise_scale = 1000,
  996. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  997. .max_event_log_size = 512,
  998. .sensitivity_calib_by_driver = true,
  999. .chain_noise_calib_by_driver = true,
  1000. .need_dc_calib = true,
  1001. .bt_statistics = true,
  1002. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  1003. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  1004. .advanced_bt_coexist = true,
  1005. .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
  1006. .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
  1007. };
  1008. struct iwl_cfg iwl6000g2b_bg_cfg = {
  1009. .name = "6000 Series 1x2 BG Gen2b",
  1010. .fw_name_pre = IWL6000G2B_FW_PRE,
  1011. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  1012. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  1013. .sku = IWL_SKU_G,
  1014. .ops = &iwl6000g2b_ops,
  1015. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1016. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  1017. .eeprom_calib_ver = EEPROM_6000G2_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_A,
  1022. .valid_rx_ant = ANT_AB,
  1023. .pll_cfg_val = 0,
  1024. .set_l0s = true,
  1025. .use_bsm = false,
  1026. .pa_type = IWL_PA_SYSTEM,
  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_DISABLE,
  1035. .chain_noise_scale = 1000,
  1036. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  1037. .max_event_log_size = 512,
  1038. .sensitivity_calib_by_driver = true,
  1039. .chain_noise_calib_by_driver = true,
  1040. .need_dc_calib = true,
  1041. .bt_statistics = true,
  1042. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  1043. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  1044. .advanced_bt_coexist = true,
  1045. .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
  1046. .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
  1047. };
  1048. /*
  1049. * "i": Internal configuration, use internal Power Amplifier
  1050. */
  1051. struct iwl_cfg iwl6000i_2agn_cfg = {
  1052. .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
  1053. .fw_name_pre = IWL6000_FW_PRE,
  1054. .ucode_api_max = IWL6000_UCODE_API_MAX,
  1055. .ucode_api_min = IWL6000_UCODE_API_MIN,
  1056. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  1057. .ops = &iwl6000_ops,
  1058. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1059. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  1060. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  1061. .num_of_queues = IWLAGN_NUM_QUEUES,
  1062. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  1063. .mod_params = &iwlagn_mod_params,
  1064. .valid_tx_ant = ANT_BC,
  1065. .valid_rx_ant = ANT_BC,
  1066. .pll_cfg_val = 0,
  1067. .set_l0s = true,
  1068. .use_bsm = false,
  1069. .pa_type = IWL_PA_INTERNAL,
  1070. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  1071. .shadow_ram_support = true,
  1072. .ht_greenfield_support = true,
  1073. .led_compensation = 51,
  1074. .use_rts_for_aggregation = true, /* use rts/cts protection */
  1075. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1076. .supports_idle = true,
  1077. .adv_thermal_throttle = true,
  1078. .support_ct_kill_exit = true,
  1079. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1080. .chain_noise_scale = 1000,
  1081. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1082. .max_event_log_size = 1024,
  1083. .ucode_tracing = true,
  1084. .sensitivity_calib_by_driver = true,
  1085. .chain_noise_calib_by_driver = true,
  1086. };
  1087. struct iwl_cfg iwl6000i_2abg_cfg = {
  1088. .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
  1089. .fw_name_pre = IWL6000_FW_PRE,
  1090. .ucode_api_max = IWL6000_UCODE_API_MAX,
  1091. .ucode_api_min = IWL6000_UCODE_API_MIN,
  1092. .sku = IWL_SKU_A|IWL_SKU_G,
  1093. .ops = &iwl6000_ops,
  1094. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1095. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  1096. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  1097. .num_of_queues = IWLAGN_NUM_QUEUES,
  1098. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  1099. .mod_params = &iwlagn_mod_params,
  1100. .valid_tx_ant = ANT_BC,
  1101. .valid_rx_ant = ANT_BC,
  1102. .pll_cfg_val = 0,
  1103. .set_l0s = true,
  1104. .use_bsm = false,
  1105. .pa_type = IWL_PA_INTERNAL,
  1106. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  1107. .shadow_ram_support = true,
  1108. .led_compensation = 51,
  1109. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1110. .supports_idle = true,
  1111. .adv_thermal_throttle = true,
  1112. .support_ct_kill_exit = true,
  1113. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1114. .chain_noise_scale = 1000,
  1115. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1116. .max_event_log_size = 1024,
  1117. .ucode_tracing = true,
  1118. .sensitivity_calib_by_driver = true,
  1119. .chain_noise_calib_by_driver = true,
  1120. };
  1121. struct iwl_cfg iwl6000i_2bg_cfg = {
  1122. .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
  1123. .fw_name_pre = IWL6000_FW_PRE,
  1124. .ucode_api_max = IWL6000_UCODE_API_MAX,
  1125. .ucode_api_min = IWL6000_UCODE_API_MIN,
  1126. .sku = IWL_SKU_G,
  1127. .ops = &iwl6000_ops,
  1128. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1129. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  1130. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  1131. .num_of_queues = IWLAGN_NUM_QUEUES,
  1132. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  1133. .mod_params = &iwlagn_mod_params,
  1134. .valid_tx_ant = ANT_BC,
  1135. .valid_rx_ant = ANT_BC,
  1136. .pll_cfg_val = 0,
  1137. .set_l0s = true,
  1138. .use_bsm = false,
  1139. .pa_type = IWL_PA_INTERNAL,
  1140. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  1141. .shadow_ram_support = true,
  1142. .led_compensation = 51,
  1143. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1144. .supports_idle = true,
  1145. .adv_thermal_throttle = true,
  1146. .support_ct_kill_exit = true,
  1147. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1148. .chain_noise_scale = 1000,
  1149. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1150. .max_event_log_size = 1024,
  1151. .ucode_tracing = true,
  1152. .sensitivity_calib_by_driver = true,
  1153. .chain_noise_calib_by_driver = true,
  1154. };
  1155. struct iwl_cfg iwl6050_2agn_cfg = {
  1156. .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
  1157. .fw_name_pre = IWL6050_FW_PRE,
  1158. .ucode_api_max = IWL6050_UCODE_API_MAX,
  1159. .ucode_api_min = IWL6050_UCODE_API_MIN,
  1160. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  1161. .ops = &iwl6000_ops,
  1162. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1163. .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
  1164. .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
  1165. .num_of_queues = IWLAGN_NUM_QUEUES,
  1166. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  1167. .mod_params = &iwlagn_mod_params,
  1168. .valid_tx_ant = ANT_AB,
  1169. .valid_rx_ant = ANT_AB,
  1170. .pll_cfg_val = 0,
  1171. .set_l0s = true,
  1172. .use_bsm = false,
  1173. .pa_type = IWL_PA_SYSTEM,
  1174. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  1175. .shadow_ram_support = true,
  1176. .ht_greenfield_support = true,
  1177. .led_compensation = 51,
  1178. .use_rts_for_aggregation = true, /* use rts/cts protection */
  1179. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1180. .supports_idle = true,
  1181. .adv_thermal_throttle = true,
  1182. .support_ct_kill_exit = true,
  1183. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1184. .chain_noise_scale = 1500,
  1185. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1186. .max_event_log_size = 1024,
  1187. .ucode_tracing = true,
  1188. .sensitivity_calib_by_driver = true,
  1189. .chain_noise_calib_by_driver = true,
  1190. .need_dc_calib = true,
  1191. };
  1192. struct iwl_cfg iwl6050g2_bgn_cfg = {
  1193. .name = "6050 Series 1x2 BGN Gen2",
  1194. .fw_name_pre = IWL6050_FW_PRE,
  1195. .ucode_api_max = IWL6050_UCODE_API_MAX,
  1196. .ucode_api_min = IWL6050_UCODE_API_MIN,
  1197. .sku = IWL_SKU_G|IWL_SKU_N,
  1198. .ops = &iwl6000_ops,
  1199. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1200. .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
  1201. .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,
  1202. .num_of_queues = IWLAGN_NUM_QUEUES,
  1203. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  1204. .mod_params = &iwlagn_mod_params,
  1205. .valid_tx_ant = ANT_A,
  1206. .valid_rx_ant = ANT_AB,
  1207. .pll_cfg_val = 0,
  1208. .set_l0s = true,
  1209. .use_bsm = false,
  1210. .pa_type = IWL_PA_SYSTEM,
  1211. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  1212. .shadow_ram_support = true,
  1213. .ht_greenfield_support = true,
  1214. .led_compensation = 51,
  1215. .use_rts_for_aggregation = true, /* use rts/cts protection */
  1216. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1217. .supports_idle = true,
  1218. .adv_thermal_throttle = true,
  1219. .support_ct_kill_exit = true,
  1220. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1221. .chain_noise_scale = 1500,
  1222. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1223. .max_event_log_size = 1024,
  1224. .ucode_tracing = true,
  1225. .sensitivity_calib_by_driver = true,
  1226. .chain_noise_calib_by_driver = true,
  1227. .need_dc_calib = true,
  1228. };
  1229. struct iwl_cfg iwl6050_2abg_cfg = {
  1230. .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
  1231. .fw_name_pre = IWL6050_FW_PRE,
  1232. .ucode_api_max = IWL6050_UCODE_API_MAX,
  1233. .ucode_api_min = IWL6050_UCODE_API_MIN,
  1234. .sku = IWL_SKU_A|IWL_SKU_G,
  1235. .ops = &iwl6000_ops,
  1236. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1237. .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
  1238. .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
  1239. .num_of_queues = IWLAGN_NUM_QUEUES,
  1240. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  1241. .mod_params = &iwlagn_mod_params,
  1242. .valid_tx_ant = ANT_AB,
  1243. .valid_rx_ant = ANT_AB,
  1244. .pll_cfg_val = 0,
  1245. .set_l0s = true,
  1246. .use_bsm = false,
  1247. .pa_type = IWL_PA_SYSTEM,
  1248. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  1249. .shadow_ram_support = true,
  1250. .led_compensation = 51,
  1251. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1252. .supports_idle = true,
  1253. .adv_thermal_throttle = true,
  1254. .support_ct_kill_exit = true,
  1255. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1256. .chain_noise_scale = 1500,
  1257. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1258. .max_event_log_size = 1024,
  1259. .ucode_tracing = true,
  1260. .sensitivity_calib_by_driver = true,
  1261. .chain_noise_calib_by_driver = true,
  1262. .need_dc_calib = true,
  1263. };
  1264. struct iwl_cfg iwl6000_3agn_cfg = {
  1265. .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
  1266. .fw_name_pre = IWL6000_FW_PRE,
  1267. .ucode_api_max = IWL6000_UCODE_API_MAX,
  1268. .ucode_api_min = IWL6000_UCODE_API_MIN,
  1269. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  1270. .ops = &iwl6000_ops,
  1271. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  1272. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  1273. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  1274. .num_of_queues = IWLAGN_NUM_QUEUES,
  1275. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  1276. .mod_params = &iwlagn_mod_params,
  1277. .valid_tx_ant = ANT_ABC,
  1278. .valid_rx_ant = ANT_ABC,
  1279. .pll_cfg_val = 0,
  1280. .set_l0s = true,
  1281. .use_bsm = false,
  1282. .pa_type = IWL_PA_SYSTEM,
  1283. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  1284. .shadow_ram_support = true,
  1285. .ht_greenfield_support = true,
  1286. .led_compensation = 51,
  1287. .use_rts_for_aggregation = true, /* use rts/cts protection */
  1288. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1289. .supports_idle = true,
  1290. .adv_thermal_throttle = true,
  1291. .support_ct_kill_exit = true,
  1292. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1293. .chain_noise_scale = 1000,
  1294. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1295. .max_event_log_size = 1024,
  1296. .ucode_tracing = true,
  1297. .sensitivity_calib_by_driver = true,
  1298. .chain_noise_calib_by_driver = true,
  1299. };
  1300. MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
  1301. MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
  1302. MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
  1303. MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));