iwl-6000.c 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086
  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. if (!bt_coex_active) {
  197. bt_cmd.flags = 0;
  198. } else {
  199. bt_cmd.flags = IWL6000G2B_BT_FLAG_CHANNEL_INHIBITION |
  200. IWL6000G2B_BT_FLAG_COEX_MODE_3W <<
  201. IWL6000G2B_BT_FLAG_COEX_MODE_SHIFT;
  202. bt_cmd.valid |= IWL6000G2B_BT_ALL_VALID_MSK;
  203. }
  204. memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_def_3w_lookup,
  205. sizeof(iwl6000g2b_def_3w_lookup));
  206. IWL_DEBUG_INFO(priv, "BT coex %s\n",
  207. bt_cmd.flags ? "active" : "disabled");
  208. if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, sizeof(bt_cmd), &bt_cmd))
  209. IWL_ERR(priv, "failed to send BT Coex Config\n");
  210. }
  211. static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
  212. .min_nrg_cck = 97,
  213. .max_nrg_cck = 0, /* not used, set to 0 */
  214. .auto_corr_min_ofdm = 80,
  215. .auto_corr_min_ofdm_mrc = 128,
  216. .auto_corr_min_ofdm_x1 = 105,
  217. .auto_corr_min_ofdm_mrc_x1 = 192,
  218. .auto_corr_max_ofdm = 145,
  219. .auto_corr_max_ofdm_mrc = 232,
  220. .auto_corr_max_ofdm_x1 = 110,
  221. .auto_corr_max_ofdm_mrc_x1 = 232,
  222. .auto_corr_min_cck = 125,
  223. .auto_corr_max_cck = 175,
  224. .auto_corr_min_cck_mrc = 160,
  225. .auto_corr_max_cck_mrc = 310,
  226. .nrg_th_cck = 97,
  227. .nrg_th_ofdm = 100,
  228. .barker_corr_th_min = 190,
  229. .barker_corr_th_min_mrc = 390,
  230. .nrg_th_cca = 62,
  231. };
  232. static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
  233. {
  234. if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
  235. priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
  236. priv->cfg->num_of_queues =
  237. priv->cfg->mod_params->num_of_queues;
  238. priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
  239. priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
  240. priv->hw_params.scd_bc_tbls_size =
  241. priv->cfg->num_of_queues *
  242. sizeof(struct iwlagn_scd_bc_tbl);
  243. priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
  244. priv->hw_params.max_stations = IWLAGN_STATION_COUNT;
  245. priv->hw_params.bcast_sta_id = IWLAGN_BROADCAST_ID;
  246. priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
  247. priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
  248. priv->hw_params.max_bsm_size = 0;
  249. priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
  250. BIT(IEEE80211_BAND_5GHZ);
  251. priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
  252. priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
  253. priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
  254. priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
  255. priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
  256. if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
  257. priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
  258. /* Set initial sensitivity parameters */
  259. /* Set initial calibration set */
  260. priv->hw_params.sens = &iwl6000_sensitivity;
  261. priv->hw_params.calib_init_cfg =
  262. BIT(IWL_CALIB_XTAL) |
  263. BIT(IWL_CALIB_LO) |
  264. BIT(IWL_CALIB_TX_IQ) |
  265. BIT(IWL_CALIB_BASE_BAND);
  266. if (priv->cfg->need_dc_calib)
  267. priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC);
  268. priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
  269. return 0;
  270. }
  271. static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
  272. struct ieee80211_channel_switch *ch_switch)
  273. {
  274. struct iwl6000_channel_switch_cmd cmd;
  275. const struct iwl_channel_info *ch_info;
  276. u32 switch_time_in_usec, ucode_switch_time;
  277. u16 ch;
  278. u32 tsf_low;
  279. u8 switch_count;
  280. u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval);
  281. struct ieee80211_vif *vif = priv->vif;
  282. struct iwl_host_cmd hcmd = {
  283. .id = REPLY_CHANNEL_SWITCH,
  284. .len = sizeof(cmd),
  285. .flags = CMD_SYNC,
  286. .data = &cmd,
  287. };
  288. cmd.band = priv->band == IEEE80211_BAND_2GHZ;
  289. ch = ch_switch->channel->hw_value;
  290. IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
  291. priv->active_rxon.channel, ch);
  292. cmd.channel = cpu_to_le16(ch);
  293. cmd.rxon_flags = priv->staging_rxon.flags;
  294. cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
  295. switch_count = ch_switch->count;
  296. tsf_low = ch_switch->timestamp & 0x0ffffffff;
  297. /*
  298. * calculate the ucode channel switch time
  299. * adding TSF as one of the factor for when to switch
  300. */
  301. if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
  302. if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
  303. beacon_interval)) {
  304. switch_count -= (priv->ucode_beacon_time -
  305. tsf_low) / beacon_interval;
  306. } else
  307. switch_count = 0;
  308. }
  309. if (switch_count <= 1)
  310. cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
  311. else {
  312. switch_time_in_usec =
  313. vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
  314. ucode_switch_time = iwl_usecs_to_beacons(priv,
  315. switch_time_in_usec,
  316. beacon_interval);
  317. cmd.switch_time = iwl_add_beacon_time(priv,
  318. priv->ucode_beacon_time,
  319. ucode_switch_time,
  320. beacon_interval);
  321. }
  322. IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
  323. cmd.switch_time);
  324. ch_info = iwl_get_channel_info(priv, priv->band, ch);
  325. if (ch_info)
  326. cmd.expect_beacon = is_channel_radar(ch_info);
  327. else {
  328. IWL_ERR(priv, "invalid channel switch from %u to %u\n",
  329. priv->active_rxon.channel, ch);
  330. return -EFAULT;
  331. }
  332. priv->switch_rxon.channel = cmd.channel;
  333. priv->switch_rxon.switch_in_progress = true;
  334. return iwl_send_cmd_sync(priv, &hcmd);
  335. }
  336. static struct iwl_lib_ops iwl6000_lib = {
  337. .set_hw_params = iwl6000_hw_set_hw_params,
  338. .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
  339. .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
  340. .txq_set_sched = iwlagn_txq_set_sched,
  341. .txq_agg_enable = iwlagn_txq_agg_enable,
  342. .txq_agg_disable = iwlagn_txq_agg_disable,
  343. .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
  344. .txq_free_tfd = iwl_hw_txq_free_tfd,
  345. .txq_init = iwl_hw_tx_queue_init,
  346. .rx_handler_setup = iwlagn_rx_handler_setup,
  347. .setup_deferred_work = iwlagn_setup_deferred_work,
  348. .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
  349. .load_ucode = iwlagn_load_ucode,
  350. .dump_nic_event_log = iwl_dump_nic_event_log,
  351. .dump_nic_error_log = iwl_dump_nic_error_log,
  352. .dump_csr = iwl_dump_csr,
  353. .dump_fh = iwl_dump_fh,
  354. .init_alive_start = iwlagn_init_alive_start,
  355. .alive_notify = iwlagn_alive_notify,
  356. .send_tx_power = iwlagn_send_tx_power,
  357. .update_chain_flags = iwl_update_chain_flags,
  358. .set_channel_switch = iwl6000_hw_channel_switch,
  359. .apm_ops = {
  360. .init = iwl_apm_init,
  361. .stop = iwl_apm_stop,
  362. .config = iwl6000_nic_config,
  363. .set_pwr_src = iwl_set_pwr_src,
  364. },
  365. .eeprom_ops = {
  366. .regulatory_bands = {
  367. EEPROM_REG_BAND_1_CHANNELS,
  368. EEPROM_REG_BAND_2_CHANNELS,
  369. EEPROM_REG_BAND_3_CHANNELS,
  370. EEPROM_REG_BAND_4_CHANNELS,
  371. EEPROM_REG_BAND_5_CHANNELS,
  372. EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
  373. EEPROM_REG_BAND_52_HT40_CHANNELS
  374. },
  375. .verify_signature = iwlcore_eeprom_verify_signature,
  376. .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
  377. .release_semaphore = iwlcore_eeprom_release_semaphore,
  378. .calib_version = iwlagn_eeprom_calib_version,
  379. .query_addr = iwlagn_eeprom_query_addr,
  380. .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
  381. },
  382. .post_associate = iwl_post_associate,
  383. .isr = iwl_isr_ict,
  384. .config_ap = iwl_config_ap,
  385. .temp_ops = {
  386. .temperature = iwlagn_temperature,
  387. .set_ct_kill = iwl6000_set_ct_threshold,
  388. .set_calib_version = iwl6000_set_calib_version,
  389. },
  390. .manage_ibss_station = iwlagn_manage_ibss_station,
  391. .update_bcast_station = iwl_update_bcast_station,
  392. .debugfs_ops = {
  393. .rx_stats_read = iwl_ucode_rx_stats_read,
  394. .tx_stats_read = iwl_ucode_tx_stats_read,
  395. .general_stats_read = iwl_ucode_general_stats_read,
  396. .bt_stats_read = iwl_ucode_bt_stats_read,
  397. },
  398. .recover_from_tx_stall = iwl_bg_monitor_recover,
  399. .check_plcp_health = iwl_good_plcp_health,
  400. .check_ack_health = iwl_good_ack_health,
  401. .txfifo_flush = iwlagn_txfifo_flush,
  402. .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
  403. .tt_ops = {
  404. .lower_power_detection = iwl_tt_is_low_power_state,
  405. .tt_power_mode = iwl_tt_current_power_mode,
  406. .ct_kill_check = iwl_check_for_ct_kill,
  407. }
  408. };
  409. static const struct iwl_ops iwl6000_ops = {
  410. .lib = &iwl6000_lib,
  411. .hcmd = &iwlagn_hcmd,
  412. .utils = &iwlagn_hcmd_utils,
  413. .led = &iwlagn_led_ops,
  414. };
  415. static struct iwl_hcmd_ops iwl6000g2b_hcmd = {
  416. .rxon_assoc = iwlagn_send_rxon_assoc,
  417. .commit_rxon = iwl_commit_rxon,
  418. .set_rxon_chain = iwl_set_rxon_chain,
  419. .set_tx_ant = iwlagn_send_tx_ant_config,
  420. .send_bt_config = iwl6000g2b_send_bt_config,
  421. };
  422. static const struct iwl_ops iwl6000g2b_ops = {
  423. .lib = &iwl6000_lib,
  424. .hcmd = &iwl6000g2b_hcmd,
  425. .utils = &iwlagn_hcmd_utils,
  426. .led = &iwlagn_led_ops,
  427. };
  428. struct iwl_cfg iwl6000g2a_2agn_cfg = {
  429. .name = "6000 Series 2x2 AGN Gen2a",
  430. .fw_name_pre = IWL6000G2A_FW_PRE,
  431. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  432. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  433. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  434. .ops = &iwl6000_ops,
  435. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  436. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  437. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  438. .num_of_queues = IWLAGN_NUM_QUEUES,
  439. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  440. .mod_params = &iwlagn_mod_params,
  441. .valid_tx_ant = ANT_AB,
  442. .valid_rx_ant = ANT_AB,
  443. .pll_cfg_val = 0,
  444. .set_l0s = true,
  445. .use_bsm = false,
  446. .pa_type = IWL_PA_SYSTEM,
  447. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  448. .shadow_ram_support = true,
  449. .ht_greenfield_support = true,
  450. .led_compensation = 51,
  451. .use_rts_for_aggregation = true, /* use rts/cts protection */
  452. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  453. .supports_idle = true,
  454. .adv_thermal_throttle = true,
  455. .support_ct_kill_exit = true,
  456. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  457. .chain_noise_scale = 1000,
  458. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  459. .max_event_log_size = 512,
  460. .ucode_tracing = true,
  461. .sensitivity_calib_by_driver = true,
  462. .chain_noise_calib_by_driver = true,
  463. .need_dc_calib = true,
  464. };
  465. struct iwl_cfg iwl6000g2a_2abg_cfg = {
  466. .name = "6000 Series 2x2 ABG Gen2a",
  467. .fw_name_pre = IWL6000G2A_FW_PRE,
  468. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  469. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  470. .sku = IWL_SKU_A|IWL_SKU_G,
  471. .ops = &iwl6000_ops,
  472. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  473. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  474. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  475. .num_of_queues = IWLAGN_NUM_QUEUES,
  476. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  477. .mod_params = &iwlagn_mod_params,
  478. .valid_tx_ant = ANT_AB,
  479. .valid_rx_ant = ANT_AB,
  480. .pll_cfg_val = 0,
  481. .set_l0s = true,
  482. .use_bsm = false,
  483. .pa_type = IWL_PA_SYSTEM,
  484. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  485. .shadow_ram_support = true,
  486. .led_compensation = 51,
  487. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  488. .supports_idle = true,
  489. .adv_thermal_throttle = true,
  490. .support_ct_kill_exit = true,
  491. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  492. .chain_noise_scale = 1000,
  493. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  494. .max_event_log_size = 512,
  495. .sensitivity_calib_by_driver = true,
  496. .chain_noise_calib_by_driver = true,
  497. .need_dc_calib = true,
  498. };
  499. struct iwl_cfg iwl6000g2a_2bg_cfg = {
  500. .name = "6000 Series 2x2 BG Gen2a",
  501. .fw_name_pre = IWL6000G2A_FW_PRE,
  502. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  503. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  504. .sku = IWL_SKU_G,
  505. .ops = &iwl6000_ops,
  506. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  507. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  508. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  509. .num_of_queues = IWLAGN_NUM_QUEUES,
  510. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  511. .mod_params = &iwlagn_mod_params,
  512. .valid_tx_ant = ANT_AB,
  513. .valid_rx_ant = ANT_AB,
  514. .pll_cfg_val = 0,
  515. .set_l0s = true,
  516. .use_bsm = false,
  517. .pa_type = IWL_PA_SYSTEM,
  518. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  519. .shadow_ram_support = true,
  520. .led_compensation = 51,
  521. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  522. .supports_idle = true,
  523. .adv_thermal_throttle = true,
  524. .support_ct_kill_exit = true,
  525. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  526. .chain_noise_scale = 1000,
  527. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  528. .max_event_log_size = 512,
  529. .sensitivity_calib_by_driver = true,
  530. .chain_noise_calib_by_driver = true,
  531. .need_dc_calib = true,
  532. };
  533. struct iwl_cfg iwl6000g2b_2agn_cfg = {
  534. .name = "6000 Series 2x2 AGN Gen2b",
  535. .fw_name_pre = IWL6000G2B_FW_PRE,
  536. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  537. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  538. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  539. .ops = &iwl6000g2b_ops,
  540. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  541. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  542. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  543. .num_of_queues = IWLAGN_NUM_QUEUES,
  544. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  545. .mod_params = &iwlagn_mod_params,
  546. .valid_tx_ant = ANT_AB,
  547. .valid_rx_ant = ANT_AB,
  548. .pll_cfg_val = 0,
  549. .set_l0s = true,
  550. .use_bsm = false,
  551. .pa_type = IWL_PA_SYSTEM,
  552. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  553. .shadow_ram_support = true,
  554. .ht_greenfield_support = true,
  555. .led_compensation = 51,
  556. .use_rts_for_aggregation = true, /* use rts/cts protection */
  557. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  558. .supports_idle = true,
  559. .adv_thermal_throttle = true,
  560. .support_ct_kill_exit = true,
  561. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  562. .chain_noise_scale = 1000,
  563. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  564. .max_event_log_size = 512,
  565. .sensitivity_calib_by_driver = true,
  566. .chain_noise_calib_by_driver = true,
  567. .need_dc_calib = true,
  568. .bt_statistics = true,
  569. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  570. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  571. .advanced_bt_coexist = true,
  572. };
  573. struct iwl_cfg iwl6000g2b_2abg_cfg = {
  574. .name = "6000 Series 2x2 ABG Gen2b",
  575. .fw_name_pre = IWL6000G2B_FW_PRE,
  576. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  577. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  578. .sku = IWL_SKU_A|IWL_SKU_G,
  579. .ops = &iwl6000g2b_ops,
  580. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  581. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  582. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  583. .num_of_queues = IWLAGN_NUM_QUEUES,
  584. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  585. .mod_params = &iwlagn_mod_params,
  586. .valid_tx_ant = ANT_AB,
  587. .valid_rx_ant = ANT_AB,
  588. .pll_cfg_val = 0,
  589. .set_l0s = true,
  590. .use_bsm = false,
  591. .pa_type = IWL_PA_SYSTEM,
  592. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  593. .shadow_ram_support = true,
  594. .led_compensation = 51,
  595. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  596. .supports_idle = true,
  597. .adv_thermal_throttle = true,
  598. .support_ct_kill_exit = true,
  599. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  600. .chain_noise_scale = 1000,
  601. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  602. .max_event_log_size = 512,
  603. .sensitivity_calib_by_driver = true,
  604. .chain_noise_calib_by_driver = true,
  605. .need_dc_calib = true,
  606. .bt_statistics = true,
  607. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  608. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  609. .advanced_bt_coexist = true,
  610. };
  611. struct iwl_cfg iwl6000g2b_2bgn_cfg = {
  612. .name = "6000 Series 2x2 BGN Gen2b",
  613. .fw_name_pre = IWL6000G2B_FW_PRE,
  614. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  615. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  616. .sku = IWL_SKU_G|IWL_SKU_N,
  617. .ops = &iwl6000g2b_ops,
  618. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  619. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  620. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  621. .num_of_queues = IWLAGN_NUM_QUEUES,
  622. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  623. .mod_params = &iwlagn_mod_params,
  624. .valid_tx_ant = ANT_AB,
  625. .valid_rx_ant = ANT_AB,
  626. .pll_cfg_val = 0,
  627. .set_l0s = true,
  628. .use_bsm = false,
  629. .pa_type = IWL_PA_SYSTEM,
  630. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  631. .shadow_ram_support = true,
  632. .ht_greenfield_support = true,
  633. .led_compensation = 51,
  634. .use_rts_for_aggregation = true, /* use rts/cts protection */
  635. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  636. .supports_idle = true,
  637. .adv_thermal_throttle = true,
  638. .support_ct_kill_exit = true,
  639. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  640. .chain_noise_scale = 1000,
  641. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  642. .max_event_log_size = 512,
  643. .sensitivity_calib_by_driver = true,
  644. .chain_noise_calib_by_driver = true,
  645. .need_dc_calib = true,
  646. .bt_statistics = true,
  647. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  648. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  649. .advanced_bt_coexist = true,
  650. };
  651. struct iwl_cfg iwl6000g2b_2bg_cfg = {
  652. .name = "6000 Series 2x2 BG Gen2b",
  653. .fw_name_pre = IWL6000G2B_FW_PRE,
  654. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  655. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  656. .sku = IWL_SKU_G,
  657. .ops = &iwl6000g2b_ops,
  658. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  659. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  660. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  661. .num_of_queues = IWLAGN_NUM_QUEUES,
  662. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  663. .mod_params = &iwlagn_mod_params,
  664. .valid_tx_ant = ANT_AB,
  665. .valid_rx_ant = ANT_AB,
  666. .pll_cfg_val = 0,
  667. .set_l0s = true,
  668. .use_bsm = false,
  669. .pa_type = IWL_PA_SYSTEM,
  670. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  671. .shadow_ram_support = true,
  672. .led_compensation = 51,
  673. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  674. .supports_idle = true,
  675. .adv_thermal_throttle = true,
  676. .support_ct_kill_exit = true,
  677. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  678. .chain_noise_scale = 1000,
  679. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  680. .max_event_log_size = 512,
  681. .sensitivity_calib_by_driver = true,
  682. .chain_noise_calib_by_driver = true,
  683. .need_dc_calib = true,
  684. .bt_statistics = true,
  685. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  686. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  687. .advanced_bt_coexist = true,
  688. };
  689. struct iwl_cfg iwl6000g2b_bgn_cfg = {
  690. .name = "6000 Series 1x2 BGN Gen2b",
  691. .fw_name_pre = IWL6000G2B_FW_PRE,
  692. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  693. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  694. .sku = IWL_SKU_G|IWL_SKU_N,
  695. .ops = &iwl6000g2b_ops,
  696. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  697. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  698. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  699. .num_of_queues = IWLAGN_NUM_QUEUES,
  700. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  701. .mod_params = &iwlagn_mod_params,
  702. .valid_tx_ant = ANT_A,
  703. .valid_rx_ant = ANT_AB,
  704. .pll_cfg_val = 0,
  705. .set_l0s = true,
  706. .use_bsm = false,
  707. .pa_type = IWL_PA_SYSTEM,
  708. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  709. .shadow_ram_support = true,
  710. .ht_greenfield_support = true,
  711. .led_compensation = 51,
  712. .use_rts_for_aggregation = true, /* use rts/cts protection */
  713. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  714. .supports_idle = true,
  715. .adv_thermal_throttle = true,
  716. .support_ct_kill_exit = true,
  717. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  718. .chain_noise_scale = 1000,
  719. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  720. .max_event_log_size = 512,
  721. .sensitivity_calib_by_driver = true,
  722. .chain_noise_calib_by_driver = true,
  723. .need_dc_calib = true,
  724. .bt_statistics = true,
  725. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  726. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  727. .advanced_bt_coexist = true,
  728. };
  729. struct iwl_cfg iwl6000g2b_bg_cfg = {
  730. .name = "6000 Series 1x2 BG Gen2b",
  731. .fw_name_pre = IWL6000G2B_FW_PRE,
  732. .ucode_api_max = IWL6000G2_UCODE_API_MAX,
  733. .ucode_api_min = IWL6000G2_UCODE_API_MIN,
  734. .sku = IWL_SKU_G,
  735. .ops = &iwl6000g2b_ops,
  736. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  737. .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
  738. .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
  739. .num_of_queues = IWLAGN_NUM_QUEUES,
  740. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  741. .mod_params = &iwlagn_mod_params,
  742. .valid_tx_ant = ANT_A,
  743. .valid_rx_ant = ANT_AB,
  744. .pll_cfg_val = 0,
  745. .set_l0s = true,
  746. .use_bsm = false,
  747. .pa_type = IWL_PA_SYSTEM,
  748. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  749. .shadow_ram_support = true,
  750. .led_compensation = 51,
  751. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  752. .supports_idle = true,
  753. .adv_thermal_throttle = true,
  754. .support_ct_kill_exit = true,
  755. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  756. .chain_noise_scale = 1000,
  757. .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
  758. .max_event_log_size = 512,
  759. .sensitivity_calib_by_driver = true,
  760. .chain_noise_calib_by_driver = true,
  761. .need_dc_calib = true,
  762. .bt_statistics = true,
  763. /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
  764. .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
  765. .advanced_bt_coexist = true,
  766. };
  767. /*
  768. * "i": Internal configuration, use internal Power Amplifier
  769. */
  770. struct iwl_cfg iwl6000i_2agn_cfg = {
  771. .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
  772. .fw_name_pre = IWL6000_FW_PRE,
  773. .ucode_api_max = IWL6000_UCODE_API_MAX,
  774. .ucode_api_min = IWL6000_UCODE_API_MIN,
  775. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  776. .ops = &iwl6000_ops,
  777. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  778. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  779. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  780. .num_of_queues = IWLAGN_NUM_QUEUES,
  781. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  782. .mod_params = &iwlagn_mod_params,
  783. .valid_tx_ant = ANT_BC,
  784. .valid_rx_ant = ANT_BC,
  785. .pll_cfg_val = 0,
  786. .set_l0s = true,
  787. .use_bsm = false,
  788. .pa_type = IWL_PA_INTERNAL,
  789. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  790. .shadow_ram_support = true,
  791. .ht_greenfield_support = true,
  792. .led_compensation = 51,
  793. .use_rts_for_aggregation = true, /* use rts/cts protection */
  794. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  795. .supports_idle = true,
  796. .adv_thermal_throttle = true,
  797. .support_ct_kill_exit = true,
  798. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  799. .chain_noise_scale = 1000,
  800. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  801. .max_event_log_size = 1024,
  802. .ucode_tracing = true,
  803. .sensitivity_calib_by_driver = true,
  804. .chain_noise_calib_by_driver = true,
  805. };
  806. struct iwl_cfg iwl6000i_2abg_cfg = {
  807. .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
  808. .fw_name_pre = IWL6000_FW_PRE,
  809. .ucode_api_max = IWL6000_UCODE_API_MAX,
  810. .ucode_api_min = IWL6000_UCODE_API_MIN,
  811. .sku = IWL_SKU_A|IWL_SKU_G,
  812. .ops = &iwl6000_ops,
  813. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  814. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  815. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  816. .num_of_queues = IWLAGN_NUM_QUEUES,
  817. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  818. .mod_params = &iwlagn_mod_params,
  819. .valid_tx_ant = ANT_BC,
  820. .valid_rx_ant = ANT_BC,
  821. .pll_cfg_val = 0,
  822. .set_l0s = true,
  823. .use_bsm = false,
  824. .pa_type = IWL_PA_INTERNAL,
  825. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  826. .shadow_ram_support = true,
  827. .led_compensation = 51,
  828. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  829. .supports_idle = true,
  830. .adv_thermal_throttle = true,
  831. .support_ct_kill_exit = true,
  832. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  833. .chain_noise_scale = 1000,
  834. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  835. .max_event_log_size = 1024,
  836. .ucode_tracing = true,
  837. .sensitivity_calib_by_driver = true,
  838. .chain_noise_calib_by_driver = true,
  839. };
  840. struct iwl_cfg iwl6000i_2bg_cfg = {
  841. .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
  842. .fw_name_pre = IWL6000_FW_PRE,
  843. .ucode_api_max = IWL6000_UCODE_API_MAX,
  844. .ucode_api_min = IWL6000_UCODE_API_MIN,
  845. .sku = IWL_SKU_G,
  846. .ops = &iwl6000_ops,
  847. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  848. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  849. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  850. .num_of_queues = IWLAGN_NUM_QUEUES,
  851. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  852. .mod_params = &iwlagn_mod_params,
  853. .valid_tx_ant = ANT_BC,
  854. .valid_rx_ant = ANT_BC,
  855. .pll_cfg_val = 0,
  856. .set_l0s = true,
  857. .use_bsm = false,
  858. .pa_type = IWL_PA_INTERNAL,
  859. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  860. .shadow_ram_support = true,
  861. .led_compensation = 51,
  862. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  863. .supports_idle = true,
  864. .adv_thermal_throttle = true,
  865. .support_ct_kill_exit = true,
  866. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  867. .chain_noise_scale = 1000,
  868. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  869. .max_event_log_size = 1024,
  870. .ucode_tracing = true,
  871. .sensitivity_calib_by_driver = true,
  872. .chain_noise_calib_by_driver = true,
  873. };
  874. struct iwl_cfg iwl6050_2agn_cfg = {
  875. .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
  876. .fw_name_pre = IWL6050_FW_PRE,
  877. .ucode_api_max = IWL6050_UCODE_API_MAX,
  878. .ucode_api_min = IWL6050_UCODE_API_MIN,
  879. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  880. .ops = &iwl6000_ops,
  881. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  882. .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
  883. .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
  884. .num_of_queues = IWLAGN_NUM_QUEUES,
  885. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  886. .mod_params = &iwlagn_mod_params,
  887. .valid_tx_ant = ANT_AB,
  888. .valid_rx_ant = ANT_AB,
  889. .pll_cfg_val = 0,
  890. .set_l0s = true,
  891. .use_bsm = false,
  892. .pa_type = IWL_PA_SYSTEM,
  893. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  894. .shadow_ram_support = true,
  895. .ht_greenfield_support = true,
  896. .led_compensation = 51,
  897. .use_rts_for_aggregation = true, /* use rts/cts protection */
  898. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  899. .supports_idle = true,
  900. .adv_thermal_throttle = true,
  901. .support_ct_kill_exit = true,
  902. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  903. .chain_noise_scale = 1500,
  904. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  905. .max_event_log_size = 1024,
  906. .ucode_tracing = true,
  907. .sensitivity_calib_by_driver = true,
  908. .chain_noise_calib_by_driver = true,
  909. .need_dc_calib = true,
  910. };
  911. struct iwl_cfg iwl6050g2_bgn_cfg = {
  912. .name = "6050 Series 1x2 BGN Gen2",
  913. .fw_name_pre = IWL6050_FW_PRE,
  914. .ucode_api_max = IWL6050_UCODE_API_MAX,
  915. .ucode_api_min = IWL6050_UCODE_API_MIN,
  916. .sku = IWL_SKU_G|IWL_SKU_N,
  917. .ops = &iwl6000_ops,
  918. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  919. .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
  920. .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,
  921. .num_of_queues = IWLAGN_NUM_QUEUES,
  922. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  923. .mod_params = &iwlagn_mod_params,
  924. .valid_tx_ant = ANT_A,
  925. .valid_rx_ant = ANT_AB,
  926. .pll_cfg_val = 0,
  927. .set_l0s = true,
  928. .use_bsm = false,
  929. .pa_type = IWL_PA_SYSTEM,
  930. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  931. .shadow_ram_support = true,
  932. .ht_greenfield_support = true,
  933. .led_compensation = 51,
  934. .use_rts_for_aggregation = true, /* use rts/cts protection */
  935. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  936. .supports_idle = true,
  937. .adv_thermal_throttle = true,
  938. .support_ct_kill_exit = true,
  939. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  940. .chain_noise_scale = 1500,
  941. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  942. .max_event_log_size = 1024,
  943. .ucode_tracing = true,
  944. .sensitivity_calib_by_driver = true,
  945. .chain_noise_calib_by_driver = true,
  946. .need_dc_calib = true,
  947. };
  948. struct iwl_cfg iwl6050_2abg_cfg = {
  949. .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
  950. .fw_name_pre = IWL6050_FW_PRE,
  951. .ucode_api_max = IWL6050_UCODE_API_MAX,
  952. .ucode_api_min = IWL6050_UCODE_API_MIN,
  953. .sku = IWL_SKU_A|IWL_SKU_G,
  954. .ops = &iwl6000_ops,
  955. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  956. .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
  957. .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
  958. .num_of_queues = IWLAGN_NUM_QUEUES,
  959. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  960. .mod_params = &iwlagn_mod_params,
  961. .valid_tx_ant = ANT_AB,
  962. .valid_rx_ant = ANT_AB,
  963. .pll_cfg_val = 0,
  964. .set_l0s = true,
  965. .use_bsm = false,
  966. .pa_type = IWL_PA_SYSTEM,
  967. .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
  968. .shadow_ram_support = true,
  969. .led_compensation = 51,
  970. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  971. .supports_idle = true,
  972. .adv_thermal_throttle = true,
  973. .support_ct_kill_exit = true,
  974. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  975. .chain_noise_scale = 1500,
  976. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  977. .max_event_log_size = 1024,
  978. .ucode_tracing = true,
  979. .sensitivity_calib_by_driver = true,
  980. .chain_noise_calib_by_driver = true,
  981. .need_dc_calib = true,
  982. };
  983. struct iwl_cfg iwl6000_3agn_cfg = {
  984. .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
  985. .fw_name_pre = IWL6000_FW_PRE,
  986. .ucode_api_max = IWL6000_UCODE_API_MAX,
  987. .ucode_api_min = IWL6000_UCODE_API_MIN,
  988. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  989. .ops = &iwl6000_ops,
  990. .eeprom_size = OTP_LOW_IMAGE_SIZE,
  991. .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
  992. .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
  993. .num_of_queues = IWLAGN_NUM_QUEUES,
  994. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  995. .mod_params = &iwlagn_mod_params,
  996. .valid_tx_ant = ANT_ABC,
  997. .valid_rx_ant = ANT_ABC,
  998. .pll_cfg_val = 0,
  999. .set_l0s = true,
  1000. .use_bsm = false,
  1001. .pa_type = IWL_PA_SYSTEM,
  1002. .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
  1003. .shadow_ram_support = true,
  1004. .ht_greenfield_support = true,
  1005. .led_compensation = 51,
  1006. .use_rts_for_aggregation = true, /* use rts/cts protection */
  1007. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  1008. .supports_idle = true,
  1009. .adv_thermal_throttle = true,
  1010. .support_ct_kill_exit = true,
  1011. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
  1012. .chain_noise_scale = 1000,
  1013. .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
  1014. .max_event_log_size = 1024,
  1015. .ucode_tracing = true,
  1016. .sensitivity_calib_by_driver = true,
  1017. .chain_noise_calib_by_driver = true,
  1018. };
  1019. MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
  1020. MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
  1021. MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
  1022. MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));