* Re: [PATCH] ath6kl: avoiding 80211 scan does not complete before start scheduled scan.
[not found] <CADhJdvDbAORKoWUxLdcz7Jq2dt9DKEPzBwgmiNvZsj6iU2K9Kw@mail.gmail.com>
@ 2012-03-20 8:04 ` Kalle Valo
2012-03-20 8:07 ` Kalle Valo
[not found] ` <CADhJdvDpdQzJHQ-hLnASyyCKc2rzG_aBMtTm0rND7d1xdkudyg@mail.gmail.com>
2012-03-21 6:09 ` Raja Mani
1 sibling, 2 replies; 4+ messages in thread
From: Kalle Valo @ 2012-03-20 8:04 UTC (permalink / raw)
To: shonmou li; +Cc: ath6kl-devel, linux-wireless
Hi Shonmou,
Thanks for the patch.
On 02/23/2012 06:15 PM, shonmou li wrote:
> In this patch, i stop 80211 scan before scheduled scan.
> It could avoid the following situation it will cause wpa_supplicant
> trigger scan fail:
>
> "The device connected with access point then system goes into suspend mode.
> At this moment AP might be turned off or signal lost and then
> disconnect with the device."
Please add a description to the commit log as well. Also can you
describe in a bit more detail how this happens, I didn't fully
understand the scenario. Also how often do you see this bug?
I'll copy the patch for reference:
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2661,6 +2661,8 @@ static int ath6kl_cfg80211_sscan_start(struct
wiphy *wiphy,
if (vif->sme_state != SME_DISCONNECTED)
return -EBUSY;
+ ath6kl_cfg80211_scan_complete_event(vif, true);
+
for (i = 0; i < ar->wiphy->max_sched_scan_ssids; i++) {
ath6kl_wmi_probedssid_cmd(ar->wmi, vif->fw_vif_idx,
i, DISABLE_SSID_FLAG,
I wonder if this is enough. At least in theory we should abort the scan
from firmware. Other option would be to check if a normal scan is
running (from vif->scan_req) and abort scheduled scan in that case. But
I'm not sure which one is better. Opinions?
Kalle
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath6kl: avoiding 80211 scan does not complete before start scheduled scan.
2012-03-20 8:04 ` [PATCH] ath6kl: avoiding 80211 scan does not complete before start scheduled scan Kalle Valo
@ 2012-03-20 8:07 ` Kalle Valo
[not found] ` <CADhJdvDpdQzJHQ-hLnASyyCKc2rzG_aBMtTm0rND7d1xdkudyg@mail.gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2012-03-20 8:07 UTC (permalink / raw)
To: shonmou li; +Cc: ath6kl-devel, linux-wireless
On 03/20/2012 10:04 AM, Kalle Valo wrote:
> On 02/23/2012 06:15 PM, shonmou li wrote:
>> In this patch, i stop 80211 scan before scheduled scan.
>> It could avoid the following situation it will cause wpa_supplicant
>> trigger scan fail:
>>
>> "The device connected with access point then system goes into suspend mode.
>> At this moment AP might be turned off or signal lost and then
>> disconnect with the device."
>
> Please add a description to the commit log as well. Also can you
> describe in a bit more detail how this happens, I didn't fully
> understand the scenario. Also how often do you see this bug?
Forgot to mention that the Signed-off-by line was missing. I need it
before I can commit the patch.
More info here:
http://wireless.kernel.org/en/developers/Documentation/SubmittingPatches
Kalle
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath6kl: avoiding 80211 scan does not complete before start scheduled scan.
[not found] <CADhJdvDbAORKoWUxLdcz7Jq2dt9DKEPzBwgmiNvZsj6iU2K9Kw@mail.gmail.com>
2012-03-20 8:04 ` [PATCH] ath6kl: avoiding 80211 scan does not complete before start scheduled scan Kalle Valo
@ 2012-03-21 6:09 ` Raja Mani
1 sibling, 0 replies; 4+ messages in thread
From: Raja Mani @ 2012-03-21 6:09 UTC (permalink / raw)
To: shonmou li; +Cc: kvalo, ath6kl-devel, linux-wireless
Tested-by: Raja Mani <rmani@qca.qualcomm.com>
On Thursday 23 February 2012 09:45 PM, shonmou li wrote:
> Dear Kvalo:
>
> In this patch, i stop 80211 scan before scheduled scan.
> It could avoid the following situation it will cause wpa_supplicant
> trigger scan fail:
>
> "The device connected with access point then system goes into suspend mode.
> At this moment AP might be turned off or signal lost and then disconnect
> with the device."
>
> The attached file is my patch.
>
> --
> Best Regards,
> shonmou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath6kl: avoiding 80211 scan does not complete before start scheduled scan.
[not found] ` <CADhJdvDpdQzJHQ-hLnASyyCKc2rzG_aBMtTm0rND7d1xdkudyg@mail.gmail.com>
@ 2012-03-21 8:09 ` Kalle Valo
0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2012-03-21 8:09 UTC (permalink / raw)
To: shonmou li; +Cc: ath6kl-devel, linux-wireless, Raja Mani
Hi Shonmou,
please include linux-wireless in CC.
On 03/20/2012 02:15 PM, shonmou li wrote:
> Hi Kalle,
>
> Thanks for your reply. I have added descriptions and signed-off-line in
> the patch file.
>
> When i port the ar6003 driver into android device (ICS), I used the
> following procedure to trigger this bug every time:
>
> 1. enable wifi in android setting menu.
> 2. connect with an AP.
> 3. After device enter suspending state, power off the connected AP.
> 4. At this moment, the device would resume to deal with disconnection event.
> 5. After device suspend again, press power on button to wake the device on.
> 6. Go to setting menu wifi page, press scan button.
> 7. You will get "Scan trigger failed: ret=-16 (Device or resource
> busy)" on android main log.
>
> The log file is in attached file log1.txt.
>
> If FW has the capability to check the status of normal scan and sscan, i
> think it is better. But it should add external information or API in
> order to notify user space what scan mode it is.
Thanks, I understand the issue better. I think your patch is a good fix
for now. If there are more problems still we can fix those separately.
Raja also saw the same problem and he confirmed that your patch fixes
the issue.
I have applied the patch to ath6kl.git with minor modifications to the
commit log. Thank you very much for the patch.
Kalle
commit b4d13d3b70b085ef9b8e0bf7132d502d77d9ffc6
Author: Kalle Valo <kvalo@qca.qualcomm.com>
Date: Wed Mar 21 10:01:09 2012 +0200
ath6kl: abort normal scan when scheduled scan is started
If the device disconnects from an AP when it is in suspending state.
You will
get the following message from wpa_supplicant after waking the
device up and
sending scan request:
"Scan trigger failed: ret=-16 (Device or resource busy)"
Fix the issue by sending a scan complete event before starting scheduled
scan.
kvalo: cosmetic changes to commit log
Signed-off-by: Isaac.li <shonmou@gmail.com>
Tested-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-21 8:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CADhJdvDbAORKoWUxLdcz7Jq2dt9DKEPzBwgmiNvZsj6iU2K9Kw@mail.gmail.com>
2012-03-20 8:04 ` [PATCH] ath6kl: avoiding 80211 scan does not complete before start scheduled scan Kalle Valo
2012-03-20 8:07 ` Kalle Valo
[not found] ` <CADhJdvDpdQzJHQ-hLnASyyCKc2rzG_aBMtTm0rND7d1xdkudyg@mail.gmail.com>
2012-03-21 8:09 ` Kalle Valo
2012-03-21 6:09 ` Raja Mani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).