Browse Source

qcacmn: Get vdev id from tx descriptor

Currently vdev id is passed from nbuf cb
but vdev_id is not being updated in nbuf cb
which is resulting in passing wrong vdev id to the
packet logging function.

So to fix issue pass vdev id from tx descriptor instead
of nbuf cb and also rate limit the error log in vdev NULL
case.

Change-Id: I69f568b7da52f1c96f208a220c6c4a7f6d98e082
CRs-Fixed: 3327359
Amit Mehta 2 năm trước cách đây
mục cha
commit
f8e6f61b2e
2 tập tin đã thay đổi với 2 bổ sung3 xóa
  1. 1 2
      dp/wifi3.0/dp_internal.h
  2. 1 1
      dp/wifi3.0/dp_main.c

+ 1 - 2
dp/wifi3.0/dp_internal.h

@@ -4125,8 +4125,7 @@ void dp_tx_send_pktlog(struct dp_soc *soc, struct dp_pdev *pdev,
 	if (qdf_unlikely(packetdump_cb) &&
 	    dp_tx_frm_std == tx_desc->frm_type) {
 		packetdump_cb((ol_txrx_soc_handle)soc, pdev->pdev_id,
-			      QDF_NBUF_CB_TX_VDEV_CTX(nbuf),
-			      nbuf, status, QDF_TX_DATA_PKT);
+			      tx_desc->vdev_id, nbuf, status, QDF_TX_DATA_PKT);
 	}
 }
 

+ 1 - 1
dp/wifi3.0/dp_main.c

@@ -9017,7 +9017,7 @@ static int dp_get_opmode(struct cdp_soc_t *soc_hdl, uint8_t vdev_id)
 	int opmode;
 
 	if (!vdev) {
-		dp_err("vdev for id %d is NULL", vdev_id);
+		dp_err_rl("vdev for id %d is NULL", vdev_id);
 		return -EINVAL;
 	}
 	opmode = vdev->opmode;