]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AOSP: P2P GO Neg oper_freq update from GO Neg Confirm
authorJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 10:13:58 +0000 (12:13 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 14:35:51 +0000 (16:35 +0200)
src/p2p/p2p_go_neg.c

index e2a31e45a4d01b07b570e6c172c9dd59e17ef008..8740ed5babfe0b1a0dd22d639833c4de8415ad83 100644 (file)
@@ -1104,6 +1104,16 @@ void p2p_process_go_neg_conf(struct p2p_data *p2p, const u8 *sa,
                }
        }
 
+#ifdef ANDROID_P2P
+       if (msg.operating_channel) {
+               dev->oper_freq = p2p_channel_to_freq(msg.operating_channel[3],
+                                                    msg.operating_channel[4]);
+               p2p_dbg(p2p, "P2P: Peer operating channel preference: %d MHz",
+                       dev->oper_freq);
+       } else
+               dev->oper_freq = 0;
+#endif
+
        if (!msg.channel_list) {
                p2p_dbg(p2p, "Mandatory Operating Channel attribute missing from GO Negotiation Confirmation");
 #ifdef CONFIG_P2P_STRICT