aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-06-21 04:53:44 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-25 03:37:58 -0400
commitb04db9ac4f7641332e0133b2fd8f82e6e4553947 (patch)
tree4d4b0fc6009f865fa3866c9062d2ae76e8e13ada /drivers/net
parente75dac921d88ac1fa1ad08686ab242556f8b888b (diff)
iwlwifi: configure the queues from the op_mode
Since the op_mode defines the queue mapping, let it do it completely through the API functions. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/commands.h40
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/dev.h16
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/main.c56
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/ucode.c37
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h27
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/internal.h3
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/trans.c22
7 files changed, 98 insertions, 103 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/commands.h b/drivers/net/wireless/iwlwifi/dvm/commands.h
index 64811cd91635..97bea16f3592 100644
--- a/drivers/net/wireless/iwlwifi/dvm/commands.h
+++ b/drivers/net/wireless/iwlwifi/dvm/commands.h
@@ -190,6 +190,44 @@ enum {
190 REPLY_MAX = 0xff 190 REPLY_MAX = 0xff
191}; 191};
192 192
193/*
194 * Minimum number of queues. MAX_NUM is defined in hw specific files.
195 * Set the minimum to accommodate
196 * - 4 standard TX queues
197 * - the command queue
198 * - 4 PAN TX queues
199 * - the PAN multicast queue, and
200 * - the AUX (TX during scan dwell) queue.
201 */
202#define IWL_MIN_NUM_QUEUES 11
203
204/*
205 * Command queue depends on iPAN support.
206 */
207#define IWL_DEFAULT_CMD_QUEUE_NUM 4
208#define IWL_IPAN_CMD_QUEUE_NUM 9
209
210#define IWL_TX_FIFO_BK 0 /* shared */
211#define IWL_TX_FIFO_BE 1
212#define IWL_TX_FIFO_VI 2 /* shared */
213#define IWL_TX_FIFO_VO 3
214#define IWL_TX_FIFO_BK_IPAN IWL_TX_FIFO_BK
215#define IWL_TX_FIFO_BE_IPAN 4
216#define IWL_TX_FIFO_VI_IPAN IWL_TX_FIFO_VI
217#define IWL_TX_FIFO_VO_IPAN 5
218/* re-uses the VO FIFO, uCode will properly flush/schedule */
219#define IWL_TX_FIFO_AUX 5
220#define IWL_TX_FIFO_UNUSED 255
221
222#define IWLAGN_CMD_FIFO_NUM 7
223
224/*
225 * This queue number is required for proper operation
226 * because the ucode will stop/start the scheduler as
227 * required.
228 */
229#define IWL_IPAN_MCAST_QUEUE 8
230
193/****************************************************************************** 231/******************************************************************************
194 * (0) 232 * (0)
195 * Commonly used structures and definitions: 233 * Commonly used structures and definitions:
@@ -755,8 +793,6 @@ struct iwl_qosparam_cmd {
755#define IWLAGN_BROADCAST_ID 15 793#define IWLAGN_BROADCAST_ID 15
756#define IWLAGN_STATION_COUNT 16 794#define IWLAGN_STATION_COUNT 16
757 795
758#define IWL_INVALID_STATION 255
759#define IWL_MAX_TID_COUNT 8
760#define IWL_TID_NON_QOS IWL_MAX_TID_COUNT 796#define IWL_TID_NON_QOS IWL_MAX_TID_COUNT
761 797
762#define STA_FLG_TX_RATE_MSK cpu_to_le32(1 << 2) 798#define STA_FLG_TX_RATE_MSK cpu_to_le32(1 << 2)
diff --git a/drivers/net/wireless/iwlwifi/dvm/dev.h b/drivers/net/wireless/iwlwifi/dvm/dev.h
index 54cf085ddc89..054f728f6266 100644
--- a/drivers/net/wireless/iwlwifi/dvm/dev.h
+++ b/drivers/net/wireless/iwlwifi/dvm/dev.h
@@ -90,22 +90,6 @@
90 90
91#define IWL_NUM_SCAN_RATES (2) 91#define IWL_NUM_SCAN_RATES (2)
92 92
93/*
94 * Minimum number of queues. MAX_NUM is defined in hw specific files.
95 * Set the minimum to accommodate
96 * - 4 standard TX queues
97 * - the command queue
98 * - 4 PAN TX queues
99 * - the PAN multicast queue, and
100 * - the AUX (TX during scan dwell) queue.
101 */
102#define IWL_MIN_NUM_QUEUES 11
103
104/*
105 * Command queue depends on iPAN support.
106 */
107#define IWL_DEFAULT_CMD_QUEUE_NUM 4
108#define IWL_IPAN_CMD_QUEUE_NUM 9
109 93
110#define IEEE80211_DATA_LEN 2304 94#define IEEE80211_DATA_LEN 2304
111#define IEEE80211_4ADDR_LEN 30 95#define IEEE80211_4ADDR_LEN 30
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c
index abfd7916bde6..612f05d757db 100644
--- a/drivers/net/wireless/iwlwifi/dvm/main.c
+++ b/drivers/net/wireless/iwlwifi/dvm/main.c
@@ -518,49 +518,6 @@ static void iwl_bg_tx_flush(struct work_struct *work)
518 * queue/FIFO/AC mapping definitions 518 * queue/FIFO/AC mapping definitions
519 */ 519 */
520 520
521#define IWL_TX_FIFO_BK 0 /* shared */
522#define IWL_TX_FIFO_BE 1
523#define IWL_TX_FIFO_VI 2 /* shared */
524#define IWL_TX_FIFO_VO 3
525#define IWL_TX_FIFO_BK_IPAN IWL_TX_FIFO_BK
526#define IWL_TX_FIFO_BE_IPAN 4
527#define IWL_TX_FIFO_VI_IPAN IWL_TX_FIFO_VI
528#define IWL_TX_FIFO_VO_IPAN 5
529/* re-uses the VO FIFO, uCode will properly flush/schedule */
530#define IWL_TX_FIFO_AUX 5
531#define IWL_TX_FIFO_UNUSED -1
532
533#define IWLAGN_CMD_FIFO_NUM 7
534
535/*
536 * This queue number is required for proper operation
537 * because the ucode will stop/start the scheduler as
538 * required.
539 */
540#define IWL_IPAN_MCAST_QUEUE 8
541
542static const u8 iwlagn_default_queue_to_tx_fifo[] = {
543 IWL_TX_FIFO_VO,
544 IWL_TX_FIFO_VI,
545 IWL_TX_FIFO_BE,
546 IWL_TX_FIFO_BK,
547 IWLAGN_CMD_FIFO_NUM,
548};
549
550static const u8 iwlagn_ipan_queue_to_tx_fifo[] = {
551 IWL_TX_FIFO_VO,
552 IWL_TX_FIFO_VI,
553 IWL_TX_FIFO_BE,
554 IWL_TX_FIFO_BK,
555 IWL_TX_FIFO_BK_IPAN,
556 IWL_TX_FIFO_BE_IPAN,
557 IWL_TX_FIFO_VI_IPAN,
558 IWL_TX_FIFO_VO_IPAN,
559 IWL_TX_FIFO_BE_IPAN,
560 IWLAGN_CMD_FIFO_NUM,
561 IWL_TX_FIFO_AUX,
562};
563
564static const u8 iwlagn_bss_ac_to_fifo[] = { 521static const u8 iwlagn_bss_ac_to_fifo[] = {
565 IWL_TX_FIFO_VO, 522 IWL_TX_FIFO_VO,
566 IWL_TX_FIFO_VI, 523 IWL_TX_FIFO_VI,
@@ -1350,6 +1307,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1350 else 1307 else
1351 trans_cfg.queue_watchdog_timeout = IWL_WATCHDOG_DISABLED; 1308 trans_cfg.queue_watchdog_timeout = IWL_WATCHDOG_DISABLED;
1352 trans_cfg.command_names = iwl_dvm_cmd_strings; 1309 trans_cfg.command_names = iwl_dvm_cmd_strings;
1310 trans_cfg.cmd_fifo = IWLAGN_CMD_FIFO_NUM;
1353 1311
1354 WARN_ON(sizeof(priv->transport_queue_stop) * BITS_PER_BYTE < 1312 WARN_ON(sizeof(priv->transport_queue_stop) * BITS_PER_BYTE <
1355 priv->cfg->base_params->num_of_queues); 1313 priv->cfg->base_params->num_of_queues);
@@ -1363,15 +1321,9 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1363 if (ucode_flags & IWL_UCODE_TLV_FLAGS_PAN) { 1321 if (ucode_flags & IWL_UCODE_TLV_FLAGS_PAN) {
1364 priv->sta_key_max_num = STA_KEY_MAX_NUM_PAN; 1322 priv->sta_key_max_num = STA_KEY_MAX_NUM_PAN;
1365 trans_cfg.cmd_queue = IWL_IPAN_CMD_QUEUE_NUM; 1323 trans_cfg.cmd_queue = IWL_IPAN_CMD_QUEUE_NUM;
1366 trans_cfg.queue_to_fifo = iwlagn_ipan_queue_to_tx_fifo;
1367 trans_cfg.n_queue_to_fifo =
1368 ARRAY_SIZE(iwlagn_ipan_queue_to_tx_fifo);
1369 } else { 1324 } else {
1370 priv->sta_key_max_num = STA_KEY_MAX_NUM; 1325 priv->sta_key_max_num = STA_KEY_MAX_NUM;
1371 trans_cfg.cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM; 1326 trans_cfg.cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM;
1372 trans_cfg.queue_to_fifo = iwlagn_default_queue_to_tx_fifo;
1373 trans_cfg.n_queue_to_fifo =
1374 ARRAY_SIZE(iwlagn_default_queue_to_tx_fifo);
1375 } 1327 }
1376 1328
1377 /* Configure transport layer */ 1329 /* Configure transport layer */
@@ -1460,9 +1412,6 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1460 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_P2P; 1412 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_P2P;
1461 priv->sta_key_max_num = STA_KEY_MAX_NUM; 1413 priv->sta_key_max_num = STA_KEY_MAX_NUM;
1462 trans_cfg.cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM; 1414 trans_cfg.cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM;
1463 trans_cfg.queue_to_fifo = iwlagn_default_queue_to_tx_fifo;
1464 trans_cfg.n_queue_to_fifo =
1465 ARRAY_SIZE(iwlagn_default_queue_to_tx_fifo);
1466 1415
1467 /* Configure transport layer again*/ 1416 /* Configure transport layer again*/
1468 iwl_trans_configure(priv->trans, &trans_cfg); 1417 iwl_trans_configure(priv->trans, &trans_cfg);
@@ -1480,9 +1429,6 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1480 atomic_set(&priv->queue_stop_count[i], 0); 1429 atomic_set(&priv->queue_stop_count[i], 0);
1481 } 1430 }
1482 1431
1483 WARN_ON(trans_cfg.queue_to_fifo[trans_cfg.cmd_queue] !=
1484 IWLAGN_CMD_FIFO_NUM);
1485
1486 if (iwl_init_drv(priv)) 1432 if (iwl_init_drv(priv))
1487 goto out_free_eeprom; 1433 goto out_free_eeprom;
1488 1434
diff --git a/drivers/net/wireless/iwlwifi/dvm/ucode.c b/drivers/net/wireless/iwlwifi/dvm/ucode.c
index b3a314ba48c7..6d8d6dd7943f 100644
--- a/drivers/net/wireless/iwlwifi/dvm/ucode.c
+++ b/drivers/net/wireless/iwlwifi/dvm/ucode.c
@@ -226,13 +226,50 @@ int iwl_send_bt_env(struct iwl_priv *priv, u8 action, u8 type)
226 return ret; 226 return ret;
227} 227}
228 228
229static const u8 iwlagn_default_queue_to_tx_fifo[] = {
230 IWL_TX_FIFO_VO,
231 IWL_TX_FIFO_VI,
232 IWL_TX_FIFO_BE,
233 IWL_TX_FIFO_BK,
234};
235
236static const u8 iwlagn_ipan_queue_to_tx_fifo[] = {
237 IWL_TX_FIFO_VO,
238 IWL_TX_FIFO_VI,
239 IWL_TX_FIFO_BE,
240 IWL_TX_FIFO_BK,
241 IWL_TX_FIFO_BK_IPAN,
242 IWL_TX_FIFO_BE_IPAN,
243 IWL_TX_FIFO_VI_IPAN,
244 IWL_TX_FIFO_VO_IPAN,
245 IWL_TX_FIFO_BE_IPAN,
246 IWL_TX_FIFO_UNUSED,
247 IWL_TX_FIFO_AUX,
248};
229 249
230static int iwl_alive_notify(struct iwl_priv *priv) 250static int iwl_alive_notify(struct iwl_priv *priv)
231{ 251{
252 const u8 *queue_to_txf;
253 u8 n_queues;
232 int ret; 254 int ret;
255 int i;
233 256
234 iwl_trans_fw_alive(priv->trans); 257 iwl_trans_fw_alive(priv->trans);
235 258
259 if (priv->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN &&
260 priv->eeprom_data->sku & EEPROM_SKU_CAP_IPAN_ENABLE) {
261 n_queues = ARRAY_SIZE(iwlagn_ipan_queue_to_tx_fifo);
262 queue_to_txf = iwlagn_ipan_queue_to_tx_fifo;
263 } else {
264 n_queues = ARRAY_SIZE(iwlagn_default_queue_to_tx_fifo);
265 queue_to_txf = iwlagn_default_queue_to_tx_fifo;
266 }
267
268 for (i = 0; i < n_queues; i++)
269 if (queue_to_txf[i] != IWL_TX_FIFO_UNUSED)
270 iwl_trans_ac_txq_enable(priv->trans, i,
271 queue_to_txf[i]);
272
236 priv->passive_no_rx = false; 273 priv->passive_no_rx = false;
237 priv->transport_queue_stop = 0; 274 priv->transport_queue_stop = 0;
238 275
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index 00efde8e5536..867d8e194da4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -290,16 +290,17 @@ static inline struct page *rxb_steal_page(struct iwl_rx_cmd_buffer *r)
290 * currently supports 290 * currently supports
291 */ 291 */
292#define IWL_MAX_HW_QUEUES 32 292#define IWL_MAX_HW_QUEUES 32
293#define IWL_INVALID_STATION 255
294#define IWL_MAX_TID_COUNT 8
295#define IWL_FRAME_LIMIT 64
293 296
294/** 297/**
295 * struct iwl_trans_config - transport configuration 298 * struct iwl_trans_config - transport configuration
296 * 299 *
297 * @op_mode: pointer to the upper layer. 300 * @op_mode: pointer to the upper layer.
298 * @queue_to_fifo: queue to FIFO mapping to set up by
299 * default
300 * @n_queue_to_fifo: number of queues to set up
301 * @cmd_queue: the index of the command queue. 301 * @cmd_queue: the index of the command queue.
302 * Must be set before start_fw. 302 * Must be set before start_fw.
303 * @cmd_fifo: the fifo for host commands
303 * @no_reclaim_cmds: Some devices erroneously don't set the 304 * @no_reclaim_cmds: Some devices erroneously don't set the
304 * SEQ_RX_FRAME bit on some notifications, this is the 305 * SEQ_RX_FRAME bit on some notifications, this is the
305 * list of such notifications to filter. Max length is 306 * list of such notifications to filter. Max length is
@@ -314,10 +315,9 @@ static inline struct page *rxb_steal_page(struct iwl_rx_cmd_buffer *r)
314 */ 315 */
315struct iwl_trans_config { 316struct iwl_trans_config {
316 struct iwl_op_mode *op_mode; 317 struct iwl_op_mode *op_mode;
317 const u8 *queue_to_fifo;
318 u8 n_queue_to_fifo;
319 318
320 u8 cmd_queue; 319 u8 cmd_queue;
320 u8 cmd_fifo;
321 const u8 *no_reclaim_cmds; 321 const u8 *no_reclaim_cmds;
322 int n_no_reclaim_cmds; 322 int n_no_reclaim_cmds;
323 323
@@ -355,9 +355,9 @@ struct iwl_trans;
355 * Must be atomic 355 * Must be atomic
356 * @reclaim: free packet until ssn. Returns a list of freed packets. 356 * @reclaim: free packet until ssn. Returns a list of freed packets.
357 * Must be atomic 357 * Must be atomic
358 * @txq_enable: setup a tx queue for AMPDU - will be called once the HW is 358 * @txq_enable: setup a queue. To setup an AC queue, use the
359 * ready and a successful ADDBA response has been received. 359 * iwl_trans_ac_txq_enable wrapper. fw_alive must have been called before
360 * May sleep 360 * this one. The op_mode must not configure the HCMD queue. May sleep.
361 * @txq_disable: de-configure a Tx queue to send AMPDUs 361 * @txq_disable: de-configure a Tx queue to send AMPDUs
362 * Must be atomic 362 * Must be atomic
363 * @wait_tx_queue_empty: wait until all tx queues are empty 363 * @wait_tx_queue_empty: wait until all tx queues are empty
@@ -497,9 +497,9 @@ static inline void iwl_trans_fw_alive(struct iwl_trans *trans)
497{ 497{
498 might_sleep(); 498 might_sleep();
499 499
500 trans->ops->fw_alive(trans);
501
502 trans->state = IWL_TRANS_FW_ALIVE; 500 trans->state = IWL_TRANS_FW_ALIVE;
501
502 trans->ops->fw_alive(trans);
503} 503}
504 504
505static inline int iwl_trans_start_fw(struct iwl_trans *trans, 505static inline int iwl_trans_start_fw(struct iwl_trans *trans,
@@ -593,6 +593,13 @@ static inline void iwl_trans_txq_enable(struct iwl_trans *trans, int queue,
593 frame_limit, ssn); 593 frame_limit, ssn);
594} 594}
595 595
596static inline void iwl_trans_ac_txq_enable(struct iwl_trans *trans, int queue,
597 int fifo)
598{
599 iwl_trans_txq_enable(trans, queue, fifo, IWL_INVALID_STATION,
600 IWL_MAX_TID_COUNT, IWL_FRAME_LIMIT, 0);
601}
602
596static inline int iwl_trans_wait_tx_queue_empty(struct iwl_trans *trans) 603static inline int iwl_trans_wait_tx_queue_empty(struct iwl_trans *trans)
597{ 604{
598 WARN_ONCE(trans->state != IWL_TRANS_FW_ALIVE, 605 WARN_ONCE(trans->state != IWL_TRANS_FW_ALIVE,
diff --git a/drivers/net/wireless/iwlwifi/pcie/internal.h b/drivers/net/wireless/iwlwifi/pcie/internal.h
index 5024fb662bf6..d9694c58208c 100644
--- a/drivers/net/wireless/iwlwifi/pcie/internal.h
+++ b/drivers/net/wireless/iwlwifi/pcie/internal.h
@@ -269,10 +269,9 @@ struct iwl_trans_pcie {
269 wait_queue_head_t ucode_write_waitq; 269 wait_queue_head_t ucode_write_waitq;
270 unsigned long status; 270 unsigned long status;
271 u8 cmd_queue; 271 u8 cmd_queue;
272 u8 cmd_fifo;
272 u8 n_no_reclaim_cmds; 273 u8 n_no_reclaim_cmds;
273 u8 no_reclaim_cmds[MAX_NO_RECLAIM_CMDS]; 274 u8 no_reclaim_cmds[MAX_NO_RECLAIM_CMDS];
274 u8 setup_q_to_fifo[IWL_MAX_HW_QUEUES];
275 u8 n_q_to_fifo;
276 275
277 bool rx_buf_size_8k; 276 bool rx_buf_size_8k;
278 u32 rx_page_order; 277 u32 rx_page_order;
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index 42f369d15f48..bac0eb0d046d 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -1059,7 +1059,7 @@ static void iwl_tx_start(struct iwl_trans *trans)
1059{ 1059{
1060 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 1060 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1061 u32 a; 1061 u32 a;
1062 int i, chan; 1062 int chan;
1063 u32 reg_val; 1063 u32 reg_val;
1064 1064
1065 /* make sure all queue are not stopped/used */ 1065 /* make sure all queue are not stopped/used */
@@ -1091,12 +1091,8 @@ static void iwl_tx_start(struct iwl_trans *trans)
1091 */ 1091 */
1092 iwl_write_prph(trans, SCD_CHAINEXT_EN, 0); 1092 iwl_write_prph(trans, SCD_CHAINEXT_EN, 0);
1093 1093
1094 for (i = 0; i < trans_pcie->n_q_to_fifo; i++) { 1094 iwl_trans_ac_txq_enable(trans, trans_pcie->cmd_queue,
1095 int fifo = trans_pcie->setup_q_to_fifo[i]; 1095 trans_pcie->cmd_fifo);
1096
1097 iwl_trans_pcie_txq_enable(trans, i, fifo, IWL_INVALID_STATION,
1098 IWL_TID_NON_QOS, SCD_FRAME_LIMIT, 0);
1099 }
1100 1096
1101 /* Activate all Tx DMA/FIFO channels */ 1097 /* Activate all Tx DMA/FIFO channels */
1102 iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7)); 1098 iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7));
@@ -1528,6 +1524,7 @@ static void iwl_trans_pcie_configure(struct iwl_trans *trans,
1528 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 1524 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1529 1525
1530 trans_pcie->cmd_queue = trans_cfg->cmd_queue; 1526 trans_pcie->cmd_queue = trans_cfg->cmd_queue;
1527 trans_pcie->cmd_fifo = trans_cfg->cmd_fifo;
1531 if (WARN_ON(trans_cfg->n_no_reclaim_cmds > MAX_NO_RECLAIM_CMDS)) 1528 if (WARN_ON(trans_cfg->n_no_reclaim_cmds > MAX_NO_RECLAIM_CMDS))
1532 trans_pcie->n_no_reclaim_cmds = 0; 1529 trans_pcie->n_no_reclaim_cmds = 0;
1533 else 1530 else
@@ -1536,17 +1533,6 @@ static void iwl_trans_pcie_configure(struct iwl_trans *trans,
1536 memcpy(trans_pcie->no_reclaim_cmds, trans_cfg->no_reclaim_cmds, 1533 memcpy(trans_pcie->no_reclaim_cmds, trans_cfg->no_reclaim_cmds,
1537 trans_pcie->n_no_reclaim_cmds * sizeof(u8)); 1534 trans_pcie->n_no_reclaim_cmds * sizeof(u8));
1538 1535
1539 trans_pcie->n_q_to_fifo = trans_cfg->n_queue_to_fifo;
1540
1541 if (WARN_ON(trans_pcie->n_q_to_fifo > IWL_MAX_HW_QUEUES))
1542 trans_pcie->n_q_to_fifo = IWL_MAX_HW_QUEUES;
1543
1544 /* at least the command queue must be mapped */
1545 WARN_ON(!trans_pcie->n_q_to_fifo);
1546
1547 memcpy(trans_pcie->setup_q_to_fifo, trans_cfg->queue_to_fifo,
1548 trans_pcie->n_q_to_fifo * sizeof(u8));
1549
1550 trans_pcie->rx_buf_size_8k = trans_cfg->rx_buf_size_8k; 1536 trans_pcie->rx_buf_size_8k = trans_cfg->rx_buf_size_8k;
1551 if (trans_pcie->rx_buf_size_8k) 1537 if (trans_pcie->rx_buf_size_8k)
1552 trans_pcie->rx_page_order = get_order(8 * 1024); 1538 trans_pcie->rx_page_order = get_order(8 * 1024);