return ret;
}
+
+static void
+hostapd_parse_vht_capab_blobmsg(struct ieee80211_vht_capabilities *vht_capabilities)
+{
+ blobmsg_add_u32(&b, "raw", vht_capabilities->vht_capabilities_info);
+ blobmsg_add_u16(&b, "mcs_rx_map", vht_capabilities->vht_supported_mcs_set.rx_map);
+ blobmsg_add_u16(&b, "mcs_rx_highest", vht_capabilities->vht_supported_mcs_set.rx_highest);
+ blobmsg_add_u16(&b, "mcs_tx_map", vht_capabilities->vht_supported_mcs_set.tx_map);
+ blobmsg_add_u16(&b, "mcs_tx_highest", vht_capabilities->vht_supported_mcs_set.tx_highest);
+}
+
+static void
+hostapd_parse_ht_capab_blobmsg(struct ieee80211_ht_capabilities *ht_capabilities)
+{
+ blobmsg_add_u16(&b, "raw", ht_capabilities->ht_capabilities_info);
+}
+
+static void
+hostapd_parse_capab_blobmsg(struct sta_info *sta)
+{
+ void *r, *v;
+
+ v = blobmsg_open_table(&b, "capabilities");
+ if (sta->vht_capabilities) {
+ r = blobmsg_open_table(&b, "vht");
+ hostapd_parse_vht_capab_blobmsg(sta->vht_capabilities);
+ blobmsg_close_table(&b, r);
+ }
+
+ if (sta->ht_capabilities) {
+ r = blobmsg_open_table(&b, "ht");
+ hostapd_parse_ht_capab_blobmsg(sta->ht_capabilities);
+ blobmsg_close_table(&b, r);
+ }
+
+ blobmsg_close_table(&b, v);
+}
+
static int
hostapd_bss_get_clients(struct ubus_context *ctx, struct ubus_object *obj,
struct ubus_request_data *req, const char *method,
blobmsg_close_table(&b,r);
blobmsg_add_u32(&b, "signal", sta_driver_data.signal);
+ hostapd_parse_capab_blobmsg(sta);
+
blobmsg_close_table(&b, c);
}
blobmsg_close_array(&b, list);