Message ID | 1410404981-6067-1-git-send-email-eduardo.abinader@openbossa.org |
---|---|
State | Deferred |
Headers | show |
On Wed, Sep 10, 2014 at 11:09:41PM -0400, Eduardo Abinader wrote: > Just update bss scan results for a p2p finding, if the scan > results contain p2p IE, no matter if the receiving iface > is p2p or not. Such change saves memory and avoid unecessary > notifications, by ignoring those BSSs supposedly not relevant > for p2p find procedure. p2p_find can be used to run a scan for both P2P device discovery and non-P2P use cases (finding an AP) without having to run two separate scans. As such, I'm not sure that it would be justifiable to save some CPU load if that comes at the price of having to run two separate scans to cover both the P2P and non-P2P uses.
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index 7d01a5f..af4e8ba 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -627,7 +627,8 @@ 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) { + (wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE || + wpa_s->p2p_scan_work)) { /* * If it's a P2P specific interface, then don't update * the scan result without a P2P IE.
Just update bss scan results for a p2p finding, if the scan results contain p2p IE, no matter if the receiving iface is p2p or not. Such change saves memory and avoid unecessary notifications, by ignoring those BSSs supposedly not relevant for p2p find procedure. Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org> --- wpa_supplicant/bss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)