--- /dev/null
+--- 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 <linux/version.h>
+
+
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+ #include <generated/autoconf.h>
++#else
++#include <linux/autoconf.h>
++#endif
++#include <linux/compat_autoconf.h>
+ #include <linux/init.h>
+ #include <linux/kernel.h>
+ #include <linux/sched.h>
--- /dev/null
+--- 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)
+ {