From 89e4d4b113dc6d78ab0f2db705bbbcd669efe3b4 Mon Sep 17 00:00:00 2001 From: Eyal Harari Date: Sun, 24 Aug 2014 14:57:07 +0300 Subject: FMD: DSAR: fixed compatibility of structures t_FmPortDsarOidsEntry and auto_res_snmp_entry Signed-off-by: Eyal Harari diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c index ccfcf86..e5ffdb4 100644 --- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c +++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c @@ -5708,14 +5708,14 @@ t_Error FM_PORT_EnterDsar(t_Handle h_FmPortRx, t_FmPortDsarParams *params) { WRITE_UINT16(snmpOid->oidSize, snmpSrc->p_OidsTbl[i].oidSize); WRITE_UINT16(snmpOid->resSize, snmpSrc->p_OidsTbl[i].resSize); - Mem2IOCpy32(charPointer, snmpSrc->p_OidsTbl[i].p_Oid, snmpSrc->p_OidsTbl[i].oidSize); + Mem2IOCpy32(charPointer, snmpSrc->p_OidsTbl[i].oidVal, snmpSrc->p_OidsTbl[i].oidSize); WRITE_UINT32(snmpOid->p_Oid, PTR_TO_UINT(charPointer) - fmMuramVirtBaseAddr); charPointer += snmpSrc->p_OidsTbl[i].oidSize; if (snmpSrc->p_OidsTbl[i].resSize <= 4) - WRITE_UINT32(snmpOid->resValOrPtr, snmpSrc->p_OidsTbl[i].resValOrPtr); + WRITE_UINT32(snmpOid->resValOrPtr, *snmpSrc->p_OidsTbl[i].resVal); else { - Mem2IOCpy32(charPointer, UINT_TO_PTR(snmpSrc->p_OidsTbl[i].resValOrPtr), snmpSrc->p_OidsTbl[i].resSize); + Mem2IOCpy32(charPointer, snmpSrc->p_OidsTbl[i].resVal, snmpSrc->p_OidsTbl[i].resSize); WRITE_UINT32(snmpOid->resValOrPtr, PTR_TO_UINT(charPointer) - fmMuramVirtBaseAddr); charPointer += snmpSrc->p_OidsTbl[i].resSize; } diff --git a/drivers/net/ethernet/freescale/fman/inc/Peripherals/fm_port_ext.h b/drivers/net/ethernet/freescale/fman/inc/Peripherals/fm_port_ext.h index 3e9470b..c342873 100644 --- a/drivers/net/ethernet/freescale/fman/inc/Peripherals/fm_port_ext.h +++ b/drivers/net/ethernet/freescale/fman/inc/Peripherals/fm_port_ext.h @@ -1389,10 +1389,11 @@ typedef struct t_FmPortDsarEchoIpv6Info *//***************************************************************************/ typedef struct { - uint16_t oidSize; /**< Size in octets of the OID. */ - uint16_t resSize; /**< Size in octets of the value that is attached to the OID. */ - uint8_t *p_Oid; /**< Pointer to the OID. OID is encoded in BER but type and length are excluded. */ - uint64_t resValOrPtr; /**< Value (for up to 4 octets) or pointer to the Value. Encoded in BER. */ + uint16_t oidSize; + uint8_t *oidVal; /* only the oid string */ + uint16_t resSize; + uint8_t *resVal; /* resVal will be the entire reply, + i.e. "Type|Length|Value" */ } t_FmPortDsarOidsEntry; /**************************************************************************//** -- cgit v0.10.2