summaryrefslogtreecommitdiff
path: root/iwinfo_lua.c
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2021-04-17 23:05:16 +0200
committerDavid Bauer <mail@david-bauer.net>2021-05-02 00:20:54 +0200
commitc45f0b584b4b86f8250f90ea19afca271c114fa2 (patch)
treea952946871da252ca62d4426e905f285870e2a14 /iwinfo_lua.c
parentcd23727f72b7859ba572c4e273247578c2124926 (diff)
downloadiwinfo-c45f0b584b4b86f8250f90ea19afca271c114fa2.tar.gz
iwinfo: add 802.11ax HE rate information
This adds 802.11ax HE specific rate information to iwinfo. Add fields for HE status of a STA as well as DCM and guard interval fields specific to HE operation. Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'iwinfo_lua.c')
-rw-r--r--iwinfo_lua.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/iwinfo_lua.c b/iwinfo_lua.c
index 9935a8d..e49e454 100644
--- a/iwinfo_lua.c
+++ b/iwinfo_lua.c
@@ -268,6 +268,9 @@ static void set_rateinfo(lua_State *L, struct iwinfo_rate_entry *r, bool rx)
lua_pushboolean(L, r->is_vht);
lua_setfield(L, -2, rx ? "rx_vht" : "tx_vht");
+ lua_pushboolean(L, r->is_he);
+ lua_setfield(L, -2, rx ? "rx_he" : "tx_he");
+
lua_pushnumber(L, r->mhz);
lua_setfield(L, -2, rx ? "rx_mhz" : "tx_mhz");
@@ -282,7 +285,7 @@ static void set_rateinfo(lua_State *L, struct iwinfo_rate_entry *r, bool rx)
lua_pushboolean(L, r->is_short_gi);
lua_setfield(L, -2, rx ? "rx_short_gi" : "tx_short_gi");
}
- else if (r->is_vht)
+ else if (r->is_vht || r->is_he)
{
lua_pushnumber(L, r->mcs);
lua_setfield(L, -2, rx ? "rx_mcs" : "tx_mcs");
@@ -290,8 +293,18 @@ static void set_rateinfo(lua_State *L, struct iwinfo_rate_entry *r, bool rx)
lua_pushnumber(L, r->nss);
lua_setfield(L, -2, rx ? "rx_nss" : "tx_nss");
- lua_pushboolean(L, r->is_short_gi);
- lua_setfield(L, -2, rx ? "rx_short_gi" : "tx_short_gi");
+ if (r->is_he) {
+ lua_pushnumber(L, r->he_gi);
+ lua_setfield(L, -2, rx ? "rx_he_gi" : "tx_he_gi");
+
+ lua_pushnumber(L, r->he_dcm);
+ lua_setfield(L, -2, rx ? "rx_he_dcm" : "tx_he_dcm");
+ }
+
+ if (r->is_vht) {
+ lua_pushboolean(L, r->is_short_gi);
+ lua_setfield(L, -2, rx ? "rx_short_gi" : "tx_short_gi");
+ }
}
}