blob: ae00a02a7c939575544142093b6ebac3004338c6 [file] [log] [blame]
developer90379572024-05-29 17:23:20 +08001#!/bin/sh
2
3wifi_wlan0=`iwconfig wlan0|grep IEEE\ 802.11 | wc -l`
4wifi_wlan1=`iwconfig wlan1|grep IEEE\ 802.11 | wc -l`
5wifi_wlan2=`iwconfig wlan2|grep IEEE\ 802.11 | wc -l`
6wifi_wlan3=`iwconfig wlan3|grep IEEE\ 802.11 | wc -l`
7
8if [ $wifi_wlan0 == "1" ] ; then
9 flag=wlan0
10 wlan0=$(iwconfig wlan0|grep IEEE\ 802.11)
11elif [ $wifi_wlan1 == "1" ]; then
12 flag=wlan1
13 wlan0=$(iwconfig wlan1|grep IEEE\ 802.11)
14elif [ $wifi_wlan2 == "1" ]; then
15 flag=wlan2
16 wlan0=$(iwconfig wlan2|grep IEEE\ 802.11)
17elif [ $wifi_wlan3 == "1" ]; then
18 flag=wlan3
19 wlan0=$(iwconfig wlan3|grep IEEE\ 802.11)
20fi
21
22wifi_driver_init=${#wlan0}
23check_dual_band=1
24if [ $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
47else
48 echo "Wifi driver is not initialized"
49fi