astlpc.c (afcb701abf013602f170c447f6d985adaa62ada9) astlpc.c (1a4f441ab29ace03e92dd873baad799969d50587)
1/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
2
3#if HAVE_CONFIG_H
4#include "config.h"
5#endif
6
7#if HAVE_ENDIAN_H
8#include <endian.h>

--- 956 unchanged lines hidden (view full) ---

965 return NULL;
966
967 memset(astlpc, 0, sizeof(*astlpc));
968 astlpc->mode = mode;
969 astlpc->lpc_map = NULL;
970 astlpc->requested_mtu = mtu;
971 astlpc->binding.name = "astlpc";
972 astlpc->binding.version = 1;
1/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
2
3#if HAVE_CONFIG_H
4#include "config.h"
5#endif
6
7#if HAVE_ENDIAN_H
8#include <endian.h>

--- 956 unchanged lines hidden (view full) ---

965 return NULL;
966
967 memset(astlpc, 0, sizeof(*astlpc));
968 astlpc->mode = mode;
969 astlpc->lpc_map = NULL;
970 astlpc->requested_mtu = mtu;
971 astlpc->binding.name = "astlpc";
972 astlpc->binding.version = 1;
973 astlpc->binding.pkt_size = MCTP_PACKET_SIZE(mtu);
973 astlpc->binding.pkt_size =
974 MCTP_PACKET_SIZE(mtu > MCTP_BTU ? mtu : MCTP_BTU);
974 astlpc->binding.pkt_pad = 0;
975 astlpc->binding.tx = mctp_binding_astlpc_tx;
976 if (mode == MCTP_BINDING_ASTLPC_MODE_BMC)
977 astlpc->binding.start = mctp_binding_astlpc_start_bmc;
978 else if (mode == MCTP_BINDING_ASTLPC_MODE_HOST)
979 astlpc->binding.start = mctp_binding_astlpc_start_host;
980 else {
981 astlpc_prerr(astlpc, "%s: Invalid mode: %d\n", __func__, mode);

--- 183 unchanged lines hidden ---
975 astlpc->binding.pkt_pad = 0;
976 astlpc->binding.tx = mctp_binding_astlpc_tx;
977 if (mode == MCTP_BINDING_ASTLPC_MODE_BMC)
978 astlpc->binding.start = mctp_binding_astlpc_start_bmc;
979 else if (mode == MCTP_BINDING_ASTLPC_MODE_HOST)
980 astlpc->binding.start = mctp_binding_astlpc_start_host;
981 else {
982 astlpc_prerr(astlpc, "%s: Invalid mode: %d\n", __func__, mode);

--- 183 unchanged lines hidden ---