Skip to content

Commit

Permalink
iwl3945: Use iwl-hcmd host command routines
Browse files Browse the repository at this point in the history
With the previously added tfd related ops, we can now use the iwl-tx.c host
command enqueue routine. Since the 3945 host command specific
routines are identical to the agn ones, we can just remove them from the 3945
code.

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>
  • Loading branch information
Samuel Ortiz authored and John W. Linville committed Jan 29, 2009
1 parent 7aaa1d7 commit 518099a
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 257 deletions.
4 changes: 3 additions & 1 deletion drivers/net/wireless/iwlwifi/iwl-3945-led.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@

#include "iwl-commands.h"
#include "iwl-3945.h"
#include "iwl-core.h"
#include "iwl-dev.h"


static const struct {
Expand Down Expand Up @@ -91,7 +93,7 @@ static int iwl_send_led_cmd(struct iwl_priv *priv,
.meta.u.callback = iwl3945_led_cmd_callback,
};

return iwl3945_send_cmd(priv, &cmd);
return iwl_send_cmd(priv, &cmd);
}


Expand Down
9 changes: 5 additions & 4 deletions drivers/net/wireless/iwlwifi/iwl-3945.c
Original file line number Diff line number Diff line change
Expand Up @@ -1766,8 +1766,9 @@ int iwl3945_hw_reg_send_txpower(struct iwl_priv *priv)
txpower.power[i].rate);
}

return iwl3945_send_cmd_pdu(priv, REPLY_TX_PWR_TABLE_CMD,
sizeof(struct iwl3945_txpowertable_cmd), &txpower);
return iwl_send_cmd_pdu(priv, REPLY_TX_PWR_TABLE_CMD,
sizeof(struct iwl3945_txpowertable_cmd),
&txpower);

}

Expand Down Expand Up @@ -2463,14 +2464,14 @@ int iwl3945_init_hw_rate_table(struct iwl_priv *priv)

/* Update the rate scaling for control frame Tx */
rate_cmd.table_id = 0;
rc = iwl3945_send_cmd_pdu(priv, REPLY_RATE_SCALE, sizeof(rate_cmd),
rc = iwl_send_cmd_pdu(priv, REPLY_RATE_SCALE, sizeof(rate_cmd),
&rate_cmd);
if (rc)
return rc;

/* Update the rate scaling for data frame Tx */
rate_cmd.table_id = 1;
return iwl3945_send_cmd_pdu(priv, REPLY_RATE_SCALE, sizeof(rate_cmd),
return iwl_send_cmd_pdu(priv, REPLY_RATE_SCALE, sizeof(rate_cmd),
&rate_cmd);
}

Expand Down
8 changes: 5 additions & 3 deletions drivers/net/wireless/iwlwifi/iwl-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,8 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
phys_addr += offsetof(struct iwl_cmd, hdr);

priv->cfg->ops->lib->txq_attach_buf_to_tfd(priv, txq,
phys_addr, fix_size, 1, 0);
phys_addr, fix_size, 1,
U32_PAD(cmd->len));

#ifdef CONFIG_IWLWIFI_DEBUG
switch (out_cmd->hdr.cmd) {
Expand All @@ -1028,8 +1029,9 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
#endif
txq->need_update = 1;

/* Set up entry in queue's byte count circular buffer */
priv->cfg->ops->lib->txq_update_byte_cnt_tbl(priv, txq, 0);
if (priv->cfg->ops->lib->txq_update_byte_cnt_tbl)
/* Set up entry in queue's byte count circular buffer */
priv->cfg->ops->lib->txq_update_byte_cnt_tbl(priv, txq, 0);

/* Increment and update queue's write index */
q->write_ptr = iwl_queue_inc_wrap(q->write_ptr, q->n_bd);
Expand Down
Loading

0 comments on commit 518099a

Please sign in to comment.