aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2009-10-09 16:20:31 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:00 -0400
commit9744c91f91e9e467b38473a8b673324ae658ca88 (patch)
tree04feb64b27912d980071b9e3621cee368804c979 /drivers/net/wireless/iwlwifi
parent37dc70fea870ced8fbd9ae786701529e7ce48f03 (diff)
iwl3945: rename tx to tx_cmd
Rename iwl3945_tx_cmd variable tx to tx_cmd for better readability. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c20
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c54
2 files changed, 37 insertions, 37 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 1372ce4a407c..a6944bc53fec 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -785,10 +785,10 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv,
785 u8 data_retry_limit; 785 u8 data_retry_limit;
786 __le32 tx_flags; 786 __le32 tx_flags;
787 __le16 fc = hdr->frame_control; 787 __le16 fc = hdr->frame_control;
788 struct iwl3945_tx_cmd *tx = (struct iwl3945_tx_cmd *)cmd->cmd.payload; 788 struct iwl3945_tx_cmd *tx_cmd = (struct iwl3945_tx_cmd *)cmd->cmd.payload;
789 789
790 rate = iwl3945_rates[rate_index].plcp; 790 rate = iwl3945_rates[rate_index].plcp;
791 tx_flags = tx->tx_flags; 791 tx_flags = tx_cmd->tx_flags;
792 792
793 /* We need to figure out how to get the sta->supp_rates while 793 /* We need to figure out how to get the sta->supp_rates while
794 * in this running context */ 794 * in this running context */
@@ -825,22 +825,22 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv,
825 } 825 }
826 } 826 }
827 827
828 tx->rts_retry_limit = rts_retry_limit; 828 tx_cmd->rts_retry_limit = rts_retry_limit;
829 tx->data_retry_limit = data_retry_limit; 829 tx_cmd->data_retry_limit = data_retry_limit;
830 tx->rate = rate; 830 tx_cmd->rate = rate;
831 tx->tx_flags = tx_flags; 831 tx_cmd->tx_flags = tx_flags;
832 832
833 /* OFDM */ 833 /* OFDM */
834 tx->supp_rates[0] = 834 tx_cmd->supp_rates[0] =
835 ((rate_mask & IWL_OFDM_RATES_MASK) >> IWL_FIRST_OFDM_RATE) & 0xFF; 835 ((rate_mask & IWL_OFDM_RATES_MASK) >> IWL_FIRST_OFDM_RATE) & 0xFF;
836 836
837 /* CCK */ 837 /* CCK */
838 tx->supp_rates[1] = (rate_mask & 0xF); 838 tx_cmd->supp_rates[1] = (rate_mask & 0xF);
839 839
840 IWL_DEBUG_RATE(priv, "Tx sta id: %d, rate: %d (plcp), flags: 0x%4X " 840 IWL_DEBUG_RATE(priv, "Tx sta id: %d, rate: %d (plcp), flags: 0x%4X "
841 "cck/ofdm mask: 0x%x/0x%x\n", sta_id, 841 "cck/ofdm mask: 0x%x/0x%x\n", sta_id,
842 tx->rate, le32_to_cpu(tx->tx_flags), 842 tx_cmd->rate, le32_to_cpu(tx_cmd->tx_flags),
843 tx->supp_rates[1], tx->supp_rates[0]); 843 tx_cmd->supp_rates[1], tx_cmd->supp_rates[0]);
844} 844}
845 845
846u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id, u16 tx_rate, u8 flags) 846u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id, u16 tx_rate, u8 flags)
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index f4d43531bfa4..03612b394591 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -365,13 +365,13 @@ static void iwl3945_build_tx_cmd_hwcrypto(struct iwl_priv *priv,
365 struct sk_buff *skb_frag, 365 struct sk_buff *skb_frag,
366 int sta_id) 366 int sta_id)
367{ 367{
368 struct iwl3945_tx_cmd *tx = (struct iwl3945_tx_cmd *)cmd->cmd.payload; 368 struct iwl3945_tx_cmd *tx_cmd = (struct iwl3945_tx_cmd *)cmd->cmd.payload;
369 struct iwl_hw_key *keyinfo = &priv->stations[sta_id].keyinfo; 369 struct iwl_hw_key *keyinfo = &priv->stations[sta_id].keyinfo;
370 370
371 switch (keyinfo->alg) { 371 switch (keyinfo->alg) {
372 case ALG_CCMP: 372 case ALG_CCMP:
373 tx->sec_ctl = TX_CMD_SEC_CCM; 373 tx_cmd->sec_ctl = TX_CMD_SEC_CCM;
374 memcpy(tx->key, keyinfo->key, keyinfo->keylen); 374 memcpy(tx_cmd->key, keyinfo->key, keyinfo->keylen);
375 IWL_DEBUG_TX(priv, "tx_cmd with AES hwcrypto\n"); 375 IWL_DEBUG_TX(priv, "tx_cmd with AES hwcrypto\n");
376 break; 376 break;
377 377
@@ -379,13 +379,13 @@ static void iwl3945_build_tx_cmd_hwcrypto(struct iwl_priv *priv,
379 break; 379 break;
380 380
381 case ALG_WEP: 381 case ALG_WEP:
382 tx->sec_ctl = TX_CMD_SEC_WEP | 382 tx_cmd->sec_ctl = TX_CMD_SEC_WEP |
383 (info->control.hw_key->hw_key_idx & TX_CMD_SEC_MSK) << TX_CMD_SEC_SHIFT; 383 (info->control.hw_key->hw_key_idx & TX_CMD_SEC_MSK) << TX_CMD_SEC_SHIFT;
384 384
385 if (keyinfo->keylen == 13) 385 if (keyinfo->keylen == 13)
386 tx->sec_ctl |= TX_CMD_SEC_KEY128; 386 tx_cmd->sec_ctl |= TX_CMD_SEC_KEY128;
387 387
388 memcpy(&tx->key[3], keyinfo->key, keyinfo->keylen); 388 memcpy(&tx_cmd->key[3], keyinfo->key, keyinfo->keylen);
389 389
390 IWL_DEBUG_TX(priv, "Configuring packet for WEP encryption " 390 IWL_DEBUG_TX(priv, "Configuring packet for WEP encryption "
391 "with key %d\n", info->control.hw_key->hw_key_idx); 391 "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,
405 struct ieee80211_tx_info *info, 405 struct ieee80211_tx_info *info,
406 struct ieee80211_hdr *hdr, u8 std_id) 406 struct ieee80211_hdr *hdr, u8 std_id)
407{ 407{
408 struct iwl3945_tx_cmd *tx = (struct iwl3945_tx_cmd *)cmd->cmd.payload; 408 struct iwl3945_tx_cmd *tx_cmd = (struct iwl3945_tx_cmd *)cmd->cmd.payload;
409 __le32 tx_flags = tx->tx_flags; 409 __le32 tx_flags = tx_cmd->tx_flags;
410 __le16 fc = hdr->frame_control; 410 __le16 fc = hdr->frame_control;
411 411
412 tx->stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; 412 tx_cmd->stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
413 if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) { 413 if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
414 tx_flags |= TX_CMD_FLG_ACK_MSK; 414 tx_flags |= TX_CMD_FLG_ACK_MSK;
415 if (ieee80211_is_mgmt(fc)) 415 if (ieee80211_is_mgmt(fc))
@@ -422,13 +422,13 @@ static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv,
422 tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK; 422 tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
423 } 423 }
424 424
425 tx->sta_id = std_id; 425 tx_cmd->sta_id = std_id;
426 if (ieee80211_has_morefrags(fc)) 426 if (ieee80211_has_morefrags(fc))
427 tx_flags |= TX_CMD_FLG_MORE_FRAG_MSK; 427 tx_flags |= TX_CMD_FLG_MORE_FRAG_MSK;
428 428
429 if (ieee80211_is_data_qos(fc)) { 429 if (ieee80211_is_data_qos(fc)) {
430 u8 *qc = ieee80211_get_qos_ctl(hdr); 430 u8 *qc = ieee80211_get_qos_ctl(hdr);
431 tx->tid_tspec = qc[0] & 0xf; 431 tx_cmd->tid_tspec = qc[0] & 0xf;
432 tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK; 432 tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK;
433 } else { 433 } else {
434 tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK; 434 tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
@@ -442,16 +442,16 @@ static void iwl3945_build_tx_cmd_basic(struct iwl_priv *priv,
442 tx_flags &= ~(TX_CMD_FLG_ANT_SEL_MSK); 442 tx_flags &= ~(TX_CMD_FLG_ANT_SEL_MSK);
443 if (ieee80211_is_mgmt(fc)) { 443 if (ieee80211_is_mgmt(fc)) {
444 if (ieee80211_is_assoc_req(fc) || ieee80211_is_reassoc_req(fc)) 444 if (ieee80211_is_assoc_req(fc) || ieee80211_is_reassoc_req(fc))
445 tx->timeout.pm_frame_timeout = cpu_to_le16(3); 445 tx_cmd->timeout.pm_frame_timeout = cpu_to_le16(3);
446 else 446 else
447 tx->timeout.pm_frame_timeout = cpu_to_le16(2); 447 tx_cmd->timeout.pm_frame_timeout = cpu_to_le16(2);
448 } else { 448 } else {
449 tx->timeout.pm_frame_timeout = 0; 449 tx_cmd->timeout.pm_frame_timeout = 0;
450 } 450 }
451 451
452 tx->driver_txop = 0; 452 tx_cmd->driver_txop = 0;
453 tx->tx_flags = tx_flags; 453 tx_cmd->tx_flags = tx_flags;
454 tx->next_frame_len = 0; 454 tx_cmd->next_frame_len = 0;
455} 455}
456 456
457/* 457/*
@@ -461,7 +461,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
461{ 461{
462 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 462 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
463 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 463 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
464 struct iwl3945_tx_cmd *tx; 464 struct iwl3945_tx_cmd *tx_cmd;
465 struct iwl_tx_queue *txq = NULL; 465 struct iwl_tx_queue *txq = NULL;
466 struct iwl_queue *q = NULL; 466 struct iwl_queue *q = NULL;
467 struct iwl_device_cmd *out_cmd; 467 struct iwl_device_cmd *out_cmd;
@@ -560,9 +560,9 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
560 /* Init first empty entry in queue's array of Tx/cmd buffers */ 560 /* Init first empty entry in queue's array of Tx/cmd buffers */
561 out_cmd = txq->cmd[idx]; 561 out_cmd = txq->cmd[idx];
562 out_meta = &txq->meta[idx]; 562 out_meta = &txq->meta[idx];
563 tx = (struct iwl3945_tx_cmd *)out_cmd->cmd.payload; 563 tx_cmd = (struct iwl3945_tx_cmd *)out_cmd->cmd.payload;
564 memset(&out_cmd->hdr, 0, sizeof(out_cmd->hdr)); 564 memset(&out_cmd->hdr, 0, sizeof(out_cmd->hdr));
565 memset(tx, 0, sizeof(*tx)); 565 memset(tx_cmd, 0, sizeof(*tx_cmd));
566 566
567 /* 567 /*
568 * Set up the Tx-command (not MAC!) header. 568 * 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)
575 INDEX_TO_SEQ(q->write_ptr))); 575 INDEX_TO_SEQ(q->write_ptr)));
576 576
577 /* Copy MAC header from skb into command buffer */ 577 /* Copy MAC header from skb into command buffer */
578 memcpy(tx->hdr, hdr, hdr_len); 578 memcpy(tx_cmd->hdr, hdr, hdr_len);
579 579
580 580
581 if (info->control.hw_key) 581 if (info->control.hw_key)
@@ -589,12 +589,12 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
589 589
590 /* Total # bytes to be transmitted */ 590 /* Total # bytes to be transmitted */
591 len = (u16)skb->len; 591 len = (u16)skb->len;
592 tx->len = cpu_to_le16(len); 592 tx_cmd->len = cpu_to_le16(len);
593 593
594 iwl_dbg_log_tx_data_frame(priv, len, hdr); 594 iwl_dbg_log_tx_data_frame(priv, len, hdr);
595 iwl_update_stats(priv, true, fc, len); 595 iwl_update_stats(priv, true, fc, len);
596 tx->tx_flags &= ~TX_CMD_FLG_ANT_A_MSK; 596 tx_cmd->tx_flags &= ~TX_CMD_FLG_ANT_A_MSK;
597 tx->tx_flags &= ~TX_CMD_FLG_ANT_B_MSK; 597 tx_cmd->tx_flags &= ~TX_CMD_FLG_ANT_B_MSK;
598 598
599 if (!ieee80211_has_morefrags(hdr->frame_control)) { 599 if (!ieee80211_has_morefrags(hdr->frame_control)) {
600 txq->need_update = 1; 600 txq->need_update = 1;
@@ -607,9 +607,9 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
607 607
608 IWL_DEBUG_TX(priv, "sequence nr = 0X%x \n", 608 IWL_DEBUG_TX(priv, "sequence nr = 0X%x \n",
609 le16_to_cpu(out_cmd->hdr.sequence)); 609 le16_to_cpu(out_cmd->hdr.sequence));
610 IWL_DEBUG_TX(priv, "tx_flags = 0X%x \n", le32_to_cpu(tx->tx_flags)); 610 IWL_DEBUG_TX(priv, "tx_flags = 0X%x \n", le32_to_cpu(tx_cmd->tx_flags));
611 iwl_print_hex_dump(priv, IWL_DL_TX, tx, sizeof(*tx)); 611 iwl_print_hex_dump(priv, IWL_DL_TX, tx_cmd, sizeof(*tx_cmd));
612 iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx->hdr, 612 iwl_print_hex_dump(priv, IWL_DL_TX, (u8 *)tx_cmd->hdr,
613 ieee80211_hdrlen(fc)); 613 ieee80211_hdrlen(fc));
614 614
615 /* 615 /*