Lines Matching refs:netdev
40 static int ipa_open(struct net_device *netdev) in ipa_open() argument
42 struct ipa_priv *priv = netdev_priv(netdev); in ipa_open()
53 netif_start_queue(netdev); in ipa_open()
64 static int ipa_stop(struct net_device *netdev) in ipa_stop() argument
66 struct ipa_priv *priv = netdev_priv(netdev); in ipa_stop()
69 netif_stop_queue(netdev); in ipa_stop()
85 static int ipa_start_xmit(struct sk_buff *skb, struct net_device *netdev) in ipa_start_xmit() argument
87 struct net_device_stats *stats = &netdev->stats; in ipa_start_xmit()
88 struct ipa_priv *priv = netdev_priv(netdev); in ipa_start_xmit()
120 void ipa_modem_skb_rx(struct net_device *netdev, struct sk_buff *skb) in ipa_modem_skb_rx() argument
122 struct net_device_stats *stats = &netdev->stats; in ipa_modem_skb_rx()
125 skb->dev = netdev; in ipa_modem_skb_rx()
143 static void ipa_modem_netdev_setup(struct net_device *netdev) in ipa_modem_netdev_setup() argument
145 netdev->netdev_ops = &ipa_modem_ops; in ipa_modem_netdev_setup()
146 ether_setup(netdev); in ipa_modem_netdev_setup()
148 netdev->header_ops = NULL; in ipa_modem_netdev_setup()
149 netdev->type = ARPHRD_RAWIP; in ipa_modem_netdev_setup()
150 netdev->hard_header_len = 0; in ipa_modem_netdev_setup()
151 netdev->max_mtu = IPA_MTU; in ipa_modem_netdev_setup()
152 netdev->mtu = netdev->max_mtu; in ipa_modem_netdev_setup()
153 netdev->addr_len = 0; in ipa_modem_netdev_setup()
154 netdev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST); in ipa_modem_netdev_setup()
156 netdev->needed_headroom = sizeof(struct rmnet_map_header); in ipa_modem_netdev_setup()
157 netdev->needed_tailroom = IPA_NETDEV_TAILROOM; in ipa_modem_netdev_setup()
158 netdev->watchdog_timeo = IPA_NETDEV_TIMEOUT * HZ; in ipa_modem_netdev_setup()
159 netdev->hw_features = NETIF_F_SG; in ipa_modem_netdev_setup()
167 void ipa_modem_suspend(struct net_device *netdev) in ipa_modem_suspend() argument
169 struct ipa_priv *priv = netdev_priv(netdev); in ipa_modem_suspend()
172 netif_stop_queue(netdev); in ipa_modem_suspend()
183 void ipa_modem_resume(struct net_device *netdev) in ipa_modem_resume() argument
185 struct ipa_priv *priv = netdev_priv(netdev); in ipa_modem_resume()
191 netif_wake_queue(netdev); in ipa_modem_resume()
197 struct net_device *netdev; in ipa_modem_start() local
209 netdev = alloc_netdev(sizeof(struct ipa_priv), IPA_NETDEV_NAME, in ipa_modem_start()
211 if (!netdev) { in ipa_modem_start()
216 ipa->name_map[IPA_ENDPOINT_AP_MODEM_TX]->netdev = netdev; in ipa_modem_start()
217 ipa->name_map[IPA_ENDPOINT_AP_MODEM_RX]->netdev = netdev; in ipa_modem_start()
219 priv = netdev_priv(netdev); in ipa_modem_start()
222 ret = register_netdev(netdev); in ipa_modem_start()
224 free_netdev(netdev); in ipa_modem_start()
226 ipa->modem_netdev = netdev; in ipa_modem_start()
240 struct net_device *netdev = ipa->modem_netdev; in ipa_modem_stop() local
259 if (netdev) { in ipa_modem_stop()
261 ret = ipa_stop(netdev); in ipa_modem_stop()
266 unregister_netdev(netdev); in ipa_modem_stop()
267 free_netdev(netdev); in ipa_modem_stop()