qcacld-3.0: Fix in accessing pre_cac adapter
Trying to get the pre_cac adapter by iface before its created, which will return NULL always, leads to pre_cac open failure. Remove accessing the pre_cac adapter before create. Change-Id: I31363d0ff8eb39fb1b16d3be20743d26fc7469a2 CRs-Fixed: 3586239
This commit is contained in:

committed by
Rahul Choudhary

parent
4577079468
commit
54797b19a9
@@ -232,20 +232,11 @@ static int __wlan_hdd_request_pre_cac(struct hdd_context *hdd_ctx,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pre_cac_adapter = hdd_get_adapter_by_iface_name(hdd_ctx,
|
||||
SAP_PRE_CAC_IFNAME);
|
||||
if (!pre_cac_adapter) {
|
||||
hdd_err("error opening the pre cac adapter");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (policy_mgr_get_connection_count(hdd_ctx->psoc) > 1) {
|
||||
hdd_err("pre cac not allowed in concurrency");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pre_cac_link_info = pre_cac_adapter->deflink;
|
||||
|
||||
ap_adapter = hdd_get_adapter(hdd_ctx, QDF_SAP_MODE);
|
||||
if (!ap_adapter) {
|
||||
hdd_err("unable to get SAP adapter");
|
||||
@@ -322,6 +313,7 @@ static int __wlan_hdd_request_pre_cac(struct hdd_context *hdd_ctx,
|
||||
goto release_intf_addr_and_return_failure;
|
||||
}
|
||||
|
||||
pre_cac_link_info = pre_cac_adapter->deflink;
|
||||
pre_cac_ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(pre_cac_link_info);
|
||||
sap_clear_global_dfs_param(mac_handle, pre_cac_ap_ctx->sap_context);
|
||||
|
||||
|
Reference in New Issue
Block a user