Procházet zdrojové kódy

ffho-wifi-blackout-workaround: Update package

- support current gluon version
- support nodes with dualband wifi
Karsten Böddeker před 8 roky
rodič
revize
c32bd3f593

+ 2 - 2
ffho/ffho-wifi-blackout-workaround/Makefile

@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ffho-wifi-blackout-workaround
-PKG_VERSION:=1
+PKG_VERSION:=2
 PKG_RELEASE:=$(GLUON_VERSION).$(GLUON_SITE_CODE)-$(GLUON_RELEASE).$(GLUON_CONFIG_VERSION)
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
@@ -12,7 +12,7 @@ define Package/ffho-wifi-blackout-workaround
   SECTION:=ffho
   CATEGORY:=workarounds
   TITLE:=WiFi-Blackout workaround
-  DEPENDS:=+busybox
+  DEPENDS:=+gluon-core
 endef
 
 define Package/ffho-wifi-blackout-workaround/description

+ 7 - 25
ffho/ffho-wifi-blackout-workaround/files/etc/hotplug.d/iface/99-ath9k_disable_ani

@@ -9,33 +9,15 @@
 # Don't need to do anything, unless the script gets triggered by an "ifup"
 # event.
 [[ "$ACTION" != "ifup" ]] && exit 0;
-[[ "$INTERFACE" != "mesh_radio0" && "$INTERFACE" != "client" ]] && exit 0;
+[[ "$INTERFACE" != "mesh_radio0" && "$INTERFACE" != "ibss_radio0" && "$INTERFACE" != "mesh_radio1" && "$INTERFACE" != "ibss_radio1" && "$INTERFACE" != "client" ]] && exit 0;
 
 # Test whether disabling ANI is applicable or not
-if [ ! -e "/sys/kernel/debug/ieee80211/phy0/ath9k/ani" ] ; then
-	logger -s -t ath9k-disable-ani -p local0.notice \
-		"Not an ath9k device with ANI. Aborting."
-	exit 0
+if [ -e "/sys/kernel/debug/ieee80211/phy0/ath9k/ani" ] ; then
+	logger -s -t ath9k-disable-ani -p local0.info "phy0 disabling ANI"
+	/bin/echo 0 > /sys/kernel/debug/ieee80211/phy0/ath9k/ani
 fi
 
-# Load helper functions and determine the current branch
-. /lib/functions.sh
-
-config_load autoupdater
-
-# Test whether this devices has the stable or the testing firmware
-config_get fw_branch "settings" "branch"
-
-new_ani_state=1
-log_msg="Current firmware branch is: ${fw_branch}"
-if [ "$fw_branch" == "stable" ] ; then
-	new_ani_state=0
-	log_msg="${log_msg} (disabling ANI)"
-else
-	log_msg="${log_msg} (enabling ANI)"
+if [ -e "/sys/kernel/debug/ieee80211/phy1/ath9k/ani" ] ; then
+        logger -s -t ath9k-disable-ani -p local0.info "phy1 disabling ANI"
+        /bin/echo 0 > /sys/kernel/debug/ieee80211/phy1/ath9k/ani
 fi
-
-# enable/disable feature
-logger -s -t ath9k-disable-ani -p local0.info $log_msg
-/bin/echo ${new_ani_state} > /sys/kernel/debug/ieee80211/phy0/ath9k/ani
-