aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-02-15 14:07:13 (GMT)
committerJouni Malinen <j@w1.fi>2017-02-16 10:08:22 (GMT)
commit3a7819f0ad527c42ecb9c568617d430a5f549d82 (patch)
treedbecced4f9f42df64b62d5146b8c5ed532bb7aa9 /wpa_supplicant/ctrl_iface.c
parent1123bd483439f38eda66e3318f9a464905727ca8 (diff)
downloadhostap-3a7819f0ad527c42ecb9c568617d430a5f549d82.zip
hostap-3a7819f0ad527c42ecb9c568617d430a5f549d82.tar.gz
hostap-3a7819f0ad527c42ecb9c568617d430a5f549d82.tar.bz2
P2P: Add P2P_SET override_pref_op_chan to allow overriding preference
This new P2P_SET parameter uses <op_class>:<channel> format and is used mainly for testing purposes to allow overriding the value of the GO Negotiation Response frame Operating Channel attribute. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 40380fa..f916316 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -6457,6 +6457,20 @@ static int p2p_ctrl_set(struct wpa_supplicant *wpa_s, char *cmd)
return 0;
}
+ if (os_strcmp(cmd, "override_pref_op_chan") == 0) {
+ int op_class, chan;
+
+ op_class = atoi(param);
+ param = os_strchr(param, ':');
+ if (!param)
+ return -1;
+ param++;
+ chan = atoi(param);
+ p2p_set_override_pref_op_chan(wpa_s->global->p2p, op_class,
+ chan);
+ return 0;
+ }
+
wpa_printf(MSG_DEBUG, "CTRL_IFACE: Unknown P2P_SET field value '%s'",
cmd);