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

Commit dadd0195 authored by Vulupala Shashank Reddy's avatar Vulupala Shashank Reddy Committed by nshrivas
Browse files

qcacmn: Add support to include tx retry count for mon interface

Extend radiotap header to append tx retry count for packets sent to
virtual mon interface.

Change-Id: I27664e624babe1ef61dc437088fdd96b370b49f9
CRs-Fixed: 2546290
parent 56e4e5ef
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -183,6 +183,7 @@ struct mon_rx_status {
	uint8_t  beamformed;
	uint8_t  tx_status;
	bool add_rtap_ext;
	uint8_t  tx_retry_cnt;
};

/* DHCP Related Mask */
+4 −0
Original line number Diff line number Diff line
@@ -3418,6 +3418,7 @@ static unsigned int qdf_nbuf_update_radiotap_vht_flags(
#define NORMALIZED_TO_NOISE_FLOOR (-96)

#define IEEE80211_RADIOTAP_TX_STATUS 0
#define IEEE80211_RADIOTAP_RETRY_COUNT 1

/* This is Radio Tap Header Extension Length.
 * 4 Bytes for Extended it_present bit map +
@@ -3534,9 +3535,12 @@ unsigned int qdf_nbuf_update_radiotap(struct mon_rx_status *rx_status,
		rtap_ext = (uint32_t *)&rthdr->it_present;
		rtap_ext++;
		*rtap_ext = cpu_to_le32(1 << IEEE80211_RADIOTAP_TX_STATUS);
		*rtap_ext |= cpu_to_le32(1 << IEEE80211_RADIOTAP_RETRY_COUNT);

		rtap_buf[rtap_len] = rx_status->tx_status;
		rtap_len += 1;
		rtap_buf[rtap_len] = rx_status->tx_retry_cnt;
		rtap_len += 1;
	}

	rthdr->it_len = cpu_to_le16(rtap_len);