summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authornannaiah <nannaiah@nvidia.com>2019-01-10 03:18:41 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2019-01-31 01:16:25 -0500
commit27a779e2ea8ccc8a0617c093dce7530c5dda7f78 (patch)
treea2578c46e8f33653ddf848a0c535f891cd165400 /drivers/net/wireless
parent52772add79f44dc56a18204d4a685dfc88b21b6f (diff)
bcmdhd: Handle scan error in scan policy
Issue: When interface is down the wl_cfg80211_scan function returns error and if not handled this causes consistent scan failures. Fix: Add call to TEGRA_SCAN_DONE when scan function returns an error and clean up workqueue when active scan rules is zero. Bug 200472884 Change-Id: I361ff6419743aef9df2d7680e7793806b2a82954 Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1990171 (cherry picked from commit 33d5eab52477c818ce88315dd7463c6376db3822) Reviewed-on: https://git-master.nvidia.com/r/1997810 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com> Reviewed-by: Om Prakash Singh <omp@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vinayak Pane <vpane@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/net/wireless')
-rwxr-xr-x[-rw-r--r--]drivers/net/wireless/bcmdhd/dhd_custom_sysfs_tegra_scan.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_custom_sysfs_tegra_scan.c b/drivers/net/wireless/bcmdhd/dhd_custom_sysfs_tegra_scan.c
index 18f3780e8..e7bce8871 100644..100755
--- a/drivers/net/wireless/bcmdhd/dhd_custom_sysfs_tegra_scan.c
+++ b/drivers/net/wireless/bcmdhd/dhd_custom_sysfs_tegra_scan.c
@@ -643,6 +643,11 @@ skip_time_check:
643 goto reschedule; 643 goto reschedule;
644 } 644 }
645 } 645 }
646 if (unlikely(err)) {
647 WIFI_SCAN_DEBUG("%s: Scan done\n", __func__);
648 TEGRA_SCAN_DONE(&scan_work->scan_arg.request_and_channels.request, true)
649 skip_cfg80211_scan_done: ;
650 }
646abort_work: 651abort_work:
647 652
648 WIFI_SCAN_DEBUG("%s }\n", __func__); 653 WIFI_SCAN_DEBUG("%s }\n", __func__);
@@ -1168,6 +1173,10 @@ wifi_scan_request_done(struct cfg80211_scan_request *request)
1168 if ((scan_work >= wifi_scan_work_list) 1173 if ((scan_work >= wifi_scan_work_list)
1169 && (scan_work - wifi_scan_work_list < sizeof(wifi_scan_work_list) 1174 && (scan_work - wifi_scan_work_list < sizeof(wifi_scan_work_list)
1170 / sizeof(wifi_scan_work_list[0]))) { 1175 / sizeof(wifi_scan_work_list[0]))) {
1176 if (!scan_work->original_scan_request) {
1177 WIFI_SCAN_DEBUG("%s no original scan request exist\n", __func__);
1178 return 0;
1179 }
1171 WIFI_SCAN_DEBUG("%s: done executing scan work #%d" 1180 WIFI_SCAN_DEBUG("%s: done executing scan work #%d"
1172 " (policy %d rule %d)\n", 1181 " (policy %d rule %d)\n",
1173 __func__, 1182 __func__,
@@ -1218,7 +1227,8 @@ wifi_scan_request_done(struct cfg80211_scan_request *request)
1218 scan_work); 1227 scan_work);
1219 scan_work->original_scan_request = NULL; 1228 scan_work->original_scan_request = NULL;
1220 } 1229 }
1221 if (scan_work->original_scan_request == request) { 1230 if (scan_work->original_scan_request == request ||
1231 (atomic_read(&wifi_scan_work_rules_active) <= 0)) {
1222 WIFI_SCAN_DEBUG("%s: TEGRA_SCAN_DONE:" 1232 WIFI_SCAN_DEBUG("%s: TEGRA_SCAN_DONE:"
1223 " scan_work #%d (%p)" 1233 " scan_work #%d (%p)"
1224 " - original scan request done\n", 1234 " - original scan request done\n",