P2P: Always re-select operating channel if not hard coded
authorArik Nemtsov <arik@wizery.com>
Thu, 27 Dec 2012 06:16:42 +0000 (08:16 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 27 Dec 2012 06:16:42 +0000 (08:16 +0200)
commit50285f5ca8086cca45afa42cd23c3a3c1cd58f40
treef71754224d7437db8899f7482776eb9007dff38f
parentbd594ea0daaa8ddb142884b6cd4e5ca86a5da4c8
P2P: Always re-select operating channel if not hard coded

Since the operating channel is randomly set to 1/6/11 on init, which is
commonly included in the channel intersection, we were effectively
ignoring the set of P2P preferred channels when trying to improve
channel selection after having received peer information. Fix this by
trying to get the best channel we can, unless the user hard coded the
operating channel in the configuration file or p2p_connect command. Fall
back to the initial randomly selected channel if a better one cannot be
chosen.

Signed-hostap: Arik Nemtsov <arik@wizery.com>
src/p2p/p2p_go_neg.c