]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Fix scan optimization for GO during persistent group invocation
authorRashmi Ramanna <c_ramanr@qti.qualcomm.com>
Tue, 13 May 2014 10:44:18 +0000 (16:14 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 13 May 2014 12:49:06 +0000 (15:49 +0300)
Commit 41d5ce9e0b7b37dd84fbf3c1aa5ed571c32321d4 was intended to scan for
GO on the negotiated channel for few iterations, but it did not work
correctly due to incorrect operator being used. Fix this by requiring
both conditions to be met for the single channel scan.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/scan.c

index bc0daebc0e9b7939d259c84dca4627f2d267686f..4d96e82cdfad7feb8006da9b5390281a0a5f23ef 100644 (file)
@@ -332,7 +332,7 @@ static void wpa_supplicant_optimize_freqs(
                 * Optimize scan based on GO information during persistent
                 * group reinvocation
                 */
-               if (wpa_s->p2p_in_invitation < 5 ||
+               if (wpa_s->p2p_in_invitation < 5 &&
                    wpa_s->p2p_invite_go_freq > 0) {
                        wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Scan only GO preferred frequency %d MHz during invitation",
                                wpa_s->p2p_invite_go_freq);