if (modes & IWINFO_HTMODE_VHT160)
blobmsg_add_string(&buf, NULL, "VHT160");
+ if (modes & IWINFO_HTMODE_HE20)
+ blobmsg_add_string(&buf, NULL, "HE20");
+
+ if (modes & IWINFO_HTMODE_HE40)
+ blobmsg_add_string(&buf, NULL, "HE40");
+
+ if (modes & IWINFO_HTMODE_HE80)
+ blobmsg_add_string(&buf, NULL, "HE80");
+
+ if (modes & IWINFO_HTMODE_HE80_80)
+ blobmsg_add_string(&buf, NULL, "HE80+80");
+
+ if (modes & IWINFO_HTMODE_HE160)
+ blobmsg_add_string(&buf, NULL, "HE160");
+
blobmsg_close_array(&buf, c);
}
}
if (modes & IWINFO_80211_AC)
blobmsg_add_string(&buf, NULL, "ac");
+ if (modes & IWINFO_80211_AX)
+ blobmsg_add_string(&buf, NULL, "ax");
+
if (modes & IWINFO_80211_A)
blobmsg_add_string(&buf, NULL, "a");
const char *hwmode_str;
const char *htmode_str;
int32_t htmode = 0;
+ int modes;
+
+ if (!iw->hwmodelist(ifname, &modes) && (modes == IWINFO_80211_AD)) {
+ blobmsg_add_string(&buf, "hwmode", "ad");
+ return;
+ }
if (iw->htmode(ifname, &htmode))
return;
htmode_str = "VHT160";
hwmode_str = "ac";
break;
+ case IWINFO_HTMODE_HE20:
+ htmode_str = "HE20";
+ hwmode_str = "ax";
+ break;
+ case IWINFO_HTMODE_HE40:
+ htmode_str = "HE40";
+ hwmode_str = "ax";
+ break;
+ case IWINFO_HTMODE_HE80:
+ htmode_str = "HE80";
+ hwmode_str = "ax";
+ break;
+ case IWINFO_HTMODE_HE80_80:
+ htmode_str = "HE80+80";
+ hwmode_str = "ax";
+ break;
+ case IWINFO_HTMODE_HE160:
+ htmode_str = "HE160";
+ hwmode_str = "ax";
+ break;
case IWINFO_HTMODE_NOHT:
htmode_str = "20";
hwmode_str = "a/g";
blobmsg_add_u32(&buf, "quality", e->quality);
blobmsg_add_u32(&buf, "quality_max", e->quality_max);
- t = blobmsg_open_table(&buf, "ht_operation");
- blobmsg_add_u32(&buf, "primary_channel", e->ht_chan_info.primary_chan);
- blobmsg_add_string(&buf, "secondary_channel_offset", ht_secondary_offset[e->ht_chan_info.secondary_chan_off]);
- blobmsg_add_u32(&buf, "channel_width", ht_chan_width[e->ht_chan_info.chan_width]);
- blobmsg_close_table(&buf, t);
+ if (e->ht_chan_info.primary_chan) {
+ t = blobmsg_open_table(&buf, "ht_operation");
+ blobmsg_add_u32(&buf, "primary_channel", e->ht_chan_info.primary_chan);
+ blobmsg_add_string(&buf, "secondary_channel_offset", ht_secondary_offset[e->ht_chan_info.secondary_chan_off]);
+ blobmsg_add_u32(&buf, "channel_width", ht_chan_width[e->ht_chan_info.chan_width]);
+ blobmsg_close_table(&buf, t);
+ }
if (e->vht_chan_info.center_chan_1) {
t = blobmsg_open_table(&buf, "vht_operation");
{
blobmsg_add_u8(&buf, "ht", r->is_ht);
blobmsg_add_u8(&buf, "vht", r->is_vht);
+ blobmsg_add_u8(&buf, "he", r->is_he);
blobmsg_add_u32(&buf, "mhz", r->mhz);
blobmsg_add_u32(&buf, "rate", r->rate);
blobmsg_add_u32(&buf, "nss", r->nss);
blobmsg_add_u8(&buf, "short_gi", r->is_short_gi);
}
+ else if (r->is_he) {
+ blobmsg_add_u32(&buf, "mcs", r->mcs);
+ blobmsg_add_u32(&buf, "nss", r->nss);
+ blobmsg_add_u32(&buf, "he_gi", r->he_gi);
+ blobmsg_add_u32(&buf, "he_dcm", r->he_dcm);
+ }
}
static int
char res[IWINFO_BUFSIZE];
struct iwinfo_assoclist_entry *a;
struct ether_addr *macaddr = NULL;
- void *c, *d, *e;
+ void *c = NULL, *d, *e;
struct blob_attr *tb[__RPC_A_MAX];
bool found = false;
};
static struct ubus_object_type iwinfo_type =
- UBUS_OBJECT_TYPE("luci-rpc-iwinfo", iwinfo_methods);
+ UBUS_OBJECT_TYPE("rpcd-plugin-iwinfo", iwinfo_methods);
static struct ubus_object obj = {
.name = "iwinfo",