#!/bin/sh # # "ANI-thing is better than no WiFi"-Workaround # # In order to avoid further WiFi-Blackouts that *might* be caused by a buggy # ANI feature in the ath9k kernel module, we disable ANI until it got fixed in # OpenWRT completely. # Don't need to do anything, unless the script gets triggered by an "ifup" # event. [[ "$ACTION" != "ifup" ]] && 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.info "phy0 disabling ANI" /bin/echo 0 > /sys/kernel/debug/ieee80211/phy0/ath9k/ani fi 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