From eabca30cd9bdbd0747a6a860c2573a7445ae8203 Mon Sep 17 00:00:00 2001 From: nbd Date: Mon, 22 Apr 2013 15:01:36 +0000 Subject: kernel: allow __netdev_alloc_skb_ip_align to be called with dev = NULL git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36378 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/generic/patches-3.3/721-phy_packets.patch | 2 +- target/linux/generic/patches-3.6/721-phy_packets.patch | 2 +- target/linux/generic/patches-3.7/721-phy_packets.patch | 2 +- target/linux/generic/patches-3.8/721-phy_packets.patch | 2 +- target/linux/generic/patches-3.9/721-phy_packets.patch | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/linux/generic/patches-3.3/721-phy_packets.patch b/target/linux/generic/patches-3.3/721-phy_packets.patch index 575fbaeaa..cdb01be10 100644 --- a/target/linux/generic/patches-3.3/721-phy_packets.patch +++ b/target/linux/generic/patches-3.3/721-phy_packets.patch @@ -145,7 +145,7 @@ + struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp); + +#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ if (dev->priv_flags & IFF_NO_IP_ALIGN) ++ if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN)) + return skb; +#endif + diff --git a/target/linux/generic/patches-3.6/721-phy_packets.patch b/target/linux/generic/patches-3.6/721-phy_packets.patch index 3a0fdc95b..70b65a86b 100644 --- a/target/linux/generic/patches-3.6/721-phy_packets.patch +++ b/target/linux/generic/patches-3.6/721-phy_packets.patch @@ -145,7 +145,7 @@ + struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp); + +#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ if (dev->priv_flags & IFF_NO_IP_ALIGN) ++ if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN)) + return skb; +#endif + diff --git a/target/linux/generic/patches-3.7/721-phy_packets.patch b/target/linux/generic/patches-3.7/721-phy_packets.patch index b8c15fcc6..78b2d69b4 100644 --- a/target/linux/generic/patches-3.7/721-phy_packets.patch +++ b/target/linux/generic/patches-3.7/721-phy_packets.patch @@ -145,7 +145,7 @@ + struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp); + +#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ if (dev->priv_flags & IFF_NO_IP_ALIGN) ++ if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN)) + return skb; +#endif + diff --git a/target/linux/generic/patches-3.8/721-phy_packets.patch b/target/linux/generic/patches-3.8/721-phy_packets.patch index d78ba8ed6..88b5969f3 100644 --- a/target/linux/generic/patches-3.8/721-phy_packets.patch +++ b/target/linux/generic/patches-3.8/721-phy_packets.patch @@ -145,7 +145,7 @@ + struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp); + +#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ if (dev->priv_flags & IFF_NO_IP_ALIGN) ++ if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN)) + return skb; +#endif + diff --git a/target/linux/generic/patches-3.9/721-phy_packets.patch b/target/linux/generic/patches-3.9/721-phy_packets.patch index 65f5ffd21..dbf105e74 100644 --- a/target/linux/generic/patches-3.9/721-phy_packets.patch +++ b/target/linux/generic/patches-3.9/721-phy_packets.patch @@ -145,7 +145,7 @@ + struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp); + +#ifdef CONFIG_ETHERNET_PACKET_MANGLE -+ if (dev->priv_flags & IFF_NO_IP_ALIGN) ++ if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN)) + return skb; +#endif + -- cgit v1.2.3