aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-05-15 01:54:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-21 21:47:56 -0400
commit1826dcc094466a39c82d4370ccfba694be0bc05b (patch)
tree6cbcd36daa8adb1723073940384d55dc249ffc59 /drivers/net/wireless/iwlwifi/iwl-4965-rs.c
parentfcab423d716f923d6a7601ba33adf356bef83414 (diff)
iwlwifi: remove 4965 from iwl4965_rate_info
This patch removes 4965 from iwl4965_rate_info structure and associated variables. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965-rs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-rs.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index 8e3660ebba7d..e2123aba202c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -481,7 +481,7 @@ static u32 rate_n_flags_from_tbl(struct iwl4965_scale_tbl_info *tbl,
481 u32 rate_n_flags = 0; 481 u32 rate_n_flags = 0;
482 482
483 if (is_legacy(tbl->lq_type)) { 483 if (is_legacy(tbl->lq_type)) {
484 rate_n_flags = iwl4965_rates[index].plcp; 484 rate_n_flags = iwl_rates[index].plcp;
485 if (index >= IWL_FIRST_CCK_RATE && index <= IWL_LAST_CCK_RATE) 485 if (index >= IWL_FIRST_CCK_RATE && index <= IWL_LAST_CCK_RATE)
486 rate_n_flags |= RATE_MCS_CCK_MSK; 486 rate_n_flags |= RATE_MCS_CCK_MSK;
487 487
@@ -493,11 +493,11 @@ static u32 rate_n_flags_from_tbl(struct iwl4965_scale_tbl_info *tbl,
493 rate_n_flags = RATE_MCS_HT_MSK; 493 rate_n_flags = RATE_MCS_HT_MSK;
494 494
495 if (is_siso(tbl->lq_type)) 495 if (is_siso(tbl->lq_type))
496 rate_n_flags |= iwl4965_rates[index].plcp_siso; 496 rate_n_flags |= iwl_rates[index].plcp_siso;
497 else if (is_mimo2(tbl->lq_type)) 497 else if (is_mimo2(tbl->lq_type))
498 rate_n_flags |= iwl4965_rates[index].plcp_mimo2; 498 rate_n_flags |= iwl_rates[index].plcp_mimo2;
499 else 499 else
500 rate_n_flags |= iwl4965_rates[index].plcp_mimo3; 500 rate_n_flags |= iwl_rates[index].plcp_mimo3;
501 } else { 501 } else {
502 IWL_ERROR("Invalid tbl->lq_type %d\n", tbl->lq_type); 502 IWL_ERROR("Invalid tbl->lq_type %d\n", tbl->lq_type);
503 } 503 }
@@ -697,7 +697,7 @@ static u16 rs_get_adjacent_rate(struct iwl_priv *priv, u8 index, u16 rate_mask,
697 697
698 low = index; 698 low = index;
699 while (low != IWL_RATE_INVALID) { 699 while (low != IWL_RATE_INVALID) {
700 low = iwl4965_rates[low].prev_rs; 700 low = iwl_rates[low].prev_rs;
701 if (low == IWL_RATE_INVALID) 701 if (low == IWL_RATE_INVALID)
702 break; 702 break;
703 if (rate_mask & (1 << low)) 703 if (rate_mask & (1 << low))
@@ -707,7 +707,7 @@ static u16 rs_get_adjacent_rate(struct iwl_priv *priv, u8 index, u16 rate_mask,
707 707
708 high = index; 708 high = index;
709 while (high != IWL_RATE_INVALID) { 709 while (high != IWL_RATE_INVALID) {
710 high = iwl4965_rates[high].next_rs; 710 high = iwl_rates[high].next_rs;
711 if (high == IWL_RATE_INVALID) 711 if (high == IWL_RATE_INVALID)
712 break; 712 break;
713 if (rate_mask & (1 << high)) 713 if (rate_mask & (1 << high))
@@ -2088,7 +2088,7 @@ static void rs_initialize_lq(struct iwl_priv *priv,
2088 i = 0; 2088 i = 0;
2089 2089
2090 /* FIXME:RS: This is also wrong in 4965 */ 2090 /* FIXME:RS: This is also wrong in 4965 */
2091 rate = iwl4965_rates[i].plcp; 2091 rate = iwl_rates[i].plcp;
2092 rate |= RATE_MCS_ANT_B_MSK; 2092 rate |= RATE_MCS_ANT_B_MSK;
2093 rate &= ~RATE_MCS_ANT_A_MSK; 2093 rate &= ~RATE_MCS_ANT_A_MSK;
2094 2094
@@ -2691,7 +2691,7 @@ int iwl4965_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
2691 int active = lq_sta->active_tbl; 2691 int active = lq_sta->active_tbl;
2692 2692
2693 cnt += 2693 cnt +=
2694 sprintf(&buf[cnt], " %2dMbs: ", iwl4965_rates[i].ieee / 2); 2694 sprintf(&buf[cnt], " %2dMbs: ", iwl_rates[i].ieee / 2);
2695 2695
2696 mask = (1ULL << (IWL_RATE_MAX_WINDOW - 1)); 2696 mask = (1ULL << (IWL_RATE_MAX_WINDOW - 1));
2697 for (j = 0; j < IWL_RATE_MAX_WINDOW; j++, mask >>= 1) 2697 for (j = 0; j < IWL_RATE_MAX_WINDOW; j++, mask >>= 1)
@@ -2702,7 +2702,7 @@ int iwl4965_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
2702 samples += lq_sta->lq_info[active].win[i].counter; 2702 samples += lq_sta->lq_info[active].win[i].counter;
2703 good += lq_sta->lq_info[active].win[i].success_counter; 2703 good += lq_sta->lq_info[active].win[i].success_counter;
2704 success += lq_sta->lq_info[active].win[i].success_counter * 2704 success += lq_sta->lq_info[active].win[i].success_counter *
2705 iwl4965_rates[i].ieee; 2705 iwl_rates[i].ieee;
2706 2706
2707 if (lq_sta->lq_info[active].win[i].stamp) { 2707 if (lq_sta->lq_info[active].win[i].stamp) {
2708 int delta = 2708 int delta =
@@ -2722,10 +2722,11 @@ int iwl4965_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
2722 i = j; 2722 i = j;
2723 } 2723 }
2724 2724
2725 /* Display the average rate of all samples taken. 2725 /*
2726 * 2726 * Display the average rate of all samples taken.
2727 * NOTE: We multiply # of samples by 2 since the IEEE measurement 2727 * NOTE: We multiply # of samples by 2 since the IEEE measurement
2728 * added from iwl4965_rates is actually 2X the rate */ 2728 * added from iwl_rates is actually 2X the rate.
2729 */
2729 if (samples) 2730 if (samples)
2730 cnt += sprintf(&buf[cnt], 2731 cnt += sprintf(&buf[cnt],
2731 "\nAverage rate is %3d.%02dMbs over last %4dms\n" 2732 "\nAverage rate is %3d.%02dMbs over last %4dms\n"