aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEcco Park <eccopark@broadcom.com>2013-10-01 09:03:55 +0900
committerZiyan <jaraidaniel@gmail.com>2016-05-01 23:35:28 +0200
commitc11f9e36804c52cdb1001ddeb07192aee194ddcc (patch)
treeaa0d7be41f6baf9341292411b48b1707095f89b8
parent3acf792e09e0d195b51915456964283bbdeb4347 (diff)
downloadkernel_samsung_tuna-c11f9e36804c52cdb1001ddeb07192aee194ddcc.zip
kernel_samsung_tuna-c11f9e36804c52cdb1001ddeb07192aee194ddcc.tar.gz
kernel_samsung_tuna-c11f9e36804c52cdb1001ddeb07192aee194ddcc.tar.bz2
net: wireless: bcmdhd: Fixed Wi-Fi Location Service issues.
1. 10954142 [BATCHED-SCAN]Wifi Batching stopped after long time 2. 10412309 [BATCHED-SCAN] Batched scans aren't as frequent as expected. Signed-off-by: Ecco Park <eccopark@broadcom.com>
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_linux.c4
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_pno.c23
2 files changed, 22 insertions, 5 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c
index 34505c6..720ce99 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -5325,6 +5325,10 @@ dhd_dev_reset(struct net_device *dev, uint8 flag)
if (dhd->pub.plat_deinit)
dhd->pub.plat_deinit((void *)&dhd->pub);
#endif /* PROP_TXSTATUS && !PROP_TXSTATUS_VSDB */
+#ifdef PNO_SUPPORT
+ if (dhd->pub.pno_state)
+ dhd_pno_deinit(&dhd->pub);
+#endif
}
ret = dhd_bus_devreset(&dhd->pub, flag);
diff --git a/drivers/net/wireless/bcmdhd/dhd_pno.c b/drivers/net/wireless/bcmdhd/dhd_pno.c
index 5e1cb24..698ac3d 100644
--- a/drivers/net/wireless/bcmdhd/dhd_pno.c
+++ b/drivers/net/wireless/bcmdhd/dhd_pno.c
@@ -1317,6 +1317,15 @@ _dhd_pno_get_for_batch(dhd_pub_t *dhd, char *buf, int bufsize, int reason)
plnetinfo++;
}
}
+ if (pscan_results->cnt_header == 0) {
+ /* In case that we didn't get any data from the firmware
+ * Remove the current scan_result list from get_bach.scan_results_list.
+ */
+ DHD_PNO(("NO BATCH DATA from Firmware, Delete current SCAN RESULT LIST\n"));
+ list_del(&pscan_results->list);
+ MFREE(dhd->osh, pscan_results, SCAN_RESULTS_SIZE);
+ _params->params_batch.get_batch.top_node_cnt--;
+ }
/* increase total scan count using current scan count */
_params->params_batch.get_batch.tot_scan_cnt += pscan_results->cnt_header;
@@ -1797,11 +1806,15 @@ dhd_pno_event_handler(dhd_pub_t *dhd, wl_event_msg_t *event, void *event_data)
{
struct dhd_pno_batch_params *params_batch;
params_batch = &_pno_state->pno_params_arr[INDEX_OF_BATCH_PARAMS].params_batch;
- DHD_PNO(("%s : WLC_E_PFN_BEST_BATCHING\n", __FUNCTION__));
- params_batch->get_batch.buf = NULL;
- params_batch->get_batch.bufsize = 0;
- params_batch->get_batch.reason = PNO_STATUS_EVENT;
- schedule_work(&_pno_state->work);
+ if (!waitqueue_active(&_pno_state->get_batch_done.wait)) {
+ DHD_PNO(("%s : WLC_E_PFN_BEST_BATCHING\n", __FUNCTION__));
+ params_batch->get_batch.buf = NULL;
+ params_batch->get_batch.bufsize = 0;
+ params_batch->get_batch.reason = PNO_STATUS_EVENT;
+ schedule_work(&_pno_state->work);
+ } else
+ DHD_PNO(("%s : WLC_E_PFN_BEST_BATCHING"
+ "will skip this event\n", __FUNCTION__));
break;
}
default: