net/bnxt: check for invalid vNIC id
authorJay Ding <jay.ding@broadcom.com>
Thu, 28 Jun 2018 20:15:38 +0000 (13:15 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 2 Jul 2018 23:35:58 +0000 (01:35 +0200)
commite9950366d08f20e4d968fd76dcd0d5bc8afc09a0
tree81953ad3a5a3f1b781dae147e0bc9604031dd69e
parent5c1171c97216c92b3057ff38f799d568c706f7a5
net/bnxt: check for invalid vNIC id

Passing an invalid fw_vnic_id to the firmware will cause the
bnxt_hwrm_vnic_plcmode_cfg command to fail.
Add a check for VNIC id before sending message to firmware.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_hwrm.c