mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-20 17:32:57 +00:00
Some checks failed
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Without this patch, we get the following error: Mon Dec 23 11:35:44 2024 daemon.err hostapd: nl80211: kernel reports: integer out of range As updating hostapd would be too complex and requires further testing, we backport this simple upstream fix instead. Fixes: https://github.com/openwrt/openwrt/issues/16680 Signed-off-by: Rany Hany <rany_hany@riseup.net> Link: https://github.com/openwrt/openwrt/pull/17590 Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit 5ce1af9539da667f62dc3cb426f9ec36e53fb54e) Link: https://github.com/openwrt/openwrt/pull/17591 Signed-off-by: Robert Marko <robimarko@gmail.com>
54 lines
1.3 KiB
Diff
54 lines
1.3 KiB
Diff
--- a/src/ap/sta_info.c
|
|
+++ b/src/ap/sta_info.c
|
|
@@ -1914,3 +1914,22 @@ void ap_sta_free_sta_profile(struct mld_
|
|
}
|
|
}
|
|
#endif /* CONFIG_IEEE80211BE */
|
|
+
|
|
+bool ap_sta_is_mld(struct hostapd_data *hapd,
|
|
+ struct sta_info *sta)
|
|
+{
|
|
+#ifdef CONFIG_IEEE80211BE
|
|
+ return hapd->conf->mld_ap && sta && sta->mld_info.mld_sta;
|
|
+#else /* CONFIG_IEEE80211BE */
|
|
+ return false;
|
|
+#endif /* CONFIG_IEEE80211BE */
|
|
+}
|
|
+
|
|
+void ap_sta_set_mld(struct sta_info *sta, bool mld)
|
|
+{
|
|
+#ifdef CONFIG_IEEE80211BE
|
|
+ if (sta)
|
|
+ sta->mld_info.mld_sta = mld;
|
|
+#endif /* CONFIG_IEEE80211BE */
|
|
+}
|
|
+
|
|
--- a/src/ap/sta_info.h
|
|
+++ b/src/ap/sta_info.h
|
|
@@ -409,23 +409,8 @@ int ap_sta_re_add(struct hostapd_data *h
|
|
|
|
void ap_free_sta_pasn(struct hostapd_data *hapd, struct sta_info *sta);
|
|
|
|
-static inline bool ap_sta_is_mld(struct hostapd_data *hapd,
|
|
- struct sta_info *sta)
|
|
-{
|
|
-#ifdef CONFIG_IEEE80211BE
|
|
- return hapd->conf->mld_ap && sta && sta->mld_info.mld_sta;
|
|
-#else /* CONFIG_IEEE80211BE */
|
|
- return false;
|
|
-#endif /* CONFIG_IEEE80211BE */
|
|
-}
|
|
-
|
|
-static inline void ap_sta_set_mld(struct sta_info *sta, bool mld)
|
|
-{
|
|
-#ifdef CONFIG_IEEE80211BE
|
|
- if (sta)
|
|
- sta->mld_info.mld_sta = mld;
|
|
-#endif /* CONFIG_IEEE80211BE */
|
|
-}
|
|
+bool ap_sta_is_mld(struct hostapd_data *hapd, struct sta_info *sta);
|
|
+void ap_sta_set_mld(struct sta_info *sta, bool mld);
|
|
|
|
void ap_sta_free_sta_profile(struct mld_info *info);
|
|
|