~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/net/ncsi.h

Version: ~ [ linux-5.3 ] ~ [ linux-5.2.15 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.73 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.144 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.193 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.193 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.73 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __NET_NCSI_H
  2 #define __NET_NCSI_H
  3 
  4 /*
  5  * The NCSI device states seen from external. More NCSI device states are
  6  * only visible internally (in net/ncsi/internal.h). When the NCSI device
  7  * is registered, it's in ncsi_dev_state_registered state. The state
  8  * ncsi_dev_state_start is used to drive to choose active package and
  9  * channel. After that, its state is changed to ncsi_dev_state_functional.
 10  *
 11  * The state ncsi_dev_state_stop helps to shut down the currently active
 12  * package and channel while ncsi_dev_state_config helps to reconfigure
 13  * them.
 14  */
 15 enum {
 16         ncsi_dev_state_registered       = 0x0000,
 17         ncsi_dev_state_functional       = 0x0100,
 18         ncsi_dev_state_probe            = 0x0200,
 19         ncsi_dev_state_config           = 0x0300,
 20         ncsi_dev_state_suspend          = 0x0400,
 21 };
 22 
 23 struct ncsi_dev {
 24         int               state;
 25         int               link_up;
 26         struct net_device *dev;
 27         void              (*handler)(struct ncsi_dev *ndev);
 28 };
 29 
 30 #ifdef CONFIG_NET_NCSI
 31 struct ncsi_dev *ncsi_register_dev(struct net_device *dev,
 32                                    void (*notifier)(struct ncsi_dev *nd));
 33 int ncsi_start_dev(struct ncsi_dev *nd);
 34 void ncsi_stop_dev(struct ncsi_dev *nd);
 35 void ncsi_unregister_dev(struct ncsi_dev *nd);
 36 #else /* !CONFIG_NET_NCSI */
 37 static inline struct ncsi_dev *ncsi_register_dev(struct net_device *dev,
 38                                         void (*notifier)(struct ncsi_dev *nd))
 39 {
 40         return NULL;
 41 }
 42 
 43 static inline int ncsi_start_dev(struct ncsi_dev *nd)
 44 {
 45         return -ENOTTY;
 46 }
 47 
 48 static void ncsi_stop_dev(struct ncsi_dev *nd)
 49 {
 50 }
 51 
 52 static inline void ncsi_unregister_dev(struct ncsi_dev *nd)
 53 {
 54 }
 55 #endif /* CONFIG_NET_NCSI */
 56 
 57 #endif /* __NET_NCSI_H */
 58 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp