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
This commit is contained in:
Amit Mehta
2022-11-03 14:55:26 +05:30
committed by Madan Koyyalamudi
parent 8c1db79cea
commit f8e6f61b2e
2 changed files with 2 additions and 3 deletions

View File

@@ -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;