• Home
  • Raw
  • Download

Lines Matching refs:priv

59 	struct chnl_net *priv;  in chnl_recv_cb()  local
64 priv = container_of(layr, struct chnl_net, chnl); in chnl_recv_cb()
74 skb->dev = priv->netdev; in chnl_recv_cb()
92 priv->netdev->stats.rx_errors++; in chnl_recv_cb()
97 if (priv->conn_req.protocol == CAIFPROTO_DATAGRAM_LOOP) in chnl_recv_cb()
105 priv->netdev->stats.rx_packets++; in chnl_recv_cb()
106 priv->netdev->stats.rx_bytes += pktlen; in chnl_recv_cb()
137 struct chnl_net *priv = container_of(lyr, struct chnl_net, chnl); in chnl_hold() local
138 dev_hold(priv->netdev); in chnl_hold()
143 struct chnl_net *priv = container_of(lyr, struct chnl_net, chnl); in chnl_put() local
144 dev_put(priv->netdev); in chnl_put()
150 struct chnl_net *priv = container_of(layr, struct chnl_net, chnl); in chnl_flowctrl_cb() local
164 priv->flowenabled = false; in chnl_flowctrl_cb()
165 netif_stop_queue(priv->netdev); in chnl_flowctrl_cb()
168 priv->state = CAIF_DISCONNECTED; in chnl_flowctrl_cb()
171 priv->state = CAIF_DISCONNECTED; in chnl_flowctrl_cb()
172 wake_up_interruptible(&priv->netmgmt_wq); in chnl_flowctrl_cb()
175 priv->state = CAIF_SHUTDOWN; in chnl_flowctrl_cb()
176 netif_tx_disable(priv->netdev); in chnl_flowctrl_cb()
180 priv->flowenabled = true; in chnl_flowctrl_cb()
181 netif_wake_queue(priv->netdev); in chnl_flowctrl_cb()
184 caif_client_register_refcnt(&priv->chnl, chnl_hold, chnl_put); in chnl_flowctrl_cb()
185 priv->state = CAIF_CONNECTED; in chnl_flowctrl_cb()
186 priv->flowenabled = true; in chnl_flowctrl_cb()
187 netif_wake_queue(priv->netdev); in chnl_flowctrl_cb()
188 wake_up_interruptible(&priv->netmgmt_wq); in chnl_flowctrl_cb()
198 struct chnl_net *priv; in chnl_net_start_xmit() local
203 priv = netdev_priv(dev); in chnl_net_start_xmit()
205 if (skb->len > priv->netdev->mtu) { in chnl_net_start_xmit()
212 if (!priv->flowenabled) { in chnl_net_start_xmit()
219 if (priv->conn_req.protocol == CAIFPROTO_DATAGRAM_LOOP) in chnl_net_start_xmit()
228 result = priv->chnl.dn->transmit(priv->chnl.dn, pkt); in chnl_net_start_xmit()
243 struct chnl_net *priv = NULL; in chnl_net_open() local
248 priv = netdev_priv(dev); in chnl_net_open()
249 if (!priv) { in chnl_net_open()
254 if (priv->state != CAIF_CONNECTING) { in chnl_net_open()
255 priv->state = CAIF_CONNECTING; in chnl_net_open()
256 result = caif_connect_client(dev_net(dev), &priv->conn_req, in chnl_net_open()
257 &priv->chnl, &llifindex, in chnl_net_open()
299 result = wait_event_interruptible_timeout(priv->netmgmt_wq, in chnl_net_open()
300 priv->state != CAIF_CONNECTING, in chnl_net_open()
317 if (priv->state != CAIF_CONNECTED) { in chnl_net_open()
326 caif_disconnect_client(dev_net(dev), &priv->chnl); in chnl_net_open()
327 priv->state = CAIF_DISCONNECTED; in chnl_net_open()
335 struct chnl_net *priv; in chnl_net_stop() local
338 priv = netdev_priv(dev); in chnl_net_stop()
339 priv->state = CAIF_DISCONNECTED; in chnl_net_stop()
340 caif_disconnect_client(dev_net(dev), &priv->chnl); in chnl_net_stop()
346 struct chnl_net *priv; in chnl_net_init() local
348 priv = netdev_priv(dev); in chnl_net_init()
349 strncpy(priv->name, dev->name, sizeof(priv->name)); in chnl_net_init()
350 INIT_LIST_HEAD(&priv->list_field); in chnl_net_init()
356 struct chnl_net *priv; in chnl_net_uninit() local
358 priv = netdev_priv(dev); in chnl_net_uninit()
359 list_del_init(&priv->list_field); in chnl_net_uninit()
372 struct chnl_net *priv = netdev_priv(dev); in chnl_net_destructor() local
373 caif_free_client(&priv->chnl); in chnl_net_destructor()
378 struct chnl_net *priv; in ipcaif_net_setup() local
387 priv = netdev_priv(dev); in ipcaif_net_setup()
388 priv->chnl.receive = chnl_recv_cb; in ipcaif_net_setup()
389 priv->chnl.ctrlcmd = chnl_flowctrl_cb; in ipcaif_net_setup()
390 priv->netdev = dev; in ipcaif_net_setup()
391 priv->conn_req.protocol = CAIFPROTO_DATAGRAM; in ipcaif_net_setup()
392 priv->conn_req.link_selector = CAIF_LINK_HIGH_BANDW; in ipcaif_net_setup()
393 priv->conn_req.priority = CAIF_PRIO_LOW; in ipcaif_net_setup()
395 priv->conn_req.sockaddr.u.dgm.connection_id = UNDEF_CONNID; in ipcaif_net_setup()
396 priv->flowenabled = false; in ipcaif_net_setup()
398 init_waitqueue_head(&priv->netmgmt_wq); in ipcaif_net_setup()
404 struct chnl_net *priv; in ipcaif_fill_info() local
406 priv = netdev_priv(dev); in ipcaif_fill_info()
408 priv->conn_req.sockaddr.u.dgm.connection_id) || in ipcaif_fill_info()
410 priv->conn_req.sockaddr.u.dgm.connection_id)) in ipcaif_fill_info()
412 loop = priv->conn_req.protocol == CAIFPROTO_DATAGRAM_LOOP; in ipcaif_fill_info()