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:
Mohit Khanna 2016-05-19 16:53:39 -07:00 • committed by qcabuildsw
commit 0fe6167c19
4 changed files with 57 additions and 32 deletions

View file

@ -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)
QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
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
QDF_STATUS wma_process_init_thermal_info(tp_wma_handle wma,
t_thermal_mgmt *pThermalParams);

View file

@ -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);
}
#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) */

View file

@ -5657,10 +5657,9 @@ QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
pAddPeriodicTxPtrnParams)
{
tp_wma_handle wma_handle = (tp_wma_handle) handle;
struct periodic_tx_pattern params;
struct periodic_tx_pattern *params_ptr;
uint8_t vdev_id;
qdf_mem_set(&params, sizeof(struct periodic_tx_pattern), 0);
QDF_STATUS status;
if (!wma_handle || !wma_handle->wmi_handle) {
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;
}
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,
pAddPeriodicTxPtrnParams->mac_address.bytes,
&vdev_id)) {
@ -5676,17 +5684,22 @@ QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
return QDF_STATUS_E_INVAL;
}
params.ucPtrnId = pAddPeriodicTxPtrnParams->ucPtrnId;
params.ucPtrnSize = pAddPeriodicTxPtrnParams->ucPtrnSize;
params.usPtrnIntervalMs = pAddPeriodicTxPtrnParams->usPtrnIntervalMs;
qdf_mem_copy(&params.mac_address,
params_ptr->ucPtrnId = pAddPeriodicTxPtrnParams->ucPtrnId;
params_ptr->ucPtrnSize = pAddPeriodicTxPtrnParams->ucPtrnSize;
params_ptr->usPtrnIntervalMs =
pAddPeriodicTxPtrnParams->usPtrnIntervalMs;
qdf_mem_copy(&params_ptr->mac_address,
&pAddPeriodicTxPtrnParams->mac_address,
sizeof(struct qdf_mac_addr));
qdf_mem_copy(params.ucPattern, pAddPeriodicTxPtrnParams->ucPattern,
params.ucPtrnSize);
qdf_mem_copy(params_ptr->ucPattern,
pAddPeriodicTxPtrnParams->ucPattern,
params_ptr->ucPtrnSize);
return wmi_unified_process_add_periodic_tx_ptrn_cmd(
wma_handle->wmi_handle, &params, vdev_id);
status = wmi_unified_process_add_periodic_tx_ptrn_cmd(
wma_handle->wmi_handle, params_ptr, vdev_id);
qdf_mem_free(params_ptr);
return status;
}
/**

View file

@ -5085,8 +5085,9 @@ QDF_STATUS wma_extscan_start_change_monitor(tp_wma_handle wma,
tSirExtScanSetSigChangeReqParams *
psigchange)
{
struct extscan_set_sig_changereq_params params = {0};
int i = 0;
QDF_STATUS status;
struct extscan_set_sig_changereq_params *params_ptr;
if (!wma || !wma->wmi_handle) {
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;
}
params.request_id = psigchange->requestId;
params.session_id = psigchange->sessionId;
params.rssi_sample_size = psigchange->rssiSampleSize;
params.lostap_sample_size = psigchange->lostApSampleSize;
params.min_breaching = psigchange->minBreaching;
params.num_ap = psigchange->numAp;
for (i = 0; i < WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS; i++) {
qdf_mem_copy(&params.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;
params_ptr = qdf_mem_malloc(sizeof(*params_ptr));
if (!params_ptr) {
WMA_LOGE(
"%s: unable to allocate memory for extscan_set_sig_changereq_params",
__func__);
return QDF_STATUS_E_NOMEM;
}
return wmi_unified_extscan_start_change_monitor_cmd(wma->wmi_handle,
&params);
params_ptr->request_id = psigchange->requestId;
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(&params_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;
}
/**