static int dhd_iscan_get_partial_result(void *dhdp, uint *scan_count) { wl_iscan_results_t *list_buf; wl_iscan_results_t list; wl_scan_results_t *results; iscan_buf_t *iscan_cur; int status = -1; dhd_pub_t *dhd = dhd_bus_pub(dhdp); int rc; DHD_TRACE(("%s: Enter\n", __FUNCTION__)); iscan_cur = dhd_iscan_allocate_buf(dhd, &iscan_chain); if (!iscan_cur) { DHD_ERROR(("%s: Failed to allocate node\n", __FUNCTION__)); dhd_iscan_free_buf(dhdp, 0); dhd_iscan_request(dhdp, WL_SCAN_ACTION_ABORT); dhd_ind_scan_confirm(dhdp, FALSE); goto fail; } dhd_iscan_lock(); memset(iscan_cur->iscan_buf, 0, WLC_IW_ISCAN_MAXLEN); list_buf = (wl_iscan_results_t*)iscan_cur->iscan_buf; results = &list_buf->results; results->buflen = WL_ISCAN_RESULTS_FIXED_SIZE; results->version = 0; results->count = 0; memset(&list, 0, sizeof(list)); list.results.buflen = htod32(WLC_IW_ISCAN_MAXLEN); bcm_mkiovar("iscanresults", (char *)&list, WL_ISCAN_RESULTS_FIXED_SIZE, iscan_cur->iscan_buf, WLC_IW_ISCAN_MAXLEN); rc = dhd_wl_ioctl_cmd(dhd, WLC_GET_VAR, iscan_cur->iscan_buf, WLC_IW_ISCAN_MAXLEN, FALSE, 0); results->buflen = dtoh32(results->buflen); results->version = dtoh32(results->version); *scan_count = results->count = dtoh32(results->count); status = dtoh32(list_buf->status); DHD_TRACE(("%s: Got %d resuls\n", __FUNCTION__, results->count)); dhd_iscan_unlock(); if (!(*scan_count)) { dhd_iscan_free_buf(dhdp, iscan_cur); } fail: return status; }
void dhd_iscan_ind_scan_confirm(void *dhdp, bool status) { dhd_ind_scan_confirm(dhdp, status); }