lldp_params
struct lldp_config_params_s lldp_params;
ecore_memcpy_from(p_hwfn, p_ptt, &lldp_params, addr,
sizeof(lldp_params));
p_params->tx_interval = GET_MFW_FIELD(lldp_params.config,
p_params->tx_hold = GET_MFW_FIELD(lldp_params.config, LLDP_CONFIG_HOLD);
p_params->tx_credit = GET_MFW_FIELD(lldp_params.config,
p_params->rx_enable = GET_MFW_FIELD(lldp_params.config,
p_params->tx_enable = GET_MFW_FIELD(lldp_params.config,
OSAL_MEMCPY(p_params->chassis_id_tlv, lldp_params.local_chassis_id,
OSAL_MEMCPY(p_params->port_id_tlv, lldp_params.local_port_id,
struct lldp_config_params_s lldp_params;
OSAL_MEMSET(&lldp_params, 0, sizeof(lldp_params));
SET_MFW_FIELD(lldp_params.config, LLDP_CONFIG_TX_INTERVAL,
SET_MFW_FIELD(lldp_params.config, LLDP_CONFIG_HOLD, p_params->tx_hold);
SET_MFW_FIELD(lldp_params.config, LLDP_CONFIG_MAX_CREDIT,
SET_MFW_FIELD(lldp_params.config, LLDP_CONFIG_ENABLE_RX,
SET_MFW_FIELD(lldp_params.config, LLDP_CONFIG_ENABLE_TX,
OSAL_MEMCPY(lldp_params.local_chassis_id, p_params->chassis_id_tlv,
sizeof(lldp_params.local_chassis_id));
OSAL_MEMCPY(lldp_params.local_port_id, p_params->port_id_tlv,
sizeof(lldp_params.local_port_id));
ecore_memcpy_to(p_hwfn, p_ptt, addr, &lldp_params, sizeof(lldp_params));
lldp_params_s lldp_params[LLDP_MAX_LLDP_AGENTS];
struct ecore_lldp_config_params lldp_params;
bzero(&lldp_params, sizeof(struct ecore_lldp_config_params));
lldp_params.agent = ECORE_LLDP_NEAREST_BRIDGE;
lldp_params.tx_interval = 30; //Default value used as suggested by MFW
lldp_params.tx_hold = 4; //Default value used as suggested by MFW
lldp_params.tx_credit = 5; //Default value used as suggested by MFW
lldp_params.rx_enable = enable ? 1 : 0;
lldp_params.tx_enable = enable ? 1 : 0;
lldp_params.chassis_id_tlv[0] = 0;
lldp_params.chassis_id_tlv[0] |= (QLNX_LLDP_TYPE_CHASSIS_ID << 1);
lldp_params.chassis_id_tlv[0] |=
lldp_params.chassis_id_tlv[0] |= (QLNX_LLDP_CHASSIS_ID_SUBTYPE_MAC << 16);
lldp_params.chassis_id_tlv[0] |= lldp_mac[0] << 24;
lldp_params.chassis_id_tlv[1] = lldp_mac[1] | (lldp_mac[2] << 8) |
lldp_params.chassis_id_tlv[2] = lldp_mac[5];
lldp_params.port_id_tlv[0] = 0;
lldp_params.port_id_tlv[0] |= (QLNX_LLDP_TYPE_PORT_ID << 1);
lldp_params.port_id_tlv[0] |=
lldp_params.port_id_tlv[0] |= (QLNX_LLDP_PORT_ID_SUBTYPE_MAC << 16);
lldp_params.port_id_tlv[0] |= lldp_mac[0] << 24;
lldp_params.port_id_tlv[1] = lldp_mac[1] | (lldp_mac[2] << 8) |
lldp_params.port_id_tlv[2] = lldp_mac[5];
ret = ecore_lldp_set_params(p_hwfn, p_ptt, &lldp_params);