X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fmac80211%2Frc80211_pid.h;h=2078803d3581dfdb6c4268e03f482bf0792d3c1c;hb=86d804e10a37cd86f16bf72386c37e843a98a74b;hp=6afd3cebdeca843580f1bd0b8c31eeb07e243756;hpb=ca5fbca924b845863ab9da00ac90b3384445f497;p=linux-2.6 diff --git a/net/mac80211/rc80211_pid.h b/net/mac80211/rc80211_pid.h index 6afd3cebde..2078803d35 100644 --- a/net/mac80211/rc80211_pid.h +++ b/net/mac80211/rc80211_pid.h @@ -10,42 +10,42 @@ #ifndef RC80211_PID_H #define RC80211_PID_H -/* Sampling period for measuring percentage of failed frames. */ -#define RC_PID_INTERVAL (HZ / 8) +/* Sampling period for measuring percentage of failed frames in ms. */ +#define RC_PID_INTERVAL 125 /* Exponential averaging smoothness (used for I part of PID controller) */ -#define RC_PID_SMOOTHING_SHIFT 3 -#define RC_PID_SMOOTHING (1 << RC_PID_SMOOTHING_SHIFT) +#define RC_PID_SMOOTHING_SHIFT 3 +#define RC_PID_SMOOTHING (1 << RC_PID_SMOOTHING_SHIFT) /* Sharpening factor (used for D part of PID controller) */ -#define RC_PID_SHARPENING_FACTOR 0 -#define RC_PID_SHARPENING_DURATION 0 +#define RC_PID_SHARPENING_FACTOR 0 +#define RC_PID_SHARPENING_DURATION 0 /* Fixed point arithmetic shifting amount. */ -#define RC_PID_ARITH_SHIFT 8 +#define RC_PID_ARITH_SHIFT 8 /* Fixed point arithmetic factor. */ -#define RC_PID_ARITH_FACTOR (1 << RC_PID_ARITH_SHIFT) +#define RC_PID_ARITH_FACTOR (1 << RC_PID_ARITH_SHIFT) /* Proportional PID component coefficient. */ -#define RC_PID_COEFF_P 15 +#define RC_PID_COEFF_P 15 /* Integral PID component coefficient. */ -#define RC_PID_COEFF_I 9 +#define RC_PID_COEFF_I 9 /* Derivative PID component coefficient. */ -#define RC_PID_COEFF_D 15 +#define RC_PID_COEFF_D 15 /* Target failed frames rate for the PID controller. NB: This effectively gives * maximum failed frames percentage we're willing to accept. If the wireless * link quality is good, the controller will fail to adjust failed frames * percentage to the target. This is intentional. */ -#define RC_PID_TARGET_PF 11 +#define RC_PID_TARGET_PF 14 /* Rate behaviour normalization quantity over time. */ -#define RC_PID_NORM_OFFSET 3 +#define RC_PID_NORM_OFFSET 3 /* Push high rates right after loading. */ -#define RC_PID_FAST_START 0 +#define RC_PID_FAST_START 0 /* Arithmetic right shift for positive and negative values for ISO C. */ #define RC_PID_DO_ARITH_RIGHT_SHIFT(x, y) \ @@ -61,7 +61,7 @@ enum rc_pid_event_type { union rc_pid_event_data { /* RC_PID_EVENT_TX_STATUS */ struct { - struct ieee80211_tx_status tx_status; + struct ieee80211_tx_info tx_status; }; /* RC_PID_EVENT_TYPE_RATE_CHANGE */ /* RC_PID_EVENT_TYPE_TX_RATE */ @@ -158,7 +158,7 @@ struct rc_pid_debugfs_entries { }; void rate_control_pid_event_tx_status(struct rc_pid_event_buffer *buf, - struct ieee80211_tx_status *stat); + struct ieee80211_tx_info *stat); void rate_control_pid_event_rate_change(struct rc_pid_event_buffer *buf, int index, int rate);