Search Linux Wireless

[PATCH] nl80211/compat: netlink_callback min_dump_alloc only exists since 3.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johannes Berg <johannes.berg@xxxxxxxxx>

On older kernels, we can't do this workaround, so if you use
an old 64-bit kernel with compat you'd better upgrade.

Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
---
 patches/0006-disable-dump-adjust-on-old-kernels.patch | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 patches/0006-disable-dump-adjust-on-old-kernels.patch

diff --git a/patches/0006-disable-dump-adjust-on-old-kernels.patch b/patches/0006-disable-dump-adjust-on-old-kernels.patch
new file mode 100644
index 0000000..1712b6a
--- /dev/null
+++ b/patches/0006-disable-dump-adjust-on-old-kernels.patch
@@ -0,0 +1,18 @@
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -1333,6 +1333,7 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb)
+ 					 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
+@@ -1352,6 +1353,7 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb)
+ 				mutex_unlock(&cfg80211_mutex);
+ 				return 1;
+ 			}
++#endif
+ 			idx--;
+ 			break;
+ 		}
-- 
1.8.0



--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux