Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3b15386 authored by Bapiraju Alla's avatar Bapiraju Alla
Browse files

qcacld-3.0: Add support to calibration failure events parsing

Currently there is no provision to get the calibration failure
information from the driver. Because of this it is getting difficult
to debug the calibration failure issues.

To simplify the calibration failure issue debugging, add support to
parse calibration failures events in the driver.

Change-Id: I6d831804cca259862fea3e8bb4af33d556138d43
CRs-Fixed: 3078926
parent 66a6bb36
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3338,6 +3338,7 @@ cppflags-$(CONFIG_RXDMA_ERR_PKT_DROP) += -DRXDMA_ERR_PKT_DROP
cppflags-$(CONFIG_MAX_ALLOC_PAGE_SIZE) += -DMAX_ALLOC_PAGE_SIZE
cppflags-$(CONFIG_DELIVERY_TO_STACK_STATUS_CHECK) += -DDELIVERY_TO_STACK_STATUS_CHECK
cppflags-$(CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS) += -DWLAN_TRACE_HIDE_MAC_ADDRESS
cppflags-$(CONFIG_WLAN_FEATURE_CAL_FAILURE_TRIGGER) += -DWLAN_FEATURE_CAL_FAILURE_TRIGGER

cppflags-$(CONFIG_LITHIUM) += -DFIX_TXDMA_LIMITATION
cppflags-$(CONFIG_LITHIUM) += -DFEATURE_AST
+2 −0
Original line number Diff line number Diff line
@@ -1231,3 +1231,5 @@ ifeq ($(CONFIG_FW_THERMAL_THROTTLE), y)
CONFIG_WLAN_THERMAL_MULTI_CLIENT_SUPPORT := y
endif
endif

CONFIG_WLAN_FEATURE_CAL_FAILURE_TRIGGER := y
+27 −0
Original line number Diff line number Diff line
@@ -14001,6 +14001,31 @@ static void hdd_thermal_stats_cmd_init(struct hdd_context *hdd_ctx)
}
#endif

#ifdef WLAN_FEATURE_CAL_FAILURE_TRIGGER
/**
 * hdd_cal_fail_send_event()- send calibration failure information
 * @cal_type: calibration type
 * @reason: reason for calibration failure
 *
 * This Function sends calibration failure diag event
 *
 * Return: void.
 */
static void hdd_cal_fail_send_event(uint8_t cal_type, uint8_t reason)
{
	/*
	 * For now we are going with the print. Once CST APK has support to
	 * read the diag events then we will add the diag event here.
	 */
	hdd_debug("Received cal failure event with cal_type:%x reason:%x",
		  cal_type, reason);
}
#else
static inline void hdd_cal_fail_send_event(uint8_t cal_type, uint8_t reason)
{
}
#endif

/**
 * hdd_features_init() - Init features
 * @hdd_ctx:	HDD context
@@ -14116,6 +14141,8 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
					       ALLOWED_KEYMGMT_6G_MASK);
	}
	hdd_thermal_stats_cmd_init(hdd_ctx);
	sme_set_cal_failure_event_cb(hdd_ctx->mac_handle,
				     hdd_cal_fail_send_event);

	hdd_exit();
	return 0;
+6 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -818,6 +819,10 @@ struct mac_context {
#ifdef FEATURE_ANI_LEVEL_REQUEST
	struct ani_level_params ani_params;
#endif

#ifdef WLAN_FEATURE_CAL_FAILURE_TRIGGER
	void (*cal_failure_event_cb)(uint8_t cal_type, uint8_t reason);
#endif
};

#ifdef FEATURE_WLAN_TDLS
+21 −0
Original line number Diff line number Diff line
@@ -2506,6 +2506,27 @@ sme_set_del_peers_ind_callback(mac_handle_t mac_handle,
void sme_set_chan_info_callback(mac_handle_t mac_handle,
			void (*callback)(struct scan_chan_info *chan_info));

#ifdef WLAN_FEATURE_CAL_FAILURE_TRIGGER
/**
 * sme_set_cal_failure_event_cb() - Register calibration failure event callback
 * @mac_handle - MAC global handle
 * @callback   - calibration failure event callback from HDD
 *
 * This API is invoked by HDD to register its callback to mac
 *
 * Return: None
 */
void sme_set_cal_failure_event_cb(
			mac_handle_t mac_handle,
			void (*callback)(uint8_t cal_type, uint8_t reason));
#else
static inline void
sme_set_cal_failure_event_cb(mac_handle_t mac_handle,
			     void (*callback)(uint8_t cal_type, uint8_t reason))
{
}
#endif

/**
 * sme_get_rssi_snr_by_bssid() - gets the rssi and snr by bssid from scan cache
 * @mac_handle: handle returned by mac_open
Loading