aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-05-21 11:33:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-21 21:48:17 -0400
commit9e72ebd686a7f39facdfff639386055f1ad7dc88 (patch)
tree96ad46f1948d76217b3422ca5d822b1c265d39d7 /net/mac80211/ieee80211_i.h
parent53c068566dde708cb28a4dfc06ae3d7fd7434397 (diff)
mac80211: remove channel use statistics
The useless channel use statistics are quite a lot of code, currently use integer divisions in the packet fast path, are rather inaccurate since they do not account for retries and finally nobody even cares. Hence, remove them completely. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 7d614cdcefcb..3f8601cafffb 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -201,7 +201,6 @@ struct ieee80211_rx_data {
201 unsigned int flags; 201 unsigned int flags;
202 int sent_ps_buffered; 202 int sent_ps_buffered;
203 int queue; 203 int queue;
204 int load;
205 u32 tkip_iv32; 204 u32 tkip_iv32;
206 u16 tkip_iv16; 205 u16 tkip_iv16;
207}; 206};
@@ -448,14 +447,11 @@ struct ieee80211_sub_if_data {
448 struct ieee80211_if_sta sta; 447 struct ieee80211_if_sta sta;
449 u32 mntr_flags; 448 u32 mntr_flags;
450 } u; 449 } u;
451 int channel_use;
452 int channel_use_raw;
453 450
454#ifdef CONFIG_MAC80211_DEBUGFS 451#ifdef CONFIG_MAC80211_DEBUGFS
455 struct dentry *debugfsdir; 452 struct dentry *debugfsdir;
456 union { 453 union {
457 struct { 454 struct {
458 struct dentry *channel_use;
459 struct dentry *drop_unencrypted; 455 struct dentry *drop_unencrypted;
460 struct dentry *state; 456 struct dentry *state;
461 struct dentry *bssid; 457 struct dentry *bssid;
@@ -474,7 +470,6 @@ struct ieee80211_sub_if_data {
474 struct dentry *num_beacons_sta; 470 struct dentry *num_beacons_sta;
475 } sta; 471 } sta;
476 struct { 472 struct {
477 struct dentry *channel_use;
478 struct dentry *drop_unencrypted; 473 struct dentry *drop_unencrypted;
479 struct dentry *num_sta_ps; 474 struct dentry *num_sta_ps;
480 struct dentry *dtim_count; 475 struct dentry *dtim_count;
@@ -484,12 +479,10 @@ struct ieee80211_sub_if_data {
484 struct dentry *num_buffered_multicast; 479 struct dentry *num_buffered_multicast;
485 } ap; 480 } ap;
486 struct { 481 struct {
487 struct dentry *channel_use;
488 struct dentry *drop_unencrypted; 482 struct dentry *drop_unencrypted;
489 struct dentry *peer; 483 struct dentry *peer;
490 } wds; 484 } wds;
491 struct { 485 struct {
492 struct dentry *channel_use;
493 struct dentry *drop_unencrypted; 486 struct dentry *drop_unencrypted;
494 } vlan; 487 } vlan;
495 struct { 488 struct {
@@ -661,9 +654,6 @@ struct ieee80211_local {
661 assoc_led_name[32], radio_led_name[32]; 654 assoc_led_name[32], radio_led_name[32];
662#endif 655#endif
663 656
664 u32 channel_use;
665 u32 channel_use_raw;
666
667#ifdef CONFIG_MAC80211_DEBUGFS 657#ifdef CONFIG_MAC80211_DEBUGFS
668 struct work_struct sta_debugfs_add; 658 struct work_struct sta_debugfs_add;
669#endif 659#endif
@@ -861,28 +851,6 @@ u32 ieee80211_handle_ht(struct ieee80211_local *local, int enable_ht,
861 851
862/* ieee80211_ioctl.c */ 852/* ieee80211_ioctl.c */
863extern const struct iw_handler_def ieee80211_iw_handler_def; 853extern const struct iw_handler_def ieee80211_iw_handler_def;
864
865
866/* Least common multiple of the used rates (in 100 kbps). This is used to
867 * calculate rate_inv values for each rate so that only integers are needed. */
868#define CHAN_UTIL_RATE_LCM 95040
869/* 1 usec is 1/8 * (95040/10) = 1188 */
870#define CHAN_UTIL_PER_USEC 1188
871/* Amount of bits to shift the result right to scale the total utilization
872 * to values that will not wrap around 32-bit integers. */
873#define CHAN_UTIL_SHIFT 9
874/* Theoretical maximum of channel utilization counter in 10 ms (stat_time=1):
875 * (CHAN_UTIL_PER_USEC * 10000) >> CHAN_UTIL_SHIFT = 23203. So dividing the
876 * raw value with about 23 should give utilization in 10th of a percentage
877 * (1/1000). However, utilization is only estimated and not all intervals
878 * between frames etc. are calculated. 18 seems to give numbers that are closer
879 * to the real maximum. */
880#define CHAN_UTIL_PER_10MS 18
881#define CHAN_UTIL_HDR_LONG (202 * CHAN_UTIL_PER_USEC)
882#define CHAN_UTIL_HDR_SHORT (40 * CHAN_UTIL_PER_USEC)
883
884
885/* ieee80211_ioctl.c */
886int ieee80211_set_freq(struct ieee80211_local *local, int freq); 854int ieee80211_set_freq(struct ieee80211_local *local, int freq);
887/* ieee80211_sta.c */ 855/* ieee80211_sta.c */
888void ieee80211_sta_timer(unsigned long data); 856void ieee80211_sta_timer(unsigned long data);