@@ -261,6 +261,12 @@ struct wpa_driver_scan_params {
* num_filter_ssids - Number of entries in filter_ssids array
*/
size_t num_filter_ssids;
+
+ /* If true, attempt to only scan the current active channel if at least
+ * one VIF on this interface's phy is associated. This can help when
+ * you are running lots of virtual interfaces.
+ */
+ int can_scan_one;
};
/**
@@ -1835,6 +1835,9 @@ static int wpa_driver_nl80211_scan(void *priv,
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
+ if (params->can_scan_one)
+ NLA_PUT_FLAG(msg, NL80211_ATTR_SCAN_ONE_IF_ASSOC);
+
for (i = 0; i < params->num_ssids; i++) {
wpa_hexdump_ascii(MSG_MSGDUMP, "nl80211: Scan SSID",
params->ssids[i].ssid,
@@ -864,6 +864,18 @@ enum nl80211_attrs {
NL80211_ATTR_LOCAL_STATE_CHANGE,
+ NL80211_ATTR_WIPHY_TX_POWER_SETTING,
+ NL80211_ATTR_WIPHY_TX_POWER_LEVEL,
+
+ NL80211_ATTR_TX_FRAME_TYPES,
+ NL80211_ATTR_RX_FRAME_TYPES,
+ NL80211_ATTR_FRAME_TYPE,
+
+ NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
+ NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT,
+
+ NL80211_ATTR_SCAN_ONE_IF_ASSOC,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -2143,6 +2143,7 @@ struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
config->eapol_version = DEFAULT_EAPOL_VERSION;
config->ap_scan = DEFAULT_AP_SCAN;
config->fast_reauth = DEFAULT_FAST_REAUTH;
+ config->can_scan_one = DEFAULT_CAN_SCAN_ONE;
config->p2p_go_intent = DEFAULT_P2P_GO_INTENT;
config->p2p_intra_bss = DEFAULT_P2P_INTRA_BSS;
config->bss_max_count = DEFAULT_BSS_MAX_COUNT;
@@ -2369,6 +2370,7 @@ static const struct global_parse_data global_fields[] = {
{ INT_RANGE(eapol_version, 1, 2), 0 },
{ INT(ap_scan), 0 },
{ INT(fast_reauth), 0 },
+ { INT(can_scan_one), 0 },
{ STR(opensc_engine_path), 0 },
{ STR(pkcs11_engine_path), 0 },
{ STR(pkcs11_module_path), 0 },
@@ -22,6 +22,7 @@
#define DEFAULT_AP_SCAN 1
#endif /* CONFIG_NO_SCAN_PROCESSING */
#define DEFAULT_FAST_REAUTH 1
+#define DEFAULT_CAN_SCAN_ONE 0
#define DEFAULT_P2P_GO_INTENT 7
#define DEFAULT_P2P_INTRA_BSS 1
#define DEFAULT_BSS_MAX_COUNT 200
@@ -382,6 +383,12 @@ struct wpa_config {
* changed_parameters - Bitmap of changed parameters since last update
*/
unsigned int changed_parameters;
+
+ /* If true, attempt to only scan the current active channel if at least
+ * one VIF on this interface's phy is associated. This can help when
+ * you are running lots of virtual interfaces.
+ */
+ int can_scan_one;
};
@@ -383,6 +383,8 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
wpa_printf(MSG_DEBUG, "Starting AP scan for wildcard SSID");
}
+ params.can_scan_one = wpa_s->conf->can_scan_one;
+
#ifdef CONFIG_P2P
wpa_s->wps->dev.p2p = 1;
if (!wps) {