iwl-5000.c 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 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 Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  23. *
  24. *****************************************************************************/
  25. #include <linux/kernel.h>
  26. #include <linux/module.h>
  27. #include <linux/init.h>
  28. #include <linux/pci.h>
  29. #include <linux/dma-mapping.h>
  30. #include <linux/delay.h>
  31. #include <linux/sched.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-helpers.h"
  44. #include "iwl-agn.h"
  45. #include "iwl-agn-led.h"
  46. #include "iwl-agn-hw.h"
  47. #include "iwl-5000-hw.h"
  48. #include "iwl-6000-hw.h"
  49. /* Highest firmware API version supported */
  50. #define IWL5000_UCODE_API_MAX 2
  51. #define IWL5150_UCODE_API_MAX 2
  52. /* Lowest firmware API version supported */
  53. #define IWL5000_UCODE_API_MIN 1
  54. #define IWL5150_UCODE_API_MIN 1
  55. #define IWL5000_FW_PRE "iwlwifi-5000-"
  56. #define _IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE #api ".ucode"
  57. #define IWL5000_MODULE_FIRMWARE(api) _IWL5000_MODULE_FIRMWARE(api)
  58. #define IWL5150_FW_PRE "iwlwifi-5150-"
  59. #define _IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE #api ".ucode"
  60. #define IWL5150_MODULE_FIRMWARE(api) _IWL5150_MODULE_FIRMWARE(api)
  61. /* NIC configuration for 5000 series */
  62. void iwl5000_nic_config(struct iwl_priv *priv)
  63. {
  64. unsigned long flags;
  65. u16 radio_cfg;
  66. spin_lock_irqsave(&priv->lock, flags);
  67. radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
  68. /* write radio config values to register */
  69. if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) < EEPROM_RF_CONFIG_TYPE_MAX)
  70. iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
  71. EEPROM_RF_CFG_TYPE_MSK(radio_cfg) |
  72. EEPROM_RF_CFG_STEP_MSK(radio_cfg) |
  73. EEPROM_RF_CFG_DASH_MSK(radio_cfg));
  74. /* set CSR_HW_CONFIG_REG for uCode use */
  75. iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG,
  76. CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
  77. CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
  78. /* W/A : NIC is stuck in a reset state after Early PCIe power off
  79. * (PCIe power is lost before PERST# is asserted),
  80. * causing ME FW to lose ownership and not being able to obtain it back.
  81. */
  82. iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG,
  83. APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS,
  84. ~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS);
  85. spin_unlock_irqrestore(&priv->lock, flags);
  86. }
  87. /*
  88. * EEPROM
  89. */
  90. static u32 eeprom_indirect_address(const struct iwl_priv *priv, u32 address)
  91. {
  92. u16 offset = 0;
  93. if ((address & INDIRECT_ADDRESS) == 0)
  94. return address;
  95. switch (address & INDIRECT_TYPE_MSK) {
  96. case INDIRECT_HOST:
  97. offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_HOST);
  98. break;
  99. case INDIRECT_GENERAL:
  100. offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_GENERAL);
  101. break;
  102. case INDIRECT_REGULATORY:
  103. offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_REGULATORY);
  104. break;
  105. case INDIRECT_CALIBRATION:
  106. offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_CALIBRATION);
  107. break;
  108. case INDIRECT_PROCESS_ADJST:
  109. offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_PROCESS_ADJST);
  110. break;
  111. case INDIRECT_OTHERS:
  112. offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_OTHERS);
  113. break;
  114. default:
  115. IWL_ERR(priv, "illegal indirect type: 0x%X\n",
  116. address & INDIRECT_TYPE_MSK);
  117. break;
  118. }
  119. /* translate the offset from words to byte */
  120. return (address & ADDRESS_MSK) + (offset << 1);
  121. }
  122. u16 iwl5000_eeprom_calib_version(struct iwl_priv *priv)
  123. {
  124. struct iwl_eeprom_calib_hdr {
  125. u8 version;
  126. u8 pa_type;
  127. u16 voltage;
  128. } *hdr;
  129. hdr = (struct iwl_eeprom_calib_hdr *)iwl_eeprom_query_addr(priv,
  130. EEPROM_5000_CALIB_ALL);
  131. return hdr->version;
  132. }
  133. static struct iwl_sensitivity_ranges iwl5000_sensitivity = {
  134. .min_nrg_cck = 95,
  135. .max_nrg_cck = 0, /* not used, set to 0 */
  136. .auto_corr_min_ofdm = 90,
  137. .auto_corr_min_ofdm_mrc = 170,
  138. .auto_corr_min_ofdm_x1 = 120,
  139. .auto_corr_min_ofdm_mrc_x1 = 240,
  140. .auto_corr_max_ofdm = 120,
  141. .auto_corr_max_ofdm_mrc = 210,
  142. .auto_corr_max_ofdm_x1 = 120,
  143. .auto_corr_max_ofdm_mrc_x1 = 240,
  144. .auto_corr_min_cck = 125,
  145. .auto_corr_max_cck = 200,
  146. .auto_corr_min_cck_mrc = 170,
  147. .auto_corr_max_cck_mrc = 400,
  148. .nrg_th_cck = 95,
  149. .nrg_th_ofdm = 95,
  150. .barker_corr_th_min = 190,
  151. .barker_corr_th_min_mrc = 390,
  152. .nrg_th_cca = 62,
  153. };
  154. static struct iwl_sensitivity_ranges iwl5150_sensitivity = {
  155. .min_nrg_cck = 95,
  156. .max_nrg_cck = 0, /* not used, set to 0 */
  157. .auto_corr_min_ofdm = 90,
  158. .auto_corr_min_ofdm_mrc = 170,
  159. .auto_corr_min_ofdm_x1 = 105,
  160. .auto_corr_min_ofdm_mrc_x1 = 220,
  161. .auto_corr_max_ofdm = 120,
  162. .auto_corr_max_ofdm_mrc = 210,
  163. /* max = min for performance bug in 5150 DSP */
  164. .auto_corr_max_ofdm_x1 = 105,
  165. .auto_corr_max_ofdm_mrc_x1 = 220,
  166. .auto_corr_min_cck = 125,
  167. .auto_corr_max_cck = 200,
  168. .auto_corr_min_cck_mrc = 170,
  169. .auto_corr_max_cck_mrc = 400,
  170. .nrg_th_cck = 95,
  171. .nrg_th_ofdm = 95,
  172. .barker_corr_th_min = 190,
  173. .barker_corr_th_min_mrc = 390,
  174. .nrg_th_cca = 62,
  175. };
  176. const u8 *iwl5000_eeprom_query_addr(const struct iwl_priv *priv,
  177. size_t offset)
  178. {
  179. u32 address = eeprom_indirect_address(priv, offset);
  180. BUG_ON(address >= priv->cfg->eeprom_size);
  181. return &priv->eeprom[address];
  182. }
  183. static void iwl5150_set_ct_threshold(struct iwl_priv *priv)
  184. {
  185. const s32 volt2temp_coef = IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF;
  186. s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) -
  187. iwl_temp_calib_to_offset(priv);
  188. priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef;
  189. }
  190. static void iwl5000_set_ct_threshold(struct iwl_priv *priv)
  191. {
  192. /* want Celsius */
  193. priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY;
  194. }
  195. int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
  196. {
  197. if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
  198. priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
  199. priv->cfg->num_of_queues =
  200. priv->cfg->mod_params->num_of_queues;
  201. priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
  202. priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
  203. priv->hw_params.scd_bc_tbls_size =
  204. priv->cfg->num_of_queues *
  205. sizeof(struct iwlagn_scd_bc_tbl);
  206. priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
  207. priv->hw_params.max_stations = IWL5000_STATION_COUNT;
  208. priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
  209. priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE;
  210. priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE;
  211. priv->hw_params.max_bsm_size = 0;
  212. priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
  213. BIT(IEEE80211_BAND_5GHZ);
  214. priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
  215. priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
  216. priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
  217. priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
  218. priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
  219. if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
  220. priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
  221. /* Set initial sensitivity parameters */
  222. /* Set initial calibration set */
  223. switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) {
  224. case CSR_HW_REV_TYPE_5150:
  225. priv->hw_params.sens = &iwl5150_sensitivity;
  226. priv->hw_params.calib_init_cfg =
  227. BIT(IWL_CALIB_DC) |
  228. BIT(IWL_CALIB_LO) |
  229. BIT(IWL_CALIB_TX_IQ) |
  230. BIT(IWL_CALIB_BASE_BAND);
  231. break;
  232. default:
  233. priv->hw_params.sens = &iwl5000_sensitivity;
  234. priv->hw_params.calib_init_cfg =
  235. BIT(IWL_CALIB_XTAL) |
  236. BIT(IWL_CALIB_LO) |
  237. BIT(IWL_CALIB_TX_IQ) |
  238. BIT(IWL_CALIB_TX_IQ_PERD) |
  239. BIT(IWL_CALIB_BASE_BAND);
  240. break;
  241. }
  242. return 0;
  243. }
  244. static inline u32 iwl5000_get_scd_ssn(struct iwl5000_tx_resp *tx_resp)
  245. {
  246. return le32_to_cpup((__le32 *)&tx_resp->status +
  247. tx_resp->frame_count) & MAX_SN;
  248. }
  249. static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv,
  250. struct iwl_ht_agg *agg,
  251. struct iwl5000_tx_resp *tx_resp,
  252. int txq_id, u16 start_idx)
  253. {
  254. u16 status;
  255. struct agg_tx_status *frame_status = &tx_resp->status;
  256. struct ieee80211_tx_info *info = NULL;
  257. struct ieee80211_hdr *hdr = NULL;
  258. u32 rate_n_flags = le32_to_cpu(tx_resp->rate_n_flags);
  259. int i, sh, idx;
  260. u16 seq;
  261. if (agg->wait_for_ba)
  262. IWL_DEBUG_TX_REPLY(priv, "got tx response w/o block-ack\n");
  263. agg->frame_count = tx_resp->frame_count;
  264. agg->start_idx = start_idx;
  265. agg->rate_n_flags = rate_n_flags;
  266. agg->bitmap = 0;
  267. /* # frames attempted by Tx command */
  268. if (agg->frame_count == 1) {
  269. /* Only one frame was attempted; no block-ack will arrive */
  270. status = le16_to_cpu(frame_status[0].status);
  271. idx = start_idx;
  272. /* FIXME: code repetition */
  273. IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, StartIdx=%d idx=%d\n",
  274. agg->frame_count, agg->start_idx, idx);
  275. info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]);
  276. info->status.rates[0].count = tx_resp->failure_frame + 1;
  277. info->flags &= ~IEEE80211_TX_CTL_AMPDU;
  278. info->flags |= iwl_tx_status_to_mac80211(status);
  279. iwl_hwrate_to_tx_control(priv, rate_n_flags, info);
  280. /* FIXME: code repetition end */
  281. IWL_DEBUG_TX_REPLY(priv, "1 Frame 0x%x failure :%d\n",
  282. status & 0xff, tx_resp->failure_frame);
  283. IWL_DEBUG_TX_REPLY(priv, "Rate Info rate_n_flags=%x\n", rate_n_flags);
  284. agg->wait_for_ba = 0;
  285. } else {
  286. /* Two or more frames were attempted; expect block-ack */
  287. u64 bitmap = 0;
  288. int start = agg->start_idx;
  289. /* Construct bit-map of pending frames within Tx window */
  290. for (i = 0; i < agg->frame_count; i++) {
  291. u16 sc;
  292. status = le16_to_cpu(frame_status[i].status);
  293. seq = le16_to_cpu(frame_status[i].sequence);
  294. idx = SEQ_TO_INDEX(seq);
  295. txq_id = SEQ_TO_QUEUE(seq);
  296. if (status & (AGG_TX_STATE_FEW_BYTES_MSK |
  297. AGG_TX_STATE_ABORT_MSK))
  298. continue;
  299. IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, txq_id=%d idx=%d\n",
  300. agg->frame_count, txq_id, idx);
  301. hdr = iwl_tx_queue_get_hdr(priv, txq_id, idx);
  302. if (!hdr) {
  303. IWL_ERR(priv,
  304. "BUG_ON idx doesn't point to valid skb"
  305. " idx=%d, txq_id=%d\n", idx, txq_id);
  306. return -1;
  307. }
  308. sc = le16_to_cpu(hdr->seq_ctrl);
  309. if (idx != (SEQ_TO_SN(sc) & 0xff)) {
  310. IWL_ERR(priv,
  311. "BUG_ON idx doesn't match seq control"
  312. " idx=%d, seq_idx=%d, seq=%d\n",
  313. idx, SEQ_TO_SN(sc),
  314. hdr->seq_ctrl);
  315. return -1;
  316. }
  317. IWL_DEBUG_TX_REPLY(priv, "AGG Frame i=%d idx %d seq=%d\n",
  318. i, idx, SEQ_TO_SN(sc));
  319. sh = idx - start;
  320. if (sh > 64) {
  321. sh = (start - idx) + 0xff;
  322. bitmap = bitmap << sh;
  323. sh = 0;
  324. start = idx;
  325. } else if (sh < -64)
  326. sh = 0xff - (start - idx);
  327. else if (sh < 0) {
  328. sh = start - idx;
  329. start = idx;
  330. bitmap = bitmap << sh;
  331. sh = 0;
  332. }
  333. bitmap |= 1ULL << sh;
  334. IWL_DEBUG_TX_REPLY(priv, "start=%d bitmap=0x%llx\n",
  335. start, (unsigned long long)bitmap);
  336. }
  337. agg->bitmap = bitmap;
  338. agg->start_idx = start;
  339. IWL_DEBUG_TX_REPLY(priv, "Frames %d start_idx=%d bitmap=0x%llx\n",
  340. agg->frame_count, agg->start_idx,
  341. (unsigned long long)agg->bitmap);
  342. if (bitmap)
  343. agg->wait_for_ba = 1;
  344. }
  345. return 0;
  346. }
  347. static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
  348. struct iwl_rx_mem_buffer *rxb)
  349. {
  350. struct iwl_rx_packet *pkt = rxb_addr(rxb);
  351. u16 sequence = le16_to_cpu(pkt->hdr.sequence);
  352. int txq_id = SEQ_TO_QUEUE(sequence);
  353. int index = SEQ_TO_INDEX(sequence);
  354. struct iwl_tx_queue *txq = &priv->txq[txq_id];
  355. struct ieee80211_tx_info *info;
  356. struct iwl5000_tx_resp *tx_resp = (void *)&pkt->u.raw[0];
  357. u32 status = le16_to_cpu(tx_resp->status.status);
  358. int tid;
  359. int sta_id;
  360. int freed;
  361. if ((index >= txq->q.n_bd) || (iwl_queue_used(&txq->q, index) == 0)) {
  362. IWL_ERR(priv, "Read index for DMA queue txq_id (%d) index %d "
  363. "is out of range [0-%d] %d %d\n", txq_id,
  364. index, txq->q.n_bd, txq->q.write_ptr,
  365. txq->q.read_ptr);
  366. return;
  367. }
  368. info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb[0]);
  369. memset(&info->status, 0, sizeof(info->status));
  370. tid = (tx_resp->ra_tid & IWL50_TX_RES_TID_MSK) >> IWL50_TX_RES_TID_POS;
  371. sta_id = (tx_resp->ra_tid & IWL50_TX_RES_RA_MSK) >> IWL50_TX_RES_RA_POS;
  372. if (txq->sched_retry) {
  373. const u32 scd_ssn = iwl5000_get_scd_ssn(tx_resp);
  374. struct iwl_ht_agg *agg = NULL;
  375. agg = &priv->stations[sta_id].tid[tid].agg;
  376. iwl5000_tx_status_reply_tx(priv, agg, tx_resp, txq_id, index);
  377. /* check if BAR is needed */
  378. if ((tx_resp->frame_count == 1) && !iwl_is_tx_success(status))
  379. info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
  380. if (txq->q.read_ptr != (scd_ssn & 0xff)) {
  381. index = iwl_queue_dec_wrap(scd_ssn & 0xff, txq->q.n_bd);
  382. IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim "
  383. "scd_ssn=%d idx=%d txq=%d swq=%d\n",
  384. scd_ssn , index, txq_id, txq->swq_id);
  385. freed = iwl_tx_queue_reclaim(priv, txq_id, index);
  386. iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
  387. if (priv->mac80211_registered &&
  388. (iwl_queue_space(&txq->q) > txq->q.low_mark) &&
  389. (agg->state != IWL_EMPTYING_HW_QUEUE_DELBA)) {
  390. if (agg->state == IWL_AGG_OFF)
  391. iwl_wake_queue(priv, txq_id);
  392. else
  393. iwl_wake_queue(priv, txq->swq_id);
  394. }
  395. }
  396. } else {
  397. BUG_ON(txq_id != txq->swq_id);
  398. info->status.rates[0].count = tx_resp->failure_frame + 1;
  399. info->flags |= iwl_tx_status_to_mac80211(status);
  400. iwl_hwrate_to_tx_control(priv,
  401. le32_to_cpu(tx_resp->rate_n_flags),
  402. info);
  403. IWL_DEBUG_TX_REPLY(priv, "TXQ %d status %s (0x%08x) rate_n_flags "
  404. "0x%x retries %d\n",
  405. txq_id,
  406. iwl_get_tx_fail_reason(status), status,
  407. le32_to_cpu(tx_resp->rate_n_flags),
  408. tx_resp->failure_frame);
  409. freed = iwl_tx_queue_reclaim(priv, txq_id, index);
  410. iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
  411. if (priv->mac80211_registered &&
  412. (iwl_queue_space(&txq->q) > txq->q.low_mark))
  413. iwl_wake_queue(priv, txq_id);
  414. }
  415. iwl_txq_check_empty(priv, sta_id, tid, txq_id);
  416. if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
  417. IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n");
  418. }
  419. void iwl5000_setup_deferred_work(struct iwl_priv *priv)
  420. {
  421. /* in 5000 the tx power calibration is done in uCode */
  422. priv->disable_tx_power_cal = 1;
  423. }
  424. void iwl5000_rx_handler_setup(struct iwl_priv *priv)
  425. {
  426. /* init calibration handlers */
  427. priv->rx_handlers[CALIBRATION_RES_NOTIFICATION] =
  428. iwlagn_rx_calib_result;
  429. priv->rx_handlers[CALIBRATION_COMPLETE_NOTIFICATION] =
  430. iwlagn_rx_calib_complete;
  431. priv->rx_handlers[REPLY_TX] = iwl5000_rx_reply_tx;
  432. }
  433. int iwl5000_hw_valid_rtc_data_addr(u32 addr)
  434. {
  435. return (addr >= IWLAGN_RTC_DATA_LOWER_BOUND) &&
  436. (addr < IWLAGN_RTC_DATA_UPPER_BOUND);
  437. }
  438. int iwl5000_send_tx_power(struct iwl_priv *priv)
  439. {
  440. struct iwl5000_tx_power_dbm_cmd tx_power_cmd;
  441. u8 tx_ant_cfg_cmd;
  442. /* half dBm need to multiply */
  443. tx_power_cmd.global_lmt = (s8)(2 * priv->tx_power_user_lmt);
  444. if (priv->tx_power_lmt_in_half_dbm &&
  445. priv->tx_power_lmt_in_half_dbm < tx_power_cmd.global_lmt) {
  446. /*
  447. * For the newer devices which using enhanced/extend tx power
  448. * table in EEPROM, the format is in half dBm. driver need to
  449. * convert to dBm format before report to mac80211.
  450. * By doing so, there is a possibility of 1/2 dBm resolution
  451. * lost. driver will perform "round-up" operation before
  452. * reporting, but it will cause 1/2 dBm tx power over the
  453. * regulatory limit. Perform the checking here, if the
  454. * "tx_power_user_lmt" is higher than EEPROM value (in
  455. * half-dBm format), lower the tx power based on EEPROM
  456. */
  457. tx_power_cmd.global_lmt = priv->tx_power_lmt_in_half_dbm;
  458. }
  459. tx_power_cmd.flags = IWL50_TX_POWER_NO_CLOSED;
  460. tx_power_cmd.srv_chan_lmt = IWL50_TX_POWER_AUTO;
  461. if (IWL_UCODE_API(priv->ucode_ver) == 1)
  462. tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD_V1;
  463. else
  464. tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD;
  465. return iwl_send_cmd_pdu_async(priv, tx_ant_cfg_cmd,
  466. sizeof(tx_power_cmd), &tx_power_cmd,
  467. NULL);
  468. }
  469. void iwl5000_temperature(struct iwl_priv *priv)
  470. {
  471. /* store temperature from statistics (in Celsius) */
  472. priv->temperature = le32_to_cpu(priv->statistics.general.temperature);
  473. iwl_tt_handler(priv);
  474. }
  475. static void iwl5150_temperature(struct iwl_priv *priv)
  476. {
  477. u32 vt = 0;
  478. s32 offset = iwl_temp_calib_to_offset(priv);
  479. vt = le32_to_cpu(priv->statistics.general.temperature);
  480. vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset;
  481. /* now vt hold the temperature in Kelvin */
  482. priv->temperature = KELVIN_TO_CELSIUS(vt);
  483. iwl_tt_handler(priv);
  484. }
  485. static int iwl5000_hw_channel_switch(struct iwl_priv *priv, u16 channel)
  486. {
  487. struct iwl5000_channel_switch_cmd cmd;
  488. const struct iwl_channel_info *ch_info;
  489. struct iwl_host_cmd hcmd = {
  490. .id = REPLY_CHANNEL_SWITCH,
  491. .len = sizeof(cmd),
  492. .flags = CMD_SIZE_HUGE,
  493. .data = &cmd,
  494. };
  495. IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
  496. priv->active_rxon.channel, channel);
  497. cmd.band = priv->band == IEEE80211_BAND_2GHZ;
  498. cmd.channel = cpu_to_le16(channel);
  499. cmd.rxon_flags = priv->staging_rxon.flags;
  500. cmd.rxon_filter_flags = priv->staging_rxon.filter_flags;
  501. cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
  502. ch_info = iwl_get_channel_info(priv, priv->band, channel);
  503. if (ch_info)
  504. cmd.expect_beacon = is_channel_radar(ch_info);
  505. else {
  506. IWL_ERR(priv, "invalid channel switch from %u to %u\n",
  507. priv->active_rxon.channel, channel);
  508. return -EFAULT;
  509. }
  510. priv->switch_rxon.channel = cpu_to_le16(channel);
  511. priv->switch_rxon.switch_in_progress = true;
  512. return iwl_send_cmd_sync(priv, &hcmd);
  513. }
  514. struct iwl_lib_ops iwl5000_lib = {
  515. .set_hw_params = iwl5000_hw_set_hw_params,
  516. .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
  517. .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
  518. .txq_set_sched = iwlagn_txq_set_sched,
  519. .txq_agg_enable = iwlagn_txq_agg_enable,
  520. .txq_agg_disable = iwlagn_txq_agg_disable,
  521. .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
  522. .txq_free_tfd = iwl_hw_txq_free_tfd,
  523. .txq_init = iwl_hw_tx_queue_init,
  524. .rx_handler_setup = iwl5000_rx_handler_setup,
  525. .setup_deferred_work = iwl5000_setup_deferred_work,
  526. .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
  527. .dump_nic_event_log = iwl_dump_nic_event_log,
  528. .dump_nic_error_log = iwl_dump_nic_error_log,
  529. .dump_csr = iwl_dump_csr,
  530. .dump_fh = iwl_dump_fh,
  531. .load_ucode = iwlagn_load_ucode,
  532. .init_alive_start = iwlagn_init_alive_start,
  533. .alive_notify = iwlagn_alive_notify,
  534. .send_tx_power = iwl5000_send_tx_power,
  535. .update_chain_flags = iwl_update_chain_flags,
  536. .set_channel_switch = iwl5000_hw_channel_switch,
  537. .apm_ops = {
  538. .init = iwl_apm_init,
  539. .stop = iwl_apm_stop,
  540. .config = iwl5000_nic_config,
  541. .set_pwr_src = iwl_set_pwr_src,
  542. },
  543. .eeprom_ops = {
  544. .regulatory_bands = {
  545. EEPROM_5000_REG_BAND_1_CHANNELS,
  546. EEPROM_5000_REG_BAND_2_CHANNELS,
  547. EEPROM_5000_REG_BAND_3_CHANNELS,
  548. EEPROM_5000_REG_BAND_4_CHANNELS,
  549. EEPROM_5000_REG_BAND_5_CHANNELS,
  550. EEPROM_5000_REG_BAND_24_HT40_CHANNELS,
  551. EEPROM_5000_REG_BAND_52_HT40_CHANNELS
  552. },
  553. .verify_signature = iwlcore_eeprom_verify_signature,
  554. .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
  555. .release_semaphore = iwlcore_eeprom_release_semaphore,
  556. .calib_version = iwl5000_eeprom_calib_version,
  557. .query_addr = iwl5000_eeprom_query_addr,
  558. },
  559. .post_associate = iwl_post_associate,
  560. .isr = iwl_isr_ict,
  561. .config_ap = iwl_config_ap,
  562. .temp_ops = {
  563. .temperature = iwl5000_temperature,
  564. .set_ct_kill = iwl5000_set_ct_threshold,
  565. },
  566. .add_bcast_station = iwl_add_bcast_station,
  567. .recover_from_tx_stall = iwl_bg_monitor_recover,
  568. .check_plcp_health = iwl_good_plcp_health,
  569. .check_ack_health = iwl_good_ack_health,
  570. };
  571. static struct iwl_lib_ops iwl5150_lib = {
  572. .set_hw_params = iwl5000_hw_set_hw_params,
  573. .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
  574. .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
  575. .txq_set_sched = iwlagn_txq_set_sched,
  576. .txq_agg_enable = iwlagn_txq_agg_enable,
  577. .txq_agg_disable = iwlagn_txq_agg_disable,
  578. .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
  579. .txq_free_tfd = iwl_hw_txq_free_tfd,
  580. .txq_init = iwl_hw_tx_queue_init,
  581. .rx_handler_setup = iwl5000_rx_handler_setup,
  582. .setup_deferred_work = iwl5000_setup_deferred_work,
  583. .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
  584. .dump_nic_event_log = iwl_dump_nic_event_log,
  585. .dump_nic_error_log = iwl_dump_nic_error_log,
  586. .dump_csr = iwl_dump_csr,
  587. .load_ucode = iwlagn_load_ucode,
  588. .init_alive_start = iwlagn_init_alive_start,
  589. .alive_notify = iwlagn_alive_notify,
  590. .send_tx_power = iwl5000_send_tx_power,
  591. .update_chain_flags = iwl_update_chain_flags,
  592. .set_channel_switch = iwl5000_hw_channel_switch,
  593. .apm_ops = {
  594. .init = iwl_apm_init,
  595. .stop = iwl_apm_stop,
  596. .config = iwl5000_nic_config,
  597. .set_pwr_src = iwl_set_pwr_src,
  598. },
  599. .eeprom_ops = {
  600. .regulatory_bands = {
  601. EEPROM_5000_REG_BAND_1_CHANNELS,
  602. EEPROM_5000_REG_BAND_2_CHANNELS,
  603. EEPROM_5000_REG_BAND_3_CHANNELS,
  604. EEPROM_5000_REG_BAND_4_CHANNELS,
  605. EEPROM_5000_REG_BAND_5_CHANNELS,
  606. EEPROM_5000_REG_BAND_24_HT40_CHANNELS,
  607. EEPROM_5000_REG_BAND_52_HT40_CHANNELS
  608. },
  609. .verify_signature = iwlcore_eeprom_verify_signature,
  610. .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
  611. .release_semaphore = iwlcore_eeprom_release_semaphore,
  612. .calib_version = iwl5000_eeprom_calib_version,
  613. .query_addr = iwl5000_eeprom_query_addr,
  614. },
  615. .post_associate = iwl_post_associate,
  616. .isr = iwl_isr_ict,
  617. .config_ap = iwl_config_ap,
  618. .temp_ops = {
  619. .temperature = iwl5150_temperature,
  620. .set_ct_kill = iwl5150_set_ct_threshold,
  621. },
  622. .add_bcast_station = iwl_add_bcast_station,
  623. .recover_from_tx_stall = iwl_bg_monitor_recover,
  624. .check_plcp_health = iwl_good_plcp_health,
  625. .check_ack_health = iwl_good_ack_health,
  626. };
  627. static const struct iwl_ops iwl5000_ops = {
  628. .ucode = &iwlagn_ucode,
  629. .lib = &iwl5000_lib,
  630. .hcmd = &iwlagn_hcmd,
  631. .utils = &iwlagn_hcmd_utils,
  632. .led = &iwlagn_led_ops,
  633. };
  634. static const struct iwl_ops iwl5150_ops = {
  635. .ucode = &iwlagn_ucode,
  636. .lib = &iwl5150_lib,
  637. .hcmd = &iwlagn_hcmd,
  638. .utils = &iwlagn_hcmd_utils,
  639. .led = &iwlagn_led_ops,
  640. };
  641. struct iwl_mod_params iwl50_mod_params = {
  642. .amsdu_size_8K = 1,
  643. .restart_fw = 1,
  644. /* the rest are 0 by default */
  645. };
  646. struct iwl_cfg iwl5300_agn_cfg = {
  647. .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
  648. .fw_name_pre = IWL5000_FW_PRE,
  649. .ucode_api_max = IWL5000_UCODE_API_MAX,
  650. .ucode_api_min = IWL5000_UCODE_API_MIN,
  651. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  652. .ops = &iwl5000_ops,
  653. .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
  654. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  655. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  656. .num_of_queues = IWLAGN_NUM_QUEUES,
  657. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  658. .mod_params = &iwl50_mod_params,
  659. .valid_tx_ant = ANT_ABC,
  660. .valid_rx_ant = ANT_ABC,
  661. .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
  662. .set_l0s = true,
  663. .use_bsm = false,
  664. .ht_greenfield_support = true,
  665. .led_compensation = 51,
  666. .use_rts_for_ht = true, /* use rts/cts protection */
  667. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  668. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
  669. .chain_noise_scale = 1000,
  670. .monitor_recover_period = IWL_MONITORING_PERIOD,
  671. };
  672. struct iwl_cfg iwl5100_bgn_cfg = {
  673. .name = "Intel(R) WiFi Link 5100 BGN",
  674. .fw_name_pre = IWL5000_FW_PRE,
  675. .ucode_api_max = IWL5000_UCODE_API_MAX,
  676. .ucode_api_min = IWL5000_UCODE_API_MIN,
  677. .sku = IWL_SKU_G|IWL_SKU_N,
  678. .ops = &iwl5000_ops,
  679. .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
  680. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  681. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  682. .num_of_queues = IWLAGN_NUM_QUEUES,
  683. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  684. .mod_params = &iwl50_mod_params,
  685. .valid_tx_ant = ANT_B,
  686. .valid_rx_ant = ANT_AB,
  687. .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
  688. .set_l0s = true,
  689. .use_bsm = false,
  690. .ht_greenfield_support = true,
  691. .led_compensation = 51,
  692. .use_rts_for_ht = true, /* use rts/cts protection */
  693. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  694. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
  695. .chain_noise_scale = 1000,
  696. .monitor_recover_period = IWL_MONITORING_PERIOD,
  697. };
  698. struct iwl_cfg iwl5100_abg_cfg = {
  699. .name = "Intel(R) WiFi Link 5100 ABG",
  700. .fw_name_pre = IWL5000_FW_PRE,
  701. .ucode_api_max = IWL5000_UCODE_API_MAX,
  702. .ucode_api_min = IWL5000_UCODE_API_MIN,
  703. .sku = IWL_SKU_A|IWL_SKU_G,
  704. .ops = &iwl5000_ops,
  705. .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
  706. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  707. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  708. .num_of_queues = IWLAGN_NUM_QUEUES,
  709. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  710. .mod_params = &iwl50_mod_params,
  711. .valid_tx_ant = ANT_B,
  712. .valid_rx_ant = ANT_AB,
  713. .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
  714. .set_l0s = true,
  715. .use_bsm = false,
  716. .led_compensation = 51,
  717. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  718. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
  719. .chain_noise_scale = 1000,
  720. .monitor_recover_period = IWL_MONITORING_PERIOD,
  721. };
  722. struct iwl_cfg iwl5100_agn_cfg = {
  723. .name = "Intel(R) WiFi Link 5100 AGN",
  724. .fw_name_pre = IWL5000_FW_PRE,
  725. .ucode_api_max = IWL5000_UCODE_API_MAX,
  726. .ucode_api_min = IWL5000_UCODE_API_MIN,
  727. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  728. .ops = &iwl5000_ops,
  729. .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
  730. .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
  731. .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
  732. .num_of_queues = IWLAGN_NUM_QUEUES,
  733. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  734. .mod_params = &iwl50_mod_params,
  735. .valid_tx_ant = ANT_B,
  736. .valid_rx_ant = ANT_AB,
  737. .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
  738. .set_l0s = true,
  739. .use_bsm = false,
  740. .ht_greenfield_support = true,
  741. .led_compensation = 51,
  742. .use_rts_for_ht = true, /* use rts/cts protection */
  743. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  744. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
  745. .chain_noise_scale = 1000,
  746. .monitor_recover_period = IWL_MONITORING_PERIOD,
  747. };
  748. struct iwl_cfg iwl5350_agn_cfg = {
  749. .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
  750. .fw_name_pre = IWL5000_FW_PRE,
  751. .ucode_api_max = IWL5000_UCODE_API_MAX,
  752. .ucode_api_min = IWL5000_UCODE_API_MIN,
  753. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  754. .ops = &iwl5000_ops,
  755. .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
  756. .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
  757. .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
  758. .num_of_queues = IWLAGN_NUM_QUEUES,
  759. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  760. .mod_params = &iwl50_mod_params,
  761. .valid_tx_ant = ANT_ABC,
  762. .valid_rx_ant = ANT_ABC,
  763. .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
  764. .set_l0s = true,
  765. .use_bsm = false,
  766. .ht_greenfield_support = true,
  767. .led_compensation = 51,
  768. .use_rts_for_ht = true, /* use rts/cts protection */
  769. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  770. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
  771. .chain_noise_scale = 1000,
  772. .monitor_recover_period = IWL_MONITORING_PERIOD,
  773. };
  774. struct iwl_cfg iwl5150_agn_cfg = {
  775. .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
  776. .fw_name_pre = IWL5150_FW_PRE,
  777. .ucode_api_max = IWL5150_UCODE_API_MAX,
  778. .ucode_api_min = IWL5150_UCODE_API_MIN,
  779. .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
  780. .ops = &iwl5150_ops,
  781. .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
  782. .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
  783. .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
  784. .num_of_queues = IWLAGN_NUM_QUEUES,
  785. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  786. .mod_params = &iwl50_mod_params,
  787. .valid_tx_ant = ANT_A,
  788. .valid_rx_ant = ANT_AB,
  789. .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
  790. .set_l0s = true,
  791. .use_bsm = false,
  792. .ht_greenfield_support = true,
  793. .led_compensation = 51,
  794. .use_rts_for_ht = true, /* use rts/cts protection */
  795. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  796. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
  797. .chain_noise_scale = 1000,
  798. .monitor_recover_period = IWL_MONITORING_PERIOD,
  799. };
  800. struct iwl_cfg iwl5150_abg_cfg = {
  801. .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
  802. .fw_name_pre = IWL5150_FW_PRE,
  803. .ucode_api_max = IWL5150_UCODE_API_MAX,
  804. .ucode_api_min = IWL5150_UCODE_API_MIN,
  805. .sku = IWL_SKU_A|IWL_SKU_G,
  806. .ops = &iwl5150_ops,
  807. .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
  808. .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
  809. .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
  810. .num_of_queues = IWLAGN_NUM_QUEUES,
  811. .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
  812. .mod_params = &iwl50_mod_params,
  813. .valid_tx_ant = ANT_A,
  814. .valid_rx_ant = ANT_AB,
  815. .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
  816. .set_l0s = true,
  817. .use_bsm = false,
  818. .led_compensation = 51,
  819. .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
  820. .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
  821. .chain_noise_scale = 1000,
  822. .monitor_recover_period = IWL_MONITORING_PERIOD,
  823. };
  824. MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
  825. MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));
  826. module_param_named(swcrypto50, iwl50_mod_params.sw_crypto, bool, S_IRUGO);
  827. MODULE_PARM_DESC(swcrypto50,
  828. "using software crypto engine (default 0 [hardware])\n");
  829. module_param_named(queues_num50, iwl50_mod_params.num_of_queues, int, S_IRUGO);
  830. MODULE_PARM_DESC(queues_num50, "number of hw queues in 50xx series");
  831. module_param_named(11n_disable50, iwl50_mod_params.disable_11n, int, S_IRUGO);
  832. MODULE_PARM_DESC(11n_disable50, "disable 50XX 11n functionality");
  833. module_param_named(amsdu_size_8K50, iwl50_mod_params.amsdu_size_8K,
  834. int, S_IRUGO);
  835. MODULE_PARM_DESC(amsdu_size_8K50, "enable 8K amsdu size in 50XX series");
  836. module_param_named(fw_restart50, iwl50_mod_params.restart_fw, int, S_IRUGO);
  837. MODULE_PARM_DESC(fw_restart50, "restart firmware in case of error");