developer | 9037957 | 2024-05-29 17:23:20 +0800 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | |
| 3 | wifi_wlan0=`iwconfig wlan0|grep IEEE\ 802.11 | wc -l` |
| 4 | wifi_wlan1=`iwconfig wlan1|grep IEEE\ 802.11 | wc -l` |
| 5 | wifi_wlan2=`iwconfig wlan2|grep IEEE\ 802.11 | wc -l` |
| 6 | wifi_wlan3=`iwconfig wlan3|grep IEEE\ 802.11 | wc -l` |
| 7 | |
| 8 | if [ $wifi_wlan0 == "1" ] ; then |
| 9 | flag=wlan0 |
| 10 | wlan0=$(iwconfig wlan0|grep IEEE\ 802.11) |
| 11 | elif [ $wifi_wlan1 == "1" ]; then |
| 12 | flag=wlan1 |
| 13 | wlan0=$(iwconfig wlan1|grep IEEE\ 802.11) |
| 14 | elif [ $wifi_wlan2 == "1" ]; then |
| 15 | flag=wlan2 |
| 16 | wlan0=$(iwconfig wlan2|grep IEEE\ 802.11) |
| 17 | elif [ $wifi_wlan3 == "1" ]; then |
| 18 | flag=wlan3 |
| 19 | wlan0=$(iwconfig wlan3|grep IEEE\ 802.11) |
| 20 | fi |
| 21 | |
| 22 | wifi_driver_init=${#wlan0} |
| 23 | check_dual_band=1 |
| 24 | if [ $wifi_driver_init != 0 ]; then |
| 25 | echo "Wifi (single band) driver is initialized" |
| 26 | while [ $check_dual_band -le 5 ] |
| 27 | do |
| 28 | echo "checking for dual band support:$check_dual_band" |
| 29 | if [ $flag == "wlan0" ]; then |
| 30 | wifi_dual_band=1 |
| 31 | elif [ $flag == "wlan1" ]; then |
| 32 | wifi_dual_band=1 |
| 33 | elif [ $flag == "wlan2" ]; then |
| 34 | wifi_dual_band=1 |
| 35 | elif [ $flag == "wlan3" ]; then |
| 36 | wifi_dual_band=1 |
| 37 | fi |
| 38 | echo "$wifi_dual_band" |
| 39 | if [ $wifi_dual_band == 1 ]; then |
| 40 | break |
| 41 | fi |
| 42 | check_dual_band=`expr $check_dual_band + 1` |
| 43 | sleep 1; |
| 44 | done |
| 45 | sleep 1; |
| 46 | touch /tmp/wifi_driver_initialized |
| 47 | else |
| 48 | echo "Wifi driver is not initialized" |
| 49 | fi |