]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Increase the scan frequencies buffer
authorAvraham Stern <avraham.stern@intel.com>
Thu, 1 Dec 2022 10:01:45 +0000 (12:01 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 1 Dec 2022 13:17:14 +0000 (15:17 +0200)
With the UHB enabled, the number of scanned frequencies may exceed
the buffer size. Increase it.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
src/drivers/driver_nl80211_event.c

index c10c31a3760af1876970ea098de80787a925d1e3..8f0361fd8ab8f1b06e2174d0aa723987db819ebd 100644 (file)
@@ -1679,7 +1679,7 @@ static void send_scan_event(struct wpa_driver_nl80211_data *drv, int aborted,
        struct nlattr *nl;
        int rem;
        struct scan_info *info;
-#define MAX_REPORT_FREQS 100
+#define MAX_REPORT_FREQS 110
        int freqs[MAX_REPORT_FREQS];
        int num_freqs = 0;
 
@@ -1711,7 +1711,7 @@ static void send_scan_event(struct wpa_driver_nl80211_data *drv, int aborted,
                }
        }
        if (tb[NL80211_ATTR_SCAN_FREQUENCIES]) {
-               char msg[500], *pos, *end;
+               char msg[MAX_REPORT_FREQS * 5], *pos, *end;
                int res;
 
                pos = msg;