Lines Matching refs:escan
218 wl_escan_dump_bss(struct net_device *dev, struct wl_escan_info *escan, in wl_escan_dump_bss() argument
226 rssi = wl_get_avg_rssi(&escan->g_rssi_cache_ctrl, &bi->BSSID); in wl_escan_dump_bss()
233 chanspec = wl_chspec_driver_to_host(escan->ioctl_ver, bi->chanspec); in wl_escan_dump_bss()
245 wl_escan_inform_bss(struct net_device *dev, struct wl_escan_info *escan) in wl_escan_inform_bss() argument
257 bss_list = escan->bss_list; in wl_escan_inform_bss()
263 wl_update_rssi_cache(&escan->g_rssi_cache_ctrl, bss_list); in wl_escan_inform_bss()
265 wl_update_connected_rssi_cache(dev, &escan->g_rssi_cache_ctrl, &rssi); in wl_escan_inform_bss()
268 wl_update_bss_cache(&escan->g_bss_cache_ctrl, in wl_escan_inform_bss()
270 &escan->g_rssi_cache_ctrl, in wl_escan_inform_bss()
277 wl_delete_dirty_rssi_cache(&escan->g_rssi_cache_ctrl); in wl_escan_inform_bss()
278 wl_reset_rssi_cache(&escan->g_rssi_cache_ctrl); in wl_escan_inform_bss()
282 wl_delete_dirty_bss_cache(&escan->g_bss_cache_ctrl); in wl_escan_inform_bss()
283 wl_reset_bss_cache(&escan->g_bss_cache_ctrl); in wl_escan_inform_bss()
284 if (escan->autochannel) in wl_escan_inform_bss()
285 wl_ext_get_best_channel(dev, &escan->g_bss_cache_ctrl, in wl_escan_inform_bss()
286 &escan->best_2g_ch, &escan->best_5g_ch, &escan->best_6g_ch); in wl_escan_inform_bss()
290 wl_escan_dump_bss(dev, escan, bi); in wl_escan_inform_bss()
292 if (escan->autochannel) in wl_escan_inform_bss()
294 &escan->best_2g_ch, &escan->best_5g_ch, &escan->best_6g_ch); in wl_escan_inform_bss()
302 wl_escan_alloc_params(struct net_device *dev, struct wl_escan_info *escan, in wl_escan_alloc_params() argument
333 params->channel_list[0] = wl_ch_host_to_driver(escan->ioctl_ver, channel); in wl_escan_alloc_params()
344 wl_escan_abort(struct net_device *dev, struct wl_escan_info *escan) in wl_escan_abort() argument
351 params = wl_escan_alloc_params(dev, escan, -1, 0, ¶ms_size); in wl_escan_abort()
368 struct wl_escan_info *escan, bool fw_abort) in wl_escan_notify_complete() argument
383 wl_escan_abort(dev, escan); in wl_escan_notify_complete()
385 if (timer_pending(&escan->scan_timeout)) in wl_escan_notify_complete()
386 del_timer_sync(&escan->scan_timeout); in wl_escan_notify_complete()
389 escan->bss_list = wl_escan_get_buf(escan); in wl_escan_notify_complete()
390 wl_escan_inform_bss(dev, escan); in wl_escan_notify_complete()
393 escan->escan_state = ESCAN_STATE_IDLE; in wl_escan_notify_complete()
418 wl_escan_find_removal_candidate(struct wl_escan_info *escan, in wl_escan_find_removal_candidate() argument
437 wl_escan_remove_lowRSSI_info(struct net_device *dev, struct wl_escan_info *escan, in wl_escan_remove_lowRSSI_info() argument
479 struct wl_escan_info *escan = (struct wl_escan_info *)argu; in wl_escan_ext_handler() local
489 mutex_lock(&escan->usr_sync); in wl_escan_ext_handler()
492 if (escan->escan_state != ESCAN_STATE_SCANING) { in wl_escan_ext_handler()
526 CHSPEC_CHANNEL(wl_chspec_driver_to_host(escan->ioctl_ver, bi->chanspec)); in wl_escan_ext_handler()
527 if (!dhd_conf_match_channel(escan->pub, channel)) in wl_escan_ext_handler()
540 list = wl_escan_get_buf(escan); in wl_escan_ext_handler()
557 wl_escan_find_removal_candidate(escan, bss, candidate); in wl_escan_ext_handler()
560 (CHSPEC_BAND(wl_chspec_driver_to_host(escan->ioctl_ver, bi->chanspec)) in wl_escan_ext_handler()
561 == CHSPEC_BAND(wl_chspec_driver_to_host(escan->ioctl_ver, bss->chanspec))) && in wl_escan_ext_handler()
636 wl_escan_remove_lowRSSI_info(dev, escan, list, candidate, bi); in wl_escan_ext_handler()
657 escan->bss_list = wl_escan_get_buf(escan); in wl_escan_ext_handler()
659 escan->bss_list->count); in wl_escan_ext_handler()
660 wl_escan_notify_complete(dev, escan, false); in wl_escan_ext_handler()
666 escan->bss_list = wl_escan_get_buf(escan); in wl_escan_ext_handler()
668 escan->bss_list->count); in wl_escan_ext_handler()
669 wl_escan_notify_complete(dev, escan, false); in wl_escan_ext_handler()
674 wl_escan_notify_complete(dev, escan, true); in wl_escan_ext_handler()
678 escan->bss_list = wl_escan_get_buf(escan); in wl_escan_ext_handler()
680 escan->bss_list->count); in wl_escan_ext_handler()
681 wl_escan_notify_complete(dev, escan, false); in wl_escan_ext_handler()
684 mutex_unlock(&escan->usr_sync); in wl_escan_ext_handler()
689 wl_escan_prep(struct net_device *dev, struct wl_escan_info *escan, in wl_escan_prep() argument
706 results = wl_escan_get_buf(escan); in wl_escan_prep()
710 escan->escan_state = ESCAN_STATE_SCANING; in wl_escan_prep()
713 mod_timer(&escan->scan_timeout, jiffies + msecs_to_jiffies(WL_ESCAN_TIMER_INTERVAL_MS)); in wl_escan_prep()
715 if (escan->scan_params_v2) { in wl_escan_prep()
772 chan_list[j] = wl_chspec_host_to_driver(escan->ioctl_ver, in wl_escan_prep()
829 wl_escan_reset(struct wl_escan_info *escan) in wl_escan_reset() argument
831 if (timer_pending(&escan->scan_timeout)) in wl_escan_reset()
832 del_timer_sync(&escan->scan_timeout); in wl_escan_reset()
833 escan->escan_state = ESCAN_STATE_IDLE; in wl_escan_reset()
842 struct wl_escan_info *escan = (struct wl_escan_info *)data; in wl_escan_timeout() local
848 if (!escan->dev) { in wl_escan_timeout()
853 bss_list = wl_escan_get_buf(escan); in wl_escan_timeout()
855 ESCAN_ERROR(escan->dev->name, in wl_escan_timeout()
858 ESCAN_ERROR(escan->dev->name, "scanned AP count (%d)\n", bss_list->count); in wl_escan_timeout()
861 channel = wf_chspec_ctlchan(wl_chspec_driver_to_host(escan->ioctl_ver, in wl_escan_timeout()
863 ESCAN_ERROR(escan->dev->name, "SSID :%s Channel :%d\n", bi->SSID, channel); in wl_escan_timeout()
868 ESCAN_ERROR(escan->dev->name, "timer expired\n"); in wl_escan_timeout()
870 msg.ifidx = dhd_net2idx(escan->pub->info, escan->dev); in wl_escan_timeout()
874 wl_ext_event_send(escan->pub->event_params, &msg, NULL); in wl_escan_timeout()
881 struct wl_escan_info *escan = dhdp->escan; in wl_escan_set_scan() local
890 mutex_lock(&escan->usr_sync); in wl_escan_set_scan()
891 if (escan->escan_state == ESCAN_STATE_DOWN) { in wl_escan_set_scan()
912 if (escan->scan_params_v2) { in wl_escan_set_scan()
956 if (escan->scan_params_v2) { in wl_escan_set_scan()
970 wl_escan_prep(dev, escan, list, scan_params, scan_info); in wl_escan_set_scan()
981 escan->escan_ioctl_buf, WLC_IOCTL_MEDLEN, NULL); in wl_escan_set_scan()
985 escan->dev = dev; in wl_escan_set_scan()
992 wl_escan_reset(escan); in wl_escan_set_scan()
995 mutex_unlock(&escan->usr_sync); in wl_escan_set_scan()
1018 wl_escan_merge_scan_results(struct net_device *dev, struct wl_escan_info *escan, in wl_escan_merge_scan_results() argument
1037 rssi = wl_get_avg_rssi(&escan->g_rssi_cache_ctrl, &bi->BSSID); in wl_escan_merge_scan_results()
1044 chanspec = wl_chspec_driver_to_host(escan->ioctl_ver, bi->chanspec); in wl_escan_merge_scan_results()
1138 struct wl_escan_info *escan = dhdp->escan; in wl_escan_merge_scan_list() local
1146 bss_list = escan->bss_list; in wl_escan_merge_scan_list()
1155 err = wl_escan_merge_scan_results(dev, escan, info, extra+*len_ret, bi, in wl_escan_merge_scan_list()
1175 struct wl_escan_info *escan = dhdp->escan; in wl_escan_merge_cache_list() local
1184 bss_list = &escan->g_bss_cache_ctrl.m_cache_head->results; in wl_escan_merge_cache_list()
1185 node = escan->g_bss_cache_ctrl.m_cache_head; in wl_escan_merge_cache_list()
1196 err = wl_escan_merge_scan_results(dev, escan, info, extra+*len_ret, bi, in wl_escan_merge_cache_list()
1217 struct wl_escan_info *escan = dhdp->escan; in wl_escan_get_scan() local
1235 mutex_lock(&escan->usr_sync); in wl_escan_get_scan()
1238 if (escan->escan_state == ESCAN_STATE_SCANING) { in wl_escan_get_scan()
1243 if (!escan->bss_list) { in wl_escan_get_scan()
1248 if (dev != escan->dev) { in wl_escan_get_scan()
1249 ESCAN_ERROR(dev->name, "not my scan from %s\n", escan->dev->name); in wl_escan_get_scan()
1276 err = wl_escan_merge_scan_results(dev, escan, info, extra+len_ret, bi, in wl_escan_get_scan()
1306 mutex_unlock(&escan->usr_sync); in wl_escan_get_scan()
1377 wl_escan_mesh_info(struct net_device *dev, struct wl_escan_info *escan, in wl_escan_mesh_info() argument
1388 mutex_lock(&escan->usr_sync); in wl_escan_mesh_info()
1391 if (escan->escan_state == ESCAN_STATE_SCANING) { in wl_escan_mesh_info()
1395 if (!escan->bss_list) { in wl_escan_mesh_info()
1399 if (dev != escan->dev) { in wl_escan_mesh_info()
1400 ESCAN_ERROR(dev->name, "not my scan from %s\n", escan->dev->name); in wl_escan_mesh_info()
1404 bss_list = escan->bss_list; in wl_escan_mesh_info()
1412 wl_chspec_driver_to_host(escan->ioctl_ver, bi->chanspec)); in wl_escan_mesh_info()
1443 mutex_unlock(&escan->usr_sync); in wl_escan_mesh_info()
1448 wl_escan_mesh_peer(struct net_device *dev, struct wl_escan_info *escan, in wl_escan_mesh_peer() argument
1461 mutex_lock(&escan->usr_sync); in wl_escan_mesh_peer()
1464 if (escan->escan_state == ESCAN_STATE_SCANING) { in wl_escan_mesh_peer()
1468 if (!escan->bss_list) { in wl_escan_mesh_peer()
1472 if (dev != escan->dev) { in wl_escan_mesh_peer()
1473 ESCAN_ERROR(dev->name, "not my scan from %s\n", escan->dev->name); in wl_escan_mesh_peer()
1477 bss_list = escan->bss_list; in wl_escan_mesh_peer()
1485 wl_chspec_driver_to_host(escan->ioctl_ver, bi->chanspec)); in wl_escan_mesh_peer()
1547 mutex_unlock(&escan->usr_sync); in wl_escan_mesh_peer()
1553 wl_escan_deinit(struct net_device *dev, struct wl_escan_info *escan) in wl_escan_deinit() argument
1557 del_timer_sync(&escan->scan_timeout); in wl_escan_deinit()
1558 escan->escan_state = ESCAN_STATE_DOWN; in wl_escan_deinit()
1561 wl_free_rssi_cache(&escan->g_rssi_cache_ctrl); in wl_escan_deinit()
1564 wl_free_bss_cache(&escan->g_bss_cache_ctrl); in wl_escan_deinit()
1569 wl_escan_init(struct net_device *dev, struct wl_escan_info *escan) in wl_escan_init() argument
1574 init_timer_compat(&escan->scan_timeout, wl_escan_timeout, escan); in wl_escan_init()
1575 escan->escan_state = ESCAN_STATE_IDLE; in wl_escan_init()
1584 struct wl_escan_info *escan = dhdp->escan; in wl_escan_down() local
1587 if (!escan) { in wl_escan_down()
1592 escan->scan_params_v2 = false; in wl_escan_down()
1594 wl_escan_deinit(dev, escan); in wl_escan_down()
1601 struct wl_escan_info *escan = dhdp->escan; in wl_escan_up() local
1607 if (!escan) { in wl_escan_up()
1612 ret = wl_escan_init(dev, escan); in wl_escan_up()
1618 if (!escan->ioctl_ver) { in wl_escan_up()
1631 escan->ioctl_ver = val; in wl_escan_up()
1638 escan->scan_params_v2 = true; in wl_escan_up()
1655 struct wl_escan_info *escan = dhdp->escan; in wl_escan_event_dettach() local
1658 if (!escan) { in wl_escan_event_dettach()
1674 struct wl_escan_info *escan = dhdp->escan; in wl_escan_event_attach() local
1677 if (!escan) { in wl_escan_event_attach()
1684 escan, PRIO_EVENT_ESCAN); in wl_escan_event_attach()
1697 struct wl_escan_info *escan = dhdp->escan; in wl_escan_detach() local
1701 if (!escan) in wl_escan_detach()
1704 wl_escan_deinit(dev, escan); in wl_escan_detach()
1705 if (escan->escan_ioctl_buf) { in wl_escan_detach()
1706 kfree(escan->escan_ioctl_buf); in wl_escan_detach()
1707 escan->escan_ioctl_buf = NULL; in wl_escan_detach()
1711 DHD_OS_PREFREE(dhdp, escan, sizeof(struct wl_escan_info)); in wl_escan_detach()
1712 dhdp->escan = NULL; in wl_escan_detach()
1719 struct wl_escan_info *escan = NULL; in wl_escan_attach() local
1724 escan = (struct wl_escan_info *)DHD_OS_PREALLOC(dhdp, in wl_escan_attach()
1726 if (!escan) in wl_escan_attach()
1728 memset(escan, 0, sizeof(struct wl_escan_info)); in wl_escan_attach()
1730 dhdp->escan = escan; in wl_escan_attach()
1733 escan->pub = dhdp; in wl_escan_attach()
1734 escan->escan_state = ESCAN_STATE_DOWN; in wl_escan_attach()
1736 escan->escan_ioctl_buf = (void *)kzalloc(WLC_IOCTL_MAXLEN, GFP_KERNEL); in wl_escan_attach()
1737 if (unlikely(!escan->escan_ioctl_buf)) { in wl_escan_attach()
1742 ret = wl_escan_init(dev, escan); in wl_escan_attach()
1747 mutex_init(&escan->usr_sync); in wl_escan_attach()