Commit c4063e9c authored by Anjan Chanda's avatar Anjan Chanda

pass correct args to wifi_get_supp_channels

parent a42fb9ed
......@@ -2434,7 +2434,7 @@ static int wl_status(struct ubus_context *ctx, struct ubus_object *obj,
uint32_t channel;
int channels[32] = {0};
ifstatus_t ifstat = 0;
int band = 0;
enum wifi_band band = Band_2;
unsigned long rate;
int noise;
enum wifi_bw bw;
......@@ -2450,8 +2450,8 @@ static int wl_status(struct ubus_context *ctx, struct ubus_object *obj,
wifi_get_ifstatus(radios[i], &ifstat);
wifi_get_channel(radios[i], &channel, &bw);
if (channel && channel > 14)
band = 1; // 5GHz
if (channel && channel >= 36 && channel < 200)
band = Band_5;
wifi_get_bandwidth(radios[i], &bw);
if (bw < bw20 || bw > bw160) { // FIXME: in libwifi
......@@ -2468,9 +2468,7 @@ static int wl_status(struct ubus_context *ctx, struct ubus_object *obj,
wifi_get_supp_channels(radios[i], channels, &nr,
country == NULL ? "" : country,
band == 1 ? 5 : 2, bw_int[bw]);
fprintf(stderr, "Supported Channels: %d\n", nr);
band, bw);
wifi_get_maxrate(radios[i], &rate);
wifi_get_noise(radios[i], &noise);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment