aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ap/hw_features.c14
-rw-r--r--src/drivers/driver.h13
-rw-r--r--src/drivers/driver_nl80211.c14
-rw-r--r--wpa_supplicant/scan.c14
-rw-r--r--wpa_supplicant/scan.h1
5 files changed, 13 insertions, 43 deletions
diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
index 5c71c9a..e723543 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -407,20 +407,6 @@ static int ieee80211n_check_40mhz_2g4(struct hostapd_iface *iface,
}
-static void wpa_scan_results_free(struct wpa_scan_results *res)
-{
- size_t i;
-
- if (res == NULL)
- return;
-
- for (i = 0; i < res->num; i++)
- os_free(res->res[i]);
- os_free(res->res);
- os_free(res);
-}
-
-
static void ieee80211n_check_scan(struct hostapd_iface *iface)
{
struct wpa_scan_results *scan_res;
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index ba24f1d..f1938e1 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -3564,4 +3564,17 @@ static inline void drv_event_eapol_rx(void *ctx, const u8 *src, const u8 *data,
wpa_supplicant_event(ctx, EVENT_EAPOL_RX, &event);
}
+static inline void wpa_scan_results_free(struct wpa_scan_results *res)
+{
+ size_t i;
+
+ if (res == NULL)
+ return;
+
+ for (i = 0; i < res->num; i++)
+ os_free(res->res[i]);
+ os_free(res->res);
+ os_free(res);
+}
+
#endif /* DRIVER_H */
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index cdb015b..50b73de 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -3065,20 +3065,6 @@ static void wpa_driver_nl80211_check_bss_status(
}
-static void wpa_scan_results_free(struct wpa_scan_results *res)
-{
- size_t i;
-
- if (res == NULL)
- return;
-
- for (i = 0; i < res->num; i++)
- os_free(res->res[i]);
- os_free(res->res);
- os_free(res);
-}
-
-
static struct wpa_scan_results *
nl80211_get_scan_results(struct wpa_driver_nl80211_data *drv)
{
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index fab43f1..47f2206 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -1139,17 +1139,3 @@ int wpa_supplicant_update_scan_results(struct wpa_supplicant *wpa_s)
return 0;
}
-
-
-void wpa_scan_results_free(struct wpa_scan_results *res)
-{
- size_t i;
-
- if (res == NULL)
- return;
-
- for (i = 0; i < res->num; i++)
- os_free(res->res[i]);
- os_free(res->res);
- os_free(res);
-}
diff --git a/wpa_supplicant/scan.h b/wpa_supplicant/scan.h
index 81dee01..7fb84e6 100644
--- a/wpa_supplicant/scan.h
+++ b/wpa_supplicant/scan.h
@@ -38,6 +38,5 @@ struct wpabuf * wpa_scan_get_vendor_ie_multi(const struct wpa_scan_res *res,
u32 vendor_type);
struct wpabuf * wpa_scan_get_vendor_ie_multi_beacon(
const struct wpa_scan_res *res, u32 vendor_type);
-void wpa_scan_results_free(struct wpa_scan_results *res);
#endif /* SCAN_H */