diff options
author | Samuel Ortiz <samuel.ortiz@intel.com> | 2009-01-23 16:45:14 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:01:34 -0500 |
commit | a8e74e2774cd1aecfef0460de07e6e178df89232 (patch) | |
tree | bccf507738fb8753e7ab16a8de9644e9d99ae07c /drivers/net/wireless/iwlwifi/iwl-3945.c | |
parent | 59606ffa9146538b73bbe1ca1285321cd7474bc0 (diff) |
iwl3945: Use iwlcore TX queue management routines
By adding an additional hw_params (tfd_size) and a new iwl_lib ops (txq_init),
we can now use the iwlcore TX queue management routines.
We had to add a new hw_params because we need to allocate the right DMA buffer
for TFDs, and those have a different sizes depending if you're on 3945 or agn.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 22770f44c2fa..2689113f4e60 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -1068,8 +1068,8 @@ static int iwl3945_txq_ctx_reset(struct iwl_priv *priv) | |||
1068 | for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) { | 1068 | for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) { |
1069 | slots_num = (txq_id == IWL_CMD_QUEUE_NUM) ? | 1069 | slots_num = (txq_id == IWL_CMD_QUEUE_NUM) ? |
1070 | TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS; | 1070 | TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS; |
1071 | rc = iwl3945_tx_queue_init(priv, &priv->txq[txq_id], slots_num, | 1071 | rc = iwl_tx_queue_init(priv, &priv->txq[txq_id], slots_num, |
1072 | txq_id); | 1072 | txq_id); |
1073 | if (rc) { | 1073 | if (rc) { |
1074 | IWL_ERR(priv, "Tx %d queue init failed\n", txq_id); | 1074 | IWL_ERR(priv, "Tx %d queue init failed\n", txq_id); |
1075 | goto error; | 1075 | goto error; |
@@ -1258,7 +1258,7 @@ void iwl3945_hw_txq_ctx_free(struct iwl_priv *priv) | |||
1258 | 1258 | ||
1259 | /* Tx queues */ | 1259 | /* Tx queues */ |
1260 | for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) | 1260 | for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) |
1261 | iwl3945_tx_queue_free(priv, &priv->txq[txq_id]); | 1261 | iwl_tx_queue_free(priv, txq_id); |
1262 | } | 1262 | } |
1263 | 1263 | ||
1264 | void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv) | 1264 | void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv) |
@@ -2491,6 +2491,7 @@ int iwl3945_hw_set_hw_params(struct iwl_priv *priv) | |||
2491 | return -ENOMEM; | 2491 | return -ENOMEM; |
2492 | } | 2492 | } |
2493 | 2493 | ||
2494 | priv->hw_params.tfd_size = sizeof(struct iwl3945_tfd); | ||
2494 | priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_3K; | 2495 | priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_3K; |
2495 | priv->hw_params.max_pkt_size = 2342; | 2496 | priv->hw_params.max_pkt_size = 2342; |
2496 | priv->hw_params.max_rxq_size = RX_QUEUE_SIZE; | 2497 | priv->hw_params.max_rxq_size = RX_QUEUE_SIZE; |
@@ -2705,6 +2706,7 @@ static int iwl3945_load_bsm(struct iwl_priv *priv) | |||
2705 | static struct iwl_lib_ops iwl3945_lib = { | 2706 | static struct iwl_lib_ops iwl3945_lib = { |
2706 | .txq_attach_buf_to_tfd = iwl3945_hw_txq_attach_buf_to_tfd, | 2707 | .txq_attach_buf_to_tfd = iwl3945_hw_txq_attach_buf_to_tfd, |
2707 | .txq_free_tfd = iwl3945_hw_txq_free_tfd, | 2708 | .txq_free_tfd = iwl3945_hw_txq_free_tfd, |
2709 | .txq_init = iwl3945_hw_tx_queue_init, | ||
2708 | .load_ucode = iwl3945_load_bsm, | 2710 | .load_ucode = iwl3945_load_bsm, |
2709 | .apm_ops = { | 2711 | .apm_ops = { |
2710 | .init = iwl3945_apm_init, | 2712 | .init = iwl3945_apm_init, |