qcacld-3.0: Store NDI beamform service bit

Store the NAN NDI beamform service bit in the NAN capability struct and
add API to access that value.

Change-Id: I429fc870b5287bd40855b9277d14b19574974a46
CRs-fixed: 2876730
This commit is contained in:
Lincoln Tran
2021-02-11 13:03:15 -08:00
committed by snandini
parent ea5da49021
commit 369c4ae107
4 changed files with 37 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -841,9 +841,10 @@ struct wlan_nan_rx_ops {
* @nan_dbs_supported: Target supports NAN Discovery with DBS * @nan_dbs_supported: Target supports NAN Discovery with DBS
* @ndi_dbs_supported: Target supports NAN Datapath with DBS * @ndi_dbs_supported: Target supports NAN Datapath with DBS
* @nan_sap_supported: Target supports NAN Discovery with SAP concurrency * @nan_sap_supported: Target supports NAN Discovery with SAP concurrency
* @ndi_sap_supported: Target supports NAN Datapth with SAP concurrency * @ndi_sap_supported: Target supports NAN Datapath with SAP concurrency
* @nan_vdev_allowed: Allow separate vdev creation for NAN discovery * @nan_vdev_allowed: Allow separate vdev creation for NAN discovery
* @sta_nan_ndi_ndi_allowed: 4 port concurrency of STA+NAN+NDI+NDI is supported * @sta_nan_ndi_ndi_allowed: 4 port concurrency of STA+NAN+NDI+NDI is supported
* @ndi_txbf_supported: Target supports NAN Datapath with TX beamforming
* by Fw or not. * by Fw or not.
*/ */
struct nan_tgt_caps { struct nan_tgt_caps {
@@ -854,6 +855,7 @@ struct nan_tgt_caps {
uint32_t ndi_sap_supported:1; uint32_t ndi_sap_supported:1;
uint32_t nan_vdev_allowed:1; uint32_t nan_vdev_allowed:1;
uint32_t sta_nan_ndi_ndi_allowed:1; uint32_t sta_nan_ndi_ndi_allowed:1;
uint32_t ndi_txbf_supported:1;
}; };
#endif #endif

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -403,6 +403,14 @@ bool ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc *psoc);
*/ */
bool ucfg_nan_is_sta_nan_ndi_4_port_allowed(struct wlan_objmgr_psoc *psoc); bool ucfg_nan_is_sta_nan_ndi_4_port_allowed(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_nan_is_beamforming_supported- Get support for beamforing
* @psoc: pointer to psoc object
*
* Return: True if beamforming is supported, false if not.
*/
bool ucfg_nan_is_beamforming_supported(struct wlan_objmgr_psoc *psoc);
/** /**
* ucfg_disable_nan_discovery() - Disable NAN discovery * ucfg_disable_nan_discovery() - Disable NAN discovery
* @psoc: pointer to psoc object * @psoc: pointer to psoc object
@@ -555,6 +563,12 @@ bool ucfg_nan_is_sta_nan_ndi_4_port_allowed(struct wlan_objmgr_psoc *psoc)
return false; return false;
} }
static inline
bool ucfg_nan_is_beamforming_supported(struct wlan_objmgr_psoc *psoc)
{
return false;
}
static inline static inline
QDF_STATUS ucfg_disable_nan_discovery(struct wlan_objmgr_psoc *psoc, QDF_STATUS ucfg_disable_nan_discovery(struct wlan_objmgr_psoc *psoc,
uint8_t *data, uint32_t data_len) uint8_t *data, uint32_t data_len)

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -1127,6 +1127,19 @@ ucfg_nan_is_sta_nan_ndi_4_port_allowed(struct wlan_objmgr_psoc *psoc)
return psoc_nan_obj->nan_caps.sta_nan_ndi_ndi_allowed; return psoc_nan_obj->nan_caps.sta_nan_ndi_ndi_allowed;
} }
bool ucfg_nan_is_beamforming_supported(struct wlan_objmgr_psoc *psoc)
{
struct nan_psoc_priv_obj *psoc_nan_obj;
psoc_nan_obj = nan_get_psoc_priv_obj(psoc);
if (!psoc_nan_obj) {
nan_err("psoc_nan_obj is null");
return false;
}
return psoc_nan_obj->nan_caps.ndi_txbf_supported;
}
static inline bool static inline bool
ucfg_is_nan_enabled(struct nan_psoc_priv_obj *psoc_nan_obj) ucfg_is_nan_enabled(struct nan_psoc_priv_obj *psoc_nan_obj)
{ {

View File

@@ -5272,6 +5272,10 @@ static void wma_update_nan_target_caps(tp_wma_handle wma_handle,
if (wmi_service_enabled(wma_handle->wmi_handle, if (wmi_service_enabled(wma_handle->wmi_handle,
wmi_service_sta_nan_ndi_four_port)) wmi_service_sta_nan_ndi_four_port))
tgt_cfg->nan_caps.sta_nan_ndi_ndi_allowed = 1; tgt_cfg->nan_caps.sta_nan_ndi_ndi_allowed = 1;
if (wmi_service_enabled(wma_handle->wmi_handle,
wmi_service_ndi_txbf_support))
tgt_cfg->nan_caps.ndi_txbf_supported = 1;
} }
#else #else
static void wma_update_nan_target_caps(tp_wma_handle wma_handle, static void wma_update_nan_target_caps(tp_wma_handle wma_handle,