[PATCH] P2P: For concurrency scenarios we should not update the scan results without P2PIE to p2p group interface
Jouni Malinen
j
Sun Apr 22 10:51:58 PDT 2012
On Tue, Apr 17, 2012 at 05:12:37AM +0000, Neeraj Kumar Garg wrote:
> Yes, actually sharing scan results from STA interface to p2p interfaces are not required (because STA scan results shall be without P2P IE). In my opinion, we still need to share the scan results from p2p interfaces to STA interface to help roaming scenarios.
Sounds fine.
> I have come-up with a better patch to take care of another racing issue in group-formation failure because of sharing of scan results in concurrency scenarios. Please let us know if the attached patch is good.
I'm not sure I fully understand why this is needed. What kind of issue
does this solve?
Is there a specific reason for removing the previous version, i.e., this
part in bss.c?
> diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
> @@ -379,18 +379,6 @@ void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s,
> p2p = wpa_scan_get_vendor_ie(res, P2P_IE_VENDOR_TYPE);
> -#ifdef CONFIG_P2P
> - if (p2p == NULL &&
> - wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE) {
> - /*
> - * If it's a P2P specific interface, then don't update
> - * the scan result without a P2P IE.
> - */
> - wpa_printf(MSG_DEBUG, "BSS: No P2P IE - skipping BSS " MACSTR
> - " update for P2P interface", MAC2STR(res->bssid));
> - return;
> - }
> -#endif /* CONFIG_P2P */
This saves some memory by not recording non-P2P BSSes for a P2P group
interface. I would have assumed that this part can be kept even if the
following change is applied.
> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
> @@ -1181,7 +1181,14 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
> if (rn2 && os_strcmp(rn, rn2) == 0) {
> wpa_printf(MSG_DEBUG, "%s: Updating scan results from "
> "sibling", ifs->ifname);
> - _wpa_supplicant_event_scan_results(ifs, data);
> + if ( (ifs->global->p2p) || (ifs->p2p_group_interface != NOT_P2P_GROUP_INTERFACE)) {
> + /* Do not update the scan results from STA interface to p2p interfaces */
> + wpa_printf(MSG_DEBUG, "Not Updating scan results on interface %s from "
> + "sibling %s", ifs->ifname, wpa_s->ifname);
> + continue;
> + }
> + else
> + _wpa_supplicant_event_scan_results(ifs, data);
This looks fine, though, I would like to better understand what kind of
issues did show up without this.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list