Commit c496e4d6 authored by Sean Anderson's avatar Sean Anderson Committed by Jakub Kicinski

net: fman: Export/rename some common functions

In preparation for moving each of the initialization functions to their
own file, export some common functions so they can be re-used. This adds
an fman prefix to set_multi to make it a bit less genericly-named.
Signed-off-by: default avatarSean Anderson <sean.anderson@seco.com>
Acked-by: default avatarCamelia Groza <camelia.groza@nxp.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9ea4742a
......@@ -58,8 +58,8 @@ static void mac_exception(void *handle, enum fman_mac_exceptions ex)
__func__, ex);
}
static int set_fman_mac_params(struct mac_device *mac_dev,
struct fman_mac_params *params)
int set_fman_mac_params(struct mac_device *mac_dev,
struct fman_mac_params *params)
{
struct mac_priv_s *priv = mac_dev->priv;
......@@ -82,7 +82,7 @@ static int set_fman_mac_params(struct mac_device *mac_dev,
return 0;
}
static int set_multi(struct net_device *net_dev, struct mac_device *mac_dev)
int fman_set_multi(struct net_device *net_dev, struct mac_device *mac_dev)
{
struct mac_priv_s *priv;
struct mac_address *old_addr, *tmp;
......@@ -275,7 +275,7 @@ static int tgec_initialization(struct mac_device *mac_dev,
mac_dev->set_exception = tgec_set_exception;
mac_dev->set_allmulti = tgec_set_allmulti;
mac_dev->set_tstamp = tgec_set_tstamp;
mac_dev->set_multi = set_multi;
mac_dev->set_multi = fman_set_multi;
mac_dev->adjust_link = adjust_link_void;
mac_dev->enable = tgec_enable;
mac_dev->disable = tgec_disable;
......@@ -335,7 +335,7 @@ static int dtsec_initialization(struct mac_device *mac_dev,
mac_dev->set_exception = dtsec_set_exception;
mac_dev->set_allmulti = dtsec_set_allmulti;
mac_dev->set_tstamp = dtsec_set_tstamp;
mac_dev->set_multi = set_multi;
mac_dev->set_multi = fman_set_multi;
mac_dev->adjust_link = adjust_link_dtsec;
mac_dev->enable = dtsec_enable;
mac_dev->disable = dtsec_disable;
......@@ -402,7 +402,7 @@ static int memac_initialization(struct mac_device *mac_dev,
mac_dev->set_exception = memac_set_exception;
mac_dev->set_allmulti = memac_set_allmulti;
mac_dev->set_tstamp = memac_set_tstamp;
mac_dev->set_multi = set_multi;
mac_dev->set_multi = fman_set_multi;
mac_dev->adjust_link = adjust_link_memac;
mac_dev->enable = memac_enable;
mac_dev->disable = memac_disable;
......
......@@ -71,5 +71,8 @@ int fman_set_mac_active_pause(struct mac_device *mac_dev, bool rx, bool tx);
void fman_get_pause_cfg(struct mac_device *mac_dev, bool *rx_pause,
bool *tx_pause);
int set_fman_mac_params(struct mac_device *mac_dev,
struct fman_mac_params *params);
int fman_set_multi(struct net_device *net_dev, struct mac_device *mac_dev);
#endif /* __MAC_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment