Commit e990a017 authored by Anjan Chanda's avatar Anjan Chanda

fix due to wifi_iface_ops changes in libwifi

parent 70d3d46b
Pipeline #798 passed with stages
in 1 minute and 45 seconds
......@@ -1994,7 +1994,7 @@ static int wl_status(struct ubus_context *ctx, struct ubus_object *obj,
hwaddr_ntoa(bssid, bssidstr);
wifi_get_ssid(ifname, ssid);
wifi_get_security(ifname, &auth, &enc);
wifi_ap_get_caps(ifname, &apcaps);
wifi_get_caps(ifname, &apcaps);
tttt = blobmsg_open_table(&bb, "");
blobmsg_add_string(&bb, "ifname", ifname);
......
......@@ -255,7 +255,7 @@ int wps_start(struct ubus_context *ctx, struct ubus_object *obj,
struct blob_attr *tb[__WPS_START_ATTR_MAX];
struct wps_param wps = {
.role = WPS_REGISTRAR,
.mode = WPS_MODE_PBC
.method = WPS_METHOD_PBC
};
char ifname[16] = {0};
char role[16] = {0};
......@@ -274,19 +274,19 @@ int wps_start(struct ubus_context *ctx, struct ubus_object *obj,
}
if (!(tb[WPS_START_ATTR_MODE])) {
wps.mode = WPS_MODE_PBC;
wps.method = WPS_METHOD_PBC;
} else {
strncpy(mode, blobmsg_data(tb[WPS_START_ATTR_MODE]), 7);
if (!strcasecmp(mode, "pin"))
wps.mode = WPS_MODE_PIN;
wps.method = WPS_METHOD_PIN;
else if (!strcasecmp(mode, "pbc"))
wps.mode = WPS_MODE_PBC;
wps.method = WPS_METHOD_PBC;
else
return UBUS_STATUS_INVALID_ARGUMENT;
}
if (!(tb[WPS_START_ATTR_ROLE])) {
wps.role = WPS_MODE_PBC;
wps.role = WPS_METHOD_PBC;
} else {
strncpy(role, blobmsg_data(tb[WPS_START_ATTR_ROLE]), 10);
if (!strcasecmp(role, "registrar"))
......@@ -297,7 +297,7 @@ int wps_start(struct ubus_context *ctx, struct ubus_object *obj,
return UBUS_STATUS_INVALID_ARGUMENT;
}
if (wps.mode == WPS_MODE_PIN && wps.role == WPS_REGISTRAR) {
if (wps.method == WPS_METHOD_PIN && wps.role == WPS_REGISTRAR) {
/* expect enrollee's pin from user */
pin = strtoul(blobmsg_data(tb[WPS_START_ATTR_STA_PIN]), NULL, 10);
if (!wifi_is_wps_pin_valid(pin))
......
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