- EXTRA_CFLAGS="$(BUILDFLAGS) -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS" \
- CONFIG_MAC80211=m \
- CONFIG_MAC80211_LEDS=$(CONFIG_LEDS_TRIGGERS)
-
-ifneq ($(KERNEL_PATCHVER),2.6.21)
- define Build/Compile
- $(MAKE) $(MAKE_OPTS) SUBDIRS="$(PKG_BUILD_DIR)/wireless" modules
- $(MAKE) $(MAKE_OPTS) SUBDIRS="$(PKG_BUILD_DIR)/mac80211" modules
+ EXTRA_CFLAGS="$(BUILDFLAGS)" \
+ $(foreach opt,$(CONFOPTS),CONFIG_$(opt)=m) \
+ CONFIG_NL80211=y \
+ CONFIG_MAC80211_RCSIMPLE=y \
+ CONFIG_MAC80211_LEDS=$(CONFIG_LEDS_TRIGGERS) \
+ LINUXINCLUDE="-I$(PKG_BUILD_DIR)/include -I$(LINUX_DIR)/include -include linux/autoconf.h" \
+
+define Build/Prepare
+ rm -rf $(PKG_BUILD_DIR)
+ mkdir -p $(PKG_BUILD_DIR)
+ $(CP) ./src/* $(PKG_BUILD_DIR)/
+ $(Build/Patch)
+ $(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
+endef
+
+define Build/Compile
+ $(MAKE) -C "$(LINUX_DIR)" $(MAKE_OPTS) SUBDIRS="$(PKG_BUILD_DIR)/net/wireless" modules
+ $(MAKE) -C "$(LINUX_DIR)" $(MAKE_OPTS) SUBDIRS="$(PKG_BUILD_DIR)/net/mac80211" modules
+endef
+
+ifeq ($(CONFIG_LINUX_2_6_23),y)
+ define Build/InstallDev
+ mkdir -p $(1)/usr/include/mac80211
+ $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
+ endef
+
+ define KernelPackage/mac80211/install
+ $(INSTALL_DIR) $(1)/lib/wifi
+ $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi