0008-Fix-build-with-Linux-6.7.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From c2024eb93f6d7ec605226d5d8a29ea17fbc71b5d Mon Sep 17 00:00:00 2001
  2. From: Giulio Benetti <giulio.benetti@benettiengineering.com>
  3. Date: Thu, 17 Apr 2025 19:06:48 +0200
  4. Subject: [PATCH] Fix build with Linux 6.7
  5. During commit:
  6. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb55441c57ccc5cc2eab44e1a97698b9d708871d
  7. struct cfg80211_ap_settings has been split into multiple structs including
  8. beacon. So is Linux version is 6.7+ let's use &info->beacon in place of
  9. beacon.
  10. Upstream: https://github.com/embeddedTS/wilc3000-external-module/pull/8
  11. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
  12. ---
  13. cfg80211.c | 8 ++++++++
  14. 1 file changed, 8 insertions(+)
  15. diff --git a/cfg80211.c b/cfg80211.c
  16. index 5c92062..25da3a1 100644
  17. --- a/cfg80211.c
  18. +++ b/cfg80211.c
  19. @@ -1822,13 +1822,21 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
  20. }
  21. static int change_beacon(struct wiphy *wiphy, struct net_device *dev,
  22. +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0))
  23. + struct cfg80211_ap_update *info)
  24. +#else
  25. struct cfg80211_beacon_data *beacon)
  26. +#endif
  27. {
  28. struct wilc_vif *vif = netdev_priv(dev);
  29. PRINT_INFO(vif->ndev, HOSTAPD_DBG, "Setting beacon\n");
  30. +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0))
  31. + return wilc_add_beacon(vif, 0, 0, &info->beacon);
  32. +#else
  33. return wilc_add_beacon(vif, 0, 0, beacon);
  34. +#endif
  35. }
  36. static int stop_ap(struct wiphy *wiphy, struct net_device *dev
  37. --
  38. 2.39.5