1 #!/bin/sh 2 NETIFD_MAIN_DIR=../../scripts 3 . $NETIFD_MAIN_DIR/netifd-wireless.sh 4 5 init_wireless_driver "$@" 6 7 drv_mac80211_init_device_config() { 8 # identifiers 9 config_add_string macaddr 10 config_add_string path 11 config_add_string phy 12 13 # config 14 config_add_int channel 15 config_add_string hwmode 16 config_add_array ht_capab 17 18 config_add_int chanbw 19 } 20 21 drv_mac80211_init_iface_config() { 22 config_add_string macaddr 23 24 config_add_boolean wds 25 config_add_int maxassoc 26 config_add_int dtim_period 27 28 config_add_int max_listen_int 29 30 config_add_boolean hidden 31 config_add_boolean wmm 32 } 33 34 setup_vif() { 35 local name="$1" 36 37 json_select config 38 json_get_var ssid ssid 39 json_select .. 40 41 wireless_add_vif "$name" "${radio}v$vifidx" 42 /bin/sleep 10 & 43 wireless_add_process "$!" /bin/sleep 1 44 vifidx=$((vifidx + 1)) 45 } 46 47 drv_mac80211_cleanup() { 48 echo "mac80211 cleanup" 49 } 50 51 drv_mac80211_setup() { 52 echo "mac80211 setup: $1" 53 radio=$1 54 vifidx=0 55 json_dump 56 for_each_interface "sta ap adhoc" setup_vif 57 wireless_set_data phy=phy0 58 wireless_set_up 59 } 60 61 drv_mac80211_teardown() { 62 json_select data 63 json_get_var phy phy 64 json_select .. 65 echo "mac80211 teardown: $1 ($phy)" 66 json_dump 67 } 68 69 add_driver mac80211
This page was automatically generated by LXR 0.3.1. • OpenWrt