projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wireless: fix getting the network_bridge variable
[project/netifd.git]
/
scripts
/
netifd-wireless.sh
diff --git
a/scripts/netifd-wireless.sh
b/scripts/netifd-wireless.sh
index
e26cea5
..
8c0ff78
100644
(file)
--- a/
scripts/netifd-wireless.sh
+++ b/
scripts/netifd-wireless.sh
@@
-58,7
+58,7
@@
_wdev_prepare_channel() {
;;
esac
;;
esac
- [[ "$hwmode_n" = "$hwmode" ]]
&&
{
+ [[ "$hwmode_n" = "$hwmode" ]]
||
{
enable_ht=1
hwmode="$hwmode_n"
enable_ht=1
hwmode="$hwmode_n"
@@
-248,14
+248,6
@@
wireless_vif_parse_encryption() {
esac
}
esac
}
-_get_vif_vars() {
- # internal use
- json_get_var _w_type mode
-
- # for drivers
- json_get_var network_bridge bridge
-}
-
for_each_interface() {
local _w_types="$1"; shift
local _w_ifaces _w_iface
for_each_interface() {
local _w_types="$1"; shift
local _w_ifaces _w_iface
@@
-267,8
+259,9
@@
for_each_interface() {
for _w_iface in $_w_ifaces; do
json_select "$_w_iface"
if [ -n "$_w_types" ]; then
for _w_iface in $_w_ifaces; do
json_select "$_w_iface"
if [ -n "$_w_types" ]; then
+ json_get_var network_bridge bridge
json_select config
json_select config
- _get_vif_vars
+ json_get_var _w_type mode
json_select ..
_w_types=" $_w_types "
[[ "${_w_types%$_w_type*}" = "$_w_types" ]] && {
json_select ..
_w_types=" $_w_types "
[[ "${_w_types%$_w_type*}" = "$_w_types" ]] && {
@@
-283,7
+276,7
@@
for_each_interface() {
}
_wdev_common_device_config() {
}
_wdev_common_device_config() {
- config_add_string channel hwmode
+ config_add_string channel hwmode
htmode
}
_wdev_common_iface_config() {
}
_wdev_common_iface_config() {
@@
-297,6
+290,8
@@
init_wireless_driver() {
case "$cmd" in
dump)
add_driver() {
case "$cmd" in
dump)
add_driver() {
+ eval "drv_$1_cleanup"
+
json_init
json_add_string name "$1"
json_init
json_add_string name "$1"