• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/wpa/wpa_supplicant/

Lines Matching refs:radio

222 	 * If we timed out, the AP or the local radio may be busy.
583 * Need to remove any pending gas-query radio work before the
586 * to cancel such pending radio works and once the pending gas-query
587 * radio work eventually gets removed, the deinit notification call to
590 if (wpa_s->radio)
5067 /* freqs are specified for the radio work */
5104 struct wpa_radio *radio;
5107 radio = iface->radio;
5108 if (radio && os_strcmp(rn, radio->name) == 0) {
5109 wpa_printf(MSG_DEBUG, "Add interface %s to existing radio %s",
5111 dl_list_add(&radio->ifaces, &wpa_s->radio_list);
5112 return radio;
5118 wpa_printf(MSG_DEBUG, "Add interface %s to a new radio %s",
5120 radio = os_zalloc(sizeof(*radio));
5121 if (radio == NULL)
5125 os_strlcpy(radio->name, rn, sizeof(radio->name));
5126 dl_list_init(&radio->ifaces);
5127 dl_list_init(&radio->work);
5128 dl_list_add(&radio->ifaces, &wpa_s->radio_list);
5130 return radio;
5138 wpa_dbg(work->wpa_s, MSG_INFO, "Freeing radio work '%s'@%p (started=%d) that is marked as scan_work",
5146 wpa_dbg(work->wpa_s, MSG_INFO, "Freeing radio work '%s'@%p (started=%d) that is marked as p2p_scan_work",
5153 work->wpa_s->radio->num_active_works--;
5157 work->wpa_s->radio->num_active_works);
5179 static struct wpa_radio_work * radio_work_get_next_work(struct wpa_radio *radio)
5185 dl_list_for_each(tmp, &radio->work, struct wpa_radio_work, list) {
5194 radio->num_active_works = 0;
5195 dl_list_for_each(tmp, &radio->work, struct wpa_radio_work,
5198 radio->external_scan_running &&
5211 * do not parallelize them with other radio works.
5214 "Do not parallelize radio work with %s",
5219 dl_list_for_each(tmp, &radio->work, struct wpa_radio_work, list) {
5242 * Check that the radio works are distinct and
5254 radio->external_scan_running &&
5267 /* Did not find a radio work to schedule in parallel. */
5274 struct wpa_radio *radio = eloop_ctx;
5279 work = dl_list_first(&radio->work, struct wpa_radio_work, list);
5281 radio->num_active_works = 0;
5285 wpa_s = dl_list_first(&radio->ifaces, struct wpa_supplicant,
5293 if (wpa_s && wpa_s->radio->external_scan_running) {
5294 wpa_printf(MSG_DEBUG, "Delay radio work start until externally triggered scan completes");
5299 if (radio->num_active_works < MAX_ACTIVE_WORKS) {
5301 work = radio_work_get_next_work(radio);
5311 "Starting radio work '%s'@%p after %ld.%06ld second wait",
5315 radio->num_active_works++;
5320 radio->num_active_works < MAX_ACTIVE_WORKS)
5326 * This function removes both started and pending radio works running on
5327 * the provided interface's radio.
5328 * Prior to the removal of the radio work, its callback (cb) is called with
5333 * @remove_all: 1 to remove all the works on this radio, 0 to remove only
5340 struct wpa_radio *radio = wpa_s->radio;
5342 dl_list_for_each_safe(work, tmp, &radio->work, struct wpa_radio_work,
5351 wpa_dbg(wpa_s, MSG_DEBUG, "Remove radio work '%s'@%p%s",
5365 struct wpa_radio *radio = wpa_s->radio;
5367 dl_list_for_each(work, &radio->work, struct wpa_radio_work, list) {
5370 wpa_dbg(wpa_s, MSG_DEBUG, "Free pending radio work '%s'@%p%s",
5380 struct wpa_radio *radio = wpa_s->radio;
5382 if (!radio)
5385 wpa_printf(MSG_DEBUG, "Remove interface %s from radio %s",
5386 wpa_s->ifname, radio->name);
5389 wpa_s->radio = NULL;
5390 if (!dl_list_empty(&radio->ifaces))
5391 return; /* Interfaces remain for this radio */
5393 wpa_printf(MSG_DEBUG, "Remove radio %s", radio->name);
5394 eloop_cancel_timeout(radio_start_next_work, radio, NULL);
5395 os_free(radio);
5401 struct wpa_radio *radio = wpa_s->radio;
5403 if (dl_list_empty(&radio->work))
5407 "External radio work in progress - delay start of pending item");
5410 eloop_cancel_timeout(radio_start_next_work, radio, NULL);
5411 eloop_register_timeout(0, 0, radio_start_next_work, radio, NULL);
5416 * radio_add_work - Add a radio work item
5421 * @cb: Callback function for indicating when radio is available
5426 * exclusive radio control. Once the radio is available, the registered callback
5428 * radio operation has been completed, so that the radio is freed for other
5431 * the radio operation, i.e., it must free any resources allocated for the radio
5435 * offchannel operation will occur. This may allow multiple radio work
5438 * requires exclusive control of the radio.
5445 struct wpa_radio *radio = wpa_s->radio;
5452 wpa_dbg(wpa_s, MSG_DEBUG, "Add radio work '%s'@%p", type, work);
5470 was_empty = dl_list_empty(&wpa_s->radio->work);
5472 dl_list_add(&wpa_s->radio->work, &work->list);
5474 dl_list_add_tail(&wpa_s->radio->work, &work->list);
5476 wpa_dbg(wpa_s, MSG_DEBUG, "First radio work item in the queue - schedule start immediately");
5479 && radio->num_active_works < MAX_ACTIVE_WORKS) {
5481 "Try to schedule a radio work (num_active_works=%u)",
5482 radio->num_active_works);
5491 * radio_work_done - Indicate that a radio work item has been completed
5518 struct wpa_radio *radio = wpa_s->radio;
5520 dl_list_for_each(work, &radio->work, struct wpa_radio_work, list) {
5570 wpa_s->radio = radio_add_interface(wpa_s, rn);
5571 if (wpa_s->radio == NULL)
7200 * are using the same radio as the current interface, and in addition, get
7213 "Determining shared radio frequencies (max len %u)", len);
7216 dl_list_for_each(ifs, &wpa_s->radio->ifaces, struct wpa_supplicant,
7255 * are using the same radio as the current interface.