summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-07 12:36:01 -0800
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-03-07 12:39:50 -0800
commitdb0e9cad45c9199cf14ae5b9d78d8dd6697d7860 (patch)
treecf88573aa254b5d92842e983328e3d52db501dcf /patches
parentcd6b770c7083d398fcfe29958dfee85f2a50f45a (diff)
compat-drivers: netlink_callback min_dump_alloc only exists since 3.1
The netlink callback min_dump_alloc only exists on kernel 3.1 so only enable using it for those kernels. If you're on an older 64-bit kernel and want this functionality of resizing the data sent to userspace for a wiphy dump then you better upgrade. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Diffstat (limited to 'patches')
-rw-r--r--patches/collateral-evolutions/network/70-disable-dump-adjust-on-old-kernels.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/70-disable-dump-adjust-on-old-kernels.patch b/patches/collateral-evolutions/network/70-disable-dump-adjust-on-old-kernels.patch
new file mode 100644
index 00000000..a1c1250b
--- /dev/null
+++ b/patches/collateral-evolutions/network/70-disable-dump-adjust-on-old-kernels.patch
@@ -0,0 +1,21 @@
+On older kernels, we can't do this workaround, so if you use
+an old 64-bit kernel with compat you'd better upgrade.
+
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -1321,6 +1321,7 @@ static int nl80211_dump_wiphy(struct sk_
+ cb->nlh->nlmsg_seq, NLM_F_MULTI,
+ dev);
+ if (ret < 0) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
+ /*
+ * If sending the wiphy data didn't fit (ENOBUFS or
+ * EMSGSIZE returned), this SKB is still empty (so
+@@ -1340,6 +1341,7 @@ static int nl80211_dump_wiphy(struct sk_
+ mutex_unlock(&cfg80211_mutex);
+ return 1;
+ }
++#endif
+ idx--;
+ break;
+ }