add suports

This commit is contained in:
PolynomialDivision 2018-05-29 20:07:38 +02:00
parent 237437e847
commit b4dd5a0460
2 changed files with 4 additions and 2 deletions

View file

@ -313,7 +313,7 @@ int support_ht(const char *ifname) {
}
uint32_t ht_support_bitmask = (1 << 0) | (1 << 2);
int ret = htmodes & ht_support_bitmask;
int ret = htmodes & ht_support_bitmask ? 1 : 0;
iwinfo_finish();
return ret;
}
@ -331,7 +331,7 @@ int support_vht(const char *ifname) {
}
uint32_t vht_support_bitmask = (1 << 2) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5) | (1 << 6);
int ret = htmodes & vht_support_bitmask;
int ret = htmodes & vht_support_bitmask ? 1 : 0;
iwinfo_finish();
return ret;
}

View file

@ -725,6 +725,8 @@ static int add_subscriber(char *name) {
// 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
hostapd_entry->ht = (uint8_t) support_ht(name);
hostapd_entry->vht = (uint8_t) support_vht(name);
ret = ubus_register_subscriber(ctx, &hostapd_entry->subscriber);