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() ...
This commit is contained in:
commit
8755e56825
37 changed files with 593 additions and 336 deletions
|
@ -26,13 +26,6 @@
|
|||
#include <linux/netdevice.h>
|
||||
#include <linux/hdlc/ioctl.h>
|
||||
|
||||
|
||||
/* 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)
|
||||
static inline struct hdlc_device* dev_to_hdlc(struct net_device *dev)
|
||||
{
|
||||
return netdev_priv(dev);
|
||||
return dev->priv;
|
||||
}
|
||||
|
||||
static __inline__ hdlc_device* dev_to_hdlc(struct net_device *dev)
|
||||
{
|
||||
return netdev_priv(dev) + sizeof(struct hdlc_device_desc);
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -348,6 +348,7 @@ enum
|
|||
FLOW_KEY_RTCLASSID,
|
||||
FLOW_KEY_SKUID,
|
||||
FLOW_KEY_SKGID,
|
||||
FLOW_KEY_VLAN_TAG,
|
||||
__FLOW_KEY_MAX,
|
||||
};
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue