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

Commit d6aa803b authored by Alok Kumar's avatar Alok Kumar
Browse files

qcacld-3.0: Send proper TX MGMT frames status to packetdump

Currently, QDF_STATUS_SUCCESS is always sent for MGMT
Tx frames to packetdump.

Send the proper Tx status for MGMT Tx frames which is
mapped to packetdump tx status.

Change-Id: I7a780777910a5b9220ebb77cda1e0c4acd9f45b2
CRs-Fixed: 2490243
parent 4476f9c7
Loading
Loading
Loading
Loading
+35 −2
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@
#include <qdf_crypto.h>
#include "wma_twt.h"
#include <wlan_mlme_main.h>
#include <wlan_logging_sock_svc.h>

/**
 * wma_send_bcn_buf_ll() - prepare and send beacon buffer to fw for LL
@@ -3033,6 +3034,35 @@ static const char *wma_get_status_str(uint32_t status)
}
#endif

/**
 * wma_mgmt_pktdump_status_map() - map MGMT Tx completion status with
 * packet dump Tx status
 * @status: MGMT Tx completion status
 *
 * Return: packet dump tx_status enum
 */
static inline enum tx_status
wma_mgmt_pktdump_status_map(WMI_MGMT_TX_COMP_STATUS_TYPE status)
{
	enum tx_status pktdump_status;

	switch (status) {
	case WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK:
		pktdump_status = tx_status_ok;
		break;
	case WMI_MGMT_TX_COMP_TYPE_DISCARD:
		pktdump_status = tx_status_discard;
		break;
	case WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK:
		pktdump_status = tx_status_no_ack;
		break;
	default:
		pktdump_status = tx_status_discard;
		break;
	}
	return pktdump_status;
}

/**
 * wma_process_mgmt_tx_completion() - process mgmt completion
 * @wma_handle: wma handle
@@ -3049,6 +3079,7 @@ static int wma_process_mgmt_tx_completion(tp_wma_handle wma_handle,
	uint8_t vdev_id = 0;
	QDF_STATUS ret;
	tp_wma_packetdump_cb packetdump_cb;
	enum tx_status pktdump_status;

	if (wma_handle == NULL) {
		WMA_LOGE("%s: wma handle is NULL", __func__);
@@ -3072,9 +3103,11 @@ static int wma_process_mgmt_tx_completion(tp_wma_handle wma_handle,
					  QDF_DMA_TO_DEVICE);

	packetdump_cb = wma_handle->wma_mgmt_tx_packetdump_cb;
	if (packetdump_cb)
		packetdump_cb(buf, QDF_STATUS_SUCCESS,
	if (packetdump_cb) {
		pktdump_status = wma_mgmt_pktdump_status_map(status);
		packetdump_cb(buf, pktdump_status,
			vdev_id, TX_MGMT_PKT);
	}

	ret = mgmt_txrx_tx_completion_handler(pdev, desc_id, status, NULL);