Virtual Interface for P2P operations

Jithu Jance jithu
Tue Jul 5 03:26:14 PDT 2011

Resending the mail with patch file for an easy diff.

Hi Jouni,

We are trying to do the below patch to make supplicant compatible with Drivers using Virtual Interface for P2P operations. We would appreciate your suggestions for the same.

Originally wpa_supplicant uses a primary mac address for the P2P dev_addr. For concurrent mode (LegacySTA and P2P), it could be better, if we can use separate mac_addr for P2P and legacy STA right from the beginning. Also Wifi firmware which support multiple interfaces will be easier to support if P2P device address is different from the primary mac address (with local administered bit set).

As a generic solution, we modified supplicant to check for P2P dev address exported by driver via /proc/sys/. This check is done runtime, when the supplicant starts up. If proc interface for p2p_device_addr is present, supplicant uses this virtual mac address in cfg->p2p_dev_addr and use this address for P2P operations. If an implementation doesn't use virtual interface for p2p operations, supplicant copies primary mac address to cfg->p2p_dev_addr and uses it.

Basically cfg->p2p_dev_addr stores the p2p device address irrespective of whether it uses the primary or virtual interface. We made changes in the the following files to use the cfg->p2p_dev_addr so that supplicant can seamlessly use this variable to refer p2p_device_address (without checking every time whether it uses virtual or primary mac address).

Changed Files: driver_nl80211.c, p2p.h, p2p_build.c, p2p_go_neg.c, p2p_group.c, p2p_supplicant.c

Kindly share your thoughts on the same.


Jithu Jance.
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p2p_dev_addr.patch
Type: application/octet-stream
Size: 9120 bytes
Desc: p2p_dev_addr.patch
Url : 

More information about the Hostap mailing list