mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: Replace soc level references of set hw request and response
Replace the obsolete WMI command WMI_SOC_SET_HW_MODE_CMDID with WMI_PDEV_SET_HW_MODE_CMDID and event WMI_SOC_SET_HW_MODE_RESP_EVENTID with WMI_PDEV_SET_HW_MODE_RESP_EVENTID respectively. These new WMI commands and events additionally carry the pdev id and all mac id references are replaced with pdev id. Change-Id: If2a3f93dcd1947eedce8d4eac8ed936166f7e078 CRs-Fixed: 989502
This commit is contained in:
parent
91152df26b
commit
d96403461f
11 changed files with 51 additions and 43 deletions
|
|
@ -698,7 +698,7 @@ static inline struct cds_conc_connection_info *cds_get_conn_info(uint32_t *len)
|
|||
|
||||
enum cds_con_mode cds_convert_device_mode_to_qdf_type(
|
||||
enum tQDF_ADAPTER_MODE device_mode);
|
||||
QDF_STATUS cds_soc_set_hw_mode(uint32_t session_id,
|
||||
QDF_STATUS cds_pdev_set_hw_mode(uint32_t session_id,
|
||||
enum hw_mode_ss_config mac0_ss,
|
||||
enum hw_mode_bandwidth mac0_bw,
|
||||
enum hw_mode_ss_config mac1_ss,
|
||||
|
|
|
|||
|
|
@ -2379,7 +2379,7 @@ void cds_set_dual_mac_fw_mode_config(uint8_t dbs, uint8_t dfs)
|
|||
}
|
||||
|
||||
/**
|
||||
* cds_soc_set_hw_mode_cb() - Callback for set hw mode
|
||||
* cds_pdev_set_hw_mode_cb() - Callback for set hw mode
|
||||
* @status: Status
|
||||
* @cfgd_hw_mode_index: Configured HW mode index
|
||||
* @num_vdev_mac_entries: Number of vdev-mac id mapping that follows
|
||||
|
|
@ -2391,7 +2391,7 @@ void cds_set_dual_mac_fw_mode_config(uint8_t dbs, uint8_t dfs)
|
|||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void cds_soc_set_hw_mode_cb(uint32_t status,
|
||||
static void cds_pdev_set_hw_mode_cb(uint32_t status,
|
||||
uint32_t cfgd_hw_mode_index,
|
||||
uint32_t num_vdev_mac_entries,
|
||||
struct sir_vdev_mac_map *vdev_mac_map)
|
||||
|
|
@ -2498,7 +2498,7 @@ static void cds_hw_mode_transition_cb(uint32_t old_hw_mode_index,
|
|||
}
|
||||
|
||||
/**
|
||||
* cds_soc_set_hw_mode() - Set HW mode command to SME
|
||||
* cds_pdev_set_hw_mode() - Set HW mode command to SME
|
||||
* @session_id: Session ID
|
||||
* @mac0_ss: MAC0 spatial stream configuration
|
||||
* @mac0_bw: MAC0 bandwidth configuration
|
||||
|
|
@ -2526,7 +2526,7 @@ static void cds_hw_mode_transition_cb(uint32_t old_hw_mode_index,
|
|||
*
|
||||
* Return: Success if the message made it down to the next layer
|
||||
*/
|
||||
QDF_STATUS cds_soc_set_hw_mode(uint32_t session_id,
|
||||
QDF_STATUS cds_pdev_set_hw_mode(uint32_t session_id,
|
||||
enum hw_mode_ss_config mac0_ss,
|
||||
enum hw_mode_bandwidth mac0_bw,
|
||||
enum hw_mode_ss_config mac1_ss,
|
||||
|
|
@ -2554,14 +2554,14 @@ QDF_STATUS cds_soc_set_hw_mode(uint32_t session_id,
|
|||
}
|
||||
|
||||
msg.hw_mode_index = hw_mode_index;
|
||||
msg.set_hw_mode_cb = (void *)cds_soc_set_hw_mode_cb;
|
||||
msg.set_hw_mode_cb = (void *)cds_pdev_set_hw_mode_cb;
|
||||
msg.reason = reason;
|
||||
msg.session_id = session_id;
|
||||
|
||||
cds_info("set hw mode to sme: hw_mode_index: %d session:%d reason:%d",
|
||||
msg.hw_mode_index, msg.session_id, msg.reason);
|
||||
|
||||
status = sme_soc_set_hw_mode(hdd_ctx->hHal, msg);
|
||||
status = sme_pdev_set_hw_mode(hdd_ctx->hHal, msg);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
cds_err("Failed to set hw mode to SME");
|
||||
return status;
|
||||
|
|
@ -6214,7 +6214,7 @@ QDF_STATUS cds_next_actions(uint32_t session_id,
|
|||
session_id);
|
||||
break;
|
||||
case CDS_DBS:
|
||||
status = cds_soc_set_hw_mode(session_id,
|
||||
status = cds_pdev_set_hw_mode(session_id,
|
||||
HW_MODE_SS_1x1,
|
||||
HW_MODE_80_MHZ,
|
||||
HW_MODE_SS_1x1, HW_MODE_40_MHZ,
|
||||
|
|
@ -6232,7 +6232,7 @@ QDF_STATUS cds_next_actions(uint32_t session_id,
|
|||
session_id);
|
||||
break;
|
||||
case CDS_MCC:
|
||||
status = cds_soc_set_hw_mode(session_id,
|
||||
status = cds_pdev_set_hw_mode(session_id,
|
||||
HW_MODE_SS_2x2,
|
||||
HW_MODE_80_MHZ,
|
||||
HW_MODE_SS_0x0, HW_MODE_BW_NONE,
|
||||
|
|
|
|||
|
|
@ -8041,7 +8041,7 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
|
|||
if (apps_args[0] == 0) {
|
||||
hddLog(LOGE,
|
||||
FL("set hw mode for single mac\n"));
|
||||
cds_soc_set_hw_mode(
|
||||
cds_pdev_set_hw_mode(
|
||||
pAdapter->sessionId,
|
||||
HW_MODE_SS_2x2,
|
||||
HW_MODE_80_MHZ,
|
||||
|
|
@ -8052,7 +8052,7 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
|
|||
} else if (apps_args[0] == 1) {
|
||||
hddLog(LOGE,
|
||||
FL("set hw mode for dual mac\n"));
|
||||
cds_soc_set_hw_mode(
|
||||
cds_pdev_set_hw_mode(
|
||||
pAdapter->sessionId,
|
||||
HW_MODE_SS_1x1,
|
||||
HW_MODE_80_MHZ,
|
||||
|
|
|
|||
|
|
@ -587,8 +587,8 @@ typedef struct sSirMbMsgP2p {
|
|||
|
||||
#define SIR_HAL_FW_MEM_DUMP_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 327)
|
||||
#define SIR_HAL_START_STOP_LOGGING (SIR_HAL_ITC_MSG_TYPES_BEGIN + 328)
|
||||
#define SIR_HAL_SOC_SET_HW_MODE (SIR_HAL_ITC_MSG_TYPES_BEGIN + 329)
|
||||
#define SIR_HAL_SOC_SET_HW_MODE_RESP (SIR_HAL_ITC_MSG_TYPES_BEGIN + 330)
|
||||
#define SIR_HAL_PDEV_SET_HW_MODE (SIR_HAL_ITC_MSG_TYPES_BEGIN + 329)
|
||||
#define SIR_HAL_PDEV_SET_HW_MODE_RESP (SIR_HAL_ITC_MSG_TYPES_BEGIN + 330)
|
||||
#define SIR_HAL_SOC_HW_MODE_TRANS_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 331)
|
||||
|
||||
#define SIR_HAL_SET_RSSI_MONITOR_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 333)
|
||||
|
|
|
|||
|
|
@ -2046,7 +2046,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg)
|
|||
msg->bodyptr = NULL;
|
||||
break;
|
||||
#endif
|
||||
case SIR_HAL_SOC_SET_HW_MODE_RESP:
|
||||
case SIR_HAL_PDEV_SET_HW_MODE_RESP:
|
||||
lim_process_set_hw_mode_resp(mac_ctx, msg->bodyptr);
|
||||
qdf_mem_free((void *)msg->bodyptr);
|
||||
msg->bodyptr = NULL;
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ static QDF_STATUS lim_process_set_hw_mode(tpAniSirGlobal mac, uint32_t *msg)
|
|||
/* Other parameters are not needed for WMA */
|
||||
|
||||
cds_message.bodyptr = req_msg;
|
||||
cds_message.type = SIR_HAL_SOC_SET_HW_MODE;
|
||||
cds_message.type = SIR_HAL_PDEV_SET_HW_MODE;
|
||||
|
||||
lim_log(mac, LOG1, FL("Posting SIR_HAL_SOC_SET_HW_MOD to WMA"));
|
||||
status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message);
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
|
|||
CASE_RETURN_STRING(SIR_HAL_START_STOP_LOGGING);
|
||||
CASE_RETURN_STRING(SIR_HAL_FLUSH_LOG_TO_FW);
|
||||
CASE_RETURN_STRING(SIR_HAL_PDEV_SET_PCL_TO_FW);
|
||||
CASE_RETURN_STRING(SIR_HAL_SOC_SET_HW_MODE);
|
||||
CASE_RETURN_STRING(SIR_HAL_PDEV_SET_HW_MODE);
|
||||
CASE_RETURN_STRING(SIR_HAL_SOC_DUAL_MAC_CFG_REQ);
|
||||
CASE_RETURN_STRING(WMA_RADAR_DETECTED_IND);
|
||||
CASE_RETURN_STRING(WMA_TIMER_TRAFFIC_STATS_IND);
|
||||
|
|
|
|||
|
|
@ -988,7 +988,7 @@ bool sme_is_any_session_in_connected_state(tHalHandle h_hal);
|
|||
|
||||
QDF_STATUS sme_pdev_set_pcl(tHalHandle hal,
|
||||
struct sir_pcl_list msg);
|
||||
QDF_STATUS sme_soc_set_hw_mode(tHalHandle hal,
|
||||
QDF_STATUS sme_pdev_set_hw_mode(tHalHandle hal,
|
||||
struct sir_hw_mode msg);
|
||||
void sme_register_hw_mode_trans_cb(tHalHandle hal,
|
||||
hw_mode_transition_cb callback);
|
||||
|
|
|
|||
|
|
@ -14918,14 +14918,14 @@ QDF_STATUS sme_pdev_set_pcl(tHalHandle hal,
|
|||
}
|
||||
|
||||
/*
|
||||
* sme_soc_set_hw_mode() - Send WMI_SOC_SET_HW_MODE_CMDID to the WMA
|
||||
* sme_pdev_set_hw_mode() - Send WMI_PDEV_SET_HW_MODE_CMDID to the WMA
|
||||
* @hal: Handle returned by macOpen
|
||||
* @msg: HW mode structure containing hw mode and callback details
|
||||
*
|
||||
* Sends the command to CSR to send WMI_SOC_SET_HW_MODE_CMDID to FW
|
||||
* Sends the command to CSR to send WMI_PDEV_SET_HW_MODE_CMDID to FW
|
||||
* Return: QDF_STATUS_SUCCESS on successful posting
|
||||
*/
|
||||
QDF_STATUS sme_soc_set_hw_mode(tHalHandle hal,
|
||||
QDF_STATUS sme_pdev_set_hw_mode(tHalHandle hal,
|
||||
struct sir_hw_mode msg)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -1981,7 +1981,7 @@ QDF_STATUS wma_set_rssi_monitoring(tp_wma_handle wma,
|
|||
QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
|
||||
struct wmi_pcl_chan_weights *msg);
|
||||
|
||||
QDF_STATUS wma_send_soc_set_hw_mode_cmd(tp_wma_handle wma_handle,
|
||||
QDF_STATUS wma_send_pdev_set_hw_mode_cmd(tp_wma_handle wma_handle,
|
||||
struct sir_hw_mode *msg);
|
||||
QDF_STATUS wma_get_scan_id(uint32_t *scan_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -2290,23 +2290,24 @@ static int wma_flush_complete_evt_handler(void *handle,
|
|||
}
|
||||
|
||||
/**
|
||||
* wma_soc_set_hw_mode_resp_evt_handler() - Set HW mode resp evt handler
|
||||
* wma_pdev_set_hw_mode_resp_evt_handler() - Set HW mode resp evt handler
|
||||
* @handle: WMI handle
|
||||
* @event: Event recevied from FW
|
||||
* @len: Length of the event
|
||||
*
|
||||
* Event handler for WMI_SOC_SET_HW_MODE_RESP_EVENTID that is sent to host
|
||||
* driver in response to a WMI_SOC_SET_HW_MODE_CMDID being sent to WLAN firmware
|
||||
* Event handler for WMI_PDEV_SET_HW_MODE_RESP_EVENTID that is sent to host
|
||||
* driver in response to a WMI_PDEV_SET_HW_MODE_CMDID being sent to WLAN
|
||||
* firmware
|
||||
*
|
||||
* Return: Success on receiving valid params from FW
|
||||
*/
|
||||
static int wma_soc_set_hw_mode_resp_evt_handler(void *handle,
|
||||
static int wma_pdev_set_hw_mode_resp_evt_handler(void *handle,
|
||||
uint8_t *event,
|
||||
uint32_t len)
|
||||
{
|
||||
WMI_SOC_SET_HW_MODE_RESP_EVENTID_param_tlvs *param_buf;
|
||||
wmi_soc_set_hw_mode_response_event_fixed_param *wmi_event;
|
||||
wmi_soc_set_hw_mode_response_vdev_mac_entry *vdev_mac_entry;
|
||||
WMI_PDEV_SET_HW_MODE_RESP_EVENTID_param_tlvs *param_buf;
|
||||
wmi_pdev_set_hw_mode_response_event_fixed_param *wmi_event;
|
||||
wmi_pdev_set_hw_mode_response_vdev_mac_entry *vdev_mac_entry;
|
||||
uint32_t i;
|
||||
struct sir_set_hw_mode_resp *hw_mode_resp;
|
||||
tp_wma_handle wma = (tp_wma_handle) handle;
|
||||
|
|
@ -2328,9 +2329,9 @@ static int wma_soc_set_hw_mode_resp_evt_handler(void *handle,
|
|||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
param_buf = (WMI_SOC_SET_HW_MODE_RESP_EVENTID_param_tlvs *) event;
|
||||
param_buf = (WMI_PDEV_SET_HW_MODE_RESP_EVENTID_param_tlvs *) event;
|
||||
if (!param_buf) {
|
||||
WMA_LOGE("Invalid WMI_SOC_SET_HW_MODE_RESP_EVENTID event");
|
||||
WMA_LOGE("Invalid WMI_PDEV_SET_HW_MODE_RESP_EVENTID event");
|
||||
/* Need to send response back to upper layer to free
|
||||
* active command list
|
||||
*/
|
||||
|
|
@ -2347,13 +2348,20 @@ static int wma_soc_set_hw_mode_resp_evt_handler(void *handle,
|
|||
wmi_event->cfgd_hw_mode_index,
|
||||
wmi_event->num_vdev_mac_entries);
|
||||
vdev_mac_entry =
|
||||
param_buf->wmi_soc_set_hw_mode_response_vdev_mac_mapping;
|
||||
param_buf->wmi_pdev_set_hw_mode_response_vdev_mac_mapping;
|
||||
|
||||
/* Store the vdev-mac map in WMA and prepare to send to PE */
|
||||
for (i = 0; i < wmi_event->num_vdev_mac_entries; i++) {
|
||||
uint32_t vdev_id, mac_id;
|
||||
uint32_t vdev_id, mac_id, pdev_id;
|
||||
vdev_id = vdev_mac_entry[i].vdev_id;
|
||||
mac_id = vdev_mac_entry[i].mac_id;
|
||||
pdev_id = vdev_mac_entry[i].pdev_id;
|
||||
if (pdev_id == WMI_PDEV_ID_SOC) {
|
||||
WMA_LOGE("%s: soc level id received for mac id)",
|
||||
__func__);
|
||||
QDF_BUG(0);
|
||||
goto fail;
|
||||
}
|
||||
mac_id = WMA_PDEV_TO_MAC_MAP(vdev_mac_entry[i].pdev_id);
|
||||
|
||||
WMA_LOGI("%s: vdev_id:%d mac_id:%d",
|
||||
__func__, vdev_id, mac_id);
|
||||
|
|
@ -2376,7 +2384,7 @@ static int wma_soc_set_hw_mode_resp_evt_handler(void *handle,
|
|||
WMA_LOGI("%s: Updated: old_hw_mode_index:%d new_hw_mode_index:%d",
|
||||
__func__, wma->old_hw_mode_index, wma->new_hw_mode_index);
|
||||
|
||||
wma_send_msg(wma, SIR_HAL_SOC_SET_HW_MODE_RESP,
|
||||
wma_send_msg(wma, SIR_HAL_PDEV_SET_HW_MODE_RESP,
|
||||
(void *) hw_mode_resp, 0);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
|
@ -2386,7 +2394,7 @@ fail:
|
|||
hw_mode_resp->status = SET_HW_MODE_STATUS_ECANCELED;
|
||||
hw_mode_resp->cfgd_hw_mode_index = 0;
|
||||
hw_mode_resp->num_vdev_mac_entries = 0;
|
||||
wma_send_msg(wma, SIR_HAL_SOC_SET_HW_MODE_RESP,
|
||||
wma_send_msg(wma, SIR_HAL_PDEV_SET_HW_MODE_RESP,
|
||||
(void *) hw_mode_resp, 0);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
|
@ -2782,10 +2790,10 @@ QDF_STATUS wma_start(void *cds_ctx)
|
|||
goto end;
|
||||
}
|
||||
|
||||
/* Initialize the WMI_SOC_SET_HW_MODE_RESP_EVENTID event handler */
|
||||
/* Initialize the wma_pdev_set_hw_mode_resp_evt_handler event handler */
|
||||
status = wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
WMI_SOC_SET_HW_MODE_RESP_EVENTID,
|
||||
wma_soc_set_hw_mode_resp_evt_handler,
|
||||
WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
|
||||
wma_pdev_set_hw_mode_resp_evt_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
WMA_LOGE("Failed to register set hw mode resp event cb");
|
||||
|
|
@ -5205,8 +5213,8 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg)
|
|||
(struct wmi_pcl_chan_weights *)msg->bodyptr);
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
break;
|
||||
case SIR_HAL_SOC_SET_HW_MODE:
|
||||
wma_send_soc_set_hw_mode_cmd(wma_handle,
|
||||
case SIR_HAL_PDEV_SET_HW_MODE:
|
||||
wma_send_pdev_set_hw_mode_cmd(wma_handle,
|
||||
(struct sir_hw_mode *)msg->bodyptr);
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
break;
|
||||
|
|
@ -5381,7 +5389,7 @@ QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
|
|||
}
|
||||
|
||||
/**
|
||||
* wma_send_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW
|
||||
* wma_send_pdev_set_hw_mode_cmd() - Send WMI_PDEV_SET_HW_MODE_CMDID to FW
|
||||
* @wma_handle: WMA handle
|
||||
* @msg: Structure containing the following parameters
|
||||
*
|
||||
|
|
@ -5394,7 +5402,7 @@ QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
|
|||
*
|
||||
* Return: Success if the cmd is sent successfully to the firmware
|
||||
*/
|
||||
QDF_STATUS wma_send_soc_set_hw_mode_cmd(tp_wma_handle wma_handle,
|
||||
QDF_STATUS wma_send_pdev_set_hw_mode_cmd(tp_wma_handle wma_handle,
|
||||
struct sir_hw_mode *msg)
|
||||
{
|
||||
struct sir_set_hw_mode_resp *param;
|
||||
|
|
@ -5429,7 +5437,7 @@ fail:
|
|||
param->cfgd_hw_mode_index = 0;
|
||||
param->num_vdev_mac_entries = 0;
|
||||
WMA_LOGE("%s: Sending HW mode fail response to LIM", __func__);
|
||||
wma_send_msg(wma_handle, SIR_HAL_SOC_SET_HW_MODE_RESP,
|
||||
wma_send_msg(wma_handle, SIR_HAL_PDEV_SET_HW_MODE_RESP,
|
||||
(void *) param, 0);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue