diff --git a/doc/dbus.doxygen b/doc/dbus.doxygen
index b0e67d45b..f3bdb20cc 100644
--- a/doc/dbus.doxygen
+++ b/doc/dbus.doxygen
@@ -1297,6 +1297,7 @@ Interface for performing P2P (Wi-Fi Peer-to-Peer) P2P Device operations.
Timeout | i | Timeout for operating in seconds | no |
RequestedDeviceTypes | aay | WPS Device Types to search for | no |
DiscoveryType | s | "start_with_full" (default, if not specified), "social", "progressive" | no |
+ freq | i | Initial scan channel (frequency in MHz) for the start_with_full case to limit the initial scan to the specified channel | no |
diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
index f50420b1a..4c91ee58f 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
@@ -90,6 +90,7 @@ DBusMessage * wpas_dbus_handler_p2p_find(DBusMessage *message,
int num_req_dev_types = 0;
unsigned int i;
u8 *req_dev_types = NULL;
+ unsigned int freq = 0;
dbus_message_iter_init(message, &iter);
entry.key = NULL;
@@ -134,6 +135,10 @@ DBusMessage * wpas_dbus_handler_p2p_find(DBusMessage *message,
type = P2P_FIND_PROGRESSIVE;
else
goto error_clear;
+ } else if (os_strcmp(entry.key, "freq") == 0 &&
+ (entry.type == DBUS_TYPE_INT32 ||
+ entry.type == DBUS_TYPE_UINT32)) {
+ freq = entry.uint32_value;
} else
goto error_clear;
wpa_dbus_dict_entry_clear(&entry);
@@ -142,7 +147,7 @@ DBusMessage * wpas_dbus_handler_p2p_find(DBusMessage *message,
wpa_s = wpa_s->global->p2p_init_wpa_s;
wpas_p2p_find(wpa_s, timeout, type, num_req_dev_types, req_dev_types,
- NULL, 0, 0, NULL, 0);
+ NULL, 0, 0, NULL, freq);
os_free(req_dev_types);
return reply;