P2P: Process preferred frequency list as part of GO Neg Req/Resp
authorAhmad Kholaif <akholaif@qca.qualcomm.com>
Fri, 24 Jul 2015 08:23:24 +0000 (01:23 -0700)
committerJouni Malinen <j@w1.fi>
Fri, 31 Jul 2015 12:24:39 +0000 (15:24 +0300)
commit6cc364946cd30681cd1e3a2ca061173be3227d11
tree3f87c8cd3bef8fb639d2cafb9e6f0d4609f29573
parentfc71f7d99db620097296720af1d46b1b94afb0f8
P2P: Process preferred frequency list as part of GO Neg Req/Resp

When processing a GO Negotiation Request and Response, if local driver
supports the preferred channel list extension, then:

- Check if peer's preference for operating channel is already included
  in our preferred channel list and if so, take the oper_channel as is.

- If peer's preference for operating channel is not in local device's
  preferred channel list and peer device has provided its preferred
  frequency list in the GO Negotiation Request/Response, then find a
  channel that is common for both preferred channel lists and use it
  for oper_channel.

- If peer's preference for operating channel is not in local device's
  preferred channel list and peer device doesn't use preferred channel
  list extension, i.e., no preferred channel list in GO Negotiation
  Request/Response, then look for a channel that is common for local
  device's preferred channel list and peer's list of supported channels
  and use it for oper_channel.

- In case no common channel is found, use the peer's preference for
  oper_channel as is.

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