iwl-6000.c 47 KB

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