mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
support vht
This commit is contained in:
parent
2c13c27b94
commit
237437e847
2 changed files with 23 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue