240-backport_genl_split_ops.patch 940 B

1234567891011121314151617181920212223242526272829303132
  1. --- a/net/wireless/nl80211.c
  2. +++ b/net/wireless/nl80211.c
  3. @@ -16442,8 +16442,14 @@ static u32 nl80211_internal_flags[] = {
  4. #undef SELECTOR
  5. };
  6. +#if LINUX_VERSION_IS_LESS(6,2,0)
  7. static int nl80211_pre_doit(const struct genl_ops *ops, struct sk_buff *skb,
  8. struct genl_info *info)
  9. +#else
  10. +static int nl80211_pre_doit(const struct genl_split_ops *ops,
  11. + struct sk_buff *skb,
  12. + struct genl_info *info)
  13. +#endif
  14. {
  15. struct cfg80211_registered_device *rdev = NULL;
  16. struct wireless_dev *wdev = NULL;
  17. @@ -16543,8 +16549,14 @@ out_unlock:
  18. return err;
  19. }
  20. +#if LINUX_VERSION_IS_LESS(6,2,0)
  21. static void nl80211_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
  22. struct genl_info *info)
  23. +#else
  24. +static void nl80211_post_doit(const struct genl_split_ops *ops,
  25. + struct sk_buff *skb,
  26. + struct genl_info *info)
  27. +#endif
  28. {
  29. u32 internal_flags = nl80211_internal_flags[ops->internal_flags];