Lines Matching refs:radio
235 * If we timed out, the AP or the local radio may be busy.
655 * Need to remove any pending gas-query radio work before the
658 * to cancel such pending radio works and once the pending gas-query
659 * radio work eventually gets removed, the deinit notification call to
662 if (wpa_s->radio)
6626 /* freqs are specified for the radio work */
6663 struct wpa_radio *radio;
6666 radio = iface->radio;
6667 if (radio && os_strcmp(rn, radio->name) == 0) {
6668 wpa_printf(MSG_DEBUG, "Add interface %s to existing radio %s",
6670 dl_list_add(&radio->ifaces, &wpa_s->radio_list);
6671 return radio;
6677 wpa_printf(MSG_DEBUG, "Add interface %s to a new radio %s",
6679 radio = os_zalloc(sizeof(*radio));
6680 if (radio == NULL)
6684 os_strlcpy(radio->name, rn, sizeof(radio->name));
6685 dl_list_init(&radio->ifaces);
6686 dl_list_init(&radio->work);
6687 dl_list_add(&radio->ifaces, &wpa_s->radio_list);
6689 return radio;
6697 wpa_dbg(work->wpa_s, MSG_INFO, "Freeing radio work '%s'@%p (started=%d) that is marked as scan_work",
6705 wpa_dbg(work->wpa_s, MSG_INFO, "Freeing radio work '%s'@%p (started=%d) that is marked as p2p_scan_work",
6712 work->wpa_s->radio->num_active_works--;
6716 work->wpa_s->radio->num_active_works);
6738 static struct wpa_radio_work * radio_work_get_next_work(struct wpa_radio *radio)
6744 dl_list_for_each(tmp, &radio->work, struct wpa_radio_work, list) {
6753 radio->num_active_works = 0;
6754 dl_list_for_each(tmp, &radio->work, struct wpa_radio_work,
6757 external_scan_running(radio) &&
6770 * do not parallelize them with other radio works.
6773 "Do not parallelize radio work with %s",
6778 dl_list_for_each(tmp, &radio->work, struct wpa_radio_work, list) {
6801 * Check that the radio works are distinct and
6813 external_scan_running(radio) &&
6826 /* Did not find a radio work to schedule in parallel. */
6833 struct wpa_radio *radio = eloop_ctx;
6838 work = dl_list_first(&radio->work, struct wpa_radio_work, list);
6840 radio->num_active_works = 0;
6844 wpa_s = dl_list_first(&radio->ifaces, struct wpa_supplicant,
6852 if (wpa_s && external_scan_running(wpa_s->radio)) {
6853 wpa_printf(MSG_DEBUG, "Delay radio work start until externally triggered scan completes");
6858 if (radio->num_active_works < MAX_ACTIVE_WORKS) {
6860 work = radio_work_get_next_work(radio);
6870 "Starting radio work '%s'@%p after %jd.%06jd second wait",
6874 radio->num_active_works++;
6879 radio->num_active_works < MAX_ACTIVE_WORKS)
6885 * This function removes both started and pending radio works running on
6886 * the provided interface's radio.
6887 * Prior to the removal of the radio work, its callback (cb) is called with
6892 * @remove_all: 1 to remove all the works on this radio, 0 to remove only
6899 struct wpa_radio *radio = wpa_s->radio;
6901 dl_list_for_each_safe(work, tmp, &radio->work, struct wpa_radio_work,
6910 wpa_dbg(wpa_s, MSG_DEBUG, "Remove radio work '%s'@%p%s",
6924 struct wpa_radio *radio = wpa_s->radio;
6926 dl_list_for_each(work, &radio->work, struct wpa_radio_work, list) {
6929 wpa_dbg(wpa_s, MSG_DEBUG, "Free pending radio work '%s'@%p%s",
6939 struct wpa_radio *radio = wpa_s->radio;
6941 if (!radio)
6944 wpa_printf(MSG_DEBUG, "Remove interface %s from radio %s",
6945 wpa_s->ifname, radio->name);
6950 if (wpa_s == radio->external_scan_req_interface)
6951 radio->external_scan_req_interface = NULL;
6952 wpa_s->radio = NULL;
6953 if (!dl_list_empty(&radio->ifaces))
6954 return; /* Interfaces remain for this radio */
6956 wpa_printf(MSG_DEBUG, "Remove radio %s", radio->name);
6957 eloop_cancel_timeout(radio_start_next_work, radio, NULL);
6958 os_free(radio);
6964 struct wpa_radio *radio = wpa_s->radio;
6966 if (dl_list_empty(&radio->work))
6970 "External radio work in progress - delay start of pending item");
6973 eloop_cancel_timeout(radio_start_next_work, radio, NULL);
6974 eloop_register_timeout(0, 0, radio_start_next_work, radio, NULL);
6979 * radio_add_work - Add a radio work item
6984 * @cb: Callback function for indicating when radio is available
6989 * exclusive radio control. Once the radio is available, the registered callback
6991 * radio operation has been completed, so that the radio is freed for other
6994 * the radio operation, i.e., it must free any resources allocated for the radio
6998 * offchannel operation will occur. This may allow multiple radio work
7001 * requires exclusive control of the radio.
7008 struct wpa_radio *radio = wpa_s->radio;
7015 wpa_dbg(wpa_s, MSG_DEBUG, "Add radio work '%s'@%p", type, work);
7033 was_empty = dl_list_empty(&wpa_s->radio->work);
7035 dl_list_add(&wpa_s->radio->work, &work->list);
7037 dl_list_add_tail(&wpa_s->radio->work, &work->list);
7039 wpa_dbg(wpa_s, MSG_DEBUG, "First radio work item in the queue - schedule start immediately");
7042 && radio->num_active_works < MAX_ACTIVE_WORKS) {
7044 "Try to schedule a radio work (num_active_works=%u)",
7045 radio->num_active_works);
7054 * radio_work_done - Indicate that a radio work item has been completed
7068 wpa_dbg(wpa_s, MSG_DEBUG, "Radio work '%s'@%p %s in %jd.%06ld seconds",
7081 struct wpa_radio *radio = wpa_s->radio;
7083 dl_list_for_each(work, &radio->work, struct wpa_radio_work, list) {
7139 wpa_s->radio = radio_add_interface(wpa_s, rn);
7140 if (wpa_s->radio == NULL)
9012 * are using the same radio as the current interface, and in addition, get
9025 "Determining shared radio frequencies (max len %u)", len);
9028 dl_list_for_each(ifs, &wpa_s->radio->ifaces, struct wpa_supplicant,
9070 * are using the same radio as the current interface.