qcacmn: TX status conversion for Datapath frame during diag logging
Wrong value of tx status sent to supplicant for Datapath frame via diag logging. Convert the tx status value to enum diag_tx_status specific value. Change-Id: I3bcf47ed5265d82fb64f1499f79e89be52d23a3e CRs-Fixed: 3236391
This commit is contained in:

committed by
Madan Koyyalamudi

parent
fb99e9066d
commit
b3113d5540
@@ -181,6 +181,52 @@ typedef struct s_qdf_trace_data {
|
|||||||
uint16_t dump_count;
|
uint16_t dump_count;
|
||||||
} t_qdf_trace_data;
|
} t_qdf_trace_data;
|
||||||
|
|
||||||
|
#ifdef CONNECTIVITY_DIAG_EVENT
|
||||||
|
/**
|
||||||
|
* enum diag_dp_tx_rx_status - TX/RX packet status
|
||||||
|
* @DIAG_TX_RX_STATUS_INVALID: default invalid status
|
||||||
|
* @DIAG_TX_RX_STATUS_OK: successfully sent + acked
|
||||||
|
* @DIAG_TX_RX_STATUS_DISCARD: queued but not sent over air
|
||||||
|
* @DIAG_TX_RX_STATUS_NO_ACK: packet sent but no ack received
|
||||||
|
* @DIAG_TX_RX_STATUS_DROP: packet dropped due to congestion
|
||||||
|
* @DIAG_TX_RX_STATUS_DOWNLOAD_SUCC: packet delivered to target
|
||||||
|
* @DIAG_TX_RX_STATUS_DEFAULT: default status
|
||||||
|
* @DIAG_TX_RX_STATUS_MAX:
|
||||||
|
*/
|
||||||
|
enum diag_dp_tx_rx_status {
|
||||||
|
DIAG_TX_RX_STATUS_INVALID,
|
||||||
|
DIAG_TX_RX_STATUS_OK,
|
||||||
|
DIAG_TX_RX_STATUS_FW_DISCARD,
|
||||||
|
DIAG_TX_RX_STATUS_NO_ACK,
|
||||||
|
DIAG_TX_RX_STATUS_DROP,
|
||||||
|
DIAG_TX_RX_STATUS_DOWNLOAD_SUCC,
|
||||||
|
DIAG_TX_RX_STATUS_DEFAULT,
|
||||||
|
DIAG_TX_RX_STATUS_MAX
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum diag_tx_status - Used by attribute
|
||||||
|
* @DIAG_TX_STATUS_FAIL: Indicates frame is not sent over the air.
|
||||||
|
* @DIAG_TX_STATUS_NO_ACK: Indicates packet sent but acknowledgment
|
||||||
|
* is not received.
|
||||||
|
* @DIAG_TX_STATUS_ACK: Indicates the frame is successfully sent and
|
||||||
|
* acknowledged.
|
||||||
|
*/
|
||||||
|
enum diag_tx_status {
|
||||||
|
DIAG_TX_STATUS_FAIL = 1,
|
||||||
|
DIAG_TX_STATUS_NO_ACK = 2,
|
||||||
|
DIAG_TX_STATUS_ACK = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_get_diag_tx_status() - Gives the diag logging specific tx status
|
||||||
|
* @tx_status: fw specific TX status
|
||||||
|
*
|
||||||
|
* Returns TX status specified in enum diag_tx_status
|
||||||
|
*/
|
||||||
|
enum diag_tx_status wlan_get_diag_tx_status(enum qdf_dp_tx_rx_status tx_status);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CASE_RETURN_STRING(str) case ((str)): return (uint8_t *)(# str);
|
#define CASE_RETURN_STRING(str) case ((str)): return (uint8_t *)(# str);
|
||||||
|
|
||||||
#ifndef MAX_QDF_DP_TRACE_RECORDS
|
#ifndef MAX_QDF_DP_TRACE_RECORDS
|
||||||
|
@@ -1728,6 +1728,25 @@ static bool qdf_log_icmp_pkt(uint8_t vdev_id, struct sk_buff *skb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONNECTIVITY_DIAG_EVENT
|
#ifdef CONNECTIVITY_DIAG_EVENT
|
||||||
|
enum diag_tx_status wlan_get_diag_tx_status(enum qdf_dp_tx_rx_status tx_status)
|
||||||
|
{
|
||||||
|
switch (tx_status) {
|
||||||
|
case DIAG_TX_RX_STATUS_FW_DISCARD:
|
||||||
|
case DIAG_TX_RX_STATUS_INVALID:
|
||||||
|
case DIAG_TX_RX_STATUS_DROP:
|
||||||
|
case DIAG_TX_RX_STATUS_DOWNLOAD_SUCC:
|
||||||
|
case DIAG_TX_RX_STATUS_DEFAULT:
|
||||||
|
default:
|
||||||
|
return DIAG_TX_STATUS_FAIL;
|
||||||
|
case DIAG_TX_RX_STATUS_NO_ACK:
|
||||||
|
return DIAG_TX_STATUS_NO_ACK;
|
||||||
|
case DIAG_TX_RX_STATUS_OK:
|
||||||
|
return DIAG_TX_STATUS_ACK;
|
||||||
|
}
|
||||||
|
|
||||||
|
return DIAG_TX_STATUS_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_subtype_to_wlan_main_tag() - Convert qdf subtype to wlan main tag
|
* qdf_subtype_to_wlan_main_tag() - Convert qdf subtype to wlan main tag
|
||||||
* @subtype: EAPoL key subtype
|
* @subtype: EAPoL key subtype
|
||||||
@@ -1884,7 +1903,8 @@ void qdf_fill_wlan_connectivity_log(enum qdf_proto_type type,
|
|||||||
|
|
||||||
/*Tx completion status needs to be logged*/
|
/*Tx completion status needs to be logged*/
|
||||||
if (dir == QDF_TX)
|
if (dir == QDF_TX)
|
||||||
wlan_diag_event.tx_status = qdf_tx_status;
|
wlan_diag_event.tx_status =
|
||||||
|
wlan_get_diag_tx_status(qdf_tx_status);
|
||||||
|
|
||||||
WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_CONN_DP);
|
WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_CONN_DP);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user