Replace hostapd_wps_probe_req_rx() with more generic ProbeReq notifier
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.
This commit is contained in:
parent
efe22727da
commit
3fed6f2504
5 changed files with 13 additions and 5 deletions
|
@ -25,6 +25,7 @@
|
||||||
#include "wpa.h"
|
#include "wpa.h"
|
||||||
#include "iapp.h"
|
#include "iapp.h"
|
||||||
#include "wme.h"
|
#include "wme.h"
|
||||||
|
#include "wps_hostapd.h"
|
||||||
|
|
||||||
|
|
||||||
struct prune_data {
|
struct prune_data {
|
||||||
|
@ -431,3 +432,10 @@ void wpa_supplicant_event(void *ctx, wpa_event_type event,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_AP */
|
#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);
|
||||||
|
}
|
||||||
|
|
|
@ -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);
|
void hostapd_michael_mic_failure(struct hostapd_data *hapd, const u8 *addr);
|
||||||
struct hostapd_data * hostapd_sta_get_bss(struct hostapd_data *hapd,
|
struct hostapd_data * hostapd_sta_get_bss(struct hostapd_data *hapd,
|
||||||
const u8 *addr);
|
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 */
|
#endif /* DRIVER_H */
|
||||||
|
|
|
@ -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 = mgmt->u.probe_req.variable;
|
||||||
ie_len = len - (IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req));
|
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 */
|
#endif /* CONFIG_WPS */
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,6 @@
|
||||||
#include "l2_packet/l2_packet.h"
|
#include "l2_packet/l2_packet.h"
|
||||||
#include "../../hostapd/hostapd.h"
|
#include "../../hostapd/hostapd.h"
|
||||||
#include "../../hostapd/config.h"
|
#include "../../hostapd/config.h"
|
||||||
#include "../../hostapd/wps_hostapd.h"
|
|
||||||
#include "../../hostapd/sta_flags.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 = mgmt->u.probe_req.variable;
|
||||||
ie_len = len - (IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req));
|
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 /* IEEE80211_IOCTL_FILTERFRAME */
|
||||||
#endif /* CONFIG_WPS */
|
#endif /* CONFIG_WPS */
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#include "../../hostapd/hostapd.h"
|
#include "../../hostapd/hostapd.h"
|
||||||
#include "../../hostapd/wpa.h"
|
#include "../../hostapd/wpa.h"
|
||||||
#include "../../hostapd/hw_features.h"
|
#include "../../hostapd/hw_features.h"
|
||||||
#include "../../hostapd/wps_hostapd.h"
|
|
||||||
|
|
||||||
|
|
||||||
struct test_client_socket {
|
struct test_client_socket {
|
||||||
|
@ -415,7 +414,7 @@ static void test_driver_scan(struct test_driver_data *drv,
|
||||||
MAC2STR(sa));
|
MAC2STR(sa));
|
||||||
wpa_hexdump(MSG_MSGDUMP, "test_driver: scan IEs", ie, ielen);
|
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) {
|
for (bss = drv->bss; bss; bss = bss->next) {
|
||||||
|
|
Loading…
Reference in a new issue