qcacld-3.0: Send nan enabled/disabled flag of SRD channels to fw
Check if NAN SRD operation is enabled in the ini "etsi13_srd_chan_in_master_mode" and send the same to firmware for all SRD channels. Change-Id: I2aa8fd34c67b2061963b62a34d29c73740af3a76 CRs-Fixed: 2748455
This commit is contained in:

committed by
snandini

parent
f955b44a6d
commit
fb7989e27a
@@ -463,6 +463,19 @@ bool ucfg_is_nan_vdev(struct wlan_objmgr_vdev *vdev);
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS ucfg_nan_disable_ind_to_userspace(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_is_nan_allowed_on_freq() - Check if NAN is allowed on given freq
|
||||
* @pdev: pdev context
|
||||
* @freq: Frequency to be checked
|
||||
*
|
||||
* Check if NAN/NDP can be enabled on given frequency.
|
||||
* Validate SRD channels based on the ini and reg domain. Assume rest of the
|
||||
* channels support NAN/NDP for now.
|
||||
*
|
||||
* Return: True if NAN is allowed on the given frequency
|
||||
*/
|
||||
bool ucfg_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq);
|
||||
#else /* WLAN_FEATURE_NAN */
|
||||
|
||||
static inline
|
||||
@@ -576,5 +589,11 @@ QDF_STATUS ucfg_nan_disable_ind_to_userspace(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline
|
||||
bool ucfg_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_NAN */
|
||||
#endif /* _NAN_UCFG_API_H_ */
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include "wlan_policy_mgr_api.h"
|
||||
#include "cfg_ucfg_api.h"
|
||||
#include "cfg_nan.h"
|
||||
#include "wlan_mlme_api.h"
|
||||
|
||||
struct wlan_objmgr_psoc;
|
||||
struct wlan_objmgr_vdev;
|
||||
@@ -1255,3 +1256,18 @@ QDF_STATUS ucfg_nan_disable_ind_to_userspace(struct wlan_objmgr_psoc *psoc)
|
||||
qdf_mem_free(disable_ind);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool ucfg_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq)
|
||||
{
|
||||
bool nan_allowed = false;
|
||||
|
||||
/* Check for SRD channels only */
|
||||
if (!wlan_reg_is_etsi13_srd_chan_for_freq(pdev, freq))
|
||||
return true;
|
||||
|
||||
wlan_mlme_get_srd_master_mode_for_vdev(wlan_pdev_get_psoc(pdev),
|
||||
QDF_NAN_DISC_MODE,
|
||||
&nan_allowed);
|
||||
|
||||
return nan_allowed;
|
||||
}
|
||||
|
@@ -2590,6 +2590,7 @@ typedef struct sSirScanOffloadEvent {
|
||||
* @dfsSet: is dfs supported or not
|
||||
* @half_rate: is the channel operating at 10MHz
|
||||
* @quarter_rate: is the channel operating at 5MHz
|
||||
* @nan_disabled: is NAN disabled on @freq
|
||||
*/
|
||||
typedef struct sSirUpdateChanParam {
|
||||
uint32_t freq;
|
||||
@@ -2597,6 +2598,7 @@ typedef struct sSirUpdateChanParam {
|
||||
bool dfsSet;
|
||||
bool half_rate;
|
||||
bool quarter_rate;
|
||||
bool nan_disabled;
|
||||
} tSirUpdateChanParam, *tpSirUpdateChanParam;
|
||||
|
||||
typedef struct sSirUpdateChan {
|
||||
|
@@ -68,6 +68,7 @@
|
||||
#include "wlan_scan_utils_api.h"
|
||||
#include "wlan_p2p_cfg_api.h"
|
||||
#include "cfg_nan_api.h"
|
||||
#include "nan_ucfg_api.h"
|
||||
|
||||
#include <ol_defines.h>
|
||||
#include "wlan_pkt_capture_ucfg_api.h"
|
||||
@@ -1175,11 +1176,12 @@ QDF_STATUS csr_update_channel_list(struct mac_context *mac)
|
||||
}
|
||||
}
|
||||
|
||||
if (!ucfg_is_nan_allowed_on_freq(mac->pdev,
|
||||
pChanList->chanParam[num_channel].freq))
|
||||
pChanList->chanParam[num_channel].nan_disabled =
|
||||
true;
|
||||
|
||||
if (CHANNEL_STATE_ENABLE == channel_state)
|
||||
pChanList->chanParam[num_channel].dfsSet =
|
||||
false;
|
||||
else
|
||||
if (CHANNEL_STATE_ENABLE != channel_state)
|
||||
pChanList->chanParam[num_channel].dfsSet =
|
||||
true;
|
||||
|
||||
|
@@ -168,6 +168,9 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
|
||||
chan_p->dfs_set = 1;
|
||||
}
|
||||
|
||||
if (chan_list->chanParam[i].nan_disabled)
|
||||
chan_p->nan_disabled = 1;
|
||||
|
||||
if (chan_p->mhz < WMA_2_4_GHZ_MAX_FREQ) {
|
||||
chan_p->phy_mode = MODE_11G;
|
||||
if (chan_list->vht_en && chan_list->vht_24_en)
|
||||
|
Reference in New Issue
Block a user