]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Share a single wpa_scan_results_free() implementation
authorJouni Malinen <j@w1.fi>
Sat, 22 Oct 2011 19:09:40 +0000 (22:09 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 22 Oct 2011 19:09:40 +0000 (22:09 +0300)
There is not really a very good location for this anywhere, but the
function is small enough to live as an inline function for now.

src/ap/hw_features.c
src/drivers/driver.h
src/drivers/driver_nl80211.c
wpa_supplicant/scan.c
wpa_supplicant/scan.h

index 5c71c9a33cc3866ac8154a722b94d29513b81741..e7235434369178adc9a06e0625e93e48f9a1d198 100644 (file)
@@ -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;
index ba24f1d2e5493053e756c8bc665028a437f37bfb..f1938e12cdcf8e64bc48a36061b71cdf3cb26298 100644 (file)
@@ -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 */
index cdb015b7440079fc68667c556eb6b55ef70639d0..50b73de4f6bc861c3869f936a2ff4d5af253e62c 100644 (file)
@@ -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)
 {
index fab43f1ee7f5353507e597274d44d3cb575dd503..47f22065ca76953bb760e6935f13a2ec6980dac0 100644 (file)
@@ -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);
-}
index 81dee01ba3350ac10ccaf02bb7a3988eb3e384be..7fb84e6dc3e113a7fa7989d0d3fd957be6982836 100644 (file)
@@ -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 */