net/ngbe: store MAC address
[dpdk.git] / drivers / net / ngbe / base / ngbe_dummy.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
3  */
4
5 #ifndef _NGBE_TYPE_DUMMY_H_
6 #define _NGBE_TYPE_DUMMY_H_
7
8 #ifdef TUP
9 #elif defined(__GNUC__)
10 #define TUP(x) x##_unused ngbe_unused
11 #elif defined(__LCLINT__)
12 #define TUP(x) x /*@unused@*/
13 #else
14 #define TUP(x) x
15 #endif /*TUP*/
16 #define TUP0 TUP(p0)
17 #define TUP1 TUP(p1)
18 #define TUP2 TUP(p2)
19 #define TUP3 TUP(p3)
20 #define TUP4 TUP(p4)
21 #define TUP5 TUP(p5)
22 #define TUP6 TUP(p6)
23 #define TUP7 TUP(p7)
24 #define TUP8 TUP(p8)
25 #define TUP9 TUP(p9)
26
27 /* struct ngbe_bus_operations */
28 static inline void ngbe_bus_set_lan_id_dummy(struct ngbe_hw *TUP0)
29 {
30 }
31 /* struct ngbe_rom_operations */
32 static inline s32 ngbe_rom_init_params_dummy(struct ngbe_hw *TUP0)
33 {
34         return NGBE_ERR_OPS_DUMMY;
35 }
36 static inline s32 ngbe_rom_validate_checksum_dummy(struct ngbe_hw *TUP0,
37                                         u16 *TUP1)
38 {
39         return NGBE_ERR_OPS_DUMMY;
40 }
41 /* struct ngbe_mac_operations */
42 static inline s32 ngbe_mac_init_hw_dummy(struct ngbe_hw *TUP0)
43 {
44         return NGBE_ERR_OPS_DUMMY;
45 }
46 static inline s32 ngbe_mac_reset_hw_dummy(struct ngbe_hw *TUP0)
47 {
48         return NGBE_ERR_OPS_DUMMY;
49 }
50 static inline s32 ngbe_mac_stop_hw_dummy(struct ngbe_hw *TUP0)
51 {
52         return NGBE_ERR_OPS_DUMMY;
53 }
54 static inline s32 ngbe_mac_get_mac_addr_dummy(struct ngbe_hw *TUP0, u8 *TUP1)
55 {
56         return NGBE_ERR_OPS_DUMMY;
57 }
58 static inline s32 ngbe_mac_acquire_swfw_sync_dummy(struct ngbe_hw *TUP0,
59                                         u32 TUP1)
60 {
61         return NGBE_ERR_OPS_DUMMY;
62 }
63 static inline void ngbe_mac_release_swfw_sync_dummy(struct ngbe_hw *TUP0,
64                                         u32 TUP1)
65 {
66 }
67 static inline s32 ngbe_mac_set_rar_dummy(struct ngbe_hw *TUP0, u32 TUP1,
68                                         u8 *TUP2, u32 TUP3, u32 TUP4)
69 {
70         return NGBE_ERR_OPS_DUMMY;
71 }
72 static inline s32 ngbe_mac_clear_rar_dummy(struct ngbe_hw *TUP0, u32 TUP1)
73 {
74         return NGBE_ERR_OPS_DUMMY;
75 }
76 static inline s32 ngbe_mac_set_vmdq_dummy(struct ngbe_hw *TUP0, u32 TUP1,
77                                         u32 TUP2)
78 {
79         return NGBE_ERR_OPS_DUMMY;
80 }
81 static inline s32 ngbe_mac_clear_vmdq_dummy(struct ngbe_hw *TUP0, u32 TUP1,
82                                         u32 TUP2)
83 {
84         return NGBE_ERR_OPS_DUMMY;
85 }
86 static inline s32 ngbe_mac_init_rx_addrs_dummy(struct ngbe_hw *TUP0)
87 {
88         return NGBE_ERR_OPS_DUMMY;
89 }
90 static inline s32 ngbe_mac_init_thermal_ssth_dummy(struct ngbe_hw *TUP0)
91 {
92         return NGBE_ERR_OPS_DUMMY;
93 }
94 static inline s32 ngbe_mac_check_overtemp_dummy(struct ngbe_hw *TUP0)
95 {
96         return NGBE_ERR_OPS_DUMMY;
97 }
98 /* struct ngbe_phy_operations */
99 static inline s32 ngbe_phy_identify_dummy(struct ngbe_hw *TUP0)
100 {
101         return NGBE_ERR_OPS_DUMMY;
102 }
103 static inline s32 ngbe_phy_reset_hw_dummy(struct ngbe_hw *TUP0)
104 {
105         return NGBE_ERR_OPS_DUMMY;
106 }
107 static inline s32 ngbe_phy_read_reg_dummy(struct ngbe_hw *TUP0, u32 TUP1,
108                                         u32 TUP2, u16 *TUP3)
109 {
110         return NGBE_ERR_OPS_DUMMY;
111 }
112 static inline s32 ngbe_phy_write_reg_dummy(struct ngbe_hw *TUP0, u32 TUP1,
113                                         u32 TUP2, u16 TUP3)
114 {
115         return NGBE_ERR_OPS_DUMMY;
116 }
117 static inline s32 ngbe_phy_read_reg_unlocked_dummy(struct ngbe_hw *TUP0,
118                                         u32 TUP1, u32 TUP2, u16 *TUP3)
119 {
120         return NGBE_ERR_OPS_DUMMY;
121 }
122 static inline s32 ngbe_phy_write_reg_unlocked_dummy(struct ngbe_hw *TUP0,
123                                         u32 TUP1, u32 TUP2, u16 TUP3)
124 {
125         return NGBE_ERR_OPS_DUMMY;
126 }
127 static inline void ngbe_init_ops_dummy(struct ngbe_hw *hw)
128 {
129         hw->bus.set_lan_id = ngbe_bus_set_lan_id_dummy;
130         hw->rom.init_params = ngbe_rom_init_params_dummy;
131         hw->rom.validate_checksum = ngbe_rom_validate_checksum_dummy;
132         hw->mac.init_hw = ngbe_mac_init_hw_dummy;
133         hw->mac.reset_hw = ngbe_mac_reset_hw_dummy;
134         hw->mac.stop_hw = ngbe_mac_stop_hw_dummy;
135         hw->mac.get_mac_addr = ngbe_mac_get_mac_addr_dummy;
136         hw->mac.acquire_swfw_sync = ngbe_mac_acquire_swfw_sync_dummy;
137         hw->mac.release_swfw_sync = ngbe_mac_release_swfw_sync_dummy;
138         hw->mac.set_rar = ngbe_mac_set_rar_dummy;
139         hw->mac.clear_rar = ngbe_mac_clear_rar_dummy;
140         hw->mac.set_vmdq = ngbe_mac_set_vmdq_dummy;
141         hw->mac.clear_vmdq = ngbe_mac_clear_vmdq_dummy;
142         hw->mac.init_rx_addrs = ngbe_mac_init_rx_addrs_dummy;
143         hw->mac.init_thermal_sensor_thresh = ngbe_mac_init_thermal_ssth_dummy;
144         hw->mac.check_overtemp = ngbe_mac_check_overtemp_dummy;
145         hw->phy.identify = ngbe_phy_identify_dummy;
146         hw->phy.reset_hw = ngbe_phy_reset_hw_dummy;
147         hw->phy.read_reg = ngbe_phy_read_reg_dummy;
148         hw->phy.write_reg = ngbe_phy_write_reg_dummy;
149         hw->phy.read_reg_unlocked = ngbe_phy_read_reg_unlocked_dummy;
150         hw->phy.write_reg_unlocked = ngbe_phy_write_reg_unlocked_dummy;
151 }
152
153 #endif /* _NGBE_TYPE_DUMMY_H_ */
154