From c0c201ee95163aabf6cac0034f4cc0dd16cef694 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Wed, 6 Apr 2022 23:21:08 +0800 Subject: [PATCH] mac80211: fixes build after kernel 4.9.297 Fixes: #666 Also refresh all patches. --- .../patches/ath/553-ath9k_of_gpio_mask.patch | 2 +- .../ath/983-ath10k-allow-vht-on-2g.patch | 2 +- .../patches/build/005-fix_build_bug.patch | 18 ++++++++++++++++++ .../subsys/600-mac80211-allow-vht-on-2g.patch | 6 +++--- 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 package/kernel/mac80211/patches/build/005-fix_build_bug.patch diff --git a/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch b/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch index 72b99050c4..082667c873 100644 --- a/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch +++ b/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch @@ -13,7 +13,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, const struct ath_bus_ops *bus_ops) { -@@ -758,6 +764,9 @@ static int ath9k_init_softc(u16 devid, s +@@ -760,6 +766,9 @@ static int ath9k_init_softc(u16 devid, s if (ret) goto err_hw; diff --git a/package/kernel/mac80211/patches/ath/983-ath10k-allow-vht-on-2g.patch b/package/kernel/mac80211/patches/ath/983-ath10k-allow-vht-on-2g.patch index eeca88a613..441e2415ce 100644 --- a/package/kernel/mac80211/patches/ath/983-ath10k-allow-vht-on-2g.patch +++ b/package/kernel/mac80211/patches/ath/983-ath10k-allow-vht-on-2g.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -4718,6 +4718,7 @@ static void ath10k_mac_setup_ht_vht_cap( +@@ -4636,6 +4636,7 @@ static void ath10k_mac_setup_ht_vht_cap( if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) { band = &ar->mac.sbands[NL80211_BAND_2GHZ]; band->ht_cap = ht_cap; diff --git a/package/kernel/mac80211/patches/build/005-fix_build_bug.patch b/package/kernel/mac80211/patches/build/005-fix_build_bug.patch new file mode 100644 index 0000000000..f7f54f0c4e --- /dev/null +++ b/package/kernel/mac80211/patches/build/005-fix_build_bug.patch @@ -0,0 +1,18 @@ +--- a/backport-include/linux/build_bug.h ++++ b/backport-include/linux/build_bug.h +@@ -1,10 +1,12 @@ + #ifndef __BP_BUILD_BUG_H + #define __BP_BUILD_BUG_H ++#include + +-#if LINUX_VERSION_IS_GEQ(4,13,0) ++#if LINUX_VERSION_IS_GEQ(4,13,0) || \ ++ LINUX_VERSION_IN_RANGE(4,9,255, 4,10,0) + #include_next +-#else /* LINUX_VERSION_IS_GEQ(4,13,0) */ ++#else + #include +-#endif /* LINUX_VERSION_IS_GEQ(4,13,0) */ ++#endif /* >= 4.13 */ + + #endif /* __BP_BUILD_BUG_H */ diff --git a/package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch b/package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch index da9fcd2185..e1192550a2 100644 --- a/package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch +++ b/package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/vht.c +++ b/net/mac80211/vht.c -@@ -135,7 +135,8 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru +@@ -137,7 +137,8 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru have_80mhz = false; for (i = 0; i < sband->n_channels; i++) { if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED | @@ -12,7 +12,7 @@ have_80mhz = true; --- a/net/mac80211/util.c +++ b/net/mac80211/util.c -@@ -1769,7 +1769,8 @@ static int ieee80211_build_preq_ies_band +@@ -1618,7 +1618,8 @@ static int ieee80211_build_preq_ies_band /* Check if any channel in this sband supports at least 80 MHz */ for (i = 0; i < sband->n_channels; i++) { if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED | @@ -24,7 +24,7 @@ have_80mhz = true; --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c -@@ -4824,7 +4824,8 @@ static int ieee80211_prep_channel(struct +@@ -4694,7 +4694,8 @@ static int ieee80211_prep_channel(struct have_80mhz = false; for (i = 0; i < sband->n_channels; i++) { if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |