diff options
| author | Eliad Peller <eliad@wizery.com> | 2011-08-22 16:40:29 +0300 |
|---|---|---|
| committer | Keith Deacon <kdeacon@ti.com> | 2011-11-15 20:45:51 -0600 |
| commit | 01d1919bd5b6d4d40e370125688297a70c40a5f9 (patch) | |
| tree | e2d0be22215230822fafe18ed9e3be2f9ab289d4 | |
| parent | 24521e2f1f6959cb194c10b16d9012347e5678a6 (diff) | |
| download | android_external_wpa_supplicant_8-01d1919bd5b6d4d40e370125688297a70c40a5f9.tar.gz android_external_wpa_supplicant_8-01d1919bd5b6d4d40e370125688297a70c40a5f9.tar.bz2 android_external_wpa_supplicant_8-01d1919bd5b6d4d40e370125688297a70c40a5f9.zip | |
P2P: use GO channel for Operating Channel IE
Change-Id: I5285126515b47cd3b4cdce717310835f23a78f0a
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
| -rw-r--r-- | src/p2p/p2p.c | 2 | ||||
| -rw-r--r-- | src/p2p/p2p.h | 2 | ||||
| -rw-r--r-- | src/p2p/p2p_invitation.c | 2 | ||||
| -rw-r--r-- | wpa_supplicant/p2p_supplicant.c | 6 |
4 files changed, 9 insertions, 3 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 15e3f0e5..e1000325 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -948,7 +948,7 @@ void p2p_stop_find(struct p2p_data *p2p) } -static int p2p_prepare_channel(struct p2p_data *p2p, unsigned int force_freq) +int p2p_prepare_channel(struct p2p_data *p2p, unsigned int force_freq) { if (force_freq) { u8 op_reg_class, op_channel; diff --git a/src/p2p/p2p.h b/src/p2p/p2p.h index 72c90b10..a83bca26 100644 --- a/src/p2p/p2p.h +++ b/src/p2p/p2p.h @@ -1528,4 +1528,6 @@ int p2p_add_wps_vendor_extension(struct p2p_data *p2p, int p2p_set_oper_channel(struct p2p_data *p2p, u8 op_reg_class, u8 op_channel, int cfg_op_channel); +int p2p_prepare_channel(struct p2p_data *p2p, unsigned int force_freq); + #endif /* P2P_H */ diff --git a/src/p2p/p2p_invitation.c b/src/p2p/p2p_invitation.c index 42015ad6..a158fb43 100644 --- a/src/p2p/p2p_invitation.c +++ b/src/p2p/p2p_invitation.c @@ -473,8 +473,6 @@ int p2p_invite(struct p2p_data *p2p, const u8 *peer, enum p2p_invite_role role, p2p->channels.reg_class[0].reg_class = p2p->op_reg_class; p2p->channels.reg_class[0].channel[0] = p2p->op_channel; } else { - p2p->op_reg_class = p2p->cfg->op_reg_class; - p2p->op_channel = p2p->cfg->op_channel; os_memcpy(&p2p->channels, &p2p->cfg->channels, sizeof(struct p2p_channels)); } diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 30a9fdc1..bcae90f3 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -3343,6 +3343,12 @@ int wpas_p2p_group_add(struct wpa_supplicant *wpa_s, int persistent_group, return -1; } + if (p2p_prepare_channel(wpa_s->global->p2p, freq) < 0) { + wpa_printf(MSG_DEBUG, "P2P: Can't prepare channel %d MHz", + freq); + return -1; + } + wpas_p2p_init_go_params(wpa_s, ¶ms, freq); p2p_go_params(wpa_s->global->p2p, ¶ms); params.persistent_group = persistent_group; |
