nuke old madwifi init script, add new /lib/wifi handler (usable for many configuratio...
authorFelix Fietkau <nbd@openwrt.org>
Fri, 22 Dec 2006 08:02:59 +0000 (08:02 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 22 Dec 2006 08:02:59 +0000 (08:02 +0000)
SVN-Revision: 5889

package/madwifi/Makefile
package/madwifi/files/lib/wifi/madwifi.sh
package/madwifi/files/madwifi.init [deleted file]

index b0e5be8712671720b0d3160c87a663ab0393c683..f59daddc1d00e76848b3235d3ec0d1b4f3427df5 100644 (file)
@@ -41,7 +41,7 @@ ifeq ($(ARCH),powerpc)
 endif
 
 BUS:=PCI
-ifneq ($(CONFIG_LINUX_2_6_AR531X),)
+ifneq ($(CONFIG_LINUX_2_6_ATHEROS),)
   BUS:=AHB
   HAL_TARGET:=ap51
 endif
@@ -140,8 +140,8 @@ define Build/UninstallDev
 endef
 
 define KernelPackage/madwifi/install
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/madwifi.init $(1)/etc/init.d/madwifi
+       $(INSTALL_DIR) $(1)/lib/wifi
+       $(INSTALL_DATA) ./files/lib/wifi/madwifi.sh $(1)/lib/wifi
        $(INSTALL_DIR) $(1)/usr/sbin
        $(CP) $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(1)/usr/sbin/
 endef
index de9870ce651ba91dd5815ebb083a947ab7c97440..dd030ba1690b22269f694239aa470af44bad30a7 100755 (executable)
@@ -154,6 +154,9 @@ enable_atheros() {
                }
                config_set "$vif" ifname "$ifname"
 
+               config_get "$device" mode
+               iwpriv "$ifname" mode "${mode:-11g}"
+
                config_get wds "$vif" wds
                case "$wds" in
                        1|on|enabled) wds=1;;
diff --git a/package/madwifi/files/madwifi.init b/package/madwifi/files/madwifi.init
deleted file mode 100644 (file)
index 0c3ad3c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh /etc/rc.common
-START=20
-boot() {
-       iwpriv ath0 mode 3
-}