diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-07-18 01:53:06 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-04 15:09:08 -0400 |
commit | 3ce84b9f2f495f59c4a4e68d814c348eaa497f65 (patch) | |
tree | 0d342d7ce132b5d310c26d207a3ec48c5de8e53f /drivers/net | |
parent | e227ceac8429ecd775c213838f0415700727b7b4 (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')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 92 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 10 |
3 files changed, 0 insertions, 111 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 | ||
2603 | int 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 | |||
2695 | int iwlagn_rate_control_register(void) | 2603 | int iwlagn_rate_control_register(void) |
2696 | { | 2604 | { |
2697 | return ieee80211_rate_control_register(&rs_ops); | 2605 | return ieee80211_rate_control_register(&rs_ops); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h index 3b06c9da77e3..84d4d1e33755 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h | |||
@@ -287,15 +287,6 @@ static inline u8 iwl4965_get_prev_ieee_rate(u8 rate_index) | |||
287 | } | 287 | } |
288 | 288 | ||
289 | /** | 289 | /** |
290 | * iwl4965_fill_rs_info - Fill an output text buffer with the rate representation | ||
291 | * | ||
292 | * NOTE: This is provided as a quick mechanism for a user to visualize | ||
293 | * the performance of the rate control algorithm and is not meant to be | ||
294 | * parsed software. | ||
295 | */ | ||
296 | extern int iwl4965_fill_rs_info(struct ieee80211_hw *, char *buf, u8 sta_id); | ||
297 | |||
298 | /** | ||
299 | * iwl4965_rate_control_register - Register the rate control algorithm callbacks | 290 | * iwl4965_rate_control_register - Register the rate control algorithm callbacks |
300 | * | 291 | * |
301 | * Since the rate control algorithm is hardware specific, there is no need | 292 | * Since the rate control algorithm is hardware specific, there is no need |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index dcd11e9bd86c..9db6aac02185 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -3687,15 +3687,6 @@ static ssize_t show_temperature(struct device *d, | |||
3687 | 3687 | ||
3688 | static DEVICE_ATTR(temperature, S_IRUGO, show_temperature, NULL); | 3688 | static DEVICE_ATTR(temperature, S_IRUGO, show_temperature, NULL); |
3689 | 3689 | ||
3690 | static ssize_t show_rs_window(struct device *d, | ||
3691 | struct device_attribute *attr, | ||
3692 | char *buf) | ||
3693 | { | ||
3694 | struct iwl_priv *priv = d->driver_data; | ||
3695 | return iwl4965_fill_rs_info(priv->hw, buf, IWL_AP_ID); | ||
3696 | } | ||
3697 | static DEVICE_ATTR(rs_window, S_IRUGO, show_rs_window, NULL); | ||
3698 | |||
3699 | static ssize_t show_tx_power(struct device *d, | 3690 | static ssize_t show_tx_power(struct device *d, |
3700 | struct device_attribute *attr, char *buf) | 3691 | struct device_attribute *attr, char *buf) |
3701 | { | 3692 | { |
@@ -4118,7 +4109,6 @@ static struct attribute *iwl4965_sysfs_entries[] = { | |||
4118 | #endif | 4109 | #endif |
4119 | &dev_attr_power_level.attr, | 4110 | &dev_attr_power_level.attr, |
4120 | &dev_attr_retry_rate.attr, | 4111 | &dev_attr_retry_rate.attr, |
4121 | &dev_attr_rs_window.attr, | ||
4122 | &dev_attr_statistics.attr, | 4112 | &dev_attr_statistics.attr, |
4123 | &dev_attr_status.attr, | 4113 | &dev_attr_status.attr, |
4124 | &dev_attr_temperature.attr, | 4114 | &dev_attr_temperature.attr, |