Add the new 'band' option, which supports the following values: 2g, 5g, 6g, 60g
Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
_wdev_prepare_channel() {
- json_get_vars channel hwmode
+ json_get_vars channel band hwmode
auto_channel=0
enable_ht=0
htmode=
hwmode="${hwmode##11}"
- hwmode_n="${hwmode##n}"
case "$channel" in
""|0|auto)
;;
esac
- [[ "$hwmode_n" = "$hwmode" ]] || {
- enable_ht=1
- hwmode="$hwmode_n"
-
- json_get_vars htmode
- case "$htmode" in
- HT20|HT40+|HT40-);;
- *) htmode= ;;
- esac
- }
-
case "$hwmode" in
a|b|g|ad) ;;
*)
fi
;;
esac
+
+ case "$band" in
+ 2g) hwmode=g;;
+ 5g|6g|60g) hwmode=a;;
+ *)
+ case "$hwmode" in
+ *a) band=5g;;
+ *ad) band=60g;;
+ *b|*g) band=2g;;
+ esac
+ ;;
+ esac
}
_wdev_handler() {
}
_wdev_common_device_config() {
- config_add_string channel hwmode htmode noscan
+ config_add_string channel hwmode band htmode noscan
}
_wdev_common_iface_config() {