rpcd-mod-luci: support parsing 11ax HW / HT modes

Add support for parsing 11ax modes returned from UBUS. This is required
so the frontend can display information about supported 11ax operation.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 7b11e848ac)
This commit is contained in:
David Bauer 2021-06-05 16:18:35 +02:00 committed by Jo-Philipp Wich
parent f0ba6c8475
commit 5b4eb1dff7

View file

@ -912,6 +912,9 @@ static bool rpc_luci_get_iwinfo(struct blob_buf *buf, const char *devname,
if (!iw->hwmodelist(devname, &nret)) { if (!iw->hwmodelist(devname, &nret)) {
a = blobmsg_open_array(buf, "hwmodes"); a = blobmsg_open_array(buf, "hwmodes");
if (nret & IWINFO_80211_AX)
blobmsg_add_string(buf, NULL, "ax");
if (nret & IWINFO_80211_AC) if (nret & IWINFO_80211_AC)
blobmsg_add_string(buf, NULL, "ac"); blobmsg_add_string(buf, NULL, "ac");
@ -954,6 +957,18 @@ static bool rpc_luci_get_iwinfo(struct blob_buf *buf, const char *devname,
if (nret & IWINFO_HTMODE_VHT160) if (nret & IWINFO_HTMODE_VHT160)
blobmsg_add_string(buf, NULL, "VHT160"); blobmsg_add_string(buf, NULL, "VHT160");
if (nret & IWINFO_HTMODE_HE20)
blobmsg_add_string(buf, NULL, "HE20");
if (nret & IWINFO_HTMODE_HE40)
blobmsg_add_string(buf, NULL, "HE40");
if (nret & IWINFO_HTMODE_HE80)
blobmsg_add_string(buf, NULL, "HE80");
if (nret & IWINFO_HTMODE_HE160)
blobmsg_add_string(buf, NULL, "HE160");
blobmsg_close_array(buf, a); blobmsg_close_array(buf, a);
} }