[PATCH 0/3] Permit P2P device interface to be enabled/disabled
Benjamin Berg
benjamin at sipsolutions.net
Wed Oct 15 08:43:58 PDT 2025
From: Benjamin Berg <benjamin.berg at intel.com>
Hi,
The aim of these patches is to make it feasible to disable and enable
P2P on-demand. This is useful because it may not be possible to use P2P
and NAN at the same time. So in order to add the NAN interface, the user
first needs to remove the P2P device interface.
I believe that this solution creates a well defined interface that is
consistent with the current wpa_supplicant behaviour. By adding and
removing the interface in response to p2p_disabled= being set, it makes
the supplicant behave in a way that is consistent with the option being
set at startup time.
That said, I also do not consider this solution to be optimal in the
long run. One could likely be smarter about this and e.g. just disable
the P2P device interface instead of fully removing it. Or one could
still remove it but delegate both addition and removal to be explicit
commands that an external networking tool should be triggering.
Said differently, I think it would be good to put some more thought on
how interfaces should be managed. However, I also believe that these
patches are a reasonable way to have a short-term solution.
Benjamin
Benjamin Berg (3):
tests: permit autogo_scan to work with dedicated P2P device removal
P2P: add/remove dedicated P2P Device when p2p_disabled is toggled
tests: p2p: verify that changing p2p_disabled removes/adds P2P device
tests/hwsim/test_p2p_autogo.py | 15 +++++++++---
tests/hwsim/test_p2p_device.py | 34 ++++++++++++++++++++++++++
wpa_supplicant/config.c | 2 +-
wpa_supplicant/config.h | 1 +
wpa_supplicant/wpa_supplicant.c | 43 +++++++++++++++++++++++++++++++++
5 files changed, 90 insertions(+), 5 deletions(-)
--
2.51.0
More information about the Hostap
mailing list