diff --git a/wifimngr.c b/wifimngr.c index c30091f4f884147b8224ae63428ee166143a85ac..da2cffcfcf6bed087cf3b7067371296b9ff2eb9f 100644 --- a/wifimngr.c +++ b/wifimngr.c @@ -252,8 +252,14 @@ static int wl_status(struct ubus_context *ctx, struct ubus_object *obj, blobmsg_add_u32(&bb, "radio", isup); blobmsg_add_string(&bb, "ssid", ssid); blobmsg_add_string(&bb, "bssid", bssid); - blobmsg_add_string(&bb, "encryption", + if (enc == CIPHER_NONE) + blobmsg_add_string(&bb, "encryption", "DISABLED"); + else if (!!(enc & CIPHER_WEP)) { + blobmsg_add_string(&bb, "encryption", "WEP"); + } else { + blobmsg_add_string(&bb, "encryption", etostr(auth, auth_buf, AUTH_MAX, auth_str)); + } blobmsg_add_u32(&bb, "frequency", (band == 1) ? 5 : 2); blobmsg_add_u32(&bb, "channel", channel); blobmsg_add_u32(&bb, "bandwidth", bandwidth);