1 --- a/net/wireless/core.c
2 +++ b/net/wireless/core.c
3 @@ -388,6 +388,17 @@ struct wiphy *wiphy_new_nm(const struct
4 struct cfg80211_registered_device *rdev;
8 + * Make sure the padding is >= the rest of the struct so that we
9 + * always keep it large enough to pad out the entire original
10 + * kernel's struct. We really only need to make sure it's larger
11 + * than the kernel compat is compiled against, but since it'll
12 + * only increase in size make sure it's larger than the current
13 + * version of it. Subtract since it's included.
15 + BUILD_BUG_ON(WIPHY_COMPAT_PAD_SIZE <
16 + sizeof(struct wiphy) - WIPHY_COMPAT_PAD_SIZE);
18 WARN_ON(ops->add_key && (!ops->del_key || !ops->set_default_key));
19 WARN_ON(ops->auth && (!ops->assoc || !ops->deauth || !ops->disassoc));
20 WARN_ON(ops->connect && !ops->disconnect);