net/bnxt: fix endianness while retrieving MTU from FW
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Tue, 24 Sep 2019 10:19:45 +0000 (15:49 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:09 +0000 (16:43 +0200)
In bnxt_hwrm_func_qcfg(), use rte_le_to_cpu_16 while getting
the mtu value from command response.

Fixes: 905cd45ce30e ("net/bnxt: use configured MTU during load")
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_hwrm.c

index 1a1ea1b..18e7429 100644 (file)
@@ -2882,7 +2882,7 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
        }
 
        if (mtu)
-               *mtu = resp->mtu;
+               *mtu = rte_le_to_cpu_16(resp->mtu);
 
        switch (resp->port_partition_type) {
        case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_0: