[PATCH 0/4] DBus, handling the P2P mgmt interface properly

Tomasz Bursztyka tomasz.bursztyka
Thu Oct 23 01:31:17 PDT 2014


Some drivers requires a P2P mgmt device to handle all P2P commands, and some don't.
Those are automatically created by wpa_supplicant now, but there was an unconsistency
in the DBus API: the dedicated P2P device appears as well there. 

Thus it's up to the client to know what to do in that case, which makes things a bit
complicated: on ath9k driver, it can do the P2P requests through the same interface,
on iwlwifi it would require to handle those through the p2p interface. 

To get a consistent API, whatever the driver is, I did this patch-set.
Basically, if a P2P mgmt device is created, it is not registered into DBus, thus the
client will not know about it. And then all P2P commands it might do against the
"normal" (non-P2P specific) interface will be transparently redirected to the P2P
mgmt device, and the result will come back to the earlier interface properly.

This hides the P2P mgmt to the DBus client, so this one does not have to handle it
if it is present. So the API usage will identical whatever card/driver is in use below.

Tomasz Bursztyka (4):
  wpa_supplicant: Parent interface should know about its dedicated P2P
  wpa_supplicant: Do not register a P2P management interface on DBus
  notify: Do not raise any signal from a P2P management interface
  dbus: Redirect P2P request to the managment device if present

 wpa_supplicant/dbus/dbus_new.c              |  83 +++++++++++++++++++---
 wpa_supplicant/dbus/dbus_new_handlers_p2p.c |  53 +++++++++++++--
 wpa_supplicant/notify.c                     | 102 ++++++++++++++++++++++++++++
 wpa_supplicant/p2p_supplicant.c             |   1 +
 wpa_supplicant/wpa_supplicant.c             |  16 +++--
 wpa_supplicant/wpa_supplicant_i.h           |   1 +
 6 files changed, 237 insertions(+), 19 deletions(-)


More information about the Hostap mailing list