diff options
| -rw-r--r-- | core/cds/inc/cds_concurrency.h | 2 | ||||
| -rw-r--r-- | core/cds/src/cds_concurrency.c | 16 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_wext.c | 4 | ||||
| -rw-r--r-- | core/mac/src/include/sir_params.h | 4 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_message_queue.c | 2 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_sme_req_messages.c | 2 | ||||
| -rw-r--r-- | core/mac/src/sys/legacy/src/utils/src/mac_trace.c | 2 | ||||
| -rw-r--r-- | core/sme/inc/sme_api.h | 2 | ||||
| -rw-r--r-- | core/sme/src/common/sme_api.c | 6 | ||||
| -rw-r--r-- | core/wma/inc/wma.h | 2 | ||||
| -rw-r--r-- | core/wma/src/wma_main.c | 52 |
11 files changed, 51 insertions, 43 deletions
diff --git a/core/cds/inc/cds_concurrency.h b/core/cds/inc/cds_concurrency.h index 45e37f8b0f94..3dd9786e706a 100644 --- a/core/cds/inc/cds_concurrency.h +++ b/core/cds/inc/cds_concurrency.h @@ -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, diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index f211ace0dfc5..b90592766319 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -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, diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index b88b01bf11ed..9e3571890bf9 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -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, diff --git a/core/mac/src/include/sir_params.h b/core/mac/src/include/sir_params.h index 75dc58bc40a0..cc433c1a65b2 100644 --- a/core/mac/src/include/sir_params.h +++ b/core/mac/src/include/sir_params.h @@ -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) diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c index 27d6a4159760..0bd956256ad6 100644 --- a/core/mac/src/pe/lim/lim_process_message_queue.c +++ b/core/mac/src/pe/lim/lim_process_message_queue.c @@ -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; diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index 8de45fe8734f..96a428d83144 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -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); diff --git a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c index db836f05c46f..1c1252e098ef 100644 --- a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c +++ b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c @@ -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); diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index 0cc23cd26ffe..0906720997c2 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -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); diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index a4d636f55c7d..49c7d685b708 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -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; diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index b525dd771d9f..b503fd1ae89f 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -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); diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 35ebdb72157d..66042548a741 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -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; } |
