compat-drivers: do not use __sock_create()
authorHauke Mehrtens <hauke@hauke-m.de>
Tue, 19 Feb 2013 22:19:50 +0000 (23:19 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 19 Feb 2013 22:21:27 +0000 (23:21 +0100)
__sock_create() is not available on kernel version < 2.6.37.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
patches/collateral-evolutions/network/69-wowlan-no-socket.patch [new file with mode: 0644]

diff --git a/patches/collateral-evolutions/network/69-wowlan-no-socket.patch b/patches/collateral-evolutions/network/69-wowlan-no-socket.patch
new file mode 100644 (file)
index 0000000..27d8f6a
--- /dev/null
@@ -0,0 +1,13 @@
+__sock_create() is not available on kernel version < 2.6.37.
+
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -7388,7 +7388,7 @@ static int nl80211_parse_wowlan_tcp(stru
+               port = nla_get_u16(tb[NL80211_WOWLAN_TCP_SRC_PORT]);
+       else
+               port = 0;
+-#ifdef CONFIG_INET
++#if defined(CONFIG_INET) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+       /* allocate a socket and port for it and use it */
+       err = __sock_create(wiphy_net(&rdev->wiphy), PF_INET, SOCK_STREAM,
+                           IPPROTO_TCP, &cfg->sock, 1);