aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ac11d73be4ce..3a0ed7f9e801 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -41,7 +41,7 @@
41struct divert_blk; 41struct divert_blk;
42struct vlan_group; 42struct vlan_group;
43struct ethtool_ops; 43struct ethtool_ops;
44struct netpoll; 44struct netpoll_info;
45 /* source back-compat hooks */ 45 /* source back-compat hooks */
46#define SET_ETHTOOL_OPS(netdev,ops) \ 46#define SET_ETHTOOL_OPS(netdev,ops) \
47 ( (netdev)->ethtool_ops = (ops) ) 47 ( (netdev)->ethtool_ops = (ops) )
@@ -164,12 +164,6 @@ struct netif_rx_stats
164 unsigned total; 164 unsigned total;
165 unsigned dropped; 165 unsigned dropped;
166 unsigned time_squeeze; 166 unsigned time_squeeze;
167 unsigned throttled;
168 unsigned fastroute_hit;
169 unsigned fastroute_success;
170 unsigned fastroute_defer;
171 unsigned fastroute_deferred_out;
172 unsigned fastroute_latency_reduction;
173 unsigned cpu_collision; 167 unsigned cpu_collision;
174}; 168};
175 169
@@ -204,7 +198,7 @@ struct hh_cache
204 /* cached hardware header; allow for machine alignment needs. */ 198 /* cached hardware header; allow for machine alignment needs. */
205#define HH_DATA_MOD 16 199#define HH_DATA_MOD 16
206#define HH_DATA_OFF(__len) \ 200#define HH_DATA_OFF(__len) \
207 (HH_DATA_MOD - ((__len) & (HH_DATA_MOD - 1))) 201 (HH_DATA_MOD - (((__len - 1) & (HH_DATA_MOD - 1)) + 1))
208#define HH_DATA_ALIGN(__len) \ 202#define HH_DATA_ALIGN(__len) \
209 (((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1)) 203 (((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1))
210 unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)]; 204 unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)];
@@ -401,7 +395,7 @@ struct net_device
401 } reg_state; 395 } reg_state;
402 396
403 /* Net device features */ 397 /* Net device features */
404 int features; 398 unsigned long features;
405#define NETIF_F_SG 1 /* Scatter/gather IO. */ 399#define NETIF_F_SG 1 /* Scatter/gather IO. */
406#define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ 400#define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */
407#define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ 401#define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */
@@ -468,7 +462,7 @@ struct net_device
468 unsigned char *haddr); 462 unsigned char *haddr);
469 int (*neigh_setup)(struct net_device *dev, struct neigh_parms *); 463 int (*neigh_setup)(struct net_device *dev, struct neigh_parms *);
470#ifdef CONFIG_NETPOLL 464#ifdef CONFIG_NETPOLL
471 struct netpoll *np; 465 struct netpoll_info *npinfo;
472#endif 466#endif
473#ifdef CONFIG_NET_POLL_CONTROLLER 467#ifdef CONFIG_NET_POLL_CONTROLLER
474 void (*poll_controller)(struct net_device *dev); 468 void (*poll_controller)(struct net_device *dev);
@@ -503,7 +497,7 @@ static inline void *netdev_priv(struct net_device *dev)
503#define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev)) 497#define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev))
504 498
505struct packet_type { 499struct packet_type {
506 unsigned short type; /* This is really htons(ether_type). */ 500 __be16 type; /* This is really htons(ether_type). */
507 struct net_device *dev; /* NULL is wildcarded here */ 501 struct net_device *dev; /* NULL is wildcarded here */
508 int (*func) (struct sk_buff *, struct net_device *, 502 int (*func) (struct sk_buff *, struct net_device *,
509 struct packet_type *); 503 struct packet_type *);
@@ -562,12 +556,9 @@ static inline int unregister_gifconf(unsigned int family)
562 556
563struct softnet_data 557struct softnet_data
564{ 558{
565 int throttle; 559 struct net_device *output_queue;
566 int cng_level;
567 int avg_blog;
568 struct sk_buff_head input_pkt_queue; 560 struct sk_buff_head input_pkt_queue;
569 struct list_head poll_list; 561 struct list_head poll_list;
570 struct net_device *output_queue;
571 struct sk_buff *completion_queue; 562 struct sk_buff *completion_queue;
572 563
573 struct net_device backlog_dev; /* Sorry. 8) */ 564 struct net_device backlog_dev; /* Sorry. 8) */
@@ -913,6 +904,7 @@ extern void dev_mc_discard(struct net_device *dev);
913extern void dev_set_promiscuity(struct net_device *dev, int inc); 904extern void dev_set_promiscuity(struct net_device *dev, int inc);
914extern void dev_set_allmulti(struct net_device *dev, int inc); 905extern void dev_set_allmulti(struct net_device *dev, int inc);
915extern void netdev_state_change(struct net_device *dev); 906extern void netdev_state_change(struct net_device *dev);
907extern void netdev_features_change(struct net_device *dev);
916/* Load a device via the kmod */ 908/* Load a device via the kmod */
917extern void dev_load(const char *name); 909extern void dev_load(const char *name);
918extern void dev_mcast_init(void); 910extern void dev_mcast_init(void);
@@ -924,10 +916,6 @@ extern int skb_checksum_help(struct sk_buff *skb, int inward);
924extern void net_enable_timestamp(void); 916extern void net_enable_timestamp(void);
925extern void net_disable_timestamp(void); 917extern void net_disable_timestamp(void);
926 918
927#ifdef CONFIG_SYSCTL
928extern char *net_sysctl_strdup(const char *s);
929#endif
930
931#endif /* __KERNEL__ */ 919#endif /* __KERNEL__ */
932 920
933#endif /* _LINUX_DEV_H */ 921#endif /* _LINUX_DEV_H */