P2P: Update peer operating channel from GO Negotiation Confirm

If the device that sends the GO Negotiation Confirm becomes the GO, it
may change its operating channel preference between GO Negotiation
Request and Confirm messages based on the channel list received from us.
Previously, the peer operating channel preference was not updated in
such a case and this could result in the initial scans after GO
Negotiation using incorrect operating channel and as such, extra delay
in the connection process. Fix this by updating the operating channel
information from GO Negotiation Confirm in cases where the peer becomes
the GO.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-08-26 14:16:31 +03:00 committed by Jouni Malinen
parent 6701fdc37f
commit 28de68ae56

View file

@ -1094,6 +1094,14 @@ void p2p_process_go_neg_conf(struct p2p_data *p2p, const u8 *sa,
p2p_parse_free(&msg);
return;
#endif /* CONFIG_P2P_STRICT */
} else if (dev->go_state == REMOTE_GO) {
int oper_freq = p2p_channel_to_freq(msg.operating_channel[3],
msg.operating_channel[4]);
if (oper_freq != dev->oper_freq) {
p2p_dbg(p2p, "Updated peer (GO) operating channel preference from %d MHz to %d MHz",
dev->oper_freq, oper_freq);
dev->oper_freq = oper_freq;
}
}
if (!msg.channel_list) {