1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */
2 /*
3  * Copyright 2008 - 2015 Freescale Semiconductor Inc.
4  */
5 
6 #ifndef __MEMAC_H
7 #define __MEMAC_H
8 
9 #include "fman_mac.h"
10 
11 #include <linux/netdevice.h>
12 #include <linux/phy_fixed.h>
13 
14 struct fman_mac *memac_config(struct fman_mac_params *params);
15 int memac_set_promiscuous(struct fman_mac *memac, bool new_val);
16 int memac_modify_mac_address(struct fman_mac *memac, const enet_addr_t *enet_addr);
17 int memac_adjust_link(struct fman_mac *memac, u16 speed);
18 int memac_cfg_max_frame_len(struct fman_mac *memac, u16 new_val);
19 int memac_cfg_reset_on_init(struct fman_mac *memac, bool enable);
20 int memac_cfg_fixed_link(struct fman_mac *memac,
21 			 struct fixed_phy_status *fixed_link);
22 int memac_enable(struct fman_mac *memac);
23 int memac_disable(struct fman_mac *memac);
24 int memac_init(struct fman_mac *memac);
25 int memac_free(struct fman_mac *memac);
26 int memac_accept_rx_pause_frames(struct fman_mac *memac, bool en);
27 int memac_set_tx_pause_frames(struct fman_mac *memac, u8 priority,
28 			      u16 pause_time, u16 thresh_time);
29 int memac_set_exception(struct fman_mac *memac,
30 			enum fman_mac_exceptions exception, bool enable);
31 int memac_add_hash_mac_address(struct fman_mac *memac, enet_addr_t *eth_addr);
32 int memac_del_hash_mac_address(struct fman_mac *memac, enet_addr_t *eth_addr);
33 int memac_set_allmulti(struct fman_mac *memac, bool enable);
34 int memac_set_tstamp(struct fman_mac *memac, bool enable);
35 
36 #endif /* __MEMAC_H */
37