diff options
| author | David S. Miller <davem@kernel.bkbits.net> | 2003-05-20 06:44:14 -0700 |
|---|---|---|
| committer | David S. Miller <davem@kernel.bkbits.net> | 2003-05-20 06:44:14 -0700 |
| commit | df13121f96f31bb5dda755ad6f0fbefb97d7f7fb (patch) | |
| tree | 2eb1f2b023754a7e92b04da3130d9c254405ec4d /include | |
| parent | ecdb306381de9308a484c29b28c03e2686aa00ae (diff) | |
| parent | eb30a9738df16d571d62e89413bac188f3fe4a8c (diff) | |
Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5
into kernel.bkbits.net:/home/davem/net-2.5
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/cyclomx.h | 4 | ||||
| -rw-r--r-- | include/linux/divert.h | 17 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 25 |
3 files changed, 36 insertions, 10 deletions
diff --git a/include/linux/cyclomx.h b/include/linux/cyclomx.h index c8f4173cc4d1..d84bc68e2af7 100644 --- a/include/linux/cyclomx.h +++ b/include/linux/cyclomx.h @@ -71,10 +71,10 @@ struct cycx_device { }; /* Public Functions */ -void cyclomx_set_state(struct cycx_device *card, int state); +void cycx_set_state(struct cycx_device *card, int state); #ifdef CONFIG_CYCLOMX_X25 -int cyx_init(struct cycx_device *card, wandev_conf_t *conf); +int cycx_x25_wan_init(struct cycx_device *card, wandev_conf_t *conf); #endif #endif /* __KERNEL__ */ #endif /* _CYCLOMX_H */ diff --git a/include/linux/divert.h b/include/linux/divert.h index 66e56ec15b66..38497a643657 100644 --- a/include/linux/divert.h +++ b/include/linux/divert.h @@ -107,11 +107,24 @@ struct divert_cf /* diverter functions */ #include <linux/skbuff.h> + +#ifdef CONFIG_NET_DIVERT int alloc_divert_blk(struct net_device *); void free_divert_blk(struct net_device *); int divert_ioctl(unsigned int cmd, struct divert_cf *arg); void divert_frame(struct sk_buff *skb); - +static inline void handle_diverter(struct sk_buff *skb) +{ + /* if diversion is supported on device, then divert */ + if (skb->dev->divert && skb->dev->divert->divert) + divert_frame(skb); +} + +#else +# define alloc_divert_blk(dev) (0) +# define free_divert_blk(dev) do {} while (0) +# define divert_ioctl(cmd, arg) (-ENOPKG) +# define handle_diverter(skb) do {} while (0) +#endif #endif - #endif /* _LINUX_DIVERT_H */ diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 94d077ef70be..7106c2eaf67e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -28,7 +28,7 @@ #include <linux/if.h> #include <linux/if_ether.h> #include <linux/if_packet.h> -#include <linux/kobject.h> +#include <linux/device.h> #include <asm/atomic.h> #include <asm/cache.h> @@ -441,11 +441,22 @@ struct net_device struct divert_blk *divert; #endif /* CONFIG_NET_DIVERT */ - /* generic object representation */ - struct kobject kobj; + /* generic device structure used in constructing class */ + struct device *dev; + + /* class/net/name entry */ + struct class_device class_dev; + + /* statistics sub-directory */ + struct kobject stats_kobj; }; #define SET_MODULE_OWNER(dev) do { } while (0) +/* Set the sysfs physical device reference for the network logical device + * if set prior to registration will cause a symlink during initialization. + */ +#define SET_NETDEV_DEV(net, pdev) ((net)->dev = (pdev)) + struct packet_type { @@ -561,12 +572,12 @@ static inline void netif_stop_queue(struct net_device *dev) set_bit(__LINK_STATE_XOFF, &dev->state); } -static inline int netif_queue_stopped(struct net_device *dev) +static inline int netif_queue_stopped(const struct net_device *dev) { return test_bit(__LINK_STATE_XOFF, &dev->state); } -static inline int netif_running(struct net_device *dev) +static inline int netif_running(const struct net_device *dev) { return test_bit(__LINK_STATE_START, &dev->state); } @@ -606,7 +617,9 @@ extern int netif_rx(struct sk_buff *skb); #define HAVE_NETIF_RECEIVE_SKB 1 extern int netif_receive_skb(struct sk_buff *skb); extern int dev_ioctl(unsigned int cmd, void *); +extern unsigned dev_get_flags(const struct net_device *); extern int dev_change_flags(struct net_device *, unsigned); +extern int dev_set_mtu(struct net_device *, int); extern void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev); extern void dev_init(void); @@ -642,7 +655,7 @@ static inline void dev_put(struct net_device *dev) extern void linkwatch_fire_event(struct net_device *dev); -static inline int netif_carrier_ok(struct net_device *dev) +static inline int netif_carrier_ok(const struct net_device *dev) { return !test_bit(__LINK_STATE_NOCARRIER, &dev->state); } |
