答复: [PATCH] STA: Fix AP connection drop issue when starting P2P scanning

赵兵 zhaobing at xiaomi.com
Wed Aug 21 21:57:21 EDT 2013


Hi Dmitry Shmidt,

Thanks for your reply. I got all patches from Android 4.3 which you mentioned. Is there any potential risk of merging them back to Android 4.2?

Best regards,

Zhao Bing (赵兵)
861060606666-5023
13693622077
MiTalk: 39682852
北京市海淀区清河中街68号 华润五彩城
The Rainbow City of China Resources ,NO.68,Qinghe Middle Street,Haidian District,Beijing,China

-----邮件原件-----
发件人: Dmitry Shmidt [mailto:dimitrysh at google.com] 
发送时间: 2013年8月20日 6:54
收件人: 赵兵
抄送: j at w1.fi; hostap at lists.shmoo.com
主题: Re: [PATCH] STA: Fix AP connection drop issue when starting P2P scanning

On Tue, Aug 13, 2013 at 5:56 AM, 赵兵 <zhaobing at xiaomi.com> wrote:
> On Android, there is an issue of STA dropping from AP when P2P scanning.
> Following is the reproduce steps:
> 1. Close WiFi
> 2. Open WiFi and wait for connecting to a saved AP 3. When AP 
> connected, go into WiFi direct screen immediately 4. Wait for P2P scan 
> for a while, the connection with AP will drop
>
> The reproduce rate is almost 100%. The root cause is wpas_p2p_scan() 
> possibly triggers an AP scan if sta_scan_pending is set. At this time, 
> scan_req is 0 and ap_scan is 2. So wpa_supplicant_assoc_try() will be 
> invoked from wpa_supplicant_scan(). It disassoc current AP.

Despite it can be correct statement, I feel like the problem is that ap_scan == 2.
We changed this functionality on Android long time ago introducing SCAN TYPE=ONLY command. So Wifi manager is not setting ap_scan to 2 anymore.

>
> Signed-off-by: zhaobing <zhaobing at xiaomi.com>
> ---
> wpa_supplicant/scan.c |    3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 
> e662713..eb8e7d7 100644
> --- a/wpa_supplicant/scan.c
> +++ b/wpa_supplicant/scan.c
> @@ -668,7 +668,8 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
>                 }
>        }
>
> -        if (scan_req != MANUAL_SCAN_REQ && wpa_s->conf->ap_scan == 2) {
> +       if (scan_req != MANUAL_SCAN_REQ && wpa_s->conf->ap_scan == 2 &&
> +          wpa_s->current_ssid == NULL) {
>                 wpa_s->connect_without_scan = NULL;
>                 wpa_s->prev_scan_wildcard = 0;
>                 wpa_supplicant_assoc_try(wpa_s, ssid);
> --
> 1.7.9.5
>
>
> Best regards,
>
> Zhao Bing (赵兵)
> 861060606666-5023
> 13693622077
> MiTalk: 39682852
> 北京市海淀区清河中街68号 华润五彩城
> The Rainbow City of China Resources ,NO.68,Qinghe Middle 
> Street,Haidian District,Beijing,China
>


More information about the HostAP mailing list