qcacld-3.0: Allow NDI creation in all concurrent cases

Currently, NDI and NDP creation is happening only if the
corresponding concurrency is allowed. But NDI should be allowed
to create/delete in all concurrent scenarios. So, don't validate
the other interfaces present on device for NDI creation/deletion
and validate only for NDP requests.

Change-Id: I8e8817ac63f1f94b48fe71a30ddf1d49183d263a
CRs-Fixed: 2552623
This commit is contained in:
Srinivas Dasari
2019-10-29 18:23:54 +05:30
committed by nshrivas
父節點 5b738c23a3
當前提交 0610cc4041
共有 3 個文件被更改,包括 20 次插入9 次删除

查看文件

@@ -411,14 +411,9 @@ static int __wlan_hdd_cfg80211_process_ndp_cmd(struct wiphy *wiphy,
hdd_err_rl("NAN datapath is not enabled");
return -EPERM;
}
/* NAN data path coexists only with STA interface */
if (false == hdd_is_ndp_allowed(hdd_ctx)) {
hdd_err_rl("Unsupported concurrency for NAN datapath");
return -EPERM;
}
return os_if_nan_process_ndp_cmd(hdd_ctx->psoc,
data, data_len);
return os_if_nan_process_ndp_cmd(hdd_ctx->psoc, data, data_len,
hdd_is_ndp_allowed(hdd_ctx));
}
/**

查看文件

@@ -43,11 +43,14 @@ struct ndi_find_vdev_filter {
* @psoc: pointer to psoc object
* @data: request data. contains vendor cmd tlvs
* @data_len: length of data
* @is_ndp_allowed: Indicates whether to allow NDP creation.
* NDI creation is always allowed.
*
* Return: status of operation
*/
int os_if_nan_process_ndp_cmd(struct wlan_objmgr_psoc *psoc,
const void *data, int data_len);
const void *data, int data_len,
bool is_ndp_allowed);
/**
* os_if_nan_register_hdd_callbacks: os_if api to register hdd callbacks

查看文件

@@ -1015,7 +1015,8 @@ static int os_if_nan_process_ndp_end_req(struct wlan_objmgr_psoc *psoc,
}
int os_if_nan_process_ndp_cmd(struct wlan_objmgr_psoc *psoc,
const void *data, int data_len)
const void *data, int data_len,
bool is_ndp_allowed)
{
uint32_t ndp_cmd_type;
uint16_t transaction_id;
@@ -1058,10 +1059,22 @@ int os_if_nan_process_ndp_cmd(struct wlan_objmgr_psoc *psoc,
case QCA_WLAN_VENDOR_ATTR_NDP_INTERFACE_DELETE:
return os_if_nan_process_ndi_delete(psoc, tb);
case QCA_WLAN_VENDOR_ATTR_NDP_INITIATOR_REQUEST:
if (!is_ndp_allowed) {
osif_err("Unsupported concurrency for NAN datapath");
return -EOPNOTSUPP;
}
return os_if_nan_process_ndp_initiator_req(psoc, tb);
case QCA_WLAN_VENDOR_ATTR_NDP_RESPONDER_REQUEST:
if (!is_ndp_allowed) {
osif_err("Unsupported concurrency for NAN datapath");
return -EOPNOTSUPP;
}
return os_if_nan_process_ndp_responder_req(psoc, tb);
case QCA_WLAN_VENDOR_ATTR_NDP_END_REQUEST:
if (!is_ndp_allowed) {
osif_err("Unsupported concurrency for NAN datapath");
return -EOPNOTSUPP;
}
return os_if_nan_process_ndp_end_req(psoc, tb);
default:
osif_err("Unrecognized NDP vendor cmd %d", ndp_cmd_type);