hostapd: adjust patches to work with git am
[openwrt/staging/xback.git] / package / network / services / hostapd / patches / 590-rrm-wnm-statistics.patch
index 8f97e54d08db3b2a00f73abcdf6515915d930ffb..e1bb37ea55f109f4696d16b89f91ad7a18afccf7 100644 (file)
@@ -1,3 +1,13 @@
+From: David Bauer <mail@david-bauer.net>
+Date: Sat, 27 Nov 2021 22:08:28 +0100
+Subject: [PATCH] hostapd: add OpenWrt specific statistic counters
+
+This adds a new struct for storing statistics not (yet) tracked by
+hostapd regarding RRM and WNM activity.
+
+These statistics can be read using the get_status hostapd interface ubus
+method.
+
 --- a/src/ap/hostapd.h
 +++ b/src/ap/hostapd.h
 @@ -163,6 +163,21 @@ struct hostapd_sae_commit_queue {
        int num_sta; /* number of entries in sta_list */
        struct sta_info *sta_list; /* STA info list head */
  #define STA_HASH_SIZE 256
+--- a/src/ap/rrm.c
++++ b/src/ap/rrm.c
+@@ -269,6 +269,8 @@ static void hostapd_send_nei_report_resp
+               }
+       }
++      hapd->openwrt_stats.rrm.neighbor_report_tx++;
++
+       hostapd_drv_send_action(hapd, hapd->iface->freq, 0, addr,
+                               wpabuf_head(buf), wpabuf_len(buf));
+       wpabuf_free(buf);
 --- a/src/ap/wnm_ap.c
 +++ b/src/ap/wnm_ap.c
 @@ -410,6 +410,7 @@ static int ieee802_11_send_bss_trans_mgm
        if (disassoc_timer) {
  #ifdef CONFIG_IEEE80211BE
                if (ap_sta_is_mld(hapd, sta)) {
---- a/src/ap/rrm.c
-+++ b/src/ap/rrm.c
-@@ -269,6 +269,8 @@ static void hostapd_send_nei_report_resp
-               }
-       }
-+      hapd->openwrt_stats.rrm.neighbor_report_tx++;
-+
-       hostapd_drv_send_action(hapd, hapd->iface->freq, 0, addr,
-                               wpabuf_head(buf), wpabuf_len(buf));
-       wpabuf_free(buf);