qcacld-3.0: Get CCA from firmware
Requirement is to get CCA from frmware when connection fails due to
assoc/auth/probe response timeout.
Change-Id: I062343ed065d7b0c38b9e3b24ecfa9851b9b1537
CRs-Fixed: 2018594
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 6ff3e7c..f1de64c 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -3515,6 +3515,14 @@
hdd_err("put fail");
goto fail;
}
+
+ hdd_info("congestion:%d", hdd_sta_ctx->conn_info.cca);
+ if (nla_put_u32(skb, NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY,
+ hdd_sta_ctx->conn_info.cca)) {
+ hdd_err("put fail");
+ goto fail;
+ }
+
return cfg80211_vendor_cmd_reply(skb);
fail:
if (skb)
@@ -9334,6 +9342,30 @@
return ret;
}
+
+void hdd_update_cca_info_cb(void *context, uint32_t congestion,
+ uint32_t vdev_id)
+{
+ hdd_context_t *hdd_ctx = (hdd_context_t *)context;
+ int status;
+ hdd_adapter_t *adapter = NULL;
+ hdd_station_ctx_t *hdd_sta_ctx;
+
+ status = wlan_hdd_validate_context(hdd_ctx);
+ if (status != 0)
+ return;
+
+ adapter = hdd_get_adapter_by_vdev(hdd_ctx, vdev_id);
+ if (adapter == NULL) {
+ hdd_err("vdev_id %d does not exist with host", vdev_id);
+ return;
+ }
+
+ hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
+ hdd_sta_ctx->conn_info.cca = congestion;
+ hdd_info("congestion:%d", congestion);
+}
+
static const struct nla_policy qca_wlan_vendor_set_trace_level_policy[
QCA_WLAN_VENDOR_ATTR_SET_TRACE_LEVEL_MAX + 1] = {
[QCA_WLAN_VENDOR_ATTR_SET_TRACE_LEVEL_PARAM] = {.type = NLA_NESTED },