From: Chad Monroe Date: Thu, 20 Jun 2024 23:52:21 +0000 (-0700) Subject: rpcd: iwinfo: add IEEE 802.11be support X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=9f4b86e70352ab9ca6aa272d096419acc53e2390;p=project%2Frpcd.git rpcd: iwinfo: add IEEE 802.11be support Add basic IEEE 802.11be support for rpcd iwinfo commands. Signed-off-by: Chad Monroe --- 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