Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107745
b: refs/heads/master
c: 3ce84b9
h: refs/heads/master
i:
  107743: cd72254
v: v3
  • Loading branch information
Tomas Winkler authored and John W. Linville committed Aug 4, 2008
1 parent 7f9412e commit 4a75780
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 112 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e227ceac8429ecd775c213838f0415700727b7b4
refs/heads/master: 3ce84b9f2f495f59c4a4e68d814c348eaa497f65
92 changes: 0 additions & 92 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 0 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-rs.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,6 @@ static inline u8 iwl4965_get_prev_ieee_rate(u8 rate_index)
return rate;
}

/**
* iwl4965_fill_rs_info - Fill an output text buffer with the rate representation
*
* NOTE: This is provided as a quick mechanism for a user to visualize
* the performance of the rate control algorithm and is not meant to be
* parsed software.
*/
extern int iwl4965_fill_rs_info(struct ieee80211_hw *, char *buf, u8 sta_id);

/**
* iwl4965_rate_control_register - Register the rate control algorithm callbacks
*
Expand Down
10 changes: 0 additions & 10 deletions trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -3687,15 +3687,6 @@ static ssize_t show_temperature(struct device *d,

static DEVICE_ATTR(temperature, S_IRUGO, show_temperature, NULL);

static ssize_t show_rs_window(struct device *d,
struct device_attribute *attr,
char *buf)
{
struct iwl_priv *priv = d->driver_data;
return iwl4965_fill_rs_info(priv->hw, buf, IWL_AP_ID);
}
static DEVICE_ATTR(rs_window, S_IRUGO, show_rs_window, NULL);

static ssize_t show_tx_power(struct device *d,
struct device_attribute *attr, char *buf)
{
Expand Down Expand Up @@ -4118,7 +4109,6 @@ static struct attribute *iwl4965_sysfs_entries[] = {
#endif
&dev_attr_power_level.attr,
&dev_attr_retry_rate.attr,
&dev_attr_rs_window.attr,
&dev_attr_statistics.attr,
&dev_attr_status.attr,
&dev_attr_temperature.attr,
Expand Down

0 comments on commit 4a75780

Please sign in to comment.