qcacld-3.0: Add USB bus support (WMA)
Add WMA specific changes for USB bus support. Change-Id: I4186d22e4f0af258ee92fb269db9a987cdd0c933 CRs-Fixed: 1023663
This commit is contained in:
@@ -794,10 +794,15 @@ int wma_mcc_vdev_tx_pause_evt_handler(void *handle, uint8_t *event,
|
|||||||
#if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL)
|
#if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL)
|
||||||
QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
|
QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
|
||||||
struct t_bad_peer_txtcl_config *config);
|
struct t_bad_peer_txtcl_config *config);
|
||||||
|
#else
|
||||||
|
static inline QDF_STATUS
|
||||||
|
wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
|
||||||
|
struct t_bad_peer_txtcl_config *config)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
QDF_STATUS wma_process_init_thermal_info(tp_wma_handle wma,
|
QDF_STATUS wma_process_init_thermal_info(tp_wma_handle wma,
|
||||||
t_thermal_mgmt *pThermalParams);
|
t_thermal_mgmt *pThermalParams);
|
||||||
|
|
||||||
|
@@ -1777,13 +1777,6 @@ QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
|
|||||||
|
|
||||||
return wma_set_peer_rate_report_condition(wma, config);
|
return wma_set_peer_rate_report_condition(wma, config);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
|
|
||||||
QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
|
|
||||||
struct t_bad_peer_txtcl_config *config)
|
|
||||||
{
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL) */
|
#endif /* defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL) */
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5657,10 +5657,9 @@ QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
|
|||||||
pAddPeriodicTxPtrnParams)
|
pAddPeriodicTxPtrnParams)
|
||||||
{
|
{
|
||||||
tp_wma_handle wma_handle = (tp_wma_handle) handle;
|
tp_wma_handle wma_handle = (tp_wma_handle) handle;
|
||||||
struct periodic_tx_pattern params;
|
struct periodic_tx_pattern *params_ptr;
|
||||||
uint8_t vdev_id;
|
uint8_t vdev_id;
|
||||||
|
QDF_STATUS status;
|
||||||
qdf_mem_set(¶ms, sizeof(struct periodic_tx_pattern), 0);
|
|
||||||
|
|
||||||
if (!wma_handle || !wma_handle->wmi_handle) {
|
if (!wma_handle || !wma_handle->wmi_handle) {
|
||||||
WMA_LOGE("%s: WMA is closed, can not issue fw add pattern cmd",
|
WMA_LOGE("%s: WMA is closed, can not issue fw add pattern cmd",
|
||||||
@@ -5668,6 +5667,15 @@ QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
|
|||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
params_ptr = qdf_mem_malloc(sizeof(*params_ptr));
|
||||||
|
|
||||||
|
if (!params_ptr) {
|
||||||
|
WMA_LOGE(
|
||||||
|
"%s: unable to allocate memory for periodic_tx_pattern",
|
||||||
|
__func__);
|
||||||
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
if (!wma_find_vdev_by_addr(wma_handle,
|
if (!wma_find_vdev_by_addr(wma_handle,
|
||||||
pAddPeriodicTxPtrnParams->mac_address.bytes,
|
pAddPeriodicTxPtrnParams->mac_address.bytes,
|
||||||
&vdev_id)) {
|
&vdev_id)) {
|
||||||
@@ -5676,17 +5684,22 @@ QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
|
|||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
params.ucPtrnId = pAddPeriodicTxPtrnParams->ucPtrnId;
|
params_ptr->ucPtrnId = pAddPeriodicTxPtrnParams->ucPtrnId;
|
||||||
params.ucPtrnSize = pAddPeriodicTxPtrnParams->ucPtrnSize;
|
params_ptr->ucPtrnSize = pAddPeriodicTxPtrnParams->ucPtrnSize;
|
||||||
params.usPtrnIntervalMs = pAddPeriodicTxPtrnParams->usPtrnIntervalMs;
|
params_ptr->usPtrnIntervalMs =
|
||||||
qdf_mem_copy(¶ms.mac_address,
|
pAddPeriodicTxPtrnParams->usPtrnIntervalMs;
|
||||||
|
qdf_mem_copy(¶ms_ptr->mac_address,
|
||||||
&pAddPeriodicTxPtrnParams->mac_address,
|
&pAddPeriodicTxPtrnParams->mac_address,
|
||||||
sizeof(struct qdf_mac_addr));
|
sizeof(struct qdf_mac_addr));
|
||||||
qdf_mem_copy(params.ucPattern, pAddPeriodicTxPtrnParams->ucPattern,
|
qdf_mem_copy(params_ptr->ucPattern,
|
||||||
params.ucPtrnSize);
|
pAddPeriodicTxPtrnParams->ucPattern,
|
||||||
|
params_ptr->ucPtrnSize);
|
||||||
|
|
||||||
return wmi_unified_process_add_periodic_tx_ptrn_cmd(
|
status = wmi_unified_process_add_periodic_tx_ptrn_cmd(
|
||||||
wma_handle->wmi_handle, ¶ms, vdev_id);
|
wma_handle->wmi_handle, params_ptr, vdev_id);
|
||||||
|
|
||||||
|
qdf_mem_free(params_ptr);
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -5085,8 +5085,9 @@ QDF_STATUS wma_extscan_start_change_monitor(tp_wma_handle wma,
|
|||||||
tSirExtScanSetSigChangeReqParams *
|
tSirExtScanSetSigChangeReqParams *
|
||||||
psigchange)
|
psigchange)
|
||||||
{
|
{
|
||||||
struct extscan_set_sig_changereq_params params = {0};
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
QDF_STATUS status;
|
||||||
|
struct extscan_set_sig_changereq_params *params_ptr;
|
||||||
|
|
||||||
if (!wma || !wma->wmi_handle) {
|
if (!wma || !wma->wmi_handle) {
|
||||||
WMA_LOGE("%s: WMA is closed,can not issue extscan cmd",
|
WMA_LOGE("%s: WMA is closed,can not issue extscan cmd",
|
||||||
@@ -5094,21 +5095,34 @@ QDF_STATUS wma_extscan_start_change_monitor(tp_wma_handle wma,
|
|||||||
return QDF_STATUS_E_INVAL;
|
return QDF_STATUS_E_INVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
params.request_id = psigchange->requestId;
|
params_ptr = qdf_mem_malloc(sizeof(*params_ptr));
|
||||||
params.session_id = psigchange->sessionId;
|
|
||||||
params.rssi_sample_size = psigchange->rssiSampleSize;
|
if (!params_ptr) {
|
||||||
params.lostap_sample_size = psigchange->lostApSampleSize;
|
WMA_LOGE(
|
||||||
params.min_breaching = psigchange->minBreaching;
|
"%s: unable to allocate memory for extscan_set_sig_changereq_params",
|
||||||
params.num_ap = psigchange->numAp;
|
__func__);
|
||||||
for (i = 0; i < WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS; i++) {
|
return QDF_STATUS_E_NOMEM;
|
||||||
qdf_mem_copy(¶ms.ap[i].bssid, &psigchange->ap[i].bssid,
|
|
||||||
sizeof(struct qdf_mac_addr));
|
|
||||||
params.ap[i].high = psigchange->ap[i].high;
|
|
||||||
params.ap[i].low = psigchange->ap[i].low;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return wmi_unified_extscan_start_change_monitor_cmd(wma->wmi_handle,
|
params_ptr->request_id = psigchange->requestId;
|
||||||
¶ms);
|
params_ptr->session_id = psigchange->sessionId;
|
||||||
|
params_ptr->rssi_sample_size = psigchange->rssiSampleSize;
|
||||||
|
params_ptr->lostap_sample_size = psigchange->lostApSampleSize;
|
||||||
|
params_ptr->min_breaching = psigchange->minBreaching;
|
||||||
|
params_ptr->num_ap = psigchange->numAp;
|
||||||
|
for (i = 0; i < WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS; i++) {
|
||||||
|
qdf_mem_copy(¶ms_ptr->ap[i].bssid,
|
||||||
|
&psigchange->ap[i].bssid,
|
||||||
|
sizeof(struct qdf_mac_addr));
|
||||||
|
params_ptr->ap[i].high = psigchange->ap[i].high;
|
||||||
|
params_ptr->ap[i].low = psigchange->ap[i].low;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = wmi_unified_extscan_start_change_monitor_cmd
|
||||||
|
(wma->wmi_handle,
|
||||||
|
params_ptr);
|
||||||
|
qdf_mem_free(params_ptr);
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user