Lines Matching refs:vif

16 	struct wil6210_vif *vif;  in wil_has_other_active_ifaces()  local
20 vif = wil->vifs[i]; in wil_has_other_active_ifaces()
21 if (vif) { in wil_has_other_active_ifaces()
22 ndev_i = vif_to_ndev(vif); in wil_has_other_active_ifaces()
144 struct wil6210_vif *vif; in wil6210_netdev_poll_tx() local
150 vif = wil->vifs[txdata->mid]; in wil6210_netdev_poll_tx()
151 if (unlikely(!vif)) { in wil6210_netdev_poll_tx()
156 tx_done += wil_tx_complete(vif, i); in wil6210_netdev_poll_tx()
201 static void wil_vif_deinit(struct wil6210_vif *vif) in wil_vif_deinit() argument
203 del_timer_sync(&vif->scan_timer); in wil_vif_deinit()
204 del_timer_sync(&vif->p2p.discovery_timer); in wil_vif_deinit()
205 cancel_work_sync(&vif->disconnect_worker); in wil_vif_deinit()
206 cancel_work_sync(&vif->p2p.discovery_expired_work); in wil_vif_deinit()
207 cancel_work_sync(&vif->p2p.delayed_listen_work); in wil_vif_deinit()
208 wil_probe_client_flush(vif); in wil_vif_deinit()
209 cancel_work_sync(&vif->probe_client_worker); in wil_vif_deinit()
210 cancel_work_sync(&vif->enable_tx_key_worker); in wil_vif_deinit()
213 void wil_vif_free(struct wil6210_vif *vif) in wil_vif_free() argument
215 struct net_device *ndev = vif_to_ndev(vif); in wil_vif_free()
217 wil_vif_deinit(vif); in wil_vif_free()
223 struct wil6210_vif *vif = ndev_to_vif(ndev); in wil_ndev_destructor() local
225 wil_vif_deinit(vif); in wil_ndev_destructor()
230 struct wil6210_vif *vif = from_timer(vif, t, connect_timer); in wil_connect_timer_fn() local
231 struct wil6210_priv *wil = vif_to_wil(vif); in wil_connect_timer_fn()
240 q = queue_work(wil->wmi_wq, &vif->disconnect_worker); in wil_connect_timer_fn()
246 struct wil6210_vif *vif = from_timer(vif, t, scan_timer); in wil_scan_timer_fn() local
247 struct wil6210_priv *wil = vif_to_wil(vif); in wil_scan_timer_fn()
256 struct wil6210_vif *vif = from_timer(vif, t, p2p.discovery_timer); in wil_p2p_discovery_timer_fn() local
257 struct wil6210_priv *wil = vif_to_wil(vif); in wil_p2p_discovery_timer_fn()
261 schedule_work(&vif->p2p.discovery_expired_work); in wil_p2p_discovery_timer_fn()
264 static void wil_vif_init(struct wil6210_vif *vif) in wil_vif_init() argument
266 vif->bcast_ring = -1; in wil_vif_init()
268 mutex_init(&vif->probe_client_mutex); in wil_vif_init()
270 timer_setup(&vif->connect_timer, wil_connect_timer_fn, 0); in wil_vif_init()
271 timer_setup(&vif->scan_timer, wil_scan_timer_fn, 0); in wil_vif_init()
272 timer_setup(&vif->p2p.discovery_timer, wil_p2p_discovery_timer_fn, 0); in wil_vif_init()
274 INIT_WORK(&vif->probe_client_worker, wil_probe_client_worker); in wil_vif_init()
275 INIT_WORK(&vif->disconnect_worker, wil_disconnect_worker); in wil_vif_init()
276 INIT_WORK(&vif->p2p.discovery_expired_work, wil_p2p_listen_expired); in wil_vif_init()
277 INIT_WORK(&vif->p2p.delayed_listen_work, wil_p2p_delayed_listen_work); in wil_vif_init()
278 INIT_WORK(&vif->enable_tx_key_worker, wil_enable_tx_key_worker); in wil_vif_init()
280 INIT_LIST_HEAD(&vif->probe_client_pending); in wil_vif_init()
282 vif->net_queue_stopped = 1; in wil_vif_init()
303 struct wil6210_vif *vif; in wil_vif_alloc() local
312 ndev = alloc_netdev(sizeof(*vif), name, name_assign_type, in wil_vif_alloc()
325 vif = ndev_to_vif(ndev); in wil_vif_alloc()
326 vif->ndev = ndev; in wil_vif_alloc()
327 vif->wil = wil; in wil_vif_alloc()
328 vif->mid = mid; in wil_vif_alloc()
329 wil_vif_init(vif); in wil_vif_alloc()
331 wdev = &vif->wdev; in wil_vif_alloc()
345 return vif; in wil_vif_alloc()
351 struct wil6210_vif *vif; in wil_if_alloc() local
368 vif = wil_vif_alloc(wil, "wlan%d", NET_NAME_UNKNOWN, in wil_if_alloc()
370 if (IS_ERR(vif)) { in wil_if_alloc()
376 wil->radio_wdev = vif_to_wdev(vif); in wil_if_alloc()
407 int wil_vif_add(struct wil6210_priv *wil, struct wil6210_vif *vif) in wil_vif_add() argument
409 struct net_device *ndev = vif_to_ndev(vif); in wil_vif_add()
410 struct wireless_dev *wdev = vif_to_wdev(vif); in wil_vif_add()
416 if (wil->vifs[vif->mid]) { in wil_vif_add()
418 vif->mid); in wil_vif_add()
421 if (any_active && vif->mid != 0) { in wil_vif_add()
422 rc = wmi_port_allocate(wil, vif->mid, ndev->dev_addr, in wil_vif_add()
430 if (any_active && vif->mid != 0) in wil_vif_add()
431 wmi_port_delete(wil, vif->mid); in wil_vif_add()
435 wil->vifs[vif->mid] = vif; in wil_vif_add()
443 struct wil6210_vif *vif = ndev_to_vif(ndev); in wil_if_add() local
469 wil_update_net_queues_bh(wil, vif, NULL, true); in wil_if_add()
473 rc = wil_vif_add(wil, vif); in wil_if_add()
488 struct wil6210_vif *vif; in wil_vif_remove() local
498 vif = wil->vifs[mid]; in wil_vif_remove()
499 if (!vif) { in wil_vif_remove()
505 wil6210_disconnect(vif, NULL, WLAN_REASON_DEAUTH_LEAVING); in wil_vif_remove()
508 ndev = vif_to_ndev(vif); in wil_vif_remove()
514 if (any_active && vif->mid != 0) in wil_vif_remove()
515 wmi_port_delete(wil, vif->mid); in wil_vif_remove()
529 del_timer_sync(&vif->connect_timer); in wil_vif_remove()
530 cancel_work_sync(&vif->disconnect_worker); in wil_vif_remove()
531 wil_probe_client_flush(vif); in wil_vif_remove()
532 cancel_work_sync(&vif->probe_client_worker); in wil_vif_remove()
533 cancel_work_sync(&vif->enable_tx_key_worker); in wil_vif_remove()