Przeglądaj źródła

qcacld-3.0: Remove legacy congestion stats implementation

Driver has a stats infrastructure and all the stats related
commands are using this infrastructure.

Remove legacy implementation for congestion stats command
as part of cleanup.

Change-Id: Ia8b919ad7cea4f47d5480b9f8e0f4636783ce6c3
CRs-Fixed: 2480246
Ashish Kumar Dhanotiya 5 lat temu
rodzic
commit
30ec2959d5

+ 0 - 1
core/hdd/inc/wlan_hdd_assoc.h

@@ -204,7 +204,6 @@ struct hdd_connection_info {
 	uint32_t roam_count;
 	int8_t signal;
 	int32_t assoc_status_code;
-	uint32_t cca;
 	tCsrSSIDInfo last_ssid;
 	enum csr_akm_type last_auth_type;
 	char auth_time[HDD_TIME_STRING_LEN];

+ 0 - 23
core/hdd/src/wlan_hdd_cfg80211.c

@@ -11280,29 +11280,6 @@ end:
 	return err;
 }
 
-void hdd_update_cca_info_cb(hdd_handle_t hdd_handle, uint32_t congestion,
-			    uint32_t vdev_id)
-{
-	struct hdd_context *hdd_ctx = hdd_handle_to_context(hdd_handle);
-	int status;
-	struct hdd_adapter *adapter = NULL;
-	struct hdd_station_ctx *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) {
-		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 },

+ 0 - 11
core/hdd/src/wlan_hdd_cfg80211.h

@@ -546,17 +546,6 @@ int wlan_hdd_try_disconnect(struct hdd_adapter *adapter);
  */
 int wlan_hdd_disconnect(struct hdd_adapter *adapter, u16 reason);
 
-/**
- * hdd_update_cca_info_cb() - stores congestion value in station context
- * @hdd_handle: HDD handle
- * @congestion: congestion
- * @vdev_id: vdev id
- *
- * Return: None
- */
-void hdd_update_cca_info_cb(hdd_handle_t hdd_handle, uint32_t congestion,
-			    uint32_t vdev_id);
-
 /**
  * wlan_hdd_get_adjacent_chan(): Gets next/previous channel
  * to the channel passed.

+ 0 - 5
core/hdd/src/wlan_hdd_main.c

@@ -12332,11 +12332,6 @@ int hdd_register_cb(struct hdd_context *hdd_ctx)
 					    hdd_set_connection_in_progress,
 					    hdd_is_connection_in_progress);
 
-	status = sme_congestion_register_callback(mac_handle,
-						  hdd_update_cca_info_cb);
-	if (!QDF_IS_STATUS_SUCCESS(status))
-		hdd_err("set congestion callback failed");
-
 	status = sme_set_bt_activity_info_cb(mac_handle,
 					     hdd_bt_activity_cb);
 	if (!QDF_IS_STATUS_SUCCESS(status))

+ 0 - 12
core/hdd/src/wlan_hdd_station_info.c

@@ -119,7 +119,6 @@ hdd_get_station_policy[STATION_MAX + 1] = {
 	[STATION_REMOTE] = {.type = NLA_BINARY, .len = QDF_MAC_ADDR_SIZE},
 };
 
-#ifdef QCA_SUPPORT_CP_STATS
 static int hdd_get_sta_congestion(struct hdd_adapter *adapter,
 				  uint32_t *congestion)
 {
@@ -133,17 +132,6 @@ static int hdd_get_sta_congestion(struct hdd_adapter *adapter,
 	*congestion = cca_stats.congestion;
 	return 0;
 }
-#else
-static int hdd_get_sta_congestion(struct hdd_adapter *adapter,
-				  uint32_t *congestion)
-{
-	struct hdd_station_ctx *hdd_sta_ctx;
-
-	hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
-	*congestion = hdd_sta_ctx->conn_info.cca;
-	return 0;
-}
-#endif
 
 /**
  * hdd_get_station_assoc_fail() - Handle get station assoc fail

+ 0 - 9
core/sme/inc/sme_api.h

@@ -2076,15 +2076,6 @@ QDF_STATUS sme_roam_invoke_nud_fail(mac_handle_t mac_handle, uint8_t vdev_id)
 }
 
 #endif
-/**
- * sme_congestion_register_callback() - registers congestion callback
- * @mac_handle: Opaque handle to the global MAC context
- * @congestion_cb: congestion callback
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS sme_congestion_register_callback(mac_handle_t mac_handle,
-					    congestion_cb congestion_cb);
 
 /**
  * sme_register_tx_queue_cb(): Register tx queue callback

+ 0 - 10
core/sme/inc/sme_internal.h

@@ -225,15 +225,6 @@ typedef void (*pwr_save_fail_cb)(hdd_handle_t hdd_handle,
 typedef void (*bt_activity_info_cb)(hdd_handle_t hdd_handle,
 				    uint32_t bt_activity);
 
-/**
- * typedef congestion_cb - congestion callback function
- * @hdd_handle: HDD handle registered with SME
- * @congestion: Current congestion value
- * @vdev_id: ID of the vdev for which congestion is being reported
- */
-typedef void (*congestion_cb)(hdd_handle_t hdd_handle, uint32_t congestion,
-			      uint32_t vdev_id);
-
 /**
  * typedef rso_cmd_status_cb - RSO command status  callback function
  * @hdd_handle: HDD handle registered with SME
@@ -364,7 +355,6 @@ struct sme_context {
 	bool (*get_connection_info_cb)(uint8_t *session_id,
 			enum scan_reject_states *reason);
 	rso_cmd_status_cb rso_cmd_status_cb;
-	congestion_cb congestion_cb;
 	pwr_save_fail_cb chip_power_save_fail_cb;
 	bt_activity_info_cb bt_activity_info_cb;
 	void *get_arp_stats_context;

+ 0 - 16
core/sme/src/common/sme_api.c

@@ -14286,22 +14286,6 @@ void sme_store_pdev(mac_handle_t mac_handle, struct wlan_objmgr_pdev *pdev)
 	pdev->pdev_nif.pdev_fw_caps |= SUPPORTED_CRYPTO_CAPS;
 }
 
-QDF_STATUS sme_congestion_register_callback(mac_handle_t mac_handle,
-					    congestion_cb congestion_cb)
-{
-	QDF_STATUS status;
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-
-	status = sme_acquire_global_lock(&mac->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		mac->sme.congestion_cb = congestion_cb;
-		sme_release_global_lock(&mac->sme);
-		sme_debug("congestion callback set");
-	}
-
-	return status;
-}
-
 QDF_STATUS sme_register_tx_queue_cb(mac_handle_t mac_handle,
 				    tx_queue_cb tx_queue_cb)
 {

+ 0 - 25
core/wma/src/wma_utils.c

@@ -3095,7 +3095,6 @@ int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
 	uint32_t i;
 	uint32_t buf_len = 0;
 	bool excess_data = false;
-	wmi_congestion_stats *congestion_stats;
 	struct mac_context *mac;
 
 	param_buf = (WMI_UPDATE_STATS_EVENTID_param_tlvs *) cmd_param_info;
@@ -3223,30 +3222,6 @@ int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
 		}
 	}
 
-	congestion_stats = (wmi_congestion_stats *) param_buf->congestion_stats;
-	if (congestion_stats) {
-		if (((congestion_stats->tlv_header & 0xFFFF0000) >> 16 ==
-			  WMITLV_TAG_STRUC_wmi_congestion_stats) &&
-			  ((congestion_stats->tlv_header & 0x0000FFFF) ==
-			  WMITLV_GET_STRUCT_TLVLEN(wmi_congestion_stats))) {
-			mac = cds_get_context(QDF_MODULE_ID_PE);
-			if (!mac) {
-				WMA_LOGE("%s: Invalid mac", __func__);
-				return -EINVAL;
-			}
-			if (!mac->sme.congestion_cb) {
-				WMA_LOGE("%s: Callback not registered",
-					__func__);
-				return -EINVAL;
-			}
-			WMA_LOGI("%s: congestion %d", __func__,
-				congestion_stats->congestion);
-			mac->sme.congestion_cb(mac->hdd_handle,
-				congestion_stats->congestion,
-				congestion_stats->vdev_id);
-		}
-	}
-
 	for (i = 0; i < wma->max_bssid; i++) {
 		node = &wma->interfaces[i];
 		if (node->fw_stats_set & FW_PEER_STATS_SET)