qcacmn: Add mon dp ops to set monitor filter
As part of mac address filtering feature for scan radio in special vap mode, on addition of first NAC entry or deletion of last NAC entry the corresponding monitor filter needs to be set or reset Add change to support ops callback function required to set or reset monitor filter settings are runtime. Change-Id: I916c0b246bb180363f1a181ef49618af763b261d CRs-Fixed: 3317409
This commit is contained in:

committed by
Madan Koyyalamudi

parent
433dee00be
commit
938ddb0956
@@ -1479,6 +1479,54 @@ fail0:
|
||||
}
|
||||
#endif /* ATH_SUPPORT_NAC_RSSI || ATH_SUPPORT_NAC */
|
||||
|
||||
/*
|
||||
* dp_update_mon_mac_filter() - Set/reset monitor mac filter
|
||||
* @soc_hdl: cdp soc handle
|
||||
* @vdev_id: id of virtual device object
|
||||
* @cmd: Add/Del command
|
||||
*
|
||||
* Return: 0 for success. nonzero for failure.
|
||||
*/
|
||||
static QDF_STATUS dp_update_mon_mac_filter(struct cdp_soc_t *soc_hdl,
|
||||
uint8_t vdev_id, uint32_t cmd)
|
||||
{
|
||||
struct dp_soc *soc = (struct dp_soc *)soc_hdl;
|
||||
struct dp_pdev *pdev;
|
||||
struct dp_vdev *vdev = dp_vdev_get_ref_by_id(soc, vdev_id,
|
||||
DP_MOD_ID_CDP);
|
||||
struct dp_mon_pdev *mon_pdev;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (!vdev)
|
||||
return status;
|
||||
|
||||
pdev = vdev->pdev;
|
||||
if (!pdev) {
|
||||
dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_CDP);
|
||||
return status;
|
||||
}
|
||||
|
||||
mon_pdev = pdev->monitor_pdev;
|
||||
if (cmd == DP_NAC_PARAM_ADD) {
|
||||
/* first neighbour added */
|
||||
dp_mon_filter_set_reset_mon_mac_filter(pdev, true);
|
||||
status = dp_mon_filter_update(pdev);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
dp_cdp_err("%pK: Mon mac filter set failed", soc);
|
||||
dp_mon_filter_set_reset_mon_mac_filter(pdev, false);
|
||||
}
|
||||
} else if (cmd == DP_NAC_PARAM_DEL) {
|
||||
/* last neighbour deleted */
|
||||
dp_mon_filter_set_reset_mon_mac_filter(pdev, false);
|
||||
status = dp_mon_filter_update(pdev);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
dp_cdp_err("%pK: Mon mac filter reset failed", soc);
|
||||
}
|
||||
|
||||
dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_CDP);
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef ATH_SUPPORT_NAC_RSSI
|
||||
/**
|
||||
* dp_vdev_get_neighbour_rssi(): Store RSSI for configured NAC
|
||||
@@ -5798,6 +5846,11 @@ void dp_mon_cdp_ops_register(struct dp_soc *soc)
|
||||
#if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
|
||||
dp_cfr_filter_register_1_0(ops);
|
||||
#endif
|
||||
if (target_type == TARGET_TYPE_QCN9000)
|
||||
ops->ctrl_ops->txrx_update_mon_mac_filter =
|
||||
dp_update_mon_mac_filter;
|
||||
else
|
||||
ops->ctrl_ops->txrx_update_mon_mac_filter = NULL;
|
||||
break;
|
||||
case TARGET_TYPE_QCN9224:
|
||||
case TARGET_TYPE_QCA5332:
|
||||
@@ -5817,6 +5870,7 @@ void dp_mon_cdp_ops_register(struct dp_soc *soc)
|
||||
dp_cfr_filter_register_2_0(ops);
|
||||
#endif
|
||||
#endif /* QCA_MONITOR_2_0_SUPPORT */
|
||||
ops->ctrl_ops->txrx_update_mon_mac_filter = NULL;
|
||||
break;
|
||||
default:
|
||||
dp_mon_err("%s: Unknown tgt type %d", __func__, target_type);
|
||||
@@ -6129,6 +6183,7 @@ void dp_mon_feature_ops_deregister(struct dp_soc *soc)
|
||||
#if defined(ATH_SUPPORT_NAC_RSSI) || defined(ATH_SUPPORT_NAC)
|
||||
mon_ops->mon_filter_setup_smart_monitor = NULL;
|
||||
#endif
|
||||
mon_ops->mon_filter_set_reset_mon_mac_filter = NULL;
|
||||
#ifdef WLAN_RX_PKT_CAPTURE_ENH
|
||||
mon_ops->mon_filter_setup_rx_enh_capture = NULL;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user