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>
This commit is contained in:
Tomas Winkler
2008-07-18 13:53:06 +08:00
committed by John W. Linville
parent e227ceac84
commit 3ce84b9f2f
3 changed files with 0 additions and 111 deletions

View File

@@ -2600,98 +2600,6 @@ static struct rate_control_ops rs_ops = {
#endif
};
int iwl4965_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
{
struct ieee80211_local *local = hw_to_local(hw);
struct iwl_priv *priv = hw->priv;
struct iwl_lq_sta *lq_sta;
struct sta_info *sta;
int cnt = 0, i;
u32 samples = 0, success = 0, good = 0;
unsigned long now = jiffies;
u32 max_time = 0;
u8 lq_type, antenna;
rcu_read_lock();
sta = sta_info_get(local, priv->stations[sta_id].sta.sta.addr);
if (!sta || !sta->rate_ctrl_priv) {
if (sta)
IWL_DEBUG_RATE("leave - no private rate data!\n");
else
IWL_DEBUG_RATE("leave - no station!\n");
rcu_read_unlock();
return sprintf(buf, "station %d not found\n", sta_id);
}
lq_sta = (void *)sta->rate_ctrl_priv;
lq_type = lq_sta->lq_info[lq_sta->active_tbl].lq_type;
antenna = lq_sta->lq_info[lq_sta->active_tbl].ant_type;
if (is_legacy(lq_type))
i = IWL_RATE_54M_INDEX;
else
i = IWL_RATE_60M_INDEX;
while (1) {
u64 mask;
int j;
int active = lq_sta->active_tbl;
cnt +=
sprintf(&buf[cnt], " %2dMbs: ", iwl_rates[i].ieee / 2);
mask = (1ULL << (IWL_RATE_MAX_WINDOW - 1));
for (j = 0; j < IWL_RATE_MAX_WINDOW; j++, mask >>= 1)
buf[cnt++] =
(lq_sta->lq_info[active].win[i].data & mask)
? '1' : '0';
samples += lq_sta->lq_info[active].win[i].counter;
good += lq_sta->lq_info[active].win[i].success_counter;
success += lq_sta->lq_info[active].win[i].success_counter *
iwl_rates[i].ieee;
if (lq_sta->lq_info[active].win[i].stamp) {
int delta =
jiffies_to_msecs(now -
lq_sta->lq_info[active].win[i].stamp);
if (delta > max_time)
max_time = delta;
cnt += sprintf(&buf[cnt], "%5dms\n", delta);
} else
buf[cnt++] = '\n';
j = iwl4965_get_prev_ieee_rate(i);
if (j == i)
break;
i = j;
}
/*
* Display the average rate of all samples taken.
* NOTE: We multiply # of samples by 2 since the IEEE measurement
* added from iwl_rates is actually 2X the rate.
*/
if (samples)
cnt += sprintf(&buf[cnt],
"\nAverage rate is %3d.%02dMbs over last %4dms\n"
"%3d%% success (%d good packets over %d tries)\n",
success / (2 * samples), (success * 5 / samples) % 10,
max_time, good * 100 / samples, good, samples);
else
cnt += sprintf(&buf[cnt], "\nAverage rate: 0Mbs\n");
cnt += sprintf(&buf[cnt], "\nrate scale type %d antenna %d "
"active_search %d rate index %d\n", lq_type, antenna,
lq_sta->search_better_tbl, sta->last_txrate_idx);
rcu_read_unlock();
return cnt;
}
int iwlagn_rate_control_register(void)
{
return ieee80211_rate_control_register(&rs_ops);