This source file includes following definitions.
- ncsi_vlan_rx_add_vid
- ncsi_vlan_rx_kill_vid
- ncsi_register_dev
- ncsi_start_dev
- ncsi_stop_dev
- ncsi_unregister_dev
1
2 #ifndef __NET_NCSI_H
3 #define __NET_NCSI_H
4
5
6
7
8
9
10
11
12
13
14
15
16 enum {
17 ncsi_dev_state_registered = 0x0000,
18 ncsi_dev_state_functional = 0x0100,
19 ncsi_dev_state_probe = 0x0200,
20 ncsi_dev_state_config = 0x0300,
21 ncsi_dev_state_suspend = 0x0400,
22 };
23
24 struct ncsi_dev {
25 int state;
26 int link_up;
27 struct net_device *dev;
28 void (*handler)(struct ncsi_dev *ndev);
29 };
30
31 #ifdef CONFIG_NET_NCSI
32 int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid);
33 int ncsi_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid);
34 struct ncsi_dev *ncsi_register_dev(struct net_device *dev,
35 void (*notifier)(struct ncsi_dev *nd));
36 int ncsi_start_dev(struct ncsi_dev *nd);
37 void ncsi_stop_dev(struct ncsi_dev *nd);
38 void ncsi_unregister_dev(struct ncsi_dev *nd);
39 #else
40 static inline int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
41 {
42 return -EINVAL;
43 }
44
45 static inline int ncsi_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid)
46 {
47 return -EINVAL;
48 }
49
50 static inline struct ncsi_dev *ncsi_register_dev(struct net_device *dev,
51 void (*notifier)(struct ncsi_dev *nd))
52 {
53 return NULL;
54 }
55
56 static inline int ncsi_start_dev(struct ncsi_dev *nd)
57 {
58 return -ENOTTY;
59 }
60
61 static void ncsi_stop_dev(struct ncsi_dev *nd)
62 {
63 }
64
65 static inline void ncsi_unregister_dev(struct ncsi_dev *nd)
66 {
67 }
68 #endif
69
70 #endif