[PATCH] Android: Skip explicit conf_p2p_dev loading for main interface
Arend van Spriel
Mon Sep 29 07:10:39 PDT 2014
On 09/29/14 15:52, Peer, Ilan wrote:
>> -----Original Message-----
>> From: Arend van Spriel [mailto:arend at broadcom.com]
>> Sent: Monday, September 29, 2014 16:36
>> To: Peer, Ilan
>> Cc: Dmitry Shmidt; hostap at lists.shmoo.com
>> Subject: Re: [PATCH] Android: Skip explicit conf_p2p_dev loading for main
>> On 09/29/14 13:05, Peer, Ilan wrote:
>>> Hi Dmitry,
>>> My original reply was bounced by the moderator ? so here it is again:
>>> You are correct; the ?m switch does not currently make much sense in
>>> case of netdev interface used for P2P_DEVICE operations (and also
>>> there is no need to specify it for the main interface).
>>> The first call to wpa_supplicant_add_interface() add the network
>>> interface, but in that case iface->p2p_mgmt would not be set, so
>>> checking would allow to skip reading the p2p device configuration file.
>>> After the netdev interface is created, the code creates an additional
>>> interface for the P2P Device management (only if one does not exist
>>> and the underlying device supports it). So in this case
>>> wpas_p2p_add_p2pdev_interface() is called, and only in this case
>>> iface->p2p_mgmt is set.
>>> So bottom line, I think that a cleaner fix would be to base the
>>> reading on the setting of iface->p2p_mgmt.
>> Related to this I created a patch that would make the -m option redundant.
>> This is done by skipping networks and ignore 'p2p_disabled=1'
>> in the configuration when iface->p2p_mgmt is set.
> Does this handle the case of update_config=1? In this case, if the configuration file is shared between 2 different interfaces, one of them will override the configuration of the other when wpa_supplicant exists or instructed to save the config.
> Regardless, I think that the approach of have one global configuration file to hold device wide configuration is cleaner and more scalable.
Ah, I see. I thought the -m file contained P2P_DEVICE specific
configuration, but you are saying it should contain configuration items
applicable to all interfaces. I think the problem is that it is not
straight-forward what the usage level is of the configuration items.
Some are applicable to supplicant, some per-interface, and some only for
a specific type of interface.
More information about the Hostap