for (i = 0; i < 3; i++)
if (c->wpa_version & (1 << i))
+ {
if (i)
pos += sprintf(pos, "WPA%d/", i + 1);
else
pos += sprintf(pos, "WPA/");
+ }
pos--;
lua_pushboolean(L, r->is_he);
lua_setfield(L, -2, rx ? "rx_he" : "tx_he");
- lua_pushnumber(L, r->mhz);
+ lua_pushboolean(L, r->is_eht);
+ lua_setfield(L, -2, rx ? "rx_eht" : "tx_eht");
+
+ lua_pushnumber(L, r->mhz_hi * 256 + r->mhz);
lua_setfield(L, -2, rx ? "rx_mhz" : "tx_mhz");
if (r->is_ht)
lua_pushboolean(L, r->is_short_gi);
lua_setfield(L, -2, rx ? "rx_short_gi" : "tx_short_gi");
}
- else if (r->is_vht || r->is_he)
+ else if (r->is_vht || r->is_he | r->is_eht)
{
lua_pushnumber(L, r->mcs);
lua_setfield(L, -2, rx ? "rx_mcs" : "tx_mcs");
lua_setfield(L, -2, rx ? "rx_he_dcm" : "tx_he_dcm");
}
+ if (r->is_eht) {
+ lua_pushnumber(L, r->eht_gi);
+ lua_setfield(L, -2, rx ? "rx_eht_gi" : "tx_eht_gi");
+ }
+
if (r->is_vht) {
lua_pushboolean(L, r->is_short_gi);
lua_setfield(L, -2, rx ? "rx_short_gi" : "tx_short_gi");
lua_pushboolean(L, hwmodes & IWINFO_80211_AX);
lua_setfield(L, -2, "ax");
+ lua_pushboolean(L, hwmodes & IWINFO_80211_BE);
+ lua_setfield(L, -2, "be");
+
return 1;
}
#endif
/* Wext */
+#ifdef USE_WEXT
LUA_WRAP_INT_OP(wext,channel)
LUA_WRAP_INT_OP(wext,frequency)
LUA_WRAP_INT_OP(wext,frequency_offset)
LUA_WRAP_STRUCT_OP(wext,encryption)
LUA_WRAP_STRUCT_OP(wext,mbssid_support)
LUA_WRAP_STRUCT_OP(wext,hardware_id)
+#endif
#ifdef USE_WL
/* Broadcom table */
#endif
/* Wext table */
+#ifdef USE_WEXT
static const luaL_reg R_wext[] = {
LUA_REG(wext,channel),
LUA_REG(wext,frequency),
LUA_REG(wext,phyname),
{ NULL, NULL }
};
+#endif
/* Common */
static const luaL_reg R_common[] = {
lua_setfield(L, -2, "nl80211");
#endif
+#ifdef USE_WEXT
luaL_newmetatable(L, IWINFO_WEXT_META);
luaL_register(L, NULL, R_common);
luaL_register(L, NULL, R_wext);
lua_pushvalue(L, -1);
lua_setfield(L, -2, "__index");
lua_setfield(L, -2, "wext");
+#endif
return 1;
}