From 40d25142f2ef27084fc317ac8bb5bae460c8ea72 Mon Sep 17 00:00:00 2001 From: Krzysztof Halasa Date: Fri, 1 Feb 2008 22:37:12 +0100 Subject: Generic HDLC - remove now unneeded hdlc_device_desc Removes now unneeded struct hdlc_device_desc Signed-off-by: Krzysztof Halasa Signed-off-by: Jeff Garzik --- include/linux/hdlc.h | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'include/linux') diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h index db390c511ad..6115545a5b9 100644 --- a/include/linux/hdlc.h +++ b/include/linux/hdlc.h @@ -26,13 +26,6 @@ #include #include - -/* Used by all network devices here, pointed to by netdev_priv(dev) */ -struct hdlc_device_desc { - int (*netif_rx)(struct sk_buff *skb); - struct net_device_stats stats; -}; - /* This structure is a private property of HDLC protocols. Hardware drivers have no interest here */ @@ -44,12 +37,15 @@ struct hdlc_proto { void (*detach)(struct net_device *dev); int (*ioctl)(struct net_device *dev, struct ifreq *ifr); __be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev); + int (*netif_rx)(struct sk_buff *skb); struct module *module; struct hdlc_proto *next; /* next protocol in the list */ }; +/* Pointed to by dev->priv */ typedef struct hdlc_device { + struct net_device_stats stats; /* used by HDLC layer to take control over HDLC device from hw driver*/ int (*attach)(struct net_device *dev, unsigned short encoding, unsigned short parity); @@ -83,18 +79,11 @@ void unregister_hdlc_protocol(struct hdlc_proto *proto); struct net_device *alloc_hdlcdev(void *priv); - -static __inline__ struct hdlc_device_desc* dev_to_desc(struct net_device *dev) -{ - return netdev_priv(dev); -} - -static __inline__ hdlc_device* dev_to_hdlc(struct net_device *dev) +static inline struct hdlc_device* dev_to_hdlc(struct net_device *dev) { - return netdev_priv(dev) + sizeof(struct hdlc_device_desc); + return dev->priv; } - static __inline__ void debug_frame(const struct sk_buff *skb) { int i; @@ -116,13 +105,13 @@ int hdlc_open(struct net_device *dev); void hdlc_close(struct net_device *dev); int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, - int (*rx)(struct sk_buff *skb), size_t size); + size_t size); /* May be used by hardware driver to gain control over HDLC device */ void detach_hdlc_protocol(struct net_device *dev); static __inline__ struct net_device_stats *hdlc_stats(struct net_device *dev) { - return &dev_to_desc(dev)->stats; + return &dev_to_hdlc(dev)->stats; } -- cgit v1.2.3 From 532031d7f426eb02f854d13184416cabcb01bdd5 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 4 Feb 2008 23:58:42 -0800 Subject: b43: fix build with CONFIG_SSB_PCIHOST=n m68k allmodconfig gives drivers/net/wireless/b43/main.c:251: error: implicit declaration of function 'mmiowb' because CONFIG_B43=m, CONFIG_SSB_PCIHOST=n. Might be Kconfig bustage, but this works... Cc: Michael Buesch Signed-off-by: Andrew Morton Signed-off-by: John W. Linville --- include/linux/ssb/ssb.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/linux') diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index e18f5c23b93..9d5da8b2ccf 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) if (sdev->bus->bustype == SSB_BUSTYPE_PCI) pci_set_power_state(sdev->bus->host_pci, state); } +#else +static inline void ssb_pcihost_unregister(struct pci_driver *driver) +{ +} + +static inline +void ssb_pcihost_set_power_state(struct ssb_device *sdev, pci_power_t state) +{ +} #endif /* CONFIG_SSB_PCIHOST */ -- cgit v1.2.3 From 181499356e5a9f0bcbd69adc3c6df450f6e2586d Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Tue, 5 Feb 2008 16:20:22 -0800 Subject: [VLAN]: Constify skb argument to vlan_get_tag() Required by next patch to use it from the flow classifier. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- include/linux/if_vlan.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 34f40efc760..79504b22a93 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 * * Returns error if the skb is not of VLAN type */ -static inline int __vlan_get_tag(struct sk_buff *skb, unsigned short *tag) +static inline int __vlan_get_tag(const struct sk_buff *skb, unsigned short *tag) { struct vlan_ethhdr *veth = (struct vlan_ethhdr *)skb->data; @@ -347,7 +347,8 @@ static inline int __vlan_get_tag(struct sk_buff *skb, unsigned short *tag) * * Returns error if @skb->cb[] is not set correctly */ -static inline int __vlan_hwaccel_get_tag(struct sk_buff *skb, unsigned short *tag) +static inline int __vlan_hwaccel_get_tag(const struct sk_buff *skb, + unsigned short *tag) { struct vlan_skb_tx_cookie *cookie; @@ -370,7 +371,7 @@ static inline int __vlan_hwaccel_get_tag(struct sk_buff *skb, unsigned short *ta * * Returns error if the skb is not VLAN tagged */ -static inline int vlan_get_tag(struct sk_buff *skb, unsigned short *tag) +static inline int vlan_get_tag(const struct sk_buff *skb, unsigned short *tag) { if (skb->dev->features & NETIF_F_HW_VLAN_TX) { return __vlan_hwaccel_get_tag(skb, tag); -- cgit v1.2.3 From 9ec138101f8a79007bc571174976a7814ed616f8 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Tue, 5 Feb 2008 16:21:04 -0800 Subject: [NET_SCHED]: cls_flow: support classification based on VLAN tag Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- include/linux/pkt_cls.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index 40fac8c4559..28dfc61cf79 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h @@ -348,6 +348,7 @@ enum FLOW_KEY_RTCLASSID, FLOW_KEY_SKUID, FLOW_KEY_SKGID, + FLOW_KEY_VLAN_TAG, __FLOW_KEY_MAX, }; -- cgit v1.2.3