net/bnxt: fix settingĀ link speed
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Fri, 22 May 2020 17:42:08 +0000 (23:12 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 28 May 2020 15:57:07 +0000 (17:57 +0200)
commit0466d286cdedc98ab561fcb23fb125e6d9329678
treec147e3e4f156eee3dad25d47a279385ae77cfa3b
parent40783b1280e1833615885dc98f3c796ad5addb54
net/bnxt: fix settingĀ link speed

bnxt PMD uses the macro BNXT_SUPPORTED_SPEEDS to validate
the user requested speed. But this has all the speed values
supported by the PMD and is not chip specific.

The check against this macro returns success when the user
tries set the speed to 100G on a port even if the chip does
not support 100G speed.

Fixed it to use bnxt_get_speed_capabilities() to check the
supported speeds by the chip.

Fixes: 1d0704f4d793 ("net/bnxt: add device configure operation")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_hwrm.c