Lines Matching refs:drv
78 struct wpa_driver_nl80211_data *drv, struct nl80211_noise_info *info)
83 msg = nl80211_drv_msg(drv, NLM_F_DUMP, NL80211_CMD_GET_SURVEY);
84 return send_and_recv_msgs(drv, msg, get_noise_for_scan_results, info);
92 struct wpa_driver_nl80211_data *drv = bss->drv;
96 ret = send_and_recv_msgs(drv, msg, NULL, NULL);
106 static int nl80211_abort_vendor_scan(struct wpa_driver_nl80211_data *drv,
116 msg = nl80211_drv_msg(drv, 0, NL80211_CMD_VENDOR);
127 ret = send_and_recv_msgs(drv, msg, NULL, NULL);
154 struct wpa_driver_nl80211_data *drv = eloop_ctx;
158 if (drv->vendor_scan_cookie &&
159 nl80211_abort_vendor_scan(drv, drv->vendor_scan_cookie) == 0)
162 if (!drv->vendor_scan_cookie &&
163 nl80211_abort_scan(drv->first_bss) == 0)
168 if (drv->ap_scan_as_station != NL80211_IFTYPE_UNSPECIFIED) {
169 wpa_driver_nl80211_set_mode(drv->first_bss,
170 drv->ap_scan_as_station);
171 drv->ap_scan_as_station = NL80211_IFTYPE_UNSPECIFIED;
183 struct wpa_driver_nl80211_data *drv = bss->drv;
233 os_free(drv->filter_ssids);
234 drv->filter_ssids = params->filter_ssids;
236 drv->num_filter_ssids = params->num_filter_ssids;
243 if (params->low_priority && drv->have_low_prio_scan) {
272 if (!(drv->capa.rrm_flags &
305 struct wpa_driver_nl80211_data *drv = bss->drv;
309 wpa_dbg(drv->ctx, MSG_DEBUG, "nl80211: scan request");
310 drv->scan_for_auth = 0;
350 ret = send_and_recv_msgs(drv, msg, NULL, NULL);
355 if (drv->hostapd && is_ap_interface(drv->nlmode)) {
356 enum nl80211_iftype old_mode = drv->nlmode;
372 drv->ap_scan_as_station = old_mode;
378 drv->scan_state = SCAN_REQUESTED;
382 if (drv->scan_complete_events) {
392 eloop_cancel_timeout(wpa_driver_nl80211_scan_timeout, drv, drv->ctx);
394 drv, drv->ctx);
395 drv->last_scan_cmd = NL80211_CMD_TRIGGER_SCAN;
404 nl80211_sched_scan_add_scan_plans(struct wpa_driver_nl80211_data *drv,
424 drv->capa.max_sched_scan_plan_interval) {
436 drv->capa.max_sched_scan_plan_iterations) {
481 struct wpa_driver_nl80211_data *drv = bss->drv;
486 wpa_dbg(drv->ctx, MSG_DEBUG, "nl80211: sched_scan request");
489 if (!drv->capa.sched_scan_supported)
494 params->sched_scan_plans_num > drv->capa.max_sched_scan_plans) {
505 if (drv->capa.max_sched_scan_plan_iterations) {
506 if (nl80211_sched_scan_add_scan_plans(drv, msg, params))
514 if ((drv->num_filter_ssids &&
515 (int) drv->num_filter_ssids <= drv->capa.max_match_sets) ||
522 for (i = 0; i < drv->num_filter_ssids; i++) {
526 drv->filter_ssids[i].ssid,
527 drv->filter_ssids[i].ssid_len);
532 drv->filter_ssids[i].ssid_len,
533 drv->filter_ssids[i].ssid) ||
598 ret = send_and_recv_msgs(drv
625 struct wpa_driver_nl80211_data *drv = bss->drv;
630 if (!drv->capa.sched_scan_supported)
634 msg = nl80211_drv_msg(drv, 0, NL80211_CMD_STOP_SCHED_SCAN);
635 ret = send_and_recv_msgs(drv, msg, NULL, NULL);
649 static int nl80211_scan_filtered(struct wpa_driver_nl80211_data *drv,
655 if (drv->filter_ssids == NULL)
662 for (i = 0; i < drv->num_filter_ssids; i++) {
663 if (ssid[1] == drv->filter_ssids[i].ssid_len &&
664 os_memcmp(ssid + 2, drv->filter_ssids[i].ssid, ssid[1]) ==
674 nl80211_parse_bss_info(struct wpa_driver_nl80211_data *drv,
722 if (nl80211_scan_filtered(drv, ie ? ie : beacon_ie,
790 struct wpa_driver_nl80211_data *drv;
801 r = nl80211_parse_bss_info(_arg->drv, msg);
822 static void clear_state_mismatch(struct wpa_driver_nl80211_data *drv,
825 if (drv->capa.flags & WPA_DRIVER_FLAGS_SME) {
828 wpa_driver_nl80211_mlme(drv, addr,
835 static void nl80211_check_bss_status(struct wpa_driver_nl80211_data *drv,
843 if (is_sta_interface(drv->nlmode) && !drv->associated) {
846 clear_state_mismatch(drv, r->bssid);
847 } else if (is_sta_interface(drv->nlmode) &&
848 os_memcmp(drv->bssid, r->bssid, ETH_ALEN) != 0) {
852 MAC2STR(drv->bssid));
853 clear_state_mismatch(drv, r->bssid);
854 clear_state_mismatch(drv, drv->bssid);
860 struct wpa_driver_nl80211_data *drv, struct wpa_scan_results *res)
865 nl80211_check_bss_status(drv, res->res[i]);
885 nl80211_get_scan_results(struct wpa_driver_nl80211_data *drv)
895 if (!(msg = nl80211_cmd_msg(drv->first_bss, NLM_F_DUMP,
901 arg.drv = drv;
903 ret = send_and_recv_msgs(drv, msg, bss_info_handler, &arg);
909 if (nl80211_get_noise_for_scan_results(drv, &info) == 0) {
933 struct wpa_driver_nl80211_data *drv = bss->drv;
936 res = nl80211_get_scan_results(drv);
938 wpa_driver_nl80211_check_bss_status(drv, res);
944 struct wpa_driver_nl80211_data *drv;
953 r = nl80211_parse_bss_info(ctx->drv, msg);
965 void nl80211_dump_scan(struct wpa_driver_nl80211_data *drv)
971 ctx.drv = drv;
973 msg = nl80211_cmd_msg(drv->first_bss, NLM_F_DUMP, NL80211_CMD_GET_SCAN);
975 send_and_recv_msgs(drv, msg, nl80211_dump_scan_handler, &ctx);
983 struct wpa_driver_nl80211_data *drv = bss->drv;
990 if (drv->scan_vendor_cmd_avail && scan_cookie)
991 return nl80211_abort_vendor_scan(drv, scan_cookie);
1033 struct wpa_driver_nl80211_data *drv = bss->drv;
1041 wpa_dbg(drv->ctx, MSG_DEBUG, "nl80211: vendor scan request");
1042 drv->scan_for_auth = 0;
1044 if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_VENDOR)) ||
1096 os_free(drv->filter_ssids);
1097 drv->filter_ssids = params->filter_ssids;
1099 drv->num_filter_ssids = params->num_filter_ssids;
1101 if (params->low_priority && drv->have_low_prio_scan) {
1168 ret = send_and_recv_msgs(drv, msg, scan_cookie_handler, &cookie);
1177 drv->vendor_scan_cookie = cookie;
1178 drv->scan_state = SCAN_REQUESTED;
1185 eloop_cancel_timeout(wpa_driver_nl80211_scan_timeout, drv, drv->ctx);
1187 drv, drv->ctx);
1188 drv->last_scan_cmd = NL80211_CMD_VENDOR;
1206 struct wpa_driver_nl80211_data *drv = bss->drv;
1211 if (!drv->set_wifi_conf_vendor_cmd_avail)
1214 if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_VENDOR)) ||
1231 ret = send_and_recv_msgs(drv, msg, NULL, NULL);