diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-23 04:46:33 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-08-27 11:27:29 -0400 |
commit | 13bb9483e190b95b04b22280ec9efa6b48469fd6 (patch) | |
tree | fdc39df48473db0ed02193eeb92d0e6a06a33ff8 /drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | |
parent | 246ed355221076884d225f9d8a4c30a048be8162 (diff) |
iwlwifi: prepare for PAN queue/fifo assignment
PAN ucode will require a different queue assignment,
in particular queue 9 instead of 4 should be used for
commands.
This is required because the ucode will stop/start
queues 4 and 8 depending on the PAN state, since
queue 8 will be used for PAN multicast (after DTIM).
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-ucode.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c index f2499e1f2047..a9ea7a1fef02 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | |||
@@ -52,6 +52,19 @@ static const s8 iwlagn_default_queue_to_tx_fifo[] = { | |||
52 | IWL_TX_FIFO_UNUSED, | 52 | IWL_TX_FIFO_UNUSED, |
53 | }; | 53 | }; |
54 | 54 | ||
55 | static const s8 iwlagn_ipan_queue_to_tx_fifo[] = { | ||
56 | IWL_TX_FIFO_VO, | ||
57 | IWL_TX_FIFO_VI, | ||
58 | IWL_TX_FIFO_BE, | ||
59 | IWL_TX_FIFO_BK, | ||
60 | IWL_TX_FIFO_UNUSED, /* FIXME */ | ||
61 | IWL_TX_FIFO_UNUSED, /* FIXME */ | ||
62 | IWL_TX_FIFO_UNUSED, /* FIXME */ | ||
63 | IWL_TX_FIFO_UNUSED, /* FIXME */ | ||
64 | IWL_TX_FIFO_UNUSED, /* FIXME */ | ||
65 | IWLAGN_CMD_FIFO_NUM, | ||
66 | }; | ||
67 | |||
55 | static struct iwl_wimax_coex_event_entry cu_priorities[COEX_NUM_OF_EVENTS] = { | 68 | static struct iwl_wimax_coex_event_entry cu_priorities[COEX_NUM_OF_EVENTS] = { |
56 | {COEX_CU_UNASSOC_IDLE_RP, COEX_CU_UNASSOC_IDLE_WP, | 69 | {COEX_CU_UNASSOC_IDLE_RP, COEX_CU_UNASSOC_IDLE_WP, |
57 | 0, COEX_UNASSOC_IDLE_FLAGS}, | 70 | 0, COEX_UNASSOC_IDLE_FLAGS}, |
@@ -376,6 +389,7 @@ static void iwlagn_send_bt_env(struct iwl_priv *priv, u8 action, u8 type) | |||
376 | 389 | ||
377 | int iwlagn_alive_notify(struct iwl_priv *priv) | 390 | int iwlagn_alive_notify(struct iwl_priv *priv) |
378 | { | 391 | { |
392 | const s8 *queues; | ||
379 | u32 a; | 393 | u32 a; |
380 | unsigned long flags; | 394 | unsigned long flags; |
381 | int i, chan; | 395 | int i, chan; |
@@ -410,7 +424,7 @@ int iwlagn_alive_notify(struct iwl_priv *priv) | |||
410 | reg_val | FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN); | 424 | reg_val | FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN); |
411 | 425 | ||
412 | iwl_write_prph(priv, IWLAGN_SCD_QUEUECHAIN_SEL, | 426 | iwl_write_prph(priv, IWLAGN_SCD_QUEUECHAIN_SEL, |
413 | IWLAGN_SCD_QUEUECHAIN_SEL_ALL(priv->hw_params.max_txq_num)); | 427 | IWLAGN_SCD_QUEUECHAIN_SEL_ALL(priv)); |
414 | iwl_write_prph(priv, IWLAGN_SCD_AGGR_SEL, 0); | 428 | iwl_write_prph(priv, IWLAGN_SCD_AGGR_SEL, 0); |
415 | 429 | ||
416 | /* initiate the queues */ | 430 | /* initiate the queues */ |
@@ -436,7 +450,13 @@ int iwlagn_alive_notify(struct iwl_priv *priv) | |||
436 | /* Activate all Tx DMA/FIFO channels */ | 450 | /* Activate all Tx DMA/FIFO channels */ |
437 | priv->cfg->ops->lib->txq_set_sched(priv, IWL_MASK(0, 7)); | 451 | priv->cfg->ops->lib->txq_set_sched(priv, IWL_MASK(0, 7)); |
438 | 452 | ||
439 | iwlagn_set_wr_ptrs(priv, IWL_CMD_QUEUE_NUM, 0); | 453 | /* map queues to FIFOs */ |
454 | if (priv->valid_contexts != BIT(IWL_RXON_CTX_BSS)) | ||
455 | queues = iwlagn_ipan_queue_to_tx_fifo; | ||
456 | else | ||
457 | queues = iwlagn_default_queue_to_tx_fifo; | ||
458 | |||
459 | iwlagn_set_wr_ptrs(priv, priv->cmd_queue, 0); | ||
440 | 460 | ||
441 | /* make sure all queue are not stopped */ | 461 | /* make sure all queue are not stopped */ |
442 | memset(&priv->queue_stopped[0], 0, sizeof(priv->queue_stopped)); | 462 | memset(&priv->queue_stopped[0], 0, sizeof(priv->queue_stopped)); |
@@ -445,11 +465,12 @@ int iwlagn_alive_notify(struct iwl_priv *priv) | |||
445 | 465 | ||
446 | /* reset to 0 to enable all the queue first */ | 466 | /* reset to 0 to enable all the queue first */ |
447 | priv->txq_ctx_active_msk = 0; | 467 | priv->txq_ctx_active_msk = 0; |
448 | /* map qos queues to fifos one-to-one */ | 468 | |
449 | BUILD_BUG_ON(ARRAY_SIZE(iwlagn_default_queue_to_tx_fifo) != 10); | 469 | BUILD_BUG_ON(ARRAY_SIZE(iwlagn_default_queue_to_tx_fifo) != 10); |
470 | BUILD_BUG_ON(ARRAY_SIZE(iwlagn_ipan_queue_to_tx_fifo) != 10); | ||
450 | 471 | ||
451 | for (i = 0; i < ARRAY_SIZE(iwlagn_default_queue_to_tx_fifo); i++) { | 472 | for (i = 0; i < 10; i++) { |
452 | int ac = iwlagn_default_queue_to_tx_fifo[i]; | 473 | int ac = queues[i]; |
453 | 474 | ||
454 | iwl_txq_ctx_activate(priv, i); | 475 | iwl_txq_ctx_activate(priv, i); |
455 | 476 | ||