aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-07-18 01:53:06 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-04 15:09:08 -0400
commit3ce84b9f2f495f59c4a4e68d814c348eaa497f65 (patch)
tree0d342d7ce132b5d310c26d207a3ec48c5de8e53f /drivers/net/wireless/iwlwifi/iwl-agn-rs.c
parente227ceac8429ecd775c213838f0415700727b7b4 (diff)
iwlwifi: kill iwl4965_fill_rs_info
iwl4965_fill_rs_info was used in sysfs. This info is already present in iwl-agn-rs debugfs. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c92
1 files changed, 0 insertions, 92 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index eee22c6dec73..0e8100e70620 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -2600,98 +2600,6 @@ static struct rate_control_ops rs_ops = {
2600#endif 2600#endif
2601}; 2601};
2602 2602
2603int iwl4965_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
2604{
2605 struct ieee80211_local *local = hw_to_local(hw);
2606 struct iwl_priv *priv = hw->priv;
2607 struct iwl_lq_sta *lq_sta;
2608 struct sta_info *sta;
2609 int cnt = 0, i;
2610 u32 samples = 0, success = 0, good = 0;
2611 unsigned long now = jiffies;
2612 u32 max_time = 0;
2613 u8 lq_type, antenna;
2614
2615 rcu_read_lock();
2616
2617 sta = sta_info_get(local, priv->stations[sta_id].sta.sta.addr);
2618 if (!sta || !sta->rate_ctrl_priv) {
2619 if (sta)
2620 IWL_DEBUG_RATE("leave - no private rate data!\n");
2621 else
2622 IWL_DEBUG_RATE("leave - no station!\n");
2623 rcu_read_unlock();
2624 return sprintf(buf, "station %d not found\n", sta_id);
2625 }
2626
2627 lq_sta = (void *)sta->rate_ctrl_priv;
2628
2629 lq_type = lq_sta->lq_info[lq_sta->active_tbl].lq_type;
2630 antenna = lq_sta->lq_info[lq_sta->active_tbl].ant_type;
2631
2632 if (is_legacy(lq_type))
2633 i = IWL_RATE_54M_INDEX;
2634 else
2635 i = IWL_RATE_60M_INDEX;
2636 while (1) {
2637 u64 mask;
2638 int j;
2639 int active = lq_sta->active_tbl;
2640
2641 cnt +=
2642 sprintf(&buf[cnt], " %2dMbs: ", iwl_rates[i].ieee / 2);
2643
2644 mask = (1ULL << (IWL_RATE_MAX_WINDOW - 1));
2645 for (j = 0; j < IWL_RATE_MAX_WINDOW; j++, mask >>= 1)
2646 buf[cnt++] =
2647 (lq_sta->lq_info[active].win[i].data & mask)
2648 ? '1' : '0';
2649
2650 samples += lq_sta->lq_info[active].win[i].counter;
2651 good += lq_sta->lq_info[active].win[i].success_counter;
2652 success += lq_sta->lq_info[active].win[i].success_counter *
2653 iwl_rates[i].ieee;
2654
2655 if (lq_sta->lq_info[active].win[i].stamp) {
2656 int delta =
2657 jiffies_to_msecs(now -
2658 lq_sta->lq_info[active].win[i].stamp);
2659
2660 if (delta > max_time)
2661 max_time = delta;
2662
2663 cnt += sprintf(&buf[cnt], "%5dms\n", delta);
2664 } else
2665 buf[cnt++] = '\n';
2666
2667 j = iwl4965_get_prev_ieee_rate(i);
2668 if (j == i)
2669 break;
2670 i = j;
2671 }
2672
2673 /*
2674 * Display the average rate of all samples taken.
2675 * NOTE: We multiply # of samples by 2 since the IEEE measurement
2676 * added from iwl_rates is actually 2X the rate.
2677 */
2678 if (samples)
2679 cnt += sprintf(&buf[cnt],
2680 "\nAverage rate is %3d.%02dMbs over last %4dms\n"
2681 "%3d%% success (%d good packets over %d tries)\n",
2682 success / (2 * samples), (success * 5 / samples) % 10,
2683 max_time, good * 100 / samples, good, samples);
2684 else
2685 cnt += sprintf(&buf[cnt], "\nAverage rate: 0Mbs\n");
2686
2687 cnt += sprintf(&buf[cnt], "\nrate scale type %d antenna %d "
2688 "active_search %d rate index %d\n", lq_type, antenna,
2689 lq_sta->search_better_tbl, sta->last_txrate_idx);
2690
2691 rcu_read_unlock();
2692 return cnt;
2693}
2694
2695int iwlagn_rate_control_register(void) 2603int iwlagn_rate_control_register(void)
2696{ 2604{
2697 return ieee80211_rate_control_register(&rs_ops); 2605 return ieee80211_rate_control_register(&rs_ops);