[PATCH] Android: Skip explicit conf_p2p_dev loading for main interface
ilan.peer at intel.com
Sun Sep 28 14:40:28 EDT 2014
> diff --git a/wpa_supplicant/wpa_supplicant.c
> b/wpa_supplicant/wpa_supplicant.c index f20bc62..9d21fe0 100644
> --- a/wpa_supplicant/wpa_supplicant.c
> +++ b/wpa_supplicant/wpa_supplicant.c
> @@ -3509,7 +3509,9 @@ static int wpa_supplicant_init_iface(struct
> wpa_supplicant *wpa_s,
> #ifdef CONFIG_P2P
> wpa_s->conf_p2p_dev = os_rel2abs_path(iface-
> +#ifndef ANDROID_P2P
> wpa_config_read(wpa_s->conf_p2p_dev, wpa_s->conf);
I think it would be cleaner to do the reading only if iface->p2p_mgmt is set (happens only in case a dedicated P2P DEVICE interface is added).
1) iface->p2p_mgmt will be set later.
For the case of Non netdev P2P_DEVICE, iface->mgmt. is set in wpas_p2p_add_p2pdev_interface() and this is done before the flow that calls wpa_supplicant_add_iface() -> wpa_supplicant_init_iface(), so using this state variable, the P2P specific configuration file would be read only for a (non netdev) P2P_DEVICE interface.
2) In case p2p has separate Netdev - it will have its own iterface, in case for Non-netdev it will still load this file
taking it from parent. Can you please describe the situation when we need to load this file for main interface?
In case that a P2P Device has a separate Netdev, you can simply use the –c to pass the configuration file for the interface with all needed parameters, so there is no need to use the –m switch.
In the past Jouni wanted to better handle this by having some global configuration file that will hold global configuration parameters that would be shared between all the interfaces. I tried to prepare some solution for this if (still in Jouni’s queue):
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the HostAP