net: ethernet: stmicro: stmmac: generate stmmac dma conf before open
authorChristian Marangi <ansuelsmth@gmail.com>
Sat, 23 Jul 2022 14:29:32 +0000 (16:29 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 26 Jul 2022 02:38:57 +0000 (19:38 -0700)
commitba39b344e9240a4a5fd4ab8178200b85cd1809da
treede9597f5421a5f5bbf18846a48e3f1104b24e2a5
parent8531c80800c10e8ef7952022326c2f983e1314bf
net: ethernet: stmicro: stmmac: generate stmmac dma conf before open

Rework the driver to generate the stmmac dma_conf before stmmac_open.
This permits a function to first check if it's possible to allocate a
new dma_config and then pass it directly to __stmmac_open and "open" the
interface with the new configuration.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c