qcacmn: Add frame vdev id check in tx

Drop frame if it is not for the vap, to which
client is connected.
Enable this check only for ap.

Change-Id: I33d7eb79267490bdb8697e4e45f789e9f6279f0e
CRs-Fixed: 2756304
此提交包含在:
Ankit Kumar
2020-08-14 16:48:28 +05:30
提交者 snandini
父節點 c886b4c527
當前提交 bdddeb7c22
共有 6 個檔案被更改,包括 173 行新增7 行删除

查看文件

@@ -5362,6 +5362,38 @@ fail0:
return QDF_STATUS_E_FAILURE;
}
/**
* dp_vdev_register_tx_handler() - Register Tx handler
* @vdev: struct dp_vdev *
* @soc: struct dp_soc *
* @txrx_ops: struct ol_txrx_ops *
*/
static inline void dp_vdev_register_tx_handler(struct dp_vdev *vdev,
struct dp_soc *soc,
struct ol_txrx_ops *txrx_ops)
{
/* Enable vdev_id check only for ap, if flag is enabled */
if (vdev->mesh_vdev)
txrx_ops->tx.tx = dp_tx_send_mesh;
else if ((wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(soc->wlan_cfg_ctx)) &&
(vdev->opmode == wlan_op_mode_ap))
txrx_ops->tx.tx = dp_tx_send_vdev_id_check;
else
txrx_ops->tx.tx = dp_tx_send;
/* Avoid check in regular exception Path */
if ((wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(soc->wlan_cfg_ctx)) &&
(vdev->opmode == wlan_op_mode_ap))
txrx_ops->tx.tx_exception = dp_tx_send_exception_vdev_id_check;
else
txrx_ops->tx.tx_exception = dp_tx_send_exception;
dp_alert("Configure tx_vdev_id_chk_handler Feature Flag: %d and mode:%d for vdev_id:%d",
wlan_cfg_is_tx_per_pkt_vdev_id_check_enabled(soc->wlan_cfg_ctx),
vdev->opmode, vdev->vdev_id);
}
/**
* dp_vdev_register_wifi3() - Register VDEV operations from osif layer
* @soc: Datapath soc handle
@@ -5406,13 +5438,7 @@ static QDF_STATUS dp_vdev_register_wifi3(struct cdp_soc_t *soc_hdl,
#endif
vdev->me_convert = txrx_ops->me_convert;
/* TODO: Enable the following once Tx code is integrated */
if (vdev->mesh_vdev)
txrx_ops->tx.tx = dp_tx_send_mesh;
else
txrx_ops->tx.tx = dp_tx_send;
txrx_ops->tx.tx_exception = dp_tx_send_exception;
dp_vdev_register_tx_handler(vdev, soc, txrx_ops);
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO_LOW,
"DP Vdev Register success");