mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
WiFi: Fix PossibleChannels when radio down
This commit is contained in:
parent
3d0a72a79a
commit
2d30db26eb
1 changed files with 6 additions and 1 deletions
|
|
@ -1300,7 +1300,12 @@ static int get_radio_possible_channels(char *refparam, struct dmctx *ctx, void *
|
|||
DM_ASSERT(res, *value = "");
|
||||
|
||||
bandwidth = dmjson_get_value(res, 1, "bandwidth");
|
||||
dmubus_call(object, "channels", UBUS_ARGS{{"bandwidth", bandwidth, Integer}}, 1, &res);
|
||||
|
||||
if (DM_STRTOL(bandwidth) == 0) {
|
||||
dmubus_call(object, "channels", UBUS_ARGS{0}, 0, &res);
|
||||
} else {
|
||||
dmubus_call(object, "channels", UBUS_ARGS{{"bandwidth", bandwidth, Integer}}, 1, &res);
|
||||
}
|
||||
DM_ASSERT(res, *value = "");
|
||||
|
||||
*value = dmjson_get_value_array_all(res, ",", 1, "channels");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue