|
@@ -365,13 +365,13 @@ static void iwl3945_build_tx_cmd_hwcrypto(struct iwl_priv *priv,
|
|
|
struct sk_buff *skb_frag,
|
|
|
int sta_id)
|
|
|
{
|
|
|
- struct iwl3945_tx_cmd *tx = (struct iwl3945_tx_cmd *)cmd->cmd.payload;
|
|
|
+ struct iwl3945_tx_cmd *tx_cmd = (struct iwl3945_tx_cmd *)cmd->cmd.payload;
|
|
|
struct iwl_hw_key *keyinfo = &priv->stations[sta_id].keyinfo;
|
|
|
|
|
|
switch (keyinfo->alg) {
|
|
|
case ALG_CCMP:
|
|
|
- tx->sec_ctl = TX_CMD_SEC_CCM;
|
|
|
- memcpy(tx->key, keyinfo->key, keyinfo->keylen);
|
|
|
+ tx_cmd->sec_ctl = TX_CMD_SEC_CCM;
|
|
|
+ memcpy(tx_cmd->key, keyinfo->key, keyinfo->keylen);
|
|
|
IWL_DEBUG_TX(priv, "tx_cmd with AES hwcrypto\n");
|
|
|
break;
|
|
|
|
|
@@ -379,13 +379,13 @@ static void iwl3945_build_tx_cmd_hwcrypto(struct iwl_priv *priv,
|
|
|
break;
|
|
|
|
|
|
case ALG_WEP:
|
|
|
- tx->sec_ctl = TX_CMD_SEC_WEP |
|
|
|
+ tx_cmd->sec_ctl = TX_CMD_SEC_WEP |
|
|
|
(info->control.hw_key->hw_key_idx & TX_CMD_SEC_MSK) << TX_CMD_SEC_SHIFT;
|
|
|
|
|
|
if (keyinfo->keylen == 13)
|
|
|
- tx->sec_ctl |= TX_CMD_SEC_KEY128;
|
|
|
+ tx_cmd->sec_ctl |= TX_CMD_SEC_KEY128;
|
|
|
|
|
|
- memcpy(&tx->key[3], keyinfo->key, keyinfo->keylen);
|
|
|
+ memcpy(&tx_cmd->key[3], keyinfo->key, keyinfo->keylen);
|
|
|
|
|
|
IWL_DEBUG_TX(priv, "Configuring packet for WEP encryption "
|
|
|
"with key %d\n", info->control.hw_key->hw_key_idx);
|
|
@@ -405,11 +405,11 @@ static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv,
|
|
|
struct ieee80211_tx_info *info,
|
|
|
struct ieee80211_hdr *hdr, u8 std_id)
|
|
|
{
|
|
|
- struct iwl3945_tx_cmd *tx = (struct iwl3945_tx_cmd *)cmd->cmd.payload;
|
|
|
- __le32 tx_flags = tx->tx_flags;
|
|
|
+ struct iwl3945_tx_cmd *tx_cmd = (struct iwl3945_tx_cmd *)cmd->cmd.payload;
|
|
|
+ __le32 tx_flags = tx_cmd->tx_flags;
|
|
|
__le16 fc = hdr->frame_control;
|
|
|
|
|
|
- tx->stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
|
|
|
+ tx_cmd->stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
|
|
|
if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
|
|
|
tx_flags |= TX_CMD_FLG_ACK_MSK;
|
|
|
if (ieee80211_is_mgmt(fc))
|
|
@@ -422,13 +422,13 @@ static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv,
|
|
|
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
|
|
|
}
|
|
|
|
|
|
- tx->sta_id = std_id;
|
|
|
+ tx_cmd->sta_id = std_id;
|
|
|
if (ieee80211_has_morefrags(fc))
|
|
|
tx_flags |= TX_CMD_FLG_MORE_FRAG_MSK;
|
|
|
|
|
|
if (ieee80211_is_data_qos(fc)) {
|
|
|
u8 *qc = ieee80211_get_qos_ctl(hdr);
|
|
|
- tx->tid_tspec = qc[0] & 0xf;
|
|
|
+ tx_cmd->tid_tspec = qc[0] & 0xf;
|
|
|
tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK;
|
|
|
} else {
|
|
|
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
|
|
@@ -442,16 +442,16 @@ static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv,
|
|
|
tx_flags &= ~(TX_CMD_FLG_ANT_SEL_MSK);
|
|
|
if (ieee80211_is_mgmt(fc)) {
|
|
|
if (ieee80211_is_assoc_req(fc) || ieee80211_is_reassoc_req(fc))
|
|
|
- tx->timeout.pm_frame_timeout = cpu_to_le16(3);
|
|
|
+ tx_cmd->timeout.pm_frame_timeout = cpu_to_le16(3);
|
|
|
else
|
|
|
- tx->timeout.pm_frame_timeout = cpu_to_le16(2);
|
|
|
+ tx_cmd->timeout.pm_frame_timeout = cpu_to_le16(2);
|
|
|
} else {
|
|
|
- tx->timeout.pm_frame_timeout = 0;
|
|
|
+ tx_cmd->timeout.pm_frame_timeout = 0;
|
|
|
}
|
|
|
|
|
|
- tx->driver_txop = 0;
|
|
|
- tx->tx_flags = tx_flags;
|
|
|
- tx->next_frame_len = 0;
|
|
|
+ tx_cmd->driver_txop = 0;
|
|
|
+ tx_cmd->tx_flags = tx_flags;
|
|
|
+ tx_cmd->next_frame_len = 0;
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -461,7 +461,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
|
|
|
{
|
|
|
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
|
|
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
|
|
- struct iwl3945_tx_cmd *tx;
|
|
|
+ struct iwl3945_tx_cmd *tx_cmd;
|
|
|
struct iwl_tx_queue *txq = NULL;
|
|
|
struct iwl_queue *q = NULL;
|
|
|
struct iwl_device_cmd *out_cmd;
|
|
@@ -560,9 +560,9 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
|
|
|
/* Init first empty entry in queue's array of Tx/cmd buffers */
|
|
|
out_cmd = txq->cmd[idx];
|
|
|
out_meta = &txq->meta[idx];
|
|
|
- tx = (struct iwl3945_tx_cmd *)out_cmd->cmd.payload;
|
|
|
+ tx_cmd = (struct iwl3945_tx_cmd *)out_cmd->cmd.payload;
|
|
|
memset(&out_cmd->hdr, 0, sizeof(out_cmd->hdr));
|
|
|
- memset(tx, 0, sizeof(*tx));
|
|
|
+ memset(tx_cmd, 0, sizeof(*tx_cmd));
|
|
|
|
|
|
/*
|
|
|
* Set up the Tx-command (not MAC!) header.
|
|
@@ -575,7 +575,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
|
|
|
INDEX_TO_SEQ(q->write_ptr)));
|
|
|
|
|
|
/* Copy MAC header from skb into command buffer */
|
|
|
- memcpy(tx->hdr, hdr, hdr_len);
|
|
|
+ memcpy(tx_cmd->hdr, hdr, hdr_len);
|
|
|
|
|
|
|
|
|
if (info->control.hw_key)
|
|
@@ -589,12 +589,12 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
|
|
|
|
|
|
/* Total # bytes to be transmitted */
|
|
|
len = (u16)skb->len;
|
|
|
- tx->len = cpu_to_le16(len);
|
|
|
+ tx_cmd->len = cpu_to_le16(len);
|
|
|
|
|
|
iwl_dbg_log_tx_data_frame(priv, len, hdr);
|
|
|
iwl_update_stats(priv, true, fc, len);
|
|
|
- tx->tx_flags &= ~TX_CMD_FLG_ANT_A_MSK;
|
|
|
- tx->tx_flags &= ~TX_CMD_FLG_ANT_B_MSK;
|
|
|
+ tx_cmd->tx_flags &= ~TX_CMD_FLG_ANT_A_MSK;
|
|
|
+ tx_cmd->tx_flags &= ~TX_CMD_FLG_ANT_B_MSK;
|
|
|
|
|
|
if (!ieee80211_has_morefrags(hdr->frame_control)) {
|
|
|
txq->need_update = 1;
|
|
@@ -607,9 +607,9 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
|
|
|
|
|
|
IWL_DEBUG_TX(priv, "sequence nr = 0X%x \n",
|
|
|
le16_to_cpu(out_cmd->hdr.sequence));
|
|
|
- IWL_DEBUG_TX(priv, "tx_flags = 0X%x \n", le32_to_cpu(tx->tx_flags));
|
|
|
- iwl_print_hex_dump(priv, IWL_DL_TX, tx, sizeof(*tx));
|
|
|
- iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx->hdr,
|
|
|
+ IWL_DEBUG_TX(priv, "tx_flags = 0X%x \n", le32_to_cpu(tx_cmd->tx_flags));
|
|
|
+ iwl_print_hex_dump(priv, IWL_DL_TX, tx_cmd, sizeof(*tx_cmd));
|
|
|
+ iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx_cmd->hdr,
|
|
|
ieee80211_hdrlen(fc));
|
|
|
|
|
|
/*
|