backports: remove usage of addr_assign_type in 6lowpan.c
authorHauke Mehrtens <hauke@hauke-m.de>
Wed, 1 Jan 2014 20:36:31 +0000 (21:36 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 18 Jan 2014 12:43:54 +0000 (13:43 +0100)
The bluetooth 6lowpan code now accesses the addr_assign_type member of
struct netdev, which is not available in older kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
patches/collateral-evolutions/network/61-netdev-addr_assign_type/net_bluetooth_6lowpan.patch [new file with mode: 0644]

diff --git a/patches/collateral-evolutions/network/61-netdev-addr_assign_type/net_bluetooth_6lowpan.patch b/patches/collateral-evolutions/network/61-netdev-addr_assign_type/net_bluetooth_6lowpan.patch
new file mode 100644 (file)
index 0000000..ad2618f
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/net/bluetooth/6lowpan.c
++++ b/net/bluetooth/6lowpan.c
+@@ -632,7 +632,9 @@ static void set_addr(u8 *eui, u8 *addr,
+ static void set_dev_addr(struct net_device *netdev, bdaddr_t *addr,
+                        u8 addr_type)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+       netdev->addr_assign_type = NET_ADDR_PERM;
++#endif
+       set_addr(netdev->dev_addr, addr->b, addr_type);
+       netdev->dev_addr[0] ^= 2;
+ }