ath6kl: Store scan request info in-advance before sending SCAN request
authorRaja Mani <rmani@qca.qualcomm.com>
Wed, 28 Mar 2012 13:20:35 +0000 (18:50 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 28 Mar 2012 13:33:38 +0000 (16:33 +0300)
commit5b35dff0bbdcddb537d4c83097b39343a8f9300f
treed01cb0b95ff60afbb024df09c12b30db48ad0c13
parent9cbee358687edf0359e29ac683ec25835134f059
ath6kl: Store scan request info in-advance before sending SCAN request

In current code, Scan request info is recorded in vif->scan_req
after sending SCAN request to the firmware in ath6kl_cfg80211_scan().

In some corner cases, firmware sends SCAN_COMPLETE event immediately
when it receives SCAN request, which internally executes scan
complete event handler ath6kl_cfg80211_scan_complete_event() first.
So, Scan completion handler will a get a chance to executed even
before storing scan request info in ath6kl_cfg80211_scan().

Scan completion handler never report SCAN_COMPLETE event to
cfg80211 if scan request info(vif->scan_req) is NULL. This leads
to scan failure issue ("Device or resource busy error") during
next SCAN request from the user space. This patch ensures that scan
request info is stored before sending SCAN request.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/cfg80211.c