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
parent 5b738c23a3
commit 0610cc4041
3 changed files with 20 additions and 9 deletions

View File

@@ -411,14 +411,9 @@ static int __wlan_hdd_cfg80211_process_ndp_cmd(struct wiphy *wiphy,
hdd_err_rl("NAN datapath is not enabled"); hdd_err_rl("NAN datapath is not enabled");
return -EPERM; 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, return os_if_nan_process_ndp_cmd(hdd_ctx->psoc, data, data_len,
data, data_len); hdd_is_ndp_allowed(hdd_ctx));
} }
/** /**

View File

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

View File

@@ -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, 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; uint32_t ndp_cmd_type;
uint16_t transaction_id; 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: case QCA_WLAN_VENDOR_ATTR_NDP_INTERFACE_DELETE:
return os_if_nan_process_ndi_delete(psoc, tb); return os_if_nan_process_ndi_delete(psoc, tb);
case QCA_WLAN_VENDOR_ATTR_NDP_INITIATOR_REQUEST: 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); return os_if_nan_process_ndp_initiator_req(psoc, tb);
case QCA_WLAN_VENDOR_ATTR_NDP_RESPONDER_REQUEST: 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); return os_if_nan_process_ndp_responder_req(psoc, tb);
case QCA_WLAN_VENDOR_ATTR_NDP_END_REQUEST: 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); return os_if_nan_process_ndp_end_req(psoc, tb);
default: default:
osif_err("Unrecognized NDP vendor cmd %d", ndp_cmd_type); osif_err("Unrecognized NDP vendor cmd %d", ndp_cmd_type);