From b4dd5a04601b9095655ef77a8cf779706bba6714 Mon Sep 17 00:00:00 2001 From: PolynomialDivision Date: Tue, 29 May 2018 20:07:38 +0200 Subject: [PATCH] add suports --- src/utils/dawn_iwinfo.c | 4 ++-- src/utils/ubus.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/dawn_iwinfo.c b/src/utils/dawn_iwinfo.c index 028c0f1..196c814 100644 --- a/src/utils/dawn_iwinfo.c +++ b/src/utils/dawn_iwinfo.c @@ -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; } \ No newline at end of file diff --git a/src/utils/ubus.c b/src/utils/ubus.c index 87e5ac6..872c03f 100644 --- a/src/utils/ubus.c +++ b/src/utils/ubus.c @@ -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);