From 2ae4b357a2a9aff6a92aa90d9f23e6813b064296 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Fri, 6 Feb 2009 17:17:06 -0800 Subject: [PATCH] Make minstrel rate control default by overriding kernel config We do this by making rate.c use our own CONFIG_COMPAT_MAC80211_RC_DEFAULT. This should help on 2.6.27 where minstrel was not available and pid was default. Signed-off-by: Luis R. Rodriguez --- compat/compat.diff | 22 ++++++++++++++++++++++ config.mk | 3 +++ 2 files changed, 25 insertions(+) diff --git a/compat/compat.diff b/compat/compat.diff index 0efa60305349..6d1bd4a7ffa8 100644 --- a/compat/compat.diff +++ b/compat/compat.diff @@ -416,3 +416,25 @@ index a0c860f..9c6f214 100644 mdev->tx_queue_len = 1000; mdev->addr_len = ETH_ALEN; } +--- a/net/mac80211/rate.c 2009-02-06 17:12:28.000000000 -0800 ++++ b/net/mac80211/rate.c 2009-02-06 17:12:51.000000000 -0800 +@@ -22,7 +22,7 @@ + static LIST_HEAD(rate_ctrl_algs); + static DEFINE_MUTEX(rate_ctrl_mutex); + +-static char *ieee80211_default_rc_algo = CONFIG_MAC80211_RC_DEFAULT; ++static char *ieee80211_default_rc_algo = CONFIG_COMPAT_MAC80211_RC_DEFAULT; + module_param(ieee80211_default_rc_algo, charp, 0644); + MODULE_PARM_DESC(ieee80211_default_rc_algo, + "Default rate control algorithm for mac80211 to use"); +@@ -117,8 +117,8 @@ + ops = ieee80211_try_rate_control_ops_get(ieee80211_default_rc_algo); + + /* try built-in one if specific alg requested but not found */ +- if (!ops && strlen(CONFIG_MAC80211_RC_DEFAULT)) +- ops = ieee80211_try_rate_control_ops_get(CONFIG_MAC80211_RC_DEFAULT); ++ if (!ops && strlen(CONFIG_COMPAT_MAC80211_RC_DEFAULT)) ++ ops = ieee80211_try_rate_control_ops_get(CONFIG_COMPAT_MAC80211_RC_DEFAULT); + + return ops; + } diff --git a/config.mk b/config.mk index a5002ee9588d..49e82b392000 100644 --- a/config.mk +++ b/config.mk @@ -62,6 +62,9 @@ endif # kernel Makefile check # choose between pid and minstrel as default rate control algorithm CONFIG_MAC80211_RC_DEFAULT=minstrel +# This is the one used by our compat-wireless net/mac80211/rate.c +# in case you have and old kernel which is overriding this to pid. +CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel CONFIG_MAC80211_RC_PID=y CONFIG_MAC80211_RC_MINSTREL=y CONFIG_MAC80211_LEDS=y -- 2.30.2