]> git.ipfire.org Git - thirdparty/hostap.git/commit
P2P: Iterate through full pref_chan list in search of a valid channel
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 16 May 2014 13:49:17 +0000 (16:49 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 16 May 2014 13:49:17 +0000 (16:49 +0300)
commit5cd0e228ac4113a539424084598868f0eca5ea7a
tree9519cd53cbe55c002f954266b182f42fdfdf1ab5
parentd00184df7cf90a5ff5c415ed218bee07c7ee0d64
P2P: Iterate through full pref_chan list in search of a valid channel

p2p_get_pref_freq() went through the full list only if the channels
arguments was provided. If no channel list contraint was in place, the
first pref_chan item was picked regardless of whether it is valid
channel and as such, a later valid entry could have been ignored. Allow
this to loop through all the entries until a valid channel is found or
the end of the pref_chan list is reached. As an extra bonus, this
simplifies the p2p_get_pref_freq() implementation quite a bit.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/p2p/p2p_utils.c