|
|
|
@ -1044,6 +1044,47 @@ int hostapd_ubus_handle_event(struct hostapd_data *hapd, struct hostapd_ubus_req |
|
|
|
|
blobmsg_add_u32(&b, "signal", req->frame_info->ssi_signal); |
|
|
|
|
blobmsg_add_u32(&b, "freq", hapd->iface->freq); |
|
|
|
|
|
|
|
|
|
if (req->elems) { |
|
|
|
|
if(req->elems->ht_capabilities) |
|
|
|
|
{ |
|
|
|
|
struct ieee80211_ht_capabilities *ht_capabilities; |
|
|
|
|
void *ht_cap, *ht_cap_mcs_set, *mcs_set; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ht_capabilities = (struct ieee80211_ht_capabilities*) req->elems->ht_capabilities; |
|
|
|
|
ht_cap = blobmsg_open_table(&b, "ht_capabilities"); |
|
|
|
|
blobmsg_add_u16(&b, "ht_capabilities_info", ht_capabilities->ht_capabilities_info); |
|
|
|
|
ht_cap_mcs_set = blobmsg_open_table(&b, "supported_mcs_set");
|
|
|
|
|
blobmsg_add_u16(&b, "a_mpdu_params", ht_capabilities->a_mpdu_params); |
|
|
|
|
blobmsg_add_u16(&b, "ht_extended_capabilities", ht_capabilities->ht_extended_capabilities); |
|
|
|
|
blobmsg_add_u32(&b, "tx_bf_capability_info", ht_capabilities->tx_bf_capability_info); |
|
|
|
|
blobmsg_add_u16(&b, "asel_capabilities", ht_capabilities->asel_capabilities); |
|
|
|
|
mcs_set = blobmsg_open_array(&b, "supported_mcs_set"); |
|
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
|
blobmsg_add_u16(&b, NULL, (u16) ht_capabilities->supported_mcs_set[i]); |
|
|
|
|
} |
|
|
|
|
blobmsg_close_array(&b, mcs_set); |
|
|
|
|
blobmsg_close_table(&b, ht_cap_mcs_set); |
|
|
|
|
blobmsg_close_table(&b, ht_cap);
|
|
|
|
|
} |
|
|
|
|
if(req->elems->vht_capabilities) |
|
|
|
|
{ |
|
|
|
|
struct ieee80211_vht_capabilities *vht_capabilities; |
|
|
|
|
void *vht_cap, *vht_cap_mcs_set; |
|
|
|
|
|
|
|
|
|
vht_capabilities = (struct ieee80211_vht_capabilities*) req->elems->vht_capabilities; |
|
|
|
|
vht_cap = blobmsg_open_table(&b, "vht_capabilities"); |
|
|
|
|
blobmsg_add_u32(&b, "vht_capabilities_info", vht_capabilities->vht_capabilities_info); |
|
|
|
|
vht_cap_mcs_set = blobmsg_open_table(&b, "vht_supported_mcs_set"); |
|
|
|
|
blobmsg_add_u16(&b, "rx_map", vht_capabilities->vht_supported_mcs_set.rx_map); |
|
|
|
|
blobmsg_add_u16(&b, "rx_highest", vht_capabilities->vht_supported_mcs_set.rx_highest); |
|
|
|
|
blobmsg_add_u16(&b, "tx_map", vht_capabilities->vht_supported_mcs_set.tx_map); |
|
|
|
|
blobmsg_add_u16(&b, "tx_highest", vht_capabilities->vht_supported_mcs_set.tx_highest); |
|
|
|
|
blobmsg_close_table(&b, vht_cap_mcs_set); |
|
|
|
|
blobmsg_close_table(&b, vht_cap); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!hapd->ubus.notify_response) { |
|
|
|
|
ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1); |
|
|
|
|
return WLAN_STATUS_SUCCESS; |
|
|
|
|