summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/0002-net-misc.patch
blob: bd50e0d28753ae03b95524935d52497036e16882 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
These are things that removed in later kernels but no good explanatin
was provided as to their removal. We should review if this is needed
and if not remove these hunks.

Pretty sure we can remove the netdev_tx_t hunk change on
net/bluetooth/bnep/netdev.c, removing that hunk just needs to be
compile tested against older kernels.

--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -332,6 +332,11 @@ generic_rndis_bind(struct usbnet *dev, s
 	u.init->major_version = cpu_to_le32(1);
 	u.init->minor_version = cpu_to_le32(0);
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
+	/* can't we remove this? */
+	net->change_mtu = NULL;
+#endif
+
 	/* max transfer (in spec) is 0x4000 at full speed, but for
 	 * TX we'll stick to one Ethernet packet plus RNDIS framing.
 	 * For RX we handle drivers that zero-pad to end-of-packet.
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1018,6 +1018,11 @@ static void ieee80211_if_setup(struct ne
 	ether_setup(dev);
 	dev->priv_flags &= ~IFF_TX_SKB_SHARING;
 	netdev_attach_ops(dev, &ieee80211_dataif_ops);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
+	/* Do we need this ? */
+	/* we will validate the address ourselves in ->open */
+	dev->validate_addr = NULL;
+#endif
 	dev->destructor = free_netdev;
 }
 
--- a/net/bluetooth/bnep/netdev.c
+++ b/net/bluetooth/bnep/netdev.c
@@ -161,8 +161,12 @@ static int bnep_net_proto_filter(struct
 }
 #endif
 
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
 static netdev_tx_t bnep_net_xmit(struct sk_buff *skb,
 				 struct net_device *dev)
+#else
+static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev)
+#endif
 {
 	struct bnep_session *s = netdev_priv(dev);
 	struct sock *sk = s->sock->sk;
--- a/drivers/net/wireless/libertas/defs.h
+++ b/drivers/net/wireless/libertas/defs.h
@@ -16,6 +16,14 @@
 #define DRV_NAME "libertas"
 #endif
 
+/*
+ * Really nasty hack to avoid stuffing compat.diff with tons of ifdefs,
+ * we could add this to a compat header file but too lazy to check ml_priv
+ * is not used anywhere else
+ */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
+#define ml_priv priv
+#endif
 
 #define LBS_DEB_ENTER	0x00000001
 #define LBS_DEB_LEAVE	0x00000002