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

Commit 99686a22 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 4f7147b1 on remote branch

Change-Id: I107343e272b7adf94a3147e253cd17f10c612b29
parents a1f4e363 4f7147b1
Loading
Loading
Loading
Loading
+22 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -582,4 +582,25 @@ QDF_STATUS cds_register_mode_change_cb(send_mode_change_event_cb callback);
 * Return: QDF_STATUS
 */
QDF_STATUS cds_deregister_mode_change_cb(void);

/**
 * cds_get_pktcap_mode_enable() - get pktcap mode enable/disable
 *
 * Get the pktcap mode enable/disable from ini
 *
 * Return: 0 - disable, 1 - enable
 */
bool cds_get_pktcap_mode_enable(void);

/**
 * cds_get_pktcapture_mode() - get pktcapture mode value
 *
 * Get the pktcapture mode value from hdd context
 *
 * Return: 0 - disable
 *         1 - Mgmt packets
 *         2 - Data packets
 *         3 - Both Mgmt and Data packets
 */
uint8_t cds_get_pktcapture_mode(void);
#endif /* if !defined __CDS_API_H */
+27 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -3055,3 +3055,29 @@ QDF_STATUS cds_deregister_mode_change_cb(void)

	return QDF_STATUS_SUCCESS;
}

bool cds_get_pktcap_mode_enable(void)
{
	hdd_context_t *hdd_ctx;

	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
	if (!hdd_ctx) {
		cds_err("HDD context is NULL");
		return false;
	}

	return hdd_ctx->config->pktcap_mode_enable;
}

uint8_t cds_get_pktcapture_mode(void)
{
	hdd_context_t *hdd_ctx;

	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
	if (!hdd_ctx) {
		cds_err("HDD context is NULL");
		return 0;
	}

	return hdd_ctx->pktcapture_mode;
}
+15 −0
Original line number Diff line number Diff line
@@ -5936,6 +5936,13 @@ static QDF_STATUS cds_pcl_modification_for_p2p_go(
		cds_err("failed to get enabled channel modified pcl for GO");
		return status;
	}
	status = cds_modify_sap_pcl_based_on_srd(
			pcl_channels, pcl_weight, len);
	if (QDF_IS_STATUS_ERROR(status)) {
		cds_err("failed to get srd modified pcl for SAP");
		return status;
	}

	cds_debug("enabled channel modified pcl len:%d", *len);
	for (i = 0; i < *len; i++)
		cds_debug("chan:%d weight:%d",
@@ -6140,6 +6147,14 @@ QDF_STATUS cds_get_pcl(enum cds_con_mode mode,
			pcl_channels[i], pcl_weight[i]);
	}

	status = cds_mode_specific_modification_on_pcl(pcl_channels, pcl_weight,
						       len, mode);

	if (QDF_IS_STATUS_ERROR(status)) {
		cds_err("failed to get modified pcl for mode %d", mode);
		return status;
	}

	return QDF_STATUS_SUCCESS;
}

+7 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -87,6 +87,8 @@ struct txrx_pdev_cfg_t {
	bool flow_steering_enabled;

	struct ol_tx_sched_wrr_ac_specs_t ac_specs[TX_WMM_AC_NUM];

	uint8_t pktcapture_mode;
};

/**
@@ -603,4 +605,8 @@ uint16_t ol_cfg_get_send_limit(ol_pdev_handle pdev, int ac);
int ol_cfg_get_credit_reserve(ol_pdev_handle pdev, int ac);

int ol_cfg_get_discard_weight(ol_pdev_handle pdev, int ac);

int ol_cfg_pktcapture_mode(ol_pdev_handle pdev);

void ol_cfg_set_pktcapture_mode(ol_pdev_handle pdev, int val);
#endif /* _OL_CFG__H_ */
+34 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -562,3 +562,36 @@ int ol_cfg_get_discard_weight(ol_pdev_handle pdev, int ac)
	else
		return 0;
}

/**
 * ol_cfg_pktcapture_mode() - return pktcapture mode
 * @pdev : handle to the physical device
 *
 * Return: 0 - disable
 *         1 - Mgmt packets
 *         2 - Data packets
 *         3 - Both Mgmt and Data packets
 */
int ol_cfg_pktcapture_mode(ol_pdev_handle pdev)
{
	struct txrx_pdev_cfg_t *cfg = (struct txrx_pdev_cfg_t *)pdev;

	return cfg->pktcapture_mode;
}

/**
 * ol_cfg_set_pktcapture_mode() - set pktcapture mode
 * @pdev : handle to the physical device
 * @val  : 0 - disable
 *         1 - Mgmt packets
 *         2 - Data packets
 *         3 - Both Mgmt and Data packets
 *
 * Return: none
 */
void ol_cfg_set_pktcapture_mode(ol_pdev_handle pdev, int val)
{
	struct txrx_pdev_cfg_t *cfg = (struct txrx_pdev_cfg_t *)pdev;

	cfg->pktcapture_mode = val;
}
Loading