summaryrefslogtreecommitdiff
path: root/drivers/net/fsl-mc/mc.c
diff options
context:
space:
mode:
authorIoana Ciornei <ioana.ciornei@nxp.com>2023-05-31 19:04:33 +0300
committerPeng Fan <peng.fan@nxp.com>2023-06-15 17:58:53 +0800
commit207c8157709e3be8fb3338b5840de4a01767b79b (patch)
tree443cf7b374ff5b77736a9da74be5245d8de8389a /drivers/net/fsl-mc/mc.c
parent95f309a4f81153f30edd52bb2ce0fad1d69bdb7a (diff)
net: fsl-mc: sync DPNI MC APIs
Sync the Data Path Network Interface APIs to their latest form, this means the layout of each command is created based on structures which clearly describe the endianness of each field rather than some macros. The command version is kept in place, meaning that the minimum MC version accepted is not changed in any way. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/net/fsl-mc/mc.c')
-rw-r--r--drivers/net/fsl-mc/mc.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 78a40f285aa..984616fb65c 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -1353,10 +1353,9 @@ err:
static int dpni_init(void)
{
- int err;
- uint8_t cfg_buf[256] = {0};
- struct dpni_cfg dpni_cfg;
+ struct dpni_cfg dpni_cfg = {0};
uint16_t major_ver, minor_ver;
+ int err;
dflt_dpni = calloc(sizeof(struct fsl_dpni_obj), 1);
if (!dflt_dpni) {
@@ -1365,14 +1364,6 @@ static int dpni_init(void)
goto err_calloc;
}
- memset(&dpni_cfg, 0, sizeof(dpni_cfg));
- err = dpni_prepare_cfg(&dpni_cfg, &cfg_buf[0]);
- if (err < 0) {
- err = -ENODEV;
- printf("dpni_prepare_cfg() failed: %d\n", err);
- goto err_prepare_cfg;
- }
-
err = dpni_create(dflt_mc_io,
dflt_dprc_handle,
MC_CMD_NO_FLAGS,
@@ -1429,7 +1420,6 @@ err_get_version:
MC_CMD_NO_FLAGS,
dflt_dpni->dpni_id);
err_create:
-err_prepare_cfg:
free(dflt_dpni);
err_calloc:
return err;