From: Hauke Mehrtens Date: Sat, 11 Sep 2010 16:18:27 +0000 (-0700) Subject: compat-wireless: make atk6kl build with older kernels X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0aa0443a01a140f0af332747fdcb25e3184172fd;p=openwrt%2Fstaging%2Fblogic.git compat-wireless: make atk6kl build with older kernels Now it will be build for kernel < 2.6.28. CONFIG_STAGING was introduced with that kernel version. Signed-off-by: Hauke Mehrtens --- diff --git a/config.mk b/config.mk index 3c6d41663773..458de29c5252 100644 --- a/config.mk +++ b/config.mk @@ -490,7 +490,6 @@ CONFIG_BT_HCIBTSDIO=m CONFIG_BT_MRVL_SDIO=m ifneq ($(CONFIG_COMPAT_STAGING),) -ifdef CONFIG_COMPAT_KERNEL_32 CONFIG_ATH6KL_CFG80211=y CONFIG_ATH6KL_DEBUG=y # CONFIG_ATH6KL_DISABLE_TARGET_DBGLOGS is not set @@ -502,7 +501,6 @@ CONFIG_ATH6KL_ENABLE_TARGET_DEBUG_PRINTS=y # CONFIG_ATH6KL_SKIP_ABI_VERSION_CHECK is not set CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER=y CONFIG_ATH6K_LEGACY=m -endif #CONFIG_COMPAT_KERNEL_32 endif diff --git a/patches/33-autoconf.patch b/patches/33-autoconf.patch new file mode 100644 index 000000000000..5d767fd789bd --- /dev/null +++ b/patches/33-autoconf.patch @@ -0,0 +1,15 @@ +--- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h ++++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h +@@ -27,7 +27,12 @@ + #include + + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) + #include ++#else ++#include ++#endif ++#include + #include + #include + #include diff --git a/patches/34-backport-bin_attribute.patch b/patches/34-backport-bin_attribute.patch new file mode 100644 index 000000000000..ce53635e7dcb --- /dev/null +++ b/patches/34-backport-bin_attribute.patch @@ -0,0 +1,47 @@ +--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c ++++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c +@@ -334,12 +334,20 @@ static void ar6000_refill_amsdu_rxbufs(A + static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar); + + static ssize_t ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34)) + ar6000_sysfs_bmi_read(struct file *fp, struct kobject *kobj, ++#else ++ar6000_sysfs_bmi_read(struct kobject *kobj, ++#endif + struct bin_attribute *bin_attr, + char *buf, loff_t pos, size_t count); + + static ssize_t ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34)) + ar6000_sysfs_bmi_write(struct file *fp, struct kobject *kobj, ++#else ++ar6000_sysfs_bmi_write(struct kobject *kobj, ++#endif + struct bin_attribute *bin_attr, + char *buf, loff_t pos, size_t count); + +@@ -799,7 +807,11 @@ static struct bin_attribute bmi_attr = { + }; + + static ssize_t ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34)) + ar6000_sysfs_bmi_read(struct file *fp, struct kobject *kobj, ++#else ++ar6000_sysfs_bmi_read(struct kobject *kobj, ++#endif + struct bin_attribute *bin_attr, + char *buf, loff_t pos, size_t count) + { +@@ -826,7 +838,11 @@ ar6000_sysfs_bmi_read(struct file *fp, s + } + + static ssize_t ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34)) + ar6000_sysfs_bmi_write(struct file *fp, struct kobject *kobj, ++#else ++ar6000_sysfs_bmi_write(struct kobject *kobj, ++#endif + struct bin_attribute *bin_attr, + char *buf, loff_t pos, size_t count) + {