summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@frijolero.org>2012-03-09 14:04:01 -0800
committerLuis R. Rodriguez <mcgrof@frijolero.org>2012-03-09 14:06:41 -0800
commit10a61489a3f53bb79b7d3e9c47d6ff81245eab0e (patch)
treea0aa3b768c6992e945ced7bf69c2d9760850dea7
parent0372f806185cb94434aa8d2def1952362d621e4d (diff)
compat-wireless: add driver-select option ath9k_ap
Prefer using Minstrel for AP for ath9k. The minstrel rate control algorihtm has been field tested more than the ath9k rate control algorithm. To disable ath9k's RC we renaem the config option to with a CONFIG_COMPAT prefix and disable it later. Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
-rw-r--r--config.mk2
-rw-r--r--patches/08-rename-config-options.patch41
-rwxr-xr-xscripts/driver-select16
3 files changed, 57 insertions, 2 deletions
diff --git a/config.mk b/config.mk
index 668f9fbb..2650a701 100644
--- a/config.mk
+++ b/config.mk
@@ -267,7 +267,7 @@ CONFIG_ATH9K_COMMON=m
# as default once we get minstrel properly tested and blessed by
# our systems engineering team. CCK rates also need to be used
# for long range considerations.
-CONFIG_ATH9K_RATE_CONTROL=y
+CONFIG_COMPAT_ATH9K_RATE_CONTROL=y
CONFIG_ATH9K_BTCOEX_SUPPORT=y
diff --git a/patches/08-rename-config-options.patch b/patches/08-rename-config-options.patch
index 0e96827d..50c554ab 100644
--- a/patches/08-rename-config-options.patch
+++ b/patches/08-rename-config-options.patch
@@ -1,3 +1,11 @@
+This file renames CONFIG_ options that may be defined in older
+kernels but that we know we can *safely* rename to other config
+option names to ensure we disable building these options at
+through this framework. An example here is ath9k's rate control
+aglorithm is always selected by default via CONFIG_ATH9K_RATE_CONTROL.
+By renaming this to CONFIG_COMPAT_ATH9K_RATE_CONTROL we have
+the flexibility to disable it for a replacement driver.
+
In kernel 2.6.26 and older CONFIG_IWL4965 was build as an extra
module, but now it is directly included in the iwlagn.
@@ -103,3 +111,36 @@ CONFIG_BT_HIDP does not build with older kernel versions.
+obj-$(CONFIG_COMPAT_WL1251_SDIO) += wl1251_sdio.o
ccflags-y += -D__CHECK_ENDIAN__
+--- a/drivers/net/wireless/ath/ath9k/Makefile
++++ b/drivers/net/wireless/ath/ath9k/Makefile
+@@ -6,7 +6,7 @@ ath9k-y += beacon.o \
+ xmit.o
+
+ ath9k-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += mci.o
+-ath9k-$(CONFIG_ATH9K_RATE_CONTROL) += rc.o
++ath9k-$(CONFIG_COMPAT_ATH9K_RATE_CONTROL) += rc.o
+ ath9k-$(CONFIG_ATH9K_PCI) += pci.o
+ ath9k-$(CONFIG_ATH9K_AHB) += ahb.o
+ ath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o
+--- drivers/net/wireless/ath/ath9k/init.c
++++ drivers/net/wireless/ath/ath9k/init.c
+@@ -703,7 +703,7 @@ void ath9k_set_hw_capab(struct ath_softc
+ sc->ant_rx = hw->wiphy->available_antennas_rx;
+ sc->ant_tx = hw->wiphy->available_antennas_tx;
+
+-#ifdef CONFIG_ATH9K_RATE_CONTROL
++#ifdef CONFIG_COMPAT_ATH9K_RATE_CONTROL
+ hw->rate_control_algorithm = "ath9k_rate_control";
+ #endif
+
+--- drivers/net/wireless/ath/ath9k/rc.h
++++ drivers/net/wireless/ath/ath9k/rc.h
+@@ -219,7 +219,7 @@ struct ath_rate_priv {
+ struct ath_rc_stats rcstats[RATE_TABLE_SIZE];
+ };
+
+-#ifdef CONFIG_ATH9K_RATE_CONTROL
++#ifdef CONFIG_COMPAT_ATH9K_RATE_CONTROL
+ int ath_rate_control_register(void);
+ void ath_rate_control_unregister(void);
+ #else
diff --git a/scripts/driver-select b/scripts/driver-select
index 44773a23..c8aff636 100755
--- a/scripts/driver-select
+++ b/scripts/driver-select
@@ -4,6 +4,7 @@
# This script allows you to select your compat-wireless driver and
# reduce compilation time.
+COMPAT_CONFIG_CW="config.mk"
DRIVERS_MAKEFILE="drivers/net/wireless/Makefile"
ATH_MAKEFILE="drivers/net/wireless/ath/Makefile"
ATH9K_MAKEFILE="drivers/net/wireless/ath/ath9k/Makefile"
@@ -33,7 +34,7 @@ PURPLE="\033[35m"
CYAN="\033[36m"
UNDERLINE="\033[02m"
-SUPPORTED_80211_DRIVERS="ath5k ath9k ath9k_htc carl9170 ath6kl b43 zd1211rw rt2x00 wl1251 wl12xx brcmsmac brcmfmac"
+SUPPORTED_80211_DRIVERS="ath5k ath9k ath9k_ap ath9k_htc carl9170 ath6kl b43 zd1211rw rt2x00 wl1251 wl12xx brcmsmac brcmfmac"
# b43 needs some more work for driver-select, the SSB stuff, plus
# what if you update b44 but not b43? It will bust.
@@ -243,6 +244,13 @@ function select_ath9k_driver
# In the future here we'll add stuff to disable ath9k_htc
}
+function select_ath9k_driver_ap
+{
+ select_ath9k_driver
+ backup_file $COMPAT_CONFIG_CW
+ perl -i -ne 'print if ! /CONFIG_COMPAT_ATH9K_RATE_CONTROL/ ' $COMPAT_CONFIG_CW
+}
+
function select_brcm80211_driver
{
backup_file $BRCM80211_MAKEFILE
@@ -381,6 +389,12 @@ case $1 in
select_driver CONFIG_ATH_COMMON
select_ath9k_driver
;;
+ ath9k_ap)
+ disable_staging
+ disable_bt_usb_ethernet_var
+ select_driver CONFIG_ATH_COMMON
+ select_ath9k_driver_ap
+ ;;
carl9170)
disable_staging
disable_bt_usb_ethernet_var