summaryrefslogtreecommitdiff
path: root/patches/0003-cfg80211-wext-padding/net_wireless_core.patch
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2017-02-07 08:07:39 +0100
committerJohannes Berg <johannes.berg@intel.com>2017-02-07 15:07:16 +0100
commit75239f276ec894c87b8fbc268bdfb0f9fd290445 (patch)
tree14a91c251f2b1986a709876d90d9a0828b8c3769 /patches/0003-cfg80211-wext-padding/net_wireless_core.patch
parent6981c5a175652d79562795127ab4ff62c9ecfac0 (diff)
backports: get rid of patch directory structure
This directory structure was never really managed well, simply get rid of it. With the patch system that only applies patches when the modified file exists, and with a lot of spatches applying everywhere anyway, it's no longer really useful either. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches/0003-cfg80211-wext-padding/net_wireless_core.patch')
-rw-r--r--patches/0003-cfg80211-wext-padding/net_wireless_core.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/patches/0003-cfg80211-wext-padding/net_wireless_core.patch b/patches/0003-cfg80211-wext-padding/net_wireless_core.patch
new file mode 100644
index 00000000..06fefaab
--- /dev/null
+++ b/patches/0003-cfg80211-wext-padding/net_wireless_core.patch
@@ -0,0 +1,20 @@
+--- a/net/wireless/core.c
++++ b/net/wireless/core.c
+@@ -344,6 +344,17 @@ struct wiphy *wiphy_new_nm(const struct
+ struct cfg80211_registered_device *rdev;
+ int alloc_size;
+
++ /*
++ * Make sure the padding is >= the rest of the struct so that we
++ * always keep it large enough to pad out the entire original
++ * kernel's struct. We really only need to make sure it's larger
++ * than the kernel compat is compiled against, but since it'll
++ * only increase in size make sure it's larger than the current
++ * version of it. Subtract since it's included.
++ */
++ BUILD_BUG_ON(WIPHY_COMPAT_PAD_SIZE <
++ sizeof(struct wiphy) - WIPHY_COMPAT_PAD_SIZE);
++
+ WARN_ON(ops->add_key && (!ops->del_key || !ops->set_default_key));
+ WARN_ON(ops->auth && (!ops->assoc || !ops->deauth || !ops->disassoc));
+ WARN_ON(ops->connect && !ops->disconnect);