#
# This file includes snippets to generate the 'wifi_config' for the
# various wireless LAN driver for each test run-script.
#
proc wifi_ssid { } {
return $::env(GENODE_WIFI_SSID)
}
proc wifi_psk { } {
return $::env(GENODE_WIFI_PSK)
}
proc wifi_wpa { } {
if {![info exists ::env(GENODE_WIFI_WPA)]} {
return WPA2
}
return $::env(GENODE_WIFI_WPA)
}
proc wifi_verbose { } {
if {![info exists ::env(GENODE_WIFI_VERBOSE)]} {
return false
}
return true
}
#
# wifi-driver config generator (supporting a network list)
#
# You may script your tests with this function in the dynamic_rom config below.
# The syntax for the networks parameter is
#
# { ssid protection passphrase explicit_scan }
#
# Example dynamic_rom config:
#
# {
# } [wifi_config 5 no [list "net1 WPA2 net1_psk no" "net2 WPA2 net2_psk no"]] {
#
#
# } [wifi_config 5 no [list "net1 WPA2 net1_psk no" "net2 WPA2 net2_psk yes"]] {
# }
#
set wifi_verbose false
proc wifi_config { scan_interval update_quality_interval rfkill networks } {
global wifi_verbose
set config "\n"
foreach n $networks {
if {[lindex $n 4] == "yes"} {
append config " \n"
}
append config " \n"
}
append config "\n"
return $config
}