Lines Matching defs:ndev
13 struct net_device *ndev, bool up, bool ok)
23 if (ndev_i != ndev)
35 /* use NULL ndev argument to check all interfaces */
39 static int wil_open(struct net_device *ndev)
41 struct wil6210_priv *wil = ndev_to_wil(ndev);
52 if (!wil_has_other_active_ifaces(wil, ndev, true, false)) {
66 static int wil_stop(struct net_device *ndev)
68 struct wil6210_priv *wil = ndev_to_wil(ndev);
73 if (!wil_has_other_active_ifaces(wil, ndev, true, false)) {
215 struct net_device *ndev = vif_to_ndev(vif);
218 free_netdev(ndev);
221 static void wil_ndev_destructor(struct net_device *ndev)
223 struct wil6210_vif *vif = ndev_to_vif(ndev);
301 struct net_device *ndev;
312 ndev = alloc_netdev(sizeof(*vif), name, name_assign_type,
314 if (!ndev) {
319 wil->main_ndev = ndev;
321 ndev->priv_destructor = wil_ndev_destructor;
322 ndev->needs_free_netdev = true;
325 vif = ndev_to_vif(ndev);
326 vif->ndev = ndev;
335 ndev->netdev_ops = &wil_netdev_ops;
336 wil_set_ethtoolops(ndev);
337 ndev->ieee80211_ptr = wdev;
338 ndev->hw_features = NETIF_F_HW_CSUM | NETIF_F_RXCSUM |
342 ndev->features |= ndev->hw_features;
343 SET_NETDEV_DEV(ndev, wiphy_dev(wdev->wiphy));
344 wdev->netdev = ndev;
391 struct net_device *ndev = wil->main_ndev;
395 if (!ndev)
401 wil_ndev_destructor(ndev);
402 free_netdev(ndev);
409 struct net_device *ndev = vif_to_ndev(vif);
417 dev_err(&ndev->dev, "VIF with mid %d already in use\n",
422 rc = wmi_port_allocate(wil, vif->mid, ndev->dev_addr,
427 rc = cfg80211_register_netdevice(ndev);
429 dev_err(&ndev->dev, "Failed to register netdev: %d\n", rc);
442 struct net_device *ndev = wil->main_ndev;
443 struct wil6210_vif *vif = ndev_to_vif(ndev);
489 struct net_device *ndev;
508 ndev = vif_to_ndev(vif);
512 cfg80211_unregister_netdevice(ndev);
534 /* for VIFs, ndev will be freed by destructor after RTNL is unlocked.
542 struct net_device *ndev = wil->main_ndev;
543 struct wireless_dev *wdev = ndev->ieee80211_ptr;