-ifneq ($(KERNEL_PATCHVER),2.6.21)
- define Build/Compile
- $(MAKE) $(MAKE_CONFIGS) -C "$(LINUX_DIR)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ifneq ($(CONFIG_MAC80211),)
+
+ PKG_EXTRA_KCONFIG:= \
+ CONFIG_BCM43XX_MAC80211=m \
+ CONFIG_BCM43XX_MAC80211_PCI=y \
+ CONFIG_BCM43XX_MAC80211_DEBUG=y \
+ CONFIG_BCM43XX_MAC80211_DMA=y \
+ CONFIG_BCM43XX_MAC80211_PIO=y \
+ CONFIG_BCM43XX_MAC80211_DMA_AND_PIO_MODE=y \
+
+ PKG_EXTRA_CFLAGS:= \
+ -I$(STAGING_DIR)/usr/include/mac80211 \
+ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(PKG_EXTRA_KCONFIG)))) \
+ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG)))) \
+
+ define Build/Compile/it
+ $(MAKE) -C "$(LINUX_DIR)" \