* in this link will thus be the least recently used entry. */
-static void ap_list_new_ap(struct hostapd_iface *iface, struct ap_info *ap)
-{
- wpa_printf(MSG_DEBUG, "New AP detected: " MACSTR, MAC2STR(ap->addr));
-
- /* TODO: could send a notification message to an external program that
- * would then determine whether a rogue AP has been detected */
-}
-
-
-static void ap_list_expired_ap(struct hostapd_iface *iface, struct ap_info *ap)
-{
- wpa_printf(MSG_DEBUG, "AP info expired: " MACSTR, MAC2STR(ap->addr));
-
- /* TODO: could send a notification message to an external program */
-}
-
-
static int ap_list_beacon_olbc(struct hostapd_iface *iface, struct ap_info *ap)
{
int i;
if (iface->num_ap > iface->conf->ap_table_max_size && ap != ap->prev) {
wpa_printf(MSG_DEBUG, "Removing the least recently used AP "
MACSTR " from AP table", MAC2STR(ap->prev->addr));
- if (iface->conf->passive_scan_interval > 0)
- ap_list_expired_ap(iface, ap->prev);
ap_free_ap(iface, ap->prev);
}
ap->datarate = fi->datarate;
}
- if (new_ap) {
- if (iface->conf->passive_scan_interval > 0)
- ap_list_new_ap(iface, ap);
- } else if (ap != iface->ap_list) {
+ if (!new_ap && ap != iface->ap_list) {
/* move AP entry into the beginning of the list so that the
* oldest entry is always in the end of the list */
ap_ap_list_del(iface, ap);
time(&now);
- /* FIX: it looks like jkm-Purina ended up in busy loop in this
- * function. Apparently, something can still cause a loop in the AP
- * list.. */
-
while (iface->ap_list) {
ap = iface->ap_list->prev;
if (ap->last_beacon + iface->conf->ap_table_expiration_time >=
now)
break;
- if (iface->conf->passive_scan_interval > 0)
- ap_list_expired_ap(iface, ap);
ap_free_ap(iface, ap);
}
now)
break;
- if (iface->conf->passive_scan_interval > 0)
- ap_list_expired_ap(iface, iface->ap_list->prev);
ap_free_ap(iface, iface->ap_list->prev);
}
bss->ssid.vlan_tagged_interface = os_strdup(pos);
#endif /* CONFIG_FULL_DYNAMIC_VLAN */
#endif /* CONFIG_NO_VLAN */
- } else if (os_strcmp(buf, "passive_scan_interval") == 0) {
- conf->passive_scan_interval = atoi(pos);
- } else if (os_strcmp(buf, "passive_scan_listen") == 0) {
- conf->passive_scan_listen = atoi(pos);
- } else if (os_strcmp(buf, "passive_scan_mode") == 0) {
- conf->passive_scan_mode = atoi(pos);
} else if (os_strcmp(buf, "ap_table_max_size") == 0) {
conf->ap_table_max_size = atoi(pos);
} else if (os_strcmp(buf, "ap_table_expiration_time") == 0) {
const struct wpa_driver_ops *driver;
- int passive_scan_interval; /* seconds, 0 = disabled */
- int passive_scan_listen; /* usec */
- int passive_scan_mode;
int ap_table_max_size;
int ap_table_expiration_time;
return hapd->driver->if_remove(hapd->drv_priv, type, ifname, addr);
}
-static inline int
-hostapd_passive_scan(struct hostapd_data *hapd, int now, int our_mode_only,
- int interval, int _listen, int *channel,
- int *last_rx)
-{
- if (hapd->driver == NULL || hapd->driver->passive_scan == NULL)
- return -1;
- return hapd->driver->passive_scan(hapd->drv_priv, now, our_mode_only,
- interval, _listen, channel, last_rx);
-}
-
static inline struct hostapd_hw_modes *
hostapd_get_hw_feature_data(struct hostapd_data *hapd, u16 *num_modes,
u16 *flags)
# 1 = push PMK-R1 to all configured R1KHs whenever a new PMK-R0 is derived
#pmk_r1_push=1
-##### Passive scanning ########################################################
-# Scan different channels every N seconds. 0 = disable passive scanning.
-#passive_scan_interval=60
-
-# Listen N usecs on each channel when doing passive scanning.
-# This value plus the time needed for changing channels should be less than
-# 32 milliseconds (i.e. 32000 usec) to avoid interruptions to normal
-# operations. Time needed for channel changing varies based on the used wlan
-# hardware.
-# default: disabled (0)
-#passive_scan_listen=10000
-
-# Passive scanning mode:
-# 0 = scan all supported modes (802.11a/b/g/Turbo) (default)
-# 1 = scan only the mode that is currently used for normal operations
-#passive_scan_mode=1
-
-# Maximum number of entries kept in AP table (either for passive scanning or
-# for detecting Overlapping Legacy BSS Condition). The oldest entry will be
+##### Neighbor table ##########################################################
+# Maximum number of entries kept in AP table (either for neigbor table or for
+# detecting Overlapping Legacy BSS Condition). The oldest entry will be
# removed when adding a new entry that would make the list grow over this
-# limit. Note! Wi-Fi certification for IEEE 802.11g requires that OLBC is
+# limit. Note! WFA certification for IEEE 802.11g requires that OLBC is
# enabled, so this field should not be set to 0 when using IEEE 802.11g.
# default: 255
#ap_table_max_size=255
*/
int hostapd_select_hw_mode(struct hostapd_iface *iface)
{
- int i, j, ok, ret;
+ int i, j, ok;
if (iface->num_hw_features < 1)
return -1;
return -1;
}
- ret = hostapd_passive_scan(iface->bss[0], 0,
- iface->conf->passive_scan_mode,
- iface->conf->passive_scan_interval,
- iface->conf->passive_scan_listen,
- NULL, NULL);
- if (ret) {
- if (ret == -1) {
- wpa_printf(MSG_DEBUG, "Passive scanning not "
- "supported");
- } else {
- wpa_printf(MSG_ERROR, "Could not set passive "
- "scanning: %s", strerror(ret));
- }
- ret = 0;
- }
-
- return ret;
+ return 0;
}
return;
}
- if (fi && fi->passive_scan)
- return;
-
broadcast = mgmt->bssid[0] == 0xff && mgmt->bssid[1] == 0xff &&
mgmt->bssid[2] == 0xff && mgmt->bssid[3] == 0xff &&
mgmt->bssid[4] == 0xff && mgmt->bssid[5] == 0xff;
int (*bss_add)(void *priv, const char *ifname, const u8 *bssid);
int (*bss_remove)(void *priv, const char *ifname);
int (*valid_bss_mask)(void *priv, const u8 *addr, const u8 *mask);
- int (*passive_scan)(void *priv, int now, int our_mode_only,
- int interval, int _listen, int *channel,
- int *last_rx);
int (*if_add)(const char *iface, void *priv,
enum hostapd_driver_if_type type, char *ifname,
const u8 *addr);
u32 channel;
u32 datarate;
u32 ssi_signal;
-
- unsigned int passive_scan:1;
};
void hostapd_mgmt_rx(struct hostapd_data *hapd, u8 *buf, size_t len,
NULL /* bss_add */,
NULL /* bss_remove */,
NULL /* valid_bss_mask */,
- NULL /* passive_scan */,
NULL /* if_add */,
NULL /* if_update */,
NULL /* if_remove */,
NULL /* bss_add */,
NULL /* bss_remove */,
NULL /* valid_bss_mask */,
- NULL /* passive_scan */,
NULL /* if_add */,
NULL /* if_update */,
NULL /* if_remove */,
NULL /* bss_add */,
NULL /* bss_remove */,
NULL /* valid_bss_mask */,
- NULL /* passive_scan */,
NULL /* if_add */,
NULL /* if_update */,
NULL /* if_remove */,