]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Replace hostapd_wps_probe_req_rx() with more generic ProbeReq notifier
authorJouni Malinen <jouni.malinen@atheros.com>
Fri, 12 Jun 2009 14:31:43 +0000 (17:31 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 12 Jun 2009 14:31:43 +0000 (17:31 +0300)
The driver wrappers should not need to include wps_hostapd.h, so let's
make this easier by introducing a driver callback for reporting Probe
Request frames.

hostapd/drv_callbacks.c
src/drivers/driver.h
src/drivers/driver_atheros.c
src/drivers/driver_madwifi.c
src/drivers/driver_test.c

index 21187e5295d7bedb20d3910d24d95a91359acfea..8a7fcf97bc278f59d95d59abdb47c93507ddca40 100644 (file)
@@ -25,6 +25,7 @@
 #include "wpa.h"
 #include "iapp.h"
 #include "wme.h"
+#include "wps_hostapd.h"
 
 
 struct prune_data {
@@ -431,3 +432,10 @@ void wpa_supplicant_event(void *ctx, wpa_event_type event,
        }
 }
 #endif /* CONFIG_AP */
+
+
+void hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa,
+                        const u8 *ie, size_t ie_len)
+{
+       hostapd_wps_probe_req_rx(hapd, sa, ie, ie_len);
+}
index 943d61c2aa0daef72cbb48559219e360d79411c6..2ae5b1a0a5158d6d3dc4c23a48ca1326f1c3443e 100644 (file)
@@ -1766,5 +1766,7 @@ void hostapd_mgmt_tx_cb(struct hostapd_data *hapd, u8 *buf, size_t len,
 void hostapd_michael_mic_failure(struct hostapd_data *hapd, const u8 *addr);
 struct hostapd_data * hostapd_sta_get_bss(struct hostapd_data *hapd,
                                          const u8 *addr);
+void hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa,
+                         const u8 *ie, size_t ie_len);
 
 #endif /* DRIVER_H */
index f1241f5f117b8ff80e2e7c3d795f58c6e4b983c6..82237a6fb5637837b3d45f288fc67fbe639de2dd 100644 (file)
@@ -685,7 +685,7 @@ static void madwifi_raw_receive(void *ctx, const u8 *src_addr, const u8 *buf,
        ie = mgmt->u.probe_req.variable;
        ie_len = len - (IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req));
 
-       hostapd_wps_probe_req_rx(drv->hapd, mgmt->sa, ie, ie_len);
+       hostapd_probe_req_rx(drv->hapd, mgmt->sa, ie, ie_len);
 }
 #endif /* CONFIG_WPS */
 
index 191fd3139d92af0c6f23be4ad58c405892b9393f..6c040aaeb230439ac6fa473d72413ee4323c9c6a 100644 (file)
@@ -71,7 +71,6 @@
 #include "l2_packet/l2_packet.h"
 #include "../../hostapd/hostapd.h"
 #include "../../hostapd/config.h"
-#include "../../hostapd/wps_hostapd.h"
 #include "../../hostapd/sta_flags.h"
 
 
@@ -778,7 +777,7 @@ static void madwifi_raw_receive(void *ctx, const u8 *src_addr, const u8 *buf,
        ie = mgmt->u.probe_req.variable;
        ie_len = len - (IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req));
 
-       hostapd_wps_probe_req_rx(drv->hapd, mgmt->sa, ie, ie_len);
+       hostapd_probe_req_rx(drv->hapd, mgmt->sa, ie, ie_len);
 }
 #endif /* IEEE80211_IOCTL_FILTERFRAME */
 #endif /* CONFIG_WPS */
index dbb0edbbb7eeb54dc88ade07302bf585ec2d2593..ff4da08746dd47d02c00a4ca42427cb8b29e1465 100644 (file)
@@ -40,7 +40,6 @@
 #include "../../hostapd/hostapd.h"
 #include "../../hostapd/wpa.h"
 #include "../../hostapd/hw_features.h"
-#include "../../hostapd/wps_hostapd.h"
 
 
 struct test_client_socket {
@@ -415,7 +414,7 @@ static void test_driver_scan(struct test_driver_data *drv,
                           MAC2STR(sa));
                wpa_hexdump(MSG_MSGDUMP, "test_driver: scan IEs", ie, ielen);
 
-               hostapd_wps_probe_req_rx(drv->hapd, sa, ie, ielen);
+               hostapd_probe_req_rx(drv->hapd, sa, ie, ielen);
        }
 
        for (bss = drv->bss; bss; bss = bss->next) {