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()
30 static int wil_stop(struct net_device *ndev) in wil_stop() argument
32 struct wil6210_priv *wil = ndev_to_wil(ndev); in wil_stop()
39 static int wil_change_mtu(struct net_device *ndev, int new_mtu) in wil_change_mtu() argument
41 struct wil6210_priv *wil = ndev_to_wil(ndev); in wil_change_mtu()
48 wil_dbg_misc(wil, "change MTU %d -> %d\n", ndev->mtu, new_mtu); in wil_change_mtu()
49 ndev->mtu = new_mtu; in wil_change_mtu()
54 static int wil_do_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd) in wil_do_ioctl() argument
56 struct wil6210_priv *wil = ndev_to_wil(ndev); in wil_do_ioctl()
132 struct net_device *ndev; in wil_if_alloc() local
161 ndev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, wil_dev_setup); in wil_if_alloc()
162 if (!ndev) { in wil_if_alloc()
168 ndev->netdev_ops = &wil_netdev_ops; in wil_if_alloc()
169 wil_set_ethtoolops(ndev); in wil_if_alloc()
170 ndev->ieee80211_ptr = wdev; in wil_if_alloc()
171 ndev->hw_features = NETIF_F_HW_CSUM | NETIF_F_RXCSUM | in wil_if_alloc()
173 ndev->features |= ndev->hw_features; in wil_if_alloc()
174 SET_NETDEV_DEV(ndev, wiphy_dev(wdev->wiphy)); in wil_if_alloc()
175 wdev->netdev = ndev; in wil_if_alloc()
177 netif_napi_add(ndev, &wil->napi_rx, wil6210_netdev_poll_rx, in wil_if_alloc()
179 netif_napi_add(ndev, &wil->napi_tx, wil6210_netdev_poll_tx, in wil_if_alloc()
182 netif_tx_stop_all_queues(ndev); in wil_if_alloc()
197 struct net_device *ndev = wil_to_ndev(wil); in wil_if_free() local
201 if (!ndev) in wil_if_free()
207 free_netdev(ndev); in wil_if_free()
214 struct net_device *ndev = wil_to_ndev(wil); in wil_if_add() local
219 rc = register_netdev(ndev); in wil_if_add()
221 dev_err(&ndev->dev, "Failed to register netdev: %d\n", rc); in wil_if_add()
230 struct net_device *ndev = wil_to_ndev(wil); in wil_if_remove() local
234 unregister_netdev(ndev); in wil_if_remove()