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()
221 cancel_work_sync(&vif->enable_tx_key_worker); in wil_vif_deinit()
224 void wil_vif_free(struct wil6210_vif *vif) in wil_vif_free() argument
226 struct net_device *ndev = vif_to_ndev(vif); in wil_vif_free()
228 wil_vif_deinit(vif); in wil_vif_free()
234 struct wil6210_vif *vif = ndev_to_vif(ndev); in wil_ndev_destructor() local
236 wil_vif_deinit(vif); in wil_ndev_destructor()
241 struct wil6210_vif *vif = from_timer(vif, t, connect_timer); in wil_connect_timer_fn() local
242 struct wil6210_priv *wil = vif_to_wil(vif); in wil_connect_timer_fn()
251 q = queue_work(wil->wmi_wq, &vif->disconnect_worker); in wil_connect_timer_fn()
257 struct wil6210_vif *vif = from_timer(vif, t, scan_timer); in wil_scan_timer_fn() local
258 struct wil6210_priv *wil = vif_to_wil(vif); in wil_scan_timer_fn()
267 struct wil6210_vif *vif = from_timer(vif, t, p2p.discovery_timer); in wil_p2p_discovery_timer_fn() local
268 struct wil6210_priv *wil = vif_to_wil(vif); in wil_p2p_discovery_timer_fn()
272 schedule_work(&vif->p2p.discovery_expired_work); in wil_p2p_discovery_timer_fn()
275 static void wil_vif_init(struct wil6210_vif *vif) in wil_vif_init() argument
277 vif->bcast_ring = -1; in wil_vif_init()
279 mutex_init(&vif->probe_client_mutex); in wil_vif_init()
281 timer_setup(&vif->connect_timer, wil_connect_timer_fn, 0); in wil_vif_init()
282 timer_setup(&vif->scan_timer, wil_scan_timer_fn, 0); in wil_vif_init()
283 timer_setup(&vif->p2p.discovery_timer, wil_p2p_discovery_timer_fn, 0); in wil_vif_init()
285 INIT_WORK(&vif->probe_client_worker, wil_probe_client_worker); in wil_vif_init()
286 INIT_WORK(&vif->disconnect_worker, wil_disconnect_worker); in wil_vif_init()
287 INIT_WORK(&vif->p2p.discovery_expired_work, wil_p2p_listen_expired); in wil_vif_init()
288 INIT_WORK(&vif->p2p.delayed_listen_work, wil_p2p_delayed_listen_work); in wil_vif_init()
289 INIT_WORK(&vif->enable_tx_key_worker, wil_enable_tx_key_worker); in wil_vif_init()
291 INIT_LIST_HEAD(&vif->probe_client_pending); in wil_vif_init()
293 vif->net_queue_stopped = 1; in wil_vif_init()
314 struct wil6210_vif *vif; in wil_vif_alloc() local
323 ndev = alloc_netdev(sizeof(*vif), name, name_assign_type, in wil_vif_alloc()
336 vif = ndev_to_vif(ndev); in wil_vif_alloc()
337 vif->ndev = ndev; in wil_vif_alloc()
338 vif->wil = wil; in wil_vif_alloc()
339 vif->mid = mid; in wil_vif_alloc()
340 wil_vif_init(vif); in wil_vif_alloc()
342 wdev = &vif->wdev; in wil_vif_alloc()
356 return vif; in wil_vif_alloc()
362 struct wil6210_vif *vif; in wil_if_alloc() local
379 vif = wil_vif_alloc(wil, "wlan%d", NET_NAME_UNKNOWN, in wil_if_alloc()
381 if (IS_ERR(vif)) { in wil_if_alloc()
387 wil->radio_wdev = vif_to_wdev(vif); in wil_if_alloc()
418 int wil_vif_add(struct wil6210_priv *wil, struct wil6210_vif *vif) in wil_vif_add() argument
420 struct net_device *ndev = vif_to_ndev(vif); in wil_vif_add()
421 struct wireless_dev *wdev = vif_to_wdev(vif); in wil_vif_add()
427 if (wil->vifs[vif->mid]) { in wil_vif_add()
429 vif->mid); in wil_vif_add()
432 if (any_active && vif->mid != 0) { in wil_vif_add()
433 rc = wmi_port_allocate(wil, vif->mid, ndev->dev_addr, in wil_vif_add()
441 if (any_active && vif->mid != 0) in wil_vif_add()
442 wmi_port_delete(wil, vif->mid); in wil_vif_add()
446 wil->vifs[vif->mid] = vif; in wil_vif_add()
454 struct wil6210_vif *vif = ndev_to_vif(ndev); in wil_if_add() local
484 wil_update_net_queues_bh(wil, vif, NULL, true); in wil_if_add()
487 rc = wil_vif_add(wil, vif); in wil_if_add()
501 struct wil6210_vif *vif; in wil_vif_remove() local
511 vif = wil->vifs[mid]; in wil_vif_remove()
512 if (!vif) { in wil_vif_remove()
518 wil6210_disconnect(vif, NULL, WLAN_REASON_DEAUTH_LEAVING); in wil_vif_remove()
521 ndev = vif_to_ndev(vif); in wil_vif_remove()
527 if (any_active && vif->mid != 0) in wil_vif_remove()
528 wmi_port_delete(wil, vif->mid); in wil_vif_remove()
542 del_timer_sync(&vif->connect_timer); in wil_vif_remove()
543 cancel_work_sync(&vif->disconnect_worker); in wil_vif_remove()
544 wil_probe_client_flush(vif); in wil_vif_remove()
545 cancel_work_sync(&vif->probe_client_worker); in wil_vif_remove()
546 cancel_work_sync(&vif->enable_tx_key_worker); in wil_vif_remove()