aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-02-18 13:20:03 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-07 11:51:01 (GMT)
commitdfe0745c9a8246400316879be0115cc119c4882f (patch)
tree5c3504b6341c021b743a02c8e3beccdfbce8a87b /wpa_supplicant/ctrl_iface.c
parente4a1469cecee8d21044fb6e97f85aa807f498b62 (diff)
downloadhostap-dfe0745c9a8246400316879be0115cc119c4882f.zip
hostap-dfe0745c9a8246400316879be0115cc119c4882f.tar.gz
hostap-dfe0745c9a8246400316879be0115cc119c4882f.tar.bz2
P2P: Add optional op_class argument to P2P_SET listen_channel
The existing implementation in p2p_ctrl_set used a hard-coded operating class 81 which is only suitable for the social channels in the 2.4 GHz band, and will not work for the social channel in the 60 GHz band. Extend this by adding an optional op_class argument to P2P_SET listen_channel. If not specified, use the default value of 81 to match existing behavior. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index be0cf5c..4e16987 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -5919,8 +5919,15 @@ static int p2p_ctrl_set(struct wpa_supplicant *wpa_s, char *cmd)
}
if (os_strcmp(cmd, "listen_channel") == 0) {
- return p2p_set_listen_channel(wpa_s->global->p2p, 81,
- atoi(param), 1);
+ char *pos;
+ u8 channel, op_class;
+
+ channel = atoi(param);
+ pos = os_strchr(param, ' ');
+ op_class = pos ? atoi(pos) : 81;
+
+ return p2p_set_listen_channel(wpa_s->global->p2p, op_class,
+ channel, 1);
}
if (os_strcmp(cmd, "ssid_postfix") == 0) {