qcacld-3.0: Remove channel avoid event processing in wma

Remove the channel avoid event processing in wma as the
event processing handled by regulatory component

Change-Id: Ifa0e340c6341b21c192066c8c6eb14418b041062
CRs-Fixed: 2080241
This commit is contained in:
Kiran Kumar Lokere 2017-07-21 19:42:36 -07:00 • committed by snandini
commit 0751f0ece9
8 changed files with 1 additions and 175 deletions

View file

@ -173,9 +173,6 @@ enum eWniMsgTypes {
eWNI_SME_TSM_IE_IND,
eWNI_SME_READY_TO_SUSPEND_IND,
#ifdef FEATURE_WLAN_CH_AVOID
eWNI_SME_CH_AVOID_IND,
#endif /* FEATURE_WLAN_CH_AVOID */
/* DFS EVENTS */
eWNI_SME_DFS_RADAR_FOUND, /* RADAR found indication from DFS */
eWNI_SME_CHANNEL_CHANGE_REQ, /* Channel Change Request from SAP */

View file

@ -310,9 +310,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
#endif /* WLAN_FEATURE_GTK_OFFLOAD */
CASE_RETURN_STRING(eWNI_SME_ROAM_SCAN_OFFLOAD_RSP);
CASE_RETURN_STRING(eWNI_SME_IBSS_PEER_INFO_RSP);
#ifdef FEATURE_WLAN_CH_AVOID
CASE_RETURN_STRING(eWNI_SME_CH_AVOID_IND);
#endif /* FEATURE_WLAN_CH_AVOID */
CASE_RETURN_STRING(eWNI_SME_DFS_RADAR_FOUND);
CASE_RETURN_STRING(eWNI_SME_CHANNEL_CHANGE_REQ);
CASE_RETURN_STRING(eWNI_SME_CHANNEL_CHANGE_RSP);

View file

@ -772,24 +772,7 @@ QDF_STATUS sme_update_fw_tdls_state(tHalHandle hHal, void *psmeTdlsParams,
QDF_STATUS sme_update_tdls_peer_state(tHalHandle hHal,
tSmeTdlsPeerStateParams *pPeerStateParams);
#endif /* FEATURE_WLAN_TDLS */
#ifdef FEATURE_WLAN_CH_AVOID
QDF_STATUS sme_add_ch_avoid_callback(tHalHandle hHal,
void (*pCallbackfn)(void *hdd_context, void *indi_param));
QDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal);
#else
static inline
QDF_STATUS sme_add_ch_avoid_callback(tHalHandle hHal,
void (*pCallbackfn)(void *hdd_context, void *indi_param))
{
return QDF_STATUS_E_NOSUPPORT;
}
static inline
QDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal)
{
return QDF_STATUS_E_NOSUPPORT;
}
#endif /* FEATURE_WLAN_CH_AVOID */
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
QDF_STATUS sme_set_auto_shutdown_cb(tHalHandle hHal, void (*pCallbackfn)(void));
QDF_STATUS sme_set_auto_shutdown_timer(tHalHandle hHal, uint32_t timer_value);

View file

@ -172,9 +172,6 @@ typedef struct tagSmeStruct {
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
host_event_wlan_status_payload_type eventPayload;
#endif
#ifdef FEATURE_WLAN_CH_AVOID
void (*pChAvoidNotificationCb)(void *hdd_context, void *indi_param);
#endif /* FEATURE_WLAN_CH_AVOID */
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
void (*pLinkLayerStatsIndCallback)(void *callbackContext,
int indType, void *pRsp);

View file

@ -2358,20 +2358,6 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, struct scheduler_msg *pMsg)
}
break;
#endif
#ifdef FEATURE_WLAN_CH_AVOID
/* channel avoid message arrived, send IND to client */
case eWNI_SME_CH_AVOID_IND:
MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_RX_WMA_MSG,
NO_SESSION, pMsg->type));
if (pMac->sme.pChAvoidNotificationCb) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
FL("CH avoid notification"));
pMac->sme.pChAvoidNotificationCb(pMac->hHdd,
pMsg->bodyptr);
}
qdf_mem_free(pMsg->bodyptr);
break;
#endif /* FEATURE_WLAN_CH_AVOID */
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
case eWNI_SME_AUTO_SHUTDOWN_IND:
if (pMac->sme.pAutoShutdownNotificationCb) {
@ -11500,36 +11486,6 @@ QDF_STATUS sme_set_auto_shutdown_timer(tHalHandle hHal, uint32_t timer_val)
}
#endif
#ifdef FEATURE_WLAN_CH_AVOID
/* ---------------------------------------------------------------------------
\fn sme_add_ch_avoid_callback
\brief Used to plug in callback function
Which notify channel may not be used with SAP or P2PGO mode.
Notification come from FW.
\param hHal
\param pCallbackfn : callback function pointer should be plugged in
\- return QDF_STATUS
-------------------------------------------------------------------------*/
QDF_STATUS sme_add_ch_avoid_callback
(tHalHandle hHal, void (*pCallbackfn)(void *pAdapter, void *indParam)
) {
QDF_STATUS status = QDF_STATUS_SUCCESS;
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
"%s: Plug in CH AVOID CB", __func__);
status = sme_acquire_global_lock(&pMac->sme);
if (QDF_STATUS_SUCCESS == status) {
if (NULL != pCallbackfn) {
pMac->sme.pChAvoidNotificationCb = pCallbackfn;
}
sme_release_global_lock(&pMac->sme);
}
return status;
}
/* ---------------------------------------------------------------------------
\fn sme_ch_avoid_update_req
\API to request channel avoidance update from FW.
@ -11578,7 +11534,6 @@ QDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal)
return status;
}
#endif /* FEATURE_WLAN_CH_AVOID */
/**
* sme_set_miracast() - Function to set miracast value to UMAC

View file

@ -1085,15 +1085,10 @@ QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle,
tSirLedFlashingReq *flashing);
#endif
#ifdef FEATURE_WLAN_CH_AVOID
int wma_channel_avoid_evt_handler(void *handle, uint8_t *event,
uint32_t len);
QDF_STATUS wma_process_ch_avoid_update_req(tp_wma_handle wma_handle,
tSirChAvoidUpdateReq *
ch_avoid_update_req);
#endif
#ifdef FEATURE_WLAN_TDLS

View file

@ -3812,91 +3812,6 @@ QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle,
}
#endif /* WLAN_FEATURE_GPIO_LED_FLASHING */
#ifdef FEATURE_WLAN_CH_AVOID
/**
* wma_channel_avoid_evt_handler() - process channel to avoid event from FW.
* @handle: wma handle
* @event: event buffer
* @len: buffer length
*
* Return: 0 for success or error code
*/
int wma_channel_avoid_evt_handler(void *handle, uint8_t *event,
uint32_t len)
{
wmi_avoid_freq_ranges_event_fixed_param *afr_fixed_param;
wmi_avoid_freq_range_desc *afr_desc;
uint32_t num_freq_ranges, freq_range_idx;
tSirChAvoidIndType *sca_indication;
QDF_STATUS qdf_status;
struct scheduler_msg sme_msg = { 0 };
WMI_WLAN_FREQ_AVOID_EVENTID_param_tlvs *param_buf =
(WMI_WLAN_FREQ_AVOID_EVENTID_param_tlvs *) event;
if (!param_buf) {
WMA_LOGE("Invalid channel avoid event buffer");
return -EINVAL;
}
afr_fixed_param = param_buf->fixed_param;
if (!afr_fixed_param) {
WMA_LOGE("Invalid channel avoid event fixed param buffer");
return -EINVAL;
}
num_freq_ranges =
(afr_fixed_param->num_freq_ranges >
SIR_CH_AVOID_MAX_RANGE) ? SIR_CH_AVOID_MAX_RANGE :
afr_fixed_param->num_freq_ranges;
WMA_LOGD("Channel avoid event received with %d ranges",
num_freq_ranges);
for (freq_range_idx = 0; freq_range_idx < num_freq_ranges;
freq_range_idx++) {
afr_desc = (wmi_avoid_freq_range_desc *)
((void *)param_buf->avd_freq_range +
freq_range_idx *
sizeof(wmi_avoid_freq_range_desc));
WMA_LOGD("range %d tlv id = %u, start freq = %u, end freq = %u",
freq_range_idx, afr_desc->tlv_header,
afr_desc->start_freq, afr_desc->end_freq);
}
sca_indication = (tSirChAvoidIndType *)
qdf_mem_malloc(sizeof(tSirChAvoidIndType));
if (!sca_indication) {
WMA_LOGE("Invalid channel avoid indication buffer");
return -EINVAL;
}
sca_indication->avoid_range_count = num_freq_ranges;
for (freq_range_idx = 0; freq_range_idx < num_freq_ranges;
freq_range_idx++) {
afr_desc = (wmi_avoid_freq_range_desc *)
((void *)param_buf->avd_freq_range +
freq_range_idx *
sizeof(wmi_avoid_freq_range_desc));
sca_indication->avoid_freq_range[freq_range_idx].start_freq =
afr_desc->start_freq;
sca_indication->avoid_freq_range[freq_range_idx].end_freq =
afr_desc->end_freq;
}
sme_msg.type = eWNI_SME_CH_AVOID_IND;
sme_msg.bodyptr = sca_indication;
sme_msg.bodyval = 0;
qdf_status = scheduler_post_msg(QDF_MODULE_ID_SME, &sme_msg);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
WMA_LOGE("Fail to post eWNI_SME_CH_AVOID_IND msg to SME");
qdf_mem_free(sca_indication);
return -EINVAL;
}
return 0;
}
/**
* wma_process_ch_avoid_update_req() - handles channel avoid update request
* @wma_handle: wma handle
@ -3930,7 +3845,7 @@ QDF_STATUS wma_process_ch_avoid_update_req(tp_wma_handle wma_handle,
__func__);
return status;
}
#endif /* FEATURE_WLAN_CH_AVOID */
/**
* wma_send_regdomain_info_to_fw() - send regdomain info to fw
* @reg_dmn: reg domain

View file

@ -3256,19 +3256,6 @@ QDF_STATUS wma_start(void *cds_ctx)
WMA_RX_TASKLET_CTX);
#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
#ifdef FEATURE_WLAN_CH_AVOID
WMA_LOGD("Registering channel to avoid handler");
status = wmi_unified_register_event_handler(wma_handle->wmi_handle,
WMI_WLAN_FREQ_AVOID_EVENTID,
wma_channel_avoid_evt_handler,
WMA_RX_SERIALIZER_CTX);
if (status) {
WMA_LOGE("Failed to register channel to avoid event cb");
qdf_status = QDF_STATUS_E_FAILURE;
goto end;
}
#endif /* FEATURE_WLAN_CH_AVOID */
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
WMA_LOGD("Registering auto shutdown handler");
status = wmi_unified_register_event_handler(wma_handle->wmi_handle,