aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAhmad Kholaif <akholaif@qca.qualcomm.com>2015-07-24 08:56:48 +0000
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-04-01 16:46:29 +0530
commita6743919b14c851bc906cd159ba95b5bffb9a3c7 (patch)
treea94b278f220f877d1cb674a61bbc8617109df1f1 /src
parent871e8ab3487e6ca0cf76128893506b4bdbf3c077 (diff)
downloadandroid_external_wpa_supplicant_8-a6743919b14c851bc906cd159ba95b5bffb9a3c7.tar.gz
android_external_wpa_supplicant_8-a6743919b14c851bc906cd159ba95b5bffb9a3c7.tar.bz2
android_external_wpa_supplicant_8-a6743919b14c851bc906cd159ba95b5bffb9a3c7.zip
P2P: Do not omit known operating channel preference from GO Neg Resp
Add an extra condition to omit operating channel preference when building GO Negotiation Response. If the local device supports the preferred frequency list extension, then when sending a GO Negotiation Response frame, advertise the preferred operating channel unless local device is assuming the P2P Client role and has an empty preferred frequency list, in which case local device can omit its preference for the operating channel. This change helps make use of the preferred frequency list and the calculated best channel for both negotiating parties of the P2P connection. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: 0ef54bd30e3d6d66fe060098c45c61dfaf87e00e Git-repo: git://w1.fi/srv/git/hostap.git Change-Id: I2192ac1fcac9253876fae3f54f10f5a89d0e3bac CRs-fixed: 842468
Diffstat (limited to 'src')
-rw-r--r--src/p2p/p2p_go_neg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c
index d47763ac..4752b294 100644
--- a/src/p2p/p2p_go_neg.c
+++ b/src/p2p/p2p_go_neg.c
@@ -315,7 +315,7 @@ static struct wpabuf * p2p_build_go_neg_resp(struct p2p_data *p2p,
group_capab);
p2p_buf_add_go_intent(buf, (p2p->go_intent << 1) | tie_breaker);
p2p_buf_add_config_timeout(buf, p2p->go_timeout, p2p->client_timeout);
- if (peer && peer->go_state == REMOTE_GO) {
+ if (peer && peer->go_state == REMOTE_GO && !p2p->num_pref_freq) {
p2p_dbg(p2p, "Omit Operating Channel attribute");
} else {
p2p_buf_add_operating_channel(buf, p2p->cfg->country,