Lines Matching refs:vif

27 	struct wil6210_vif *vif;  in wil_has_other_active_ifaces()  local
31 vif = wil->vifs[i]; in wil_has_other_active_ifaces()
32 if (vif) { in wil_has_other_active_ifaces()
33 ndev_i = vif_to_ndev(vif); in wil_has_other_active_ifaces()
155 struct wil6210_vif *vif; in wil6210_netdev_poll_tx() local
161 vif = wil->vifs[txdata->mid]; in wil6210_netdev_poll_tx()
162 if (unlikely(!vif)) { in wil6210_netdev_poll_tx()
167 tx_done += wil_tx_complete(vif, i); in wil6210_netdev_poll_tx()
212 static void wil_vif_deinit(struct wil6210_vif *vif) in wil_vif_deinit() argument
214 del_timer_sync(&vif->scan_timer); in wil_vif_deinit()
215 del_timer_sync(&vif->p2p.discovery_timer); in wil_vif_deinit()
216 cancel_work_sync(&vif->disconnect_worker); in wil_vif_deinit()
217 cancel_work_sync(&vif->p2p.discovery_expired_work); in wil_vif_deinit()
218 cancel_work_sync(&vif->p2p.delayed_listen_work); in wil_vif_deinit()
219 wil_probe_client_flush(vif); in wil_vif_deinit()
220 cancel_work_sync(&vif->probe_client_worker); in wil_vif_deinit()
223 void wil_vif_free(struct wil6210_vif *vif) in wil_vif_free() argument
225 struct net_device *ndev = vif_to_ndev(vif); in wil_vif_free()
227 wil_vif_deinit(vif); in wil_vif_free()
233 struct wil6210_vif *vif = ndev_to_vif(ndev); in wil_ndev_destructor() local
235 wil_vif_deinit(vif); in wil_ndev_destructor()
240 struct wil6210_vif *vif = from_timer(vif, t, connect_timer); in wil_connect_timer_fn() local
241 struct wil6210_priv *wil = vif_to_wil(vif); in wil_connect_timer_fn()
250 q = queue_work(wil->wmi_wq, &vif->disconnect_worker); in wil_connect_timer_fn()
256 struct wil6210_vif *vif = from_timer(vif, t, scan_timer); in wil_scan_timer_fn() local
257 struct wil6210_priv *wil = vif_to_wil(vif); in wil_scan_timer_fn()
266 struct wil6210_vif *vif = from_timer(vif, t, p2p.discovery_timer); in wil_p2p_discovery_timer_fn() local
267 struct wil6210_priv *wil = vif_to_wil(vif); in wil_p2p_discovery_timer_fn()
271 schedule_work(&vif->p2p.discovery_expired_work); in wil_p2p_discovery_timer_fn()
274 static void wil_vif_init(struct wil6210_vif *vif) in wil_vif_init() argument
276 vif->bcast_ring = -1; in wil_vif_init()
278 mutex_init(&vif->probe_client_mutex); in wil_vif_init()
280 timer_setup(&vif->connect_timer, wil_connect_timer_fn, 0); in wil_vif_init()
281 timer_setup(&vif->scan_timer, wil_scan_timer_fn, 0); in wil_vif_init()
282 timer_setup(&vif->p2p.discovery_timer, wil_p2p_discovery_timer_fn, 0); in wil_vif_init()
284 INIT_WORK(&vif->probe_client_worker, wil_probe_client_worker); in wil_vif_init()
285 INIT_WORK(&vif->disconnect_worker, wil_disconnect_worker); in wil_vif_init()
286 INIT_WORK(&vif->p2p.delayed_listen_work, wil_p2p_delayed_listen_work); in wil_vif_init()
288 INIT_LIST_HEAD(&vif->probe_client_pending); in wil_vif_init()
290 vif->net_queue_stopped = 1; in wil_vif_init()
311 struct wil6210_vif *vif; in wil_vif_alloc() local
320 ndev = alloc_netdev(sizeof(*vif), name, name_assign_type, in wil_vif_alloc()
333 vif = ndev_to_vif(ndev); in wil_vif_alloc()
334 vif->ndev = ndev; in wil_vif_alloc()
335 vif->wil = wil; in wil_vif_alloc()
336 vif->mid = mid; in wil_vif_alloc()
337 wil_vif_init(vif); in wil_vif_alloc()
339 wdev = &vif->wdev; in wil_vif_alloc()
354 return vif; in wil_vif_alloc()
360 struct wil6210_vif *vif; in wil_if_alloc() local
377 vif = wil_vif_alloc(wil, "wlan%d", NET_NAME_UNKNOWN, in wil_if_alloc()
379 if (IS_ERR(vif)) { in wil_if_alloc()
385 wil->radio_wdev = vif_to_wdev(vif); in wil_if_alloc()
416 int wil_vif_add(struct wil6210_priv *wil, struct wil6210_vif *vif) in wil_vif_add() argument
418 struct net_device *ndev = vif_to_ndev(vif); in wil_vif_add()
419 struct wireless_dev *wdev = vif_to_wdev(vif); in wil_vif_add()
425 if (wil->vifs[vif->mid]) { in wil_vif_add()
427 vif->mid); in wil_vif_add()
430 if (any_active && vif->mid != 0) { in wil_vif_add()
431 rc = wmi_port_allocate(wil, vif->mid, ndev->dev_addr, in wil_vif_add()
439 if (any_active && vif->mid != 0) in wil_vif_add()
440 wmi_port_delete(wil, vif->mid); in wil_vif_add()
444 wil->vifs[vif->mid] = vif; in wil_vif_add()
452 struct wil6210_vif *vif = ndev_to_vif(ndev); in wil_if_add() local
482 wil_update_net_queues_bh(wil, vif, NULL, true); in wil_if_add()
485 rc = wil_vif_add(wil, vif); in wil_if_add()
499 struct wil6210_vif *vif; in wil_vif_remove() local
509 vif = wil->vifs[mid]; in wil_vif_remove()
510 if (!vif) { in wil_vif_remove()
516 wil6210_disconnect(vif, NULL, WLAN_REASON_DEAUTH_LEAVING, false); in wil_vif_remove()
519 ndev = vif_to_ndev(vif); in wil_vif_remove()
525 if (any_active && vif->mid != 0) in wil_vif_remove()
526 wmi_port_delete(wil, vif->mid); in wil_vif_remove()
540 del_timer_sync(&vif->connect_timer); in wil_vif_remove()
541 cancel_work_sync(&vif->disconnect_worker); in wil_vif_remove()
542 wil_probe_client_flush(vif); in wil_vif_remove()
543 cancel_work_sync(&vif->probe_client_worker); in wil_vif_remove()