Merge "qcacmn: Enable ML logging for wmi_control_rx"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
1b9461ae1a
@@ -40,6 +40,8 @@
|
||||
QDF_TRACE_INFO(QDF_MODULE_ID_REGULATORY, params)
|
||||
#define reg_debug(params...) \
|
||||
QDF_TRACE_DEBUG(QDF_MODULE_ID_REGULATORY, params)
|
||||
#define reg_debug_rl(params...) \
|
||||
QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_REGULATORY, params)
|
||||
|
||||
#define reg_nofl_alert(params...) \
|
||||
QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_REGULATORY, params)
|
||||
|
@@ -1848,17 +1848,16 @@ uint32_t reg_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
for (count = 0; count < NUM_CHANNELS; count++)
|
||||
if (chan_list[count].chan_num == chan_num) {
|
||||
if (reg_chan_in_range(chan_list,
|
||||
pdev_priv_obj->range_2g_low,
|
||||
pdev_priv_obj->range_2g_high,
|
||||
pdev_priv_obj->range_5g_low,
|
||||
pdev_priv_obj->range_5g_high,
|
||||
count)) {
|
||||
pdev_priv_obj->range_2g_low,
|
||||
pdev_priv_obj->range_2g_high,
|
||||
pdev_priv_obj->range_5g_low,
|
||||
pdev_priv_obj->range_5g_high,
|
||||
count)) {
|
||||
return chan_list[count].center_freq;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
reg_err("invalid channel %d", chan_num);
|
||||
reg_debug_rl("invalid channel %d", chan_num);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -874,9 +874,14 @@ QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
|
||||
QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
|
||||
struct nlo_mawc_params *params);
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
|
||||
uint8_t is_add_ts);
|
||||
|
||||
QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
|
||||
uint8_t vdev_id);
|
||||
#endif
|
||||
|
||||
QDF_STATUS wmi_unified_process_ll_stats_clear_cmd
|
||||
(void *wmi_hdl, const struct ll_stats_clear_params *clear_req,
|
||||
uint8_t addr[IEEE80211_ADDR_LEN]);
|
||||
@@ -1071,9 +1076,6 @@ QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
|
||||
QDF_STATUS wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
|
||||
struct ssid_hotlist_request_params *request);
|
||||
|
||||
QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
|
||||
uint8_t vdev_id);
|
||||
|
||||
QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
|
||||
struct wmi_unit_test_cmd *wmi_utest);
|
||||
|
||||
|
@@ -578,9 +578,14 @@ QDF_STATUS (*send_ipa_offload_control_cmd)(wmi_unified_t wmi_handle,
|
||||
struct ipa_uc_offload_control_params *ipa_offload);
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
QDF_STATUS (*send_set_ric_req_cmd)(wmi_unified_t wmi_handle, void *msg,
|
||||
uint8_t is_add_ts);
|
||||
|
||||
QDF_STATUS (*send_process_roam_synch_complete_cmd)(wmi_unified_t wmi_handle,
|
||||
uint8_t vdev_id);
|
||||
#endif
|
||||
|
||||
QDF_STATUS (*send_process_ll_stats_clear_cmd)
|
||||
(wmi_unified_t wmi_handle,
|
||||
const struct ll_stats_clear_params *clear_req,
|
||||
@@ -828,9 +833,6 @@ QDF_STATUS (*send_app_type1_params_in_fw_cmd)(wmi_unified_t wmi_handle,
|
||||
QDF_STATUS (*send_set_ssid_hotlist_cmd)(wmi_unified_t wmi_handle,
|
||||
struct ssid_hotlist_request_params *request);
|
||||
|
||||
QDF_STATUS (*send_process_roam_synch_complete_cmd)(wmi_unified_t wmi_handle,
|
||||
uint8_t vdev_id);
|
||||
|
||||
QDF_STATUS (*send_unit_test_cmd)(wmi_unified_t wmi_handle,
|
||||
struct wmi_unit_test_cmd *wmi_utest);
|
||||
|
||||
|
@@ -1966,6 +1966,33 @@ static struct wmi_unified *wmi_get_pdev_ep(struct wmi_soc *soc,
|
||||
return soc->wmi_pdev[i];
|
||||
}
|
||||
|
||||
/**
|
||||
* wmi_mtrace_rx() - Wrappper function for qdf_mtrace api
|
||||
* @message_id: 32-Bit Wmi message ID
|
||||
* @vdev_id: Vdev ID
|
||||
* @data: Actual message contents
|
||||
*
|
||||
* This function converts the 32-bit WMI message ID in 15-bit message ID
|
||||
* format for qdf_mtrace as in qdf_mtrace message there are only 15
|
||||
* bits reserved for message ID.
|
||||
* out of these 15-bits, 8-bits (From LSB) specifies the WMI_GRP_ID
|
||||
* and remaining 7-bits specifies the actual WMI command. With this
|
||||
* notation there can be maximum 256 groups and each group can have
|
||||
* max 128 commands can be supported.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void wmi_mtrace_rx(uint32_t message_id, uint16_t vdev_id, uint32_t data)
|
||||
{
|
||||
uint16_t mtrace_message_id;
|
||||
|
||||
mtrace_message_id = QDF_WMI_MTRACE_CMD_ID(message_id) |
|
||||
(QDF_WMI_MTRACE_GRP_ID(message_id) <<
|
||||
QDF_WMI_MTRACE_CMD_NUM_BITS);
|
||||
qdf_mtrace(QDF_MODULE_ID_WMI, QDF_MODULE_ID_WMA,
|
||||
mtrace_message_id, vdev_id, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* wmi_control_rx() - process fw events callbacks
|
||||
* @ctx: handle to wmi
|
||||
@@ -2001,6 +2028,7 @@ static void wmi_control_rx(void *ctx, HTC_PACKET *htc_packet)
|
||||
qdf_nbuf_free(evt_buf);
|
||||
return;
|
||||
}
|
||||
wmi_mtrace_rx(id, 0xFF, idx);
|
||||
qdf_spin_lock_bh(&soc->ctx_lock);
|
||||
exec_ctx = wmi_handle->ctx[idx];
|
||||
qdf_spin_unlock_bh(&soc->ctx_lock);
|
||||
|
@@ -1839,27 +1839,6 @@ QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* wmi_unified_set_ric_req_cmd() - set ric request element
|
||||
* @wmi_hdl: wmi handle
|
||||
* @msg: message
|
||||
* @is_add_ts: is addts required
|
||||
*
|
||||
* This function sets ric request element for 11r roaming.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
|
||||
uint8_t is_add_ts)
|
||||
{
|
||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||
|
||||
if (wmi_handle->ops->send_set_ric_req_cmd)
|
||||
return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg,
|
||||
is_add_ts);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
|
||||
/**
|
||||
* wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats
|
||||
@@ -2877,6 +2856,7 @@ wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
/**
|
||||
* wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
|
||||
* @wmi_hdl: wmi handle
|
||||
@@ -2898,6 +2878,28 @@ QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* wmi_unified_set_ric_req_cmd() - set ric request element
|
||||
* @wmi_hdl: wmi handle
|
||||
* @msg: message
|
||||
* @is_add_ts: is addts required
|
||||
*
|
||||
* This function sets ric request element for 11r roaming.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
|
||||
uint8_t is_add_ts)
|
||||
{
|
||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||
|
||||
if (wmi_handle->ops->send_set_ric_req_cmd)
|
||||
return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg,
|
||||
is_add_ts);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wmi_unified_fw_test_cmd() - send fw test command to fw.
|
||||
* @wmi_hdl: wmi handle
|
||||
|
@@ -7921,6 +7921,7 @@ static QDF_STATUS send_pno_start_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
/* send_set_ric_req_cmd_tlv() - set ric request element
|
||||
* @wmi_handle: wmi handle
|
||||
* @msg: message
|
||||
@@ -7971,10 +7972,8 @@ static QDF_STATUS send_set_ric_req_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
|
||||
if (is_add_ts)
|
||||
ptspecIE = &(((struct add_ts_param *) msg)->tspec);
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
else
|
||||
ptspecIE = &(((struct del_ts_params *) msg)->delTsInfo.tspec);
|
||||
#endif
|
||||
if (ptspecIE) {
|
||||
/* Fill the tsinfo in the format expected by firmware */
|
||||
#ifndef ANI_LITTLE_BIT_ENDIAN
|
||||
@@ -8018,6 +8017,49 @@ static QDF_STATUS send_set_ric_req_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_process_roam_synch_complete_cmd_tlv() - roam synch complete command to fw.
|
||||
* @wmi_handle: wmi handle
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* This function sends roam synch complete event to fw.
|
||||
*
|
||||
* Return: CDF STATUS
|
||||
*/
|
||||
static QDF_STATUS send_process_roam_synch_complete_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
wmi_roam_synch_complete_fixed_param *cmd;
|
||||
wmi_buf_t wmi_buf;
|
||||
uint8_t *buf_ptr;
|
||||
uint16_t len;
|
||||
len = sizeof(wmi_roam_synch_complete_fixed_param);
|
||||
|
||||
wmi_buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!wmi_buf) {
|
||||
WMI_LOGE("%s: wmi_buf_alloc failed", __func__);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
cmd = (wmi_roam_synch_complete_fixed_param *) wmi_buf_data(wmi_buf);
|
||||
buf_ptr = (uint8_t *) cmd;
|
||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
||||
WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param,
|
||||
WMITLV_GET_STRUCT_TLVLEN
|
||||
(wmi_roam_synch_complete_fixed_param));
|
||||
cmd->vdev_id = vdev_id;
|
||||
wmi_mtrace(WMI_ROAM_SYNCH_COMPLETE, cmd->vdev_id, 0);
|
||||
if (wmi_unified_cmd_send(wmi_handle, wmi_buf, len,
|
||||
WMI_ROAM_SYNCH_COMPLETE)) {
|
||||
WMI_LOGP("%s: failed to send roam synch confirmation",
|
||||
__func__);
|
||||
wmi_buf_free(wmi_buf);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
|
||||
/**
|
||||
* send_process_ll_stats_clear_cmd_tlv() - clear link layer stats
|
||||
@@ -15306,48 +15348,6 @@ send_set_ssid_hotlist_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_process_roam_synch_complete_cmd_tlv() - roam synch complete command to fw.
|
||||
* @wmi_handle: wmi handle
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* This function sends roam synch complete event to fw.
|
||||
*
|
||||
* Return: CDF STATUS
|
||||
*/
|
||||
static QDF_STATUS send_process_roam_synch_complete_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
wmi_roam_synch_complete_fixed_param *cmd;
|
||||
wmi_buf_t wmi_buf;
|
||||
uint8_t *buf_ptr;
|
||||
uint16_t len;
|
||||
len = sizeof(wmi_roam_synch_complete_fixed_param);
|
||||
|
||||
wmi_buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!wmi_buf) {
|
||||
WMI_LOGE("%s: wmi_buf_alloc failed", __func__);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
cmd = (wmi_roam_synch_complete_fixed_param *) wmi_buf_data(wmi_buf);
|
||||
buf_ptr = (uint8_t *) cmd;
|
||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
||||
WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param,
|
||||
WMITLV_GET_STRUCT_TLVLEN
|
||||
(wmi_roam_synch_complete_fixed_param));
|
||||
cmd->vdev_id = vdev_id;
|
||||
wmi_mtrace(WMI_ROAM_SYNCH_COMPLETE, cmd->vdev_id, 0);
|
||||
if (wmi_unified_cmd_send(wmi_handle, wmi_buf, len,
|
||||
WMI_ROAM_SYNCH_COMPLETE)) {
|
||||
WMI_LOGP("%s: failed to send roam synch confirmation",
|
||||
__func__);
|
||||
wmi_buf_free(wmi_buf);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_fw_test_cmd_tlv() - send fw test command to fw.
|
||||
* @wmi_handle: wmi handle
|
||||
@@ -22589,7 +22589,11 @@ struct wmi_ops tlv_ops = {
|
||||
.send_pno_stop_cmd = send_pno_stop_cmd_tlv,
|
||||
.send_pno_start_cmd = send_pno_start_cmd_tlv,
|
||||
.send_nlo_mawc_cmd = send_nlo_mawc_cmd_tlv,
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
.send_set_ric_req_cmd = send_set_ric_req_cmd_tlv,
|
||||
.send_process_roam_synch_complete_cmd =
|
||||
send_process_roam_synch_complete_cmd_tlv,
|
||||
#endif
|
||||
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
|
||||
.send_process_ll_stats_clear_cmd = send_process_ll_stats_clear_cmd_tlv,
|
||||
.send_process_ll_stats_set_cmd = send_process_ll_stats_set_cmd_tlv,
|
||||
@@ -22705,8 +22709,6 @@ struct wmi_ops tlv_ops = {
|
||||
.send_app_type1_params_in_fw_cmd =
|
||||
send_app_type1_params_in_fw_cmd_tlv,
|
||||
.send_set_ssid_hotlist_cmd = send_set_ssid_hotlist_cmd_tlv,
|
||||
.send_process_roam_synch_complete_cmd =
|
||||
send_process_roam_synch_complete_cmd_tlv,
|
||||
.send_unit_test_cmd = send_unit_test_cmd_tlv,
|
||||
.send_roam_invoke_cmd = send_roam_invoke_cmd_tlv,
|
||||
.send_roam_scan_offload_cmd = send_roam_scan_offload_cmd_tlv,
|
||||
|
Reference in New Issue
Block a user