diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:47:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:47:18 -0500 |
commit | 8755e568250ecd3149ecd3495d8070f3a5384f73 (patch) | |
tree | 26e76b657020cd864b3e6fbfcee9ca86a96059c2 /include/linux | |
parent | e33f6635da037ed4d2634ee6bdf5c4d601946c18 (diff) | |
parent | 655d2ce073f5927194dbc28d2bd3c062a4a3caac (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (35 commits)
virtio net: fix oops on interface-up
Fix PHY Lib support for gianfar and ucc_geth
forcedeth: preserve registers
forcedeth: phy status fix
forcedeth: restart tx/rx
ipvs: Make wrr "no available servers" error message rate-limited
[PPPOL2TP]: Label unused warning when CONFIG_PROC_FS is not set.
[NET_SCHED]: cls_flow: support classification based on VLAN tag
[VLAN]: Constify skb argument to vlan_get_tag()
[NET_SCHED]: cls_flow: fix key mask validity check
[NET_SCHED]: em_meta: fix compile warning
b43: Fix DMA for 30/32-bit DMA engines
b43: fix build with CONFIG_SSB_PCIHOST=n
mac80211: Is not EXPERIMENTAL anymore
iwl3945-base.c: fix off-by-one errors
b43legacy: fix DMA slot resource leakage
b43legacy: drop packets we are not able to encrypt
b43legacy: fix suspend/resume
b43legacy: fix PIO crash
Generic HDLC - use random_ether_addr()
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/hdlc.h | 25 | ||||
-rw-r--r-- | include/linux/if_vlan.h | 7 | ||||
-rw-r--r-- | include/linux/pkt_cls.h | 1 | ||||
-rw-r--r-- | include/linux/ssb/ssb.h | 9 |
4 files changed, 21 insertions, 21 deletions
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h index db390c511ada..6115545a5b9c 100644 --- a/include/linux/hdlc.h +++ b/include/linux/hdlc.h | |||
@@ -26,13 +26,6 @@ | |||
26 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
27 | #include <linux/hdlc/ioctl.h> | 27 | #include <linux/hdlc/ioctl.h> |
28 | 28 | ||
29 | |||
30 | /* Used by all network devices here, pointed to by netdev_priv(dev) */ | ||
31 | struct hdlc_device_desc { | ||
32 | int (*netif_rx)(struct sk_buff *skb); | ||
33 | struct net_device_stats stats; | ||
34 | }; | ||
35 | |||
36 | /* This structure is a private property of HDLC protocols. | 29 | /* This structure is a private property of HDLC protocols. |
37 | Hardware drivers have no interest here */ | 30 | Hardware drivers have no interest here */ |
38 | 31 | ||
@@ -44,12 +37,15 @@ struct hdlc_proto { | |||
44 | void (*detach)(struct net_device *dev); | 37 | void (*detach)(struct net_device *dev); |
45 | int (*ioctl)(struct net_device *dev, struct ifreq *ifr); | 38 | int (*ioctl)(struct net_device *dev, struct ifreq *ifr); |
46 | __be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev); | 39 | __be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev); |
40 | int (*netif_rx)(struct sk_buff *skb); | ||
47 | struct module *module; | 41 | struct module *module; |
48 | struct hdlc_proto *next; /* next protocol in the list */ | 42 | struct hdlc_proto *next; /* next protocol in the list */ |
49 | }; | 43 | }; |
50 | 44 | ||
51 | 45 | ||
46 | /* Pointed to by dev->priv */ | ||
52 | typedef struct hdlc_device { | 47 | typedef struct hdlc_device { |
48 | struct net_device_stats stats; | ||
53 | /* used by HDLC layer to take control over HDLC device from hw driver*/ | 49 | /* used by HDLC layer to take control over HDLC device from hw driver*/ |
54 | int (*attach)(struct net_device *dev, | 50 | int (*attach)(struct net_device *dev, |
55 | unsigned short encoding, unsigned short parity); | 51 | unsigned short encoding, unsigned short parity); |
@@ -83,18 +79,11 @@ void unregister_hdlc_protocol(struct hdlc_proto *proto); | |||
83 | 79 | ||
84 | struct net_device *alloc_hdlcdev(void *priv); | 80 | struct net_device *alloc_hdlcdev(void *priv); |
85 | 81 | ||
86 | 82 | static inline struct hdlc_device* dev_to_hdlc(struct net_device *dev) | |
87 | static __inline__ struct hdlc_device_desc* dev_to_desc(struct net_device *dev) | ||
88 | { | ||
89 | return netdev_priv(dev); | ||
90 | } | ||
91 | |||
92 | static __inline__ hdlc_device* dev_to_hdlc(struct net_device *dev) | ||
93 | { | 83 | { |
94 | return netdev_priv(dev) + sizeof(struct hdlc_device_desc); | 84 | return dev->priv; |
95 | } | 85 | } |
96 | 86 | ||
97 | |||
98 | static __inline__ void debug_frame(const struct sk_buff *skb) | 87 | static __inline__ void debug_frame(const struct sk_buff *skb) |
99 | { | 88 | { |
100 | int i; | 89 | int i; |
@@ -116,13 +105,13 @@ int hdlc_open(struct net_device *dev); | |||
116 | void hdlc_close(struct net_device *dev); | 105 | void hdlc_close(struct net_device *dev); |
117 | 106 | ||
118 | int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, | 107 | int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, |
119 | int (*rx)(struct sk_buff *skb), size_t size); | 108 | size_t size); |
120 | /* May be used by hardware driver to gain control over HDLC device */ | 109 | /* May be used by hardware driver to gain control over HDLC device */ |
121 | void detach_hdlc_protocol(struct net_device *dev); | 110 | void detach_hdlc_protocol(struct net_device *dev); |
122 | 111 | ||
123 | static __inline__ struct net_device_stats *hdlc_stats(struct net_device *dev) | 112 | static __inline__ struct net_device_stats *hdlc_stats(struct net_device *dev) |
124 | { | 113 | { |
125 | return &dev_to_desc(dev)->stats; | 114 | return &dev_to_hdlc(dev)->stats; |
126 | } | 115 | } |
127 | 116 | ||
128 | 117 | ||
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 34f40efc7607..79504b22a932 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -327,7 +327,7 @@ static inline struct sk_buff *vlan_put_tag(struct sk_buff *skb, unsigned short t | |||
327 | * | 327 | * |
328 | * Returns error if the skb is not of VLAN type | 328 | * Returns error if the skb is not of VLAN type |
329 | */ | 329 | */ |
330 | static inline int __vlan_get_tag(struct sk_buff *skb, unsigned short *tag) | 330 | static inline int __vlan_get_tag(const struct sk_buff *skb, unsigned short *tag) |
331 | { | 331 | { |
332 | struct vlan_ethhdr *veth = (struct vlan_ethhdr *)skb->data; | 332 | struct vlan_ethhdr *veth = (struct vlan_ethhdr *)skb->data; |
333 | 333 | ||
@@ -347,7 +347,8 @@ static inline int __vlan_get_tag(struct sk_buff *skb, unsigned short *tag) | |||
347 | * | 347 | * |
348 | * Returns error if @skb->cb[] is not set correctly | 348 | * Returns error if @skb->cb[] is not set correctly |
349 | */ | 349 | */ |
350 | static inline int __vlan_hwaccel_get_tag(struct sk_buff *skb, unsigned short *tag) | 350 | static inline int __vlan_hwaccel_get_tag(const struct sk_buff *skb, |
351 | unsigned short *tag) | ||
351 | { | 352 | { |
352 | struct vlan_skb_tx_cookie *cookie; | 353 | struct vlan_skb_tx_cookie *cookie; |
353 | 354 | ||
@@ -370,7 +371,7 @@ static inline int __vlan_hwaccel_get_tag(struct sk_buff *skb, unsigned short *ta | |||
370 | * | 371 | * |
371 | * Returns error if the skb is not VLAN tagged | 372 | * Returns error if the skb is not VLAN tagged |
372 | */ | 373 | */ |
373 | static inline int vlan_get_tag(struct sk_buff *skb, unsigned short *tag) | 374 | static inline int vlan_get_tag(const struct sk_buff *skb, unsigned short *tag) |
374 | { | 375 | { |
375 | if (skb->dev->features & NETIF_F_HW_VLAN_TX) { | 376 | if (skb->dev->features & NETIF_F_HW_VLAN_TX) { |
376 | return __vlan_hwaccel_get_tag(skb, tag); | 377 | return __vlan_hwaccel_get_tag(skb, tag); |
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index 40fac8c4559d..28dfc61cf79e 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
@@ -348,6 +348,7 @@ enum | |||
348 | FLOW_KEY_RTCLASSID, | 348 | FLOW_KEY_RTCLASSID, |
349 | FLOW_KEY_SKUID, | 349 | FLOW_KEY_SKUID, |
350 | FLOW_KEY_SKGID, | 350 | FLOW_KEY_SKGID, |
351 | FLOW_KEY_VLAN_TAG, | ||
351 | __FLOW_KEY_MAX, | 352 | __FLOW_KEY_MAX, |
352 | }; | 353 | }; |
353 | 354 | ||
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index e18f5c23b930..9d5da8b2ccf9 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
@@ -373,6 +373,15 @@ void ssb_pcihost_set_power_state(struct ssb_device *sdev, pci_power_t state) | |||
373 | if (sdev->bus->bustype == SSB_BUSTYPE_PCI) | 373 | if (sdev->bus->bustype == SSB_BUSTYPE_PCI) |
374 | pci_set_power_state(sdev->bus->host_pci, state); | 374 | pci_set_power_state(sdev->bus->host_pci, state); |
375 | } | 375 | } |
376 | #else | ||
377 | static inline void ssb_pcihost_unregister(struct pci_driver *driver) | ||
378 | { | ||
379 | } | ||
380 | |||
381 | static inline | ||
382 | void ssb_pcihost_set_power_state(struct ssb_device *sdev, pci_power_t state) | ||
383 | { | ||
384 | } | ||
376 | #endif /* CONFIG_SSB_PCIHOST */ | 385 | #endif /* CONFIG_SSB_PCIHOST */ |
377 | 386 | ||
378 | 387 | ||