aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-02-18 15:20:03 +0200
committerHamad Kadmany <hkadmany@codeaurora.org>2016-04-15 01:49:55 +0300
commit710691ec007483d462a3323ed76a0ebaa03564aa (patch)
treef4ed1a627e9c1c7503b00b560f437fb6059027c8
parent1f6d4daae72f8c663b3b6edee00e7298cfc2f5ed (diff)
downloadandroid_external_wpa_supplicant_8-710691ec007483d462a3323ed76a0ebaa03564aa.tar.gz
android_external_wpa_supplicant_8-710691ec007483d462a3323ed76a0ebaa03564aa.tar.bz2
android_external_wpa_supplicant_8-710691ec007483d462a3323ed76a0ebaa03564aa.zip
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. Change-Id: I6a60a47c8dea72059fd32bca94d4e28e06a5936e Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Git-commit: dfe0745c9a8246400316879be0115cc119c4882f Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 985990
-rw-r--r--wpa_supplicant/README-P2P7
-rw-r--r--wpa_supplicant/ctrl_iface.c11
2 files changed, 15 insertions, 3 deletions
diff --git a/wpa_supplicant/README-P2P b/wpa_supplicant/README-P2P
index 6a5b0321..0a21d133 100644
--- a/wpa_supplicant/README-P2P
+++ b/wpa_supplicant/README-P2P
@@ -633,12 +633,17 @@ p2p_set managed <0/1>
Disable/enable managed P2P Device operations. This is disabled by
default.
-p2p_set listen_channel <1/6/11>
+p2p_set listen_channel <channel> [<op_class>]
Set P2P Listen channel. This is mainly meant for testing purposes and
changing the Listen channel during normal operations can result in
protocol failures.
+When specifying a social channel on the 2.4 GHz band (1/6/11) there is
+no need to specify the operating class since it defaults to 81. When
+specifying a social channel on the 60 GHz band (2), specify the 60 GHz
+operating class (180).
+
p2p_set ssid_postfix <postfix>
Set postfix string to be added to the automatically generated P2P SSID
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 77865051..e0c82dd4 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -5774,8 +5774,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) {