Lines Matching refs:ctlb

66 	struct t7xx_ccmni_ctrl *ctlb = ccmni->ctlb;  in t7xx_ccmni_send_packet()  local
71 if (t7xx_dpmaif_tx_send_skb(ctlb->hif_ctrl, txq_number, skb)) in t7xx_ccmni_send_packet()
115 static void t7xx_ccmni_start(struct t7xx_ccmni_ctrl *ctlb) in t7xx_ccmni_start() argument
120 for (i = 0; i < ctlb->nic_dev_num; i++) { in t7xx_ccmni_start()
121 ccmni = ctlb->ccmni_inst[i]; in t7xx_ccmni_start()
132 static void t7xx_ccmni_pre_stop(struct t7xx_ccmni_ctrl *ctlb) in t7xx_ccmni_pre_stop() argument
137 for (i = 0; i < ctlb->nic_dev_num; i++) { in t7xx_ccmni_pre_stop()
138 ccmni = ctlb->ccmni_inst[i]; in t7xx_ccmni_pre_stop()
147 static void t7xx_ccmni_post_stop(struct t7xx_ccmni_ctrl *ctlb) in t7xx_ccmni_post_stop() argument
152 for (i = 0; i < ctlb->nic_dev_num; i++) { in t7xx_ccmni_post_stop()
153 ccmni = ctlb->ccmni_inst[i]; in t7xx_ccmni_post_stop()
196 struct t7xx_ccmni_ctrl *ctlb = ctxt; in t7xx_ccmni_wwan_newlink() local
200 if (if_id >= ARRAY_SIZE(ctlb->ccmni_inst)) in t7xx_ccmni_wwan_newlink()
205 ccmni->ctlb = ctlb; in t7xx_ccmni_wwan_newlink()
208 ctlb->ccmni_inst[if_id] = ccmni; in t7xx_ccmni_wwan_newlink()
221 struct t7xx_ccmni_ctrl *ctlb = ctxt; in t7xx_ccmni_wwan_dellink() local
224 if (if_id >= ARRAY_SIZE(ctlb->ccmni_inst)) in t7xx_ccmni_wwan_dellink()
227 if (WARN_ON(ctlb->ccmni_inst[if_id] != ccmni)) in t7xx_ccmni_wwan_dellink()
240 static int t7xx_ccmni_register_wwan(struct t7xx_ccmni_ctrl *ctlb) in t7xx_ccmni_register_wwan() argument
242 struct device *dev = ctlb->hif_ctrl->dev; in t7xx_ccmni_register_wwan()
245 if (ctlb->wwan_is_registered) in t7xx_ccmni_register_wwan()
249 ret = wwan_register_ops(dev, &ccmni_wwan_ops, ctlb, IP_MUX_SESSION_DEFAULT); in t7xx_ccmni_register_wwan()
255 ctlb->wwan_is_registered = true; in t7xx_ccmni_register_wwan()
261 struct t7xx_ccmni_ctrl *ctlb = para; in t7xx_ccmni_md_state_callback() local
265 dev = ctlb->hif_ctrl->dev; in t7xx_ccmni_md_state_callback()
266 ctlb->md_sta = state; in t7xx_ccmni_md_state_callback()
270 ret = t7xx_ccmni_register_wwan(ctlb); in t7xx_ccmni_md_state_callback()
272 t7xx_ccmni_start(ctlb); in t7xx_ccmni_md_state_callback()
277 t7xx_ccmni_pre_stop(ctlb); in t7xx_ccmni_md_state_callback()
279 ret = t7xx_dpmaif_md_state_callback(ctlb->hif_ctrl, state); in t7xx_ccmni_md_state_callback()
283 t7xx_ccmni_post_stop(ctlb); in t7xx_ccmni_md_state_callback()
288 ret = t7xx_dpmaif_md_state_callback(ctlb->hif_ctrl, state); in t7xx_ccmni_md_state_callback()
303 struct t7xx_ccmni_ctrl *ctlb = t7xx_dev->ccmni_ctlb; in init_md_status_notifier() local
306 md_status_notifier = &ctlb->md_status_notify; in init_md_status_notifier()
309 md_status_notifier->data = ctlb; in init_md_status_notifier()
345 static void t7xx_ccmni_queue_tx_irq_notify(struct t7xx_ccmni_ctrl *ctlb, int qno) in t7xx_ccmni_queue_tx_irq_notify() argument
347 struct t7xx_ccmni *ccmni = ctlb->ccmni_inst[0]; in t7xx_ccmni_queue_tx_irq_notify()
357 static void t7xx_ccmni_queue_tx_full_notify(struct t7xx_ccmni_ctrl *ctlb, int qno) in t7xx_ccmni_queue_tx_full_notify() argument
359 struct t7xx_ccmni *ccmni = ctlb->ccmni_inst[0]; in t7xx_ccmni_queue_tx_full_notify()
372 struct t7xx_ccmni_ctrl *ctlb = t7xx_dev->ccmni_ctlb; in t7xx_ccmni_queue_state_notify() local
374 if (ctlb->md_sta != MD_STATE_READY) in t7xx_ccmni_queue_state_notify()
377 if (!ctlb->ccmni_inst[0]) { in t7xx_ccmni_queue_state_notify()
383 t7xx_ccmni_queue_tx_irq_notify(ctlb, qno); in t7xx_ccmni_queue_state_notify()
385 t7xx_ccmni_queue_tx_full_notify(ctlb, qno); in t7xx_ccmni_queue_state_notify()
391 struct t7xx_ccmni_ctrl *ctlb; in t7xx_ccmni_init() local
393 ctlb = devm_kzalloc(dev, sizeof(*ctlb), GFP_KERNEL); in t7xx_ccmni_init()
394 if (!ctlb) in t7xx_ccmni_init()
397 t7xx_dev->ccmni_ctlb = ctlb; in t7xx_ccmni_init()
398 ctlb->t7xx_dev = t7xx_dev; in t7xx_ccmni_init()
399 ctlb->callbacks.state_notify = t7xx_ccmni_queue_state_notify; in t7xx_ccmni_init()
400 ctlb->callbacks.recv_skb = t7xx_ccmni_recv_skb; in t7xx_ccmni_init()
401 ctlb->nic_dev_num = NIC_DEV_DEFAULT; in t7xx_ccmni_init()
403 ctlb->hif_ctrl = t7xx_dpmaif_hif_init(t7xx_dev, &ctlb->callbacks); in t7xx_ccmni_init()
404 if (!ctlb->hif_ctrl) in t7xx_ccmni_init()
413 struct t7xx_ccmni_ctrl *ctlb = t7xx_dev->ccmni_ctlb; in t7xx_ccmni_exit() local
415 t7xx_fsm_notifier_unregister(t7xx_dev->md, &ctlb->md_status_notify); in t7xx_ccmni_exit()
417 if (ctlb->wwan_is_registered) { in t7xx_ccmni_exit()
419 ctlb->wwan_is_registered = false; in t7xx_ccmni_exit()
422 t7xx_dpmaif_hif_exit(ctlb->hif_ctrl); in t7xx_ccmni_exit()