nvethernetrm: Fix validation of incorrect func. pointer

Issue: The OSI interface API osi_configure_eee validates
       function pointer osi_core_ops->core_init instead
       of osi_core_ops->configure_eee. This is a copy
       paste error.
Fix:   Validate the correct function pointer
       osi_core_ops->configure_eee.

Bug 2594864

Change-Id: I9e291f03debf508c80cff0a9d63af872faa7856b
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2269269
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Srinivas Ramachandran
2019-12-26 12:23:54 -08:00
committed by mobile promotions
parent def5f309e8
commit 2d46b475ec

View File

@@ -921,7 +921,7 @@ int osi_configure_eee(struct osi_core_priv_data *osi_core,
unsigned int tx_lpi_enabled, unsigned int tx_lpi_timer) unsigned int tx_lpi_enabled, unsigned int tx_lpi_timer)
{ {
if ((osi_core != OSI_NULL) && (osi_core->ops != OSI_NULL) && if ((osi_core != OSI_NULL) && (osi_core->ops != OSI_NULL) &&
(osi_core->ops->core_init != OSI_NULL) && (osi_core->ops->configure_eee != OSI_NULL) &&
(tx_lpi_timer <= OSI_MAX_TX_LPI_TIMER) && (tx_lpi_timer <= OSI_MAX_TX_LPI_TIMER) &&
(tx_lpi_timer >= OSI_MIN_TX_LPI_TIMER) && (tx_lpi_timer >= OSI_MIN_TX_LPI_TIMER) &&
(tx_lpi_timer % OSI_MIN_TX_LPI_TIMER == OSI_NONE)) { (tx_lpi_timer % OSI_MIN_TX_LPI_TIMER == OSI_NONE)) {