From cb801b052cc38db807ecc6e10b9c06cb0d45491f Mon Sep 17 00:00:00 2001 From: Daniel Albers Date: Sun, 12 Feb 2017 20:23:20 +0100 Subject: hostapd: mv netifd.sh hostapd.sh same name for the file on the host and target Signed-off-by: Daniel Albers --- package/network/services/hostapd/files/netifd.sh | 763 ----------------------- 1 file changed, 763 deletions(-) delete mode 100644 package/network/services/hostapd/files/netifd.sh (limited to 'package/network/services/hostapd/files/netifd.sh') diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh deleted file mode 100644 index 988ebc7757..0000000000 --- a/package/network/services/hostapd/files/netifd.sh +++ /dev/null @@ -1,763 +0,0 @@ -. /lib/functions/network.sh - -wpa_supplicant_add_rate() { - local var="$1" - local val="$(($2 / 1000))" - local sub="$((($2 / 100) % 10))" - append $var "$val" "," - [ $sub -gt 0 ] && append $var "." -} - -hostapd_add_rate() { - local var="$1" - local val="$(($2 / 100))" - append $var "$val" " " -} - -hostapd_append_wep_key() { - local var="$1" - - wep_keyidx=0 - set_default key 1 - case "$key" in - [1234]) - for idx in 1 2 3 4; do - local zidx - zidx=$(($idx - 1)) - json_get_var ckey "key${idx}" - [ -n "$ckey" ] && \ - append $var "wep_key${zidx}=$(prepare_key_wep "$ckey")" "$N$T" - done - wep_keyidx=$((key - 1)) - ;; - *) - append $var "wep_key0=$(prepare_key_wep "$key")" "$N$T" - ;; - esac -} - -hostapd_append_wpa_key_mgmt() { - local auth_type="$(echo $auth_type | tr 'a-z' 'A-Z')" - - append wpa_key_mgmt "WPA-$auth_type" - [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-${auth_type}" - [ "${ieee80211w:-0}" -gt 0 ] && append wpa_key_mgmt "WPA-${auth_type}-SHA256" -} - -hostapd_add_log_config() { - config_add_boolean \ - log_80211 \ - log_8021x \ - log_radius \ - log_wpa \ - log_driver \ - log_iapp \ - log_mlme - - config_add_int log_level -} - -hostapd_common_add_device_config() { - config_add_array basic_rate - config_add_array supported_rates - - config_add_string country - config_add_boolean country_ie doth - config_add_string require_mode - - hostapd_add_log_config -} - -hostapd_prepare_device_config() { - local config="$1" - local driver="$2" - - local base="${config%%.conf}" - local base_cfg= - - json_get_vars country country_ie beacon_int doth require_mode - - hostapd_set_log_options base_cfg - - set_default country_ie 1 - set_default doth 1 - - [ -n "$country" ] && { - append base_cfg "country_code=$country" "$N" - - [ "$country_ie" -gt 0 ] && append base_cfg "ieee80211d=1" "$N" - [ "$hwmode" = "a" -a "$doth" -gt 0 ] && append base_cfg "ieee80211h=1" "$N" - } - [ -n "$hwmode" ] && append base_cfg "hw_mode=$hwmode" "$N" - - local brlist= br - json_get_values basic_rate_list basic_rate - for br in $basic_rate_list; do - hostapd_add_rate brlist "$br" - done - case "$require_mode" in - g) brlist="60 120 240" ;; - n) append base_cfg "require_ht=1" "$N";; - ac) append base_cfg "require_vht=1" "$N";; - esac - - local rlist= r - json_get_values rate_list supported_rates - for r in $rate_list; do - hostapd_add_rate rlist "$r" - done - - [ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N" - [ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" - [ -n "$beacon_int" ] && append base_cfg "beacon_int=$beacon_int" "$N" - - cat > "$config" <