Răsfoiți Sursa

qcacld-3.0: Update Arp Stats for both Tx and Rx Arp Packets

Currently rx_arp_resp_count stats is not updated for ARP packet
during rx in htt_rx_amsdu_rx_in_order_pop_ll as packet type is
not marked as QDF_NBUF_CB_PACKET_TYPE_ARP.
Also, track_arp_ip member of adapter is updated during NUD SET
but track_arp_ip of hdd_ctx is used inside hdd_hard_start_xmit
and hdd_rx_packet_cbk to compare arp src ip.

Update the packet type to QDF_NBUF_CB_PACKET_TYPE_ARP for ipv4 ARP
packet during htt_rx_amsdu_rx_in_order_pop_ll.
Use track_arp_ip member of adapter to compare arp src ip.

Change-Id: I58a678caa8ce4b54b583f76cfcbbb4f46443f448
CRs-Fixed: 2405335
Alok Kumar 6 ani în urmă
părinte
comite
b94a2e7f29
2 a modificat fișierele cu 7 adăugiri și 3 ștergeri
  1. 5 0
      core/dp/htt/htt_rx_ll.c
  2. 2 3
      core/hdd/src/wlan_hdd_tx_rx.c

+ 5 - 0
core/dp/htt/htt_rx_ll.c

@@ -1533,6 +1533,11 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
 		qdf_dp_trace_set_track(msdu, QDF_RX);
 		QDF_NBUF_CB_TX_PACKET_TRACK(msdu) = QDF_NBUF_TX_PKT_DATA_TRACK;
 		QDF_NBUF_CB_RX_CTX_ID(msdu) = rx_ctx_id;
+
+		if (qdf_nbuf_is_ipv4_arp_pkt(msdu))
+			QDF_NBUF_CB_GET_PACKET_TYPE(msdu) =
+				QDF_NBUF_CB_PACKET_TYPE_ARP;
+
 		DPTRACE(qdf_dp_trace(msdu,
 				     QDF_DP_TRACE_RX_HTT_PACKET_PTR_RECORD,
 				     QDF_TRACE_DEFAULT_PDEV_ID,

+ 2 - 3
core/hdd/src/wlan_hdd_tx_rx.c

@@ -918,7 +918,6 @@ static void __hdd_hard_start_xmit(struct sk_buff *skb,
 	struct hdd_station_ctx *sta_ctx = &adapter->session.station;
 	struct qdf_mac_addr *mac_addr;
 	uint8_t pkt_type = 0;
-	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	bool is_arp = false;
 	struct wlan_objmgr_vdev *vdev;
 
@@ -943,7 +942,7 @@ static void __hdd_hard_start_xmit(struct sk_buff *skb,
 	if (QDF_NBUF_CB_GET_PACKET_TYPE(skb) == QDF_NBUF_CB_PACKET_TYPE_ARP) {
 		is_arp = true;
 		if (qdf_nbuf_data_is_arp_req(skb) &&
-		    (hdd_ctx->track_arp_ip == qdf_nbuf_get_arp_tgt_ip(skb))) {
+		    (adapter->track_arp_ip == qdf_nbuf_get_arp_tgt_ip(skb))) {
 			++adapter->hdd_stats.hdd_arp_stats.tx_arp_req_count;
 			QDF_TRACE(QDF_MODULE_ID_HDD_DATA,
 				  QDF_TRACE_LEVEL_INFO_HIGH,
@@ -2036,7 +2035,7 @@ QDF_STATUS hdd_rx_packet_cbk(void *adapter_context,
 		if (QDF_NBUF_CB_PACKET_TYPE_ARP ==
 		    QDF_NBUF_CB_GET_PACKET_TYPE(skb)) {
 			if (qdf_nbuf_data_is_arp_rsp(skb) &&
-				(hdd_ctx->track_arp_ip ==
+				(adapter->track_arp_ip ==
 			     qdf_nbuf_get_arp_src_ip(skb))) {
 				++adapter->hdd_stats.hdd_arp_stats.
 							rx_arp_rsp_count;