summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Monroe2024-06-20 23:52:21 +0000
committerDaniel Golle2024-09-17 17:06:44 +0000
commit9f4b86e70352ab9ca6aa272d096419acc53e2390 (patch)
treeaa5477bd8702696955f608cd587433436e1d42c3
parentbcc091d2f15c8ec258488964abfb335c9e969153 (diff)
downloadrpcd-9f4b86e70352ab9ca6aa272d096419acc53e2390.tar.gz
rpcd: iwinfo: add IEEE 802.11be support
Add basic IEEE 802.11be support for rpcd iwinfo commands. Signed-off-by: Chad Monroe <chad@monroe.io>
-rw-r--r--iwinfo.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/iwinfo.c b/iwinfo.c
index f8dec80..ff0f38b 100644
--- a/iwinfo.c
+++ b/iwinfo.c
@@ -284,8 +284,20 @@ static void rpc_iwinfo_call_hw_ht_mode(int hwmodelist)
hwmode_str = "ac";
else if (iwinfo_htmode_is_he(htmode))
hwmode_str = "ax";
- else
- hwmode_str = "a/g";
+ else if (iwinfo_htmode_is_eht(htmode))
+ hwmode_str = "be";
+ else {
+ if (hwmodelist & IWINFO_80211_N)
+ hwmode_str = "n";
+ else if (hwmodelist & IWINFO_80211_G)
+ hwmode_str = "g";
+ else if (hwmodelist & IWINFO_80211_B)
+ hwmode_str = "b";
+ else if (hwmodelist & IWINFO_80211_A)
+ hwmode_str = "a";
+ else
+ hwmode_str = "unknown";
+ }
} else
htmode_str = hwmode_str = "unknown";
@@ -446,7 +458,8 @@ rpc_iwinfo_add_rateinfo(struct iwinfo_rate_entry *r)
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_u8(&buf, "eht", r->is_eht);
+ blobmsg_add_u32(&buf, "mhz", r->mhz_hi * 256 + r->mhz);
blobmsg_add_u32(&buf, "rate", r->rate);
if (r->is_ht) {
@@ -465,6 +478,11 @@ rpc_iwinfo_add_rateinfo(struct iwinfo_rate_entry *r)
blobmsg_add_u32(&buf, "he_gi", r->he_gi);
blobmsg_add_u32(&buf, "he_dcm", r->he_dcm);
}
+ else if (r->is_eht) {
+ blobmsg_add_u32(&buf, "mcs", r->mcs);
+ blobmsg_add_u32(&buf, "nss", r->nss);
+ blobmsg_add_u32(&buf, "eht_gi", r->eht_gi);
+ }
}
static int