include $(M)/$(COMPAT_CONFIG)
-NOSTDINC_FLAGS := -I$(M)/include/ -include $(M)/include/net/compat.h $(CFLAGS)
+NOSTDINC_FLAGS := -I$(M)/include/ -include $(M)/include/linux/compat.h $(CFLAGS)
-obj-y := \
- compat/ \
- net/rfkill/
- net/bluetooth/ \
- net/wireless/ net/mac80211/
+obj-y := compat/
-obj-m += \
- drivers/ssb/ \
- drivers/misc/eeprom/ \
- drivers/net/ \
- drivers/net/usb/ \
- drivers/net/wireless/ \
- drivers/bluetooth/
+obj-$(COMPAT_RFKILL) += net/rfkill/
+obj-$(CONFIG_COMPAT_BT) += net/bluetooth/
+obj-$(CONFIG_COMPAT_WIRELESS) += net/wireless/ net/mac80211/
+
+obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/
+obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/ssb/ drivers/misc/eeprom/
+
+obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/
+obj-$(CONFIG_COMPAT_WIRELESS_MODULES) += drivers/net/wireless/
+obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/
else
include $(KLIB_BUILD)/.config
endif
+# These both are needed by compat-wireless || compat-bluetooth so enable them
+ CONFIG_COMPAT_RFKILL=y
+
ifeq ($(CONFIG_MAC80211),y)
$(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
+else
+ CONFIG_COMPAT_WIRELESS=y
+ CONFIG_COMPAT_WIRELESS_MODULES=m
+ CONFIG_COMPAT_VAR_MODULES=m
+# We could technically separate these but not yet, we only have b44
+# Note that we don't intend on backporting network drivers that
+# use Multiqueue as that was a pain to backport to kernels older than
+# 2.6.27. But -- we could just disable those drivers from kernels
+# older than 2.6.27
+ CONFIG_COMPAT_NETWORK_MODULES=m
endif
ifeq ($(CONFIG_BT),y)
-$(error "ERROR: your kernel has CONFIG_BT=y, you should have it CONFIG_BT=m if you want to use compat bluetooth.")
+# we'll ignore compiling bluetooth
+else
+CONFIG_COMPAT_BT=y
+CONFIG_COMPAT_BLUETOOTH_MODULES=m
endif
# We will warn when you don't have MQ support or NET_SCHED enabled.
/* remove once we remove the wext stuff */
#include <net/iw_handler.h>
#include <linux/wireless.h>
-+#include <net/compat.h>
++#include <linux/compat.h>
/*
mkdir -p $COMPAT
echo "Copying $GIT_COMPAT_TREE/ files..."
cp $GIT_COMPAT_TREE/compat/*.c $COMPAT/
-cp $GIT_COMPAT_TREE/Makefile $COMPAT/
+cp $GIT_COMPAT_TREE/compat/Makefile $COMPAT/
cp $GIT_COMPAT_TREE/include/linux/*.h include/linux/
rm -f $COMPAT/*.mod.c