support vht

This commit is contained in:
PolynomialDivision 2018-05-29 20:06:27 +02:00
parent 2c13c27b94
commit 237437e847
2 changed files with 23 additions and 1 deletions

View file

@ -61,4 +61,8 @@ int get_ssid(const char *ifname, char *ssid);
int get_channel_utilization(const char *ifname, uint64_t *last_channel_time, uint64_t *last_channel_time_busy);
int support_ht(const char *ifname);
int support_vht(const char *ifname);
#endif //DAWN_RSSI_H

View file

@ -312,8 +312,26 @@ int support_ht(const char *ifname) {
return 0;
}
uint32_t ht_support_bitmask = (1 << 2) | (1 << 3);
uint32_t ht_support_bitmask = (1 << 0) | (1 << 2);
int ret = htmodes & ht_support_bitmask;
iwinfo_finish();
return ret;
}
int support_vht(const char *ifname) {
const struct iwinfo_ops *iw;
iw = iwinfo_backend(ifname);
int htmodes = 0;
if (iw->htmodelist(ifname, &htmodes))
{
printf("No HT mode information available\n");
return 0;
}
uint32_t vht_support_bitmask = (1 << 2) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5) | (1 << 6);
int ret = htmodes & vht_support_bitmask;
iwinfo_finish();
return ret;
}