Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7650770 authored by Vulupala Shashank Reddy's avatar Vulupala Shashank Reddy
Browse files

Revert "qcacld-3.0: Add support to send config to FW based on filter"

This reverts commit dbc1c1a8.

Change-Id: I4660512e5c5b72f60f20332c5139e7bc15f20890
parent 1573e8ee
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -172,25 +172,6 @@ void pkt_capture_set_pktcap_mode(struct wlan_objmgr_psoc *psoc,
enum pkt_capture_mode
pkt_capture_get_pktcap_mode(struct wlan_objmgr_psoc *psoc);

/**
 * pkt_capture_set_pktcap_config - Set packet capture config
 * @psoc: pointer to psoc object
 * @config: config to be set
 *
 * Return: None
 */
void pkt_capture_set_pktcap_config(struct wlan_objmgr_psoc *psoc,
				   enum pkt_capture_config config);

/**
 * pkt_capture_get_pktcap_config - Get packet capture config
 * @psoc: pointer to psoc object
 *
 * Return: config value
 */
enum pkt_capture_config
pkt_capture_get_pktcap_config(struct wlan_objmgr_psoc *psoc);

/**
 * pkt_capture_drop_nbuf_list() - drop an nbuf list
 * @buf_list: buffer list to be dropepd
+0 −2
Original line number Diff line number Diff line
@@ -44,13 +44,11 @@ struct pkt_capture_cfg {
 * @mon_cb: monitor callback function pointer
 * @mon_ctx: monitor callback context
 * @pkt_capture_mode: packet capture mode
 * @pkt_capture_config: pakcet capture config
 */
struct pkt_capture_cb_context {
	QDF_STATUS (*mon_cb)(void *, qdf_nbuf_t);
	void *mon_ctx;
	enum pkt_capture_mode pkt_capture_mode;
	enum pkt_capture_config pkt_capture_config;
};

/**
+2 −104
Original line number Diff line number Diff line
@@ -686,65 +686,6 @@ pkt_capture_get_pktcap_mode(struct wlan_objmgr_psoc *psoc)
	return mode;
}

void pkt_capture_set_pktcap_config(struct wlan_objmgr_psoc *psoc,
				   enum pkt_capture_config config)
{
	struct pkt_capture_vdev_priv *vdev_priv;
	struct wlan_objmgr_vdev *vdev;

	if (!psoc) {
		pkt_capture_err("psoc is NULL");
		return;
	}

	vdev = wlan_objmgr_get_vdev_by_opmode_from_psoc(psoc,
							QDF_STA_MODE,
							WLAN_PKT_CAPTURE_ID);
	if (!vdev) {
		pkt_capture_err("vdev is NULL");
		return;
	}

	vdev_priv = pkt_capture_vdev_get_priv(vdev);
	if (vdev_priv)
		vdev_priv->cb_ctx->pkt_capture_config = config;
	else
		pkt_capture_err("vdev_priv is NULL");

	wlan_objmgr_vdev_release_ref(vdev, WLAN_PKT_CAPTURE_ID);
}

enum pkt_capture_config
pkt_capture_get_pktcap_config(struct wlan_objmgr_psoc *psoc)
{
	enum pkt_capture_config config = 0;
	struct pkt_capture_vdev_priv *vdev_priv;
	struct wlan_objmgr_vdev *vdev;

	if (!psoc) {
		pkt_capture_err("psoc is NULL");
		return 0;
	}

	if (!pkt_capture_get_mode(psoc))
		return 0;

	vdev = wlan_objmgr_get_vdev_by_opmode_from_psoc(psoc,
							QDF_STA_MODE,
							WLAN_PKT_CAPTURE_ID);
	if (!vdev)
		return 0;

	vdev_priv = pkt_capture_vdev_get_priv(vdev);
	if (!vdev_priv)
		pkt_capture_err("vdev_priv is NULL");
	else
		config = vdev_priv->cb_ctx->pkt_capture_config;

	wlan_objmgr_vdev_release_ref(vdev, WLAN_PKT_CAPTURE_ID);
	return config;
}

/**
 * pkt_capture_callback_ctx_create() - Create packet capture callback context
 * @vdev_priv: pointer to packet capture vdev priv obj
@@ -1045,8 +986,6 @@ QDF_STATUS pkt_capture_set_filter(struct pkt_capture_frame_filter frame_filter,
	enum pkt_capture_mode mode = PACKET_CAPTURE_MODE_DISABLE;
	struct dp_soc *soc;
	QDF_STATUS status;
	enum pkt_capture_config config = 0;
	bool check_enable_beacon = 0;

	if (!vdev) {
		pkt_capture_err("vdev is NULL");
@@ -1095,35 +1034,10 @@ QDF_STATUS pkt_capture_set_filter(struct pkt_capture_frame_filter frame_filter,
		psoc_priv->frame_filter.connected_beacon_interval =
			frame_filter.connected_beacon_interval;

	if (psoc_priv->frame_filter.mgmt_tx_frame_filter)
	if (psoc_priv->frame_filter.mgmt_tx_frame_filter ||
	    psoc_priv->frame_filter.mgmt_rx_frame_filter)
		mode |= PACKET_CAPTURE_MODE_MGMT_ONLY;

	if (psoc_priv->frame_filter.mgmt_rx_frame_filter &
	    PKT_CAPTURE_MGMT_FRAME_TYPE_ALL) {
		mode |= PACKET_CAPTURE_MODE_MGMT_ONLY;
		config |= 1 << PACKET_CAPTURE_CONFIG_BEACON_ENABLE;
		config |= 1 << PACKET_CAPTURE_CONFIG_OFF_CHANNEL_BEACON_ENABLE;
	} else {
		if (psoc_priv->frame_filter.mgmt_rx_frame_filter &
		    PKT_CAPTURE_MGMT_CONNECT_NO_BEACON) {
			mode |= PACKET_CAPTURE_MODE_MGMT_ONLY;
			config |= 1 << PACKET_CAPTURE_CONFIG_NO_BEACON_ENABLE;
		} else {
			check_enable_beacon = 1;
		}
	}

	if (check_enable_beacon) {
		if (psoc_priv->frame_filter.mgmt_rx_frame_filter &
		    PKT_CAPTURE_MGMT_CONNECT_BEACON)
			config |= 1 << PACKET_CAPTURE_CONFIG_BEACON_ENABLE;

		if (psoc_priv->frame_filter.mgmt_rx_frame_filter &
		    PKT_CAPTURE_MGMT_CONNECT_SCAN_BEACON)
			config |= 1 <<
				PACKET_CAPTURE_CONFIG_OFF_CHANNEL_BEACON_ENABLE;
	}

	if (psoc_priv->frame_filter.data_tx_frame_filter ||
	    psoc_priv->frame_filter.data_rx_frame_filter)
		mode |= PACKET_CAPTURE_MODE_DATA_ONLY;
@@ -1138,21 +1052,5 @@ QDF_STATUS pkt_capture_set_filter(struct pkt_capture_frame_filter frame_filter,
		soc->wlan_cfg_ctx->pkt_capture_mode = mode;
	}

	if (psoc_priv->frame_filter.ctrl_tx_frame_filter ||
	    psoc_priv->frame_filter.ctrl_rx_frame_filter)
		config |= 1 << PACKET_CAPTURE_CONFIG_TRIGGER_ENABLE;

	if (psoc_priv->frame_filter.data_rx_frame_filter &
	    PKT_CAPTURE_DATA_FRAME_QOS_NULL)
		config |= 1 << PACKET_CAPTURE_CONFIG_QOS_ENABLE;

	if (config != pkt_capture_get_pktcap_config(psoc)) {
		status = tgt_pkt_capture_send_config(vdev, config);
		if (QDF_IS_STATUS_ERROR(status)) {
			pkt_capture_err("packet capture send config failed");
			return status;
		}
	}

	return QDF_STATUS_SUCCESS;
}
+11 −14
Original line number Diff line number Diff line
@@ -38,22 +38,19 @@ enum pkt_capture_mode {
};

/**
 * enum pkt_capture_config - packet capture config
 * enum pkt_capture_trigger_qos_config - packet capture config
 * @PACKET_CAPTURE_CONFIG_TRIGGER_QOS_DISABLE: disable capture for trigger and
 *                                             qos frames
 * @PACKET_CAPTURE_CONFIG_TRIGGER_ENABLE: enable capture for trigger frames only
 * @PACKET_CAPTURE_CONFIG_QOS_ENABLE: enable capture for qos frames only
 * @PACKET_CAPTURE_CONFIG_CONNECT_NO_BEACON_ENABLE: drop all beacons, when
 *                                                  device in connected state
 * @PACKET_CAPTURE_CONFIG_CONNECT_BEACON_ENABLE: enable only connected BSSID
 *                                      beacons, when device in connected state
 * @PACKET_CAPTURE_CONFIG_CONNECT_OFF_CHANNEL_BEACON_ENABLE: enable off channel
 *                                      beacons, when device in connected state
 * @PACKET_CAPTURE_CONFIG_TRIGGER_QOS_ENABLE: enable capture for both trigger
 *                                            and qos frames
 */
enum pkt_capture_config {
	PACKET_CAPTURE_CONFIG_TRIGGER_ENABLE = BIT(0),
	PACKET_CAPTURE_CONFIG_QOS_ENABLE = BIT(1),
	PACKET_CAPTURE_CONFIG_NO_BEACON_ENABLE = BIT(2),
	PACKET_CAPTURE_CONFIG_BEACON_ENABLE = BIT(3),
	PACKET_CAPTURE_CONFIG_OFF_CHANNEL_BEACON_ENABLE = BIT(4),
enum pkt_capture_trigger_qos_config {
	PACKET_CAPTURE_CONFIG_TRIGGER_QOS_DISABLE = 0,
	PACKET_CAPTURE_CONFIG_TRIGGER_ENABLE,
	PACKET_CAPTURE_CONFIG_QOS_ENABLE,
	PACKET_CAPTURE_CONFIG_TRIGGER_QOS_ENABLE,
};

/**
@@ -109,7 +106,7 @@ struct wlan_pkt_capture_tx_ops {
	QDF_STATUS (*pkt_capture_send_config)
				(struct wlan_objmgr_psoc *psoc,
				 uint8_t vdev_id,
				 enum pkt_capture_config config);
				 enum pkt_capture_trigger_qos_config config);
};

/**
+2 −2
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ QDF_STATUS
tgt_pkt_capture_send_mode(struct wlan_objmgr_vdev *vdev,
			  enum pkt_capture_mode mode);

#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
/**
 * tgt_pkt_capture_send_config() - send packet capture config to firmware
 * @vdev: pointer to vdev object
@@ -62,9 +63,8 @@ tgt_pkt_capture_send_mode(struct wlan_objmgr_vdev *vdev,
 */
QDF_STATUS
tgt_pkt_capture_send_config(struct wlan_objmgr_vdev *vdev,
			    enum pkt_capture_config config);
			    enum pkt_capture_trigger_qos_config config);

#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
/**
 * tgt_pkt_capture_smu_event() - Receive smart monitor event from firmware
 * @psoc: pointer to psoc
Loading