mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
use htmodes
This commit is contained in:
parent
3a81f22178
commit
2c13c27b94
2 changed files with 20 additions and 0 deletions
|
@ -298,4 +298,22 @@ int get_channel_utilization(const char *ifname, uint64_t *last_channel_time, uin
|
||||||
printf("GOT SURVEY INFO!\n");
|
printf("GOT SURVEY INFO!\n");
|
||||||
return (int)(dividend * 255 / divisor);
|
return (int)(dividend * 255 / divisor);
|
||||||
iwinfo_finish();
|
iwinfo_finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
int support_ht(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 ht_support_bitmask = (1 << 2) | (1 << 3);
|
||||||
|
int ret = htmodes & ht_support_bitmask;
|
||||||
|
iwinfo_finish();
|
||||||
|
return ret;
|
||||||
}
|
}
|
|
@ -724,6 +724,8 @@ static int add_subscriber(char *name) {
|
||||||
get_ssid(name, hostapd_entry->ssid);
|
get_ssid(name, hostapd_entry->ssid);
|
||||||
|
|
||||||
// TODO: here we need to add ht and vht supported!!!
|
// TODO: here we need to add ht and vht supported!!!
|
||||||
|
// actually we wanted to use an ubus call but for now we can use libiwinfo
|
||||||
|
|
||||||
|
|
||||||
ret = ubus_register_subscriber(ctx, &hostapd_entry->subscriber);
|
ret = ubus_register_subscriber(ctx, &hostapd_entry->subscriber);
|
||||||
ret = ubus_subscribe( ctx, &hostapd_entry->subscriber, id);
|
ret = ubus_subscribe( ctx, &hostapd_entry->subscriber, id);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue