Lines Matching refs:ndev
21 static int wil_open(struct net_device *ndev) in wil_open() argument
23 struct wil6210_priv *wil = ndev_to_wil(ndev); in wil_open()
35 static int wil_stop(struct net_device *ndev) in wil_stop() argument
37 struct wil6210_priv *wil = ndev_to_wil(ndev); in wil_stop()
44 static int wil_change_mtu(struct net_device *ndev, int new_mtu) in wil_change_mtu() argument
46 struct wil6210_priv *wil = ndev_to_wil(ndev); in wil_change_mtu()
53 wil_dbg_misc(wil, "change MTU %d -> %d\n", ndev->mtu, new_mtu); in wil_change_mtu()
54 ndev->mtu = new_mtu; in wil_change_mtu()
59 static int wil_do_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd) in wil_do_ioctl() argument
61 struct wil6210_priv *wil = ndev_to_wil(ndev); in wil_do_ioctl()
137 struct net_device *ndev; in wil_if_alloc() local
165 ndev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, wil_dev_setup); in wil_if_alloc()
166 if (!ndev) { in wil_if_alloc()
172 ndev->netdev_ops = &wil_netdev_ops; in wil_if_alloc()
173 wil_set_ethtoolops(ndev); in wil_if_alloc()
174 ndev->ieee80211_ptr = wdev; in wil_if_alloc()
175 ndev->hw_features = NETIF_F_HW_CSUM | NETIF_F_RXCSUM | in wil_if_alloc()
180 ndev->features |= ndev->hw_features; in wil_if_alloc()
181 SET_NETDEV_DEV(ndev, wiphy_dev(wdev->wiphy)); in wil_if_alloc()
182 wdev->netdev = ndev; in wil_if_alloc()
184 netif_napi_add(ndev, &wil->napi_rx, wil6210_netdev_poll_rx, in wil_if_alloc()
186 netif_napi_add(ndev, &wil->napi_tx, wil6210_netdev_poll_tx, in wil_if_alloc()
189 netif_tx_stop_all_queues(ndev); in wil_if_alloc()
204 struct net_device *ndev = wil_to_ndev(wil); in wil_if_free() local
208 if (!ndev) in wil_if_free()
214 free_netdev(ndev); in wil_if_free()
221 struct net_device *ndev = wil_to_ndev(wil); in wil_if_add() local
226 rc = register_netdev(ndev); in wil_if_add()
228 dev_err(&ndev->dev, "Failed to register netdev: %d\n", rc); in wil_if_add()
237 struct net_device *ndev = wil_to_ndev(wil); in wil_if_remove() local
241 unregister_netdev(ndev); in wil_if_remove()