|
@@ -2366,12 +2366,13 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
|
|
params.nss_5g = self_sta_req->nss_5g;
|
|
|
|
|
|
/* Create a vdev in target */
|
|
|
- status = wmi_unified_vdev_create_send(wma_handle->wmi_handle,
|
|
|
- self_sta_req->self_mac_addr,
|
|
|
- ¶ms);
|
|
|
- if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ ret = wmi_unified_vdev_create_send(wma_handle->wmi_handle,
|
|
|
+ self_sta_req->self_mac_addr,
|
|
|
+ ¶ms);
|
|
|
+ if (QDF_IS_STATUS_ERROR(ret)) {
|
|
|
WMA_LOGE("%s: Unable to add an interface for ath_dev",
|
|
|
__func__);
|
|
|
+ status = QDF_STATUS_E_FAILURE;
|
|
|
goto end;
|
|
|
}
|
|
|
|
|
@@ -2389,7 +2390,7 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
|
|
self_sta_req->self_mac_addr,
|
|
|
vdev_id, txrx_vdev_type);
|
|
|
|
|
|
- WMA_LOGD("vdev_id %hu, txrx_vdev_handle = %pK", self_sta_req->session_id,
|
|
|
+ WMA_LOGD("vdev_id %hu, txrx_vdev_handle = %pK", vdev_id,
|
|
|
txrx_vdev_handle);
|
|
|
|
|
|
if (!txrx_vdev_handle) {
|
|
@@ -2404,6 +2405,17 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
|
|
wma_handle->interfaces[vdev_id].handle = txrx_vdev_handle;
|
|
|
wma_vdev_update_pause_bitmap(vdev_id, 0);
|
|
|
|
|
|
+ vdev = wlan_objmgr_get_vdev_by_id_from_psoc(wma_handle->psoc, vdev_id,
|
|
|
+ WLAN_LEGACY_WMA_ID);
|
|
|
+ if (!vdev) {
|
|
|
+ WMA_LOGE(FL("vdev obj is NULL for vdev_id: %u"), vdev_id);
|
|
|
+ status = QDF_STATUS_E_FAILURE;
|
|
|
+ wma_handle->interfaces[vdev_id].vdev_active = false;
|
|
|
+ wmi_unified_vdev_delete_send(wma_handle->wmi_handle, vdev_id);
|
|
|
+ goto end;
|
|
|
+ }
|
|
|
+
|
|
|
+ wma_handle->interfaces[vdev_id].vdev = vdev;
|
|
|
wma_handle->interfaces[vdev_id].ptrn_match_enable =
|
|
|
wma_handle->ptrn_match_enable_all_vdev ? true : false;
|
|
|
|
|
@@ -2436,9 +2448,9 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
|
|
tx_rx_aggregation_size.vdev_id = self_sta_req->session_id;
|
|
|
tx_rx_aggregation_size.aggr_type = WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU;
|
|
|
|
|
|
- status = wma_set_tx_rx_aggregation_size(&tx_rx_aggregation_size);
|
|
|
- if (status != QDF_STATUS_SUCCESS)
|
|
|
- WMA_LOGE("failed to set aggregation sizes(err=%d)", status);
|
|
|
+ ret = wma_set_tx_rx_aggregation_size(&tx_rx_aggregation_size);
|
|
|
+ if (QDF_IS_STATUS_ERROR(ret))
|
|
|
+ WMA_LOGE("failed to set aggregation sizes(err=%d)", ret);
|
|
|
|
|
|
tx_rx_aggregation_size.tx_aggregation_size_be =
|
|
|
self_sta_req->tx_aggregation_size_be;
|
|
@@ -2462,11 +2474,10 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
|
|
|
|
|
switch (self_sta_req->type) {
|
|
|
case WMI_VDEV_TYPE_STA:
|
|
|
- status = wma_set_tx_rx_aggregation_size_per_ac(
|
|
|
+ ret = wma_set_tx_rx_aggregation_size_per_ac(
|
|
|
&tx_rx_aggregation_size);
|
|
|
- if (status != QDF_STATUS_SUCCESS)
|
|
|
- WMA_LOGE("failed to set aggr sizes per ac(err=%d)",
|
|
|
- status);
|
|
|
+ if (QDF_IS_STATUS_ERROR(ret))
|
|
|
+ WMA_LOGE("set aggr sizes per ac(err=%d) failed", ret);
|
|
|
|
|
|
cfg_val = mac->mlme_cfg->sta.sta_keep_alive_period;
|
|
|
wma_set_sta_keep_alive(wma_handle,
|
|
@@ -2477,57 +2488,59 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
|
|
/* offload STA SA query related params to fwr */
|
|
|
if (wmi_service_enabled(wma_handle->wmi_handle,
|
|
|
wmi_service_sta_pmf_offload)) {
|
|
|
- wma_set_sta_sa_query_param(wma_handle,
|
|
|
- self_sta_req->session_id);
|
|
|
+ wma_set_sta_sa_query_param(wma_handle, vdev_id);
|
|
|
}
|
|
|
|
|
|
- status = wma_set_sw_retry_threshold(
|
|
|
- &tx_aggr_sw_retry_threshold);
|
|
|
- if (status != QDF_STATUS_SUCCESS)
|
|
|
- WMA_LOGE("failed to set retry threshold(err=%d)",
|
|
|
- status);
|
|
|
+ ret = wma_set_sw_retry_threshold(&tx_aggr_sw_retry_threshold);
|
|
|
+ if (QDF_IS_STATUS_ERROR(ret))
|
|
|
+ WMA_LOGE("failed to set retry threshold(err=%d)", ret);
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- wma_handle->interfaces[self_sta_req->session_id].type =
|
|
|
- self_sta_req->type;
|
|
|
- wma_handle->interfaces[self_sta_req->session_id].sub_type =
|
|
|
- self_sta_req->sub_type;
|
|
|
- qdf_atomic_init(&wma_handle->interfaces
|
|
|
- [self_sta_req->session_id].bss_status);
|
|
|
+ wma_handle->interfaces[vdev_id].type = self_sta_req->type;
|
|
|
+ wma_handle->interfaces[vdev_id].sub_type = self_sta_req->sub_type;
|
|
|
+ qdf_atomic_init(&wma_handle->interfaces[vdev_id].bss_status);
|
|
|
|
|
|
if (wma_vdev_uses_self_peer(self_sta_req->type,
|
|
|
self_sta_req->sub_type)) {
|
|
|
- status = wma_create_peer(wma_handle, txrx_pdev,
|
|
|
- txrx_vdev_handle,
|
|
|
- self_sta_req->self_mac_addr,
|
|
|
- WMI_PEER_TYPE_DEFAULT,
|
|
|
- self_sta_req->session_id, false);
|
|
|
- if (status != QDF_STATUS_SUCCESS) {
|
|
|
+ ret = wma_create_peer(wma_handle, txrx_pdev, txrx_vdev_handle,
|
|
|
+ self_sta_req->self_mac_addr,
|
|
|
+ WMI_PEER_TYPE_DEFAULT,
|
|
|
+ self_sta_req->session_id, false);
|
|
|
+ if (QDF_IS_STATUS_ERROR(ret)) {
|
|
|
WMA_LOGE("%s: Failed to create peer", __func__);
|
|
|
status = QDF_STATUS_E_FAILURE;
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_WMA_ID);
|
|
|
wmi_unified_vdev_delete_send(wma_handle->wmi_handle,
|
|
|
self_sta_req->session_id);
|
|
|
+ wma_handle->interfaces[vdev_id].vdev_active = false;
|
|
|
+ wma_cdp_vdev_detach(soc, wma_handle, vdev_id);
|
|
|
+ wma_handle->interfaces[vdev_id].vdev = NULL;
|
|
|
goto end;
|
|
|
}
|
|
|
} else if (self_sta_req->type == WMI_VDEV_TYPE_STA) {
|
|
|
- obj_peer = wma_create_objmgr_peer(wma_handle,
|
|
|
- vdev_id,
|
|
|
+ obj_peer = wma_create_objmgr_peer(wma_handle, vdev_id,
|
|
|
self_sta_req->self_mac_addr,
|
|
|
WMI_PEER_TYPE_DEFAULT);
|
|
|
if (!obj_peer) {
|
|
|
WMA_LOGE("%s: Failed to create obj mgr peer for self sta",
|
|
|
__func__);
|
|
|
+ status = QDF_STATUS_E_FAILURE;
|
|
|
+ wmi_unified_vdev_delete_send(wma_handle->wmi_handle,
|
|
|
+ self_sta_req->session_id);
|
|
|
+ wma_handle->interfaces[vdev_id].vdev_active = false;
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_WMA_ID);
|
|
|
+ wma_handle->interfaces[vdev_id].vdev = NULL;
|
|
|
+ wma_cdp_vdev_detach(soc, wma_handle, vdev_id);
|
|
|
goto end;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
WMA_LOGD("Setting WMI_VDEV_PARAM_DISCONNECT_TH: %d",
|
|
|
- self_sta_req->pkt_err_disconn_th);
|
|
|
- ret = wma_vdev_set_param(wma_handle->wmi_handle,
|
|
|
- self_sta_req->session_id,
|
|
|
- WMI_VDEV_PARAM_DISCONNECT_TH,
|
|
|
- self_sta_req->pkt_err_disconn_th);
|
|
|
+ self_sta_req->pkt_err_disconn_th);
|
|
|
+ ret = wma_vdev_set_param(wma_handle->wmi_handle, vdev_id,
|
|
|
+ WMI_VDEV_PARAM_DISCONNECT_TH,
|
|
|
+ self_sta_req->pkt_err_disconn_th);
|
|
|
if (ret)
|
|
|
WMA_LOGE("Failed to set WMI_VDEV_PARAM_DISCONNECT_TH");
|
|
|
|
|
@@ -2538,8 +2551,7 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
|
|
if (QDF_IS_STATUS_ERROR(ret))
|
|
|
WMA_LOGE("Failed to set WMI VDEV MCC_RTSCTS_PROTECTION_ENABLE");
|
|
|
|
|
|
- ret = wma_vdev_set_param(wma_handle->wmi_handle,
|
|
|
- self_sta_req->session_id,
|
|
|
+ ret = wma_vdev_set_param(wma_handle->wmi_handle, vdev_id,
|
|
|
WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,
|
|
|
mac->roam.configParam.mcc_bcast_prob_resp_enable);
|
|
|
if (QDF_IS_STATUS_ERROR(ret))
|
|
@@ -2655,7 +2667,7 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
|
|
WMA_LOGD("%s: setting ini value for WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED: %d",
|
|
|
__func__, cfg_val);
|
|
|
ret = wma_set_enable_disable_mcc_adaptive_scheduler(cfg_val);
|
|
|
- if (ret != QDF_STATUS_SUCCESS) {
|
|
|
+ if (QDF_IS_STATUS_ERROR(ret)) {
|
|
|
WMA_LOGE("Failed to set WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED");
|
|
|
}
|
|
|
} else {
|
|
@@ -2663,21 +2675,12 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
|
|
}
|
|
|
|
|
|
if (self_sta_req->type == WMI_VDEV_TYPE_STA) {
|
|
|
- status = wma_config_active_apf_mode(wma_handle,
|
|
|
- self_sta_req->session_id);
|
|
|
- if (QDF_IS_STATUS_ERROR(status))
|
|
|
+ ret = wma_config_active_apf_mode(wma_handle,
|
|
|
+ self_sta_req->session_id);
|
|
|
+ if (QDF_IS_STATUS_ERROR(ret))
|
|
|
WMA_LOGE("Failed to configure active APF mode");
|
|
|
}
|
|
|
|
|
|
- vdev = wlan_objmgr_get_vdev_by_id_from_psoc(wma_handle->psoc,
|
|
|
- vdev_id,
|
|
|
- WLAN_LEGACY_WMA_ID);
|
|
|
- if (!vdev) {
|
|
|
- WMA_LOGE(FL("vdev obj is NULL for vdev_id: %u"), vdev_id);
|
|
|
- status = QDF_STATUS_E_FAILURE;
|
|
|
- } else {
|
|
|
- wma_handle->interfaces[vdev_id].vdev = vdev;
|
|
|
- }
|
|
|
end:
|
|
|
self_sta_req->status = status;
|
|
|
|