#define IWINFO_80211_G (1 << 2)
#define IWINFO_80211_N (1 << 3)
#define IWINFO_80211_AC (1 << 4)
+#define IWINFO_80211_AD (1 << 5)
#define IWINFO_CIPHER_NONE (1 << 0)
#define IWINFO_CIPHER_WEP40 (1 << 1)
#define IWINFO_FREQ_NO_HT40MINUS (1 << 3)
#define IWINFO_FREQ_NO_80MHZ (1 << 4)
#define IWINFO_FREQ_NO_160MHZ (1 << 5)
+#define IWINFO_FREQ_NO_2160MHZ (1 << 6)
extern const char *IWINFO_CIPHER_NAMES[IWINFO_CIPHER_COUNT];
extern const char *IWINFO_KMGMT_NAMES[IWINFO_KMGMT_COUNT];
static char * format_hwmodes(int modes)
{
- static char buf[12];
+ static char buf[15];
if (modes <= 0)
snprintf(buf, sizeof(buf), "unknown");
else
- snprintf(buf, sizeof(buf), "802.11%s%s%s%s%s",
+ snprintf(buf, sizeof(buf), "802.11%s%s%s%s%s%s",
(modes & IWINFO_80211_A) ? "a" : "",
(modes & IWINFO_80211_B) ? "b" : "",
(modes & IWINFO_80211_G) ? "g" : "",
(modes & IWINFO_80211_N) ? "n" : "",
- (modes & IWINFO_80211_AC) ? "ac" : "");
+ (modes & IWINFO_80211_AC) ? "ac" : "",
+ (modes & IWINFO_80211_AD) ? "ad" : "");
return buf;
}
lua_pushboolean(L, hwmodes & IWINFO_80211_AC);
lua_setfield(L, -2, "ac");
+ lua_pushboolean(L, hwmodes & IWINFO_80211_AD);
+ lua_setfield(L, -2, "ad");
+
return 1;
}
return (freq - 2407) / 5;
else if (freq >= 4910 && freq <= 4980)
return (freq - 4000) / 5;
+ else if(freq >= 56160 + 2160 * 1 && freq <= 56160 + 2160 * 6)
+ return (freq - 56160) / 2160;
else
return (freq - 5000) / 5;
}
else if (channel < 14)
return (channel * 5) + 2407;
}
+ else if ( strcmp(band, "ad") == 0)
+ {
+ return 56160 + 2160 * channel;
+ }
else
{
if (channel >= 182 && channel <= 196)
}
}
}
+ else if (nla_get_u32(freqs[NL80211_FREQUENCY_ATTR_FREQ]) >= 56160)
+ {
+ m->hw |= IWINFO_80211_AD;
+ }
else if (!(m->hw & IWINFO_80211_AC))
{
m->hw |= IWINFO_80211_A;