diff --git a/src/freedombone b/src/freedombone index 2ff4480b..63a4acee 100755 --- a/src/freedombone +++ b/src/freedombone @@ -72,6 +72,9 @@ if [ ! $COMPLETION_FILE ]; then COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt fi +# before the interactive config so that wifi adaptors may be detected +setup_wifi_atheros + if [[ $command_options == "menuconfig"* ]]; then if [[ "$2" == "--reset" ]]; then if [ -f $CONFIGURATION_FILE ]; then diff --git a/src/freedombone-utils-wifi b/src/freedombone-utils-wifi index ecd36d12..c71d0845 100755 --- a/src/freedombone-utils-wifi +++ b/src/freedombone-utils-wifi @@ -39,6 +39,27 @@ WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg # repo for atheros AR9271 wifi driver ATHEROS_WIFI_REPO="https://github.com/qca/open-ath9k-htc-firmware.git" +function setup_wifi_atheros { + atheros_drivers_file=drivers/ath9k_htc_driver_bbb.tar.gz + if [ ! -f $atheros_drivers_file ]; then + if [ ! -f ~/freedombone/$atheros_drivers_file ]; then + return + else + atheros_drivers_file=drivers/$atheros_drivers_file + fi + fi + if [ ! -d /lib/firmware ]; then + return + fi + if [ -f /lib/firmware/htc_9271.fw ]; then + return + fi + curr_dir=$(pwd) + cd /lib/firmware + tar -xzvf $atheros_drivers_file + cd $curr_dir +} + function setup_wifi { if [[ $SYSTEM_TYPE == "mesh"* ]]; then return