Lines Matching refs:drvr
99 struct brcmf_fws_info *drvr_to_fws(struct brcmf_pub *drvr) in drvr_to_fws() argument
101 struct brcmf_bcdc *bcdc = drvr->proto->pd; in drvr_to_fws()
107 brcmf_proto_bcdc_msg(struct brcmf_pub *drvr, int ifidx, uint cmd, void *buf, in brcmf_proto_bcdc_msg() argument
110 struct brcmf_bcdc *bcdc = (struct brcmf_bcdc *)drvr->proto->pd; in brcmf_proto_bcdc_msg()
135 return brcmf_bus_txctl(drvr->bus_if, (unsigned char *)&bcdc->msg, len); in brcmf_proto_bcdc_msg()
138 static int brcmf_proto_bcdc_cmplt(struct brcmf_pub *drvr, u32 id, u32 len) in brcmf_proto_bcdc_cmplt() argument
141 struct brcmf_bcdc *bcdc = (struct brcmf_bcdc *)drvr->proto->pd; in brcmf_proto_bcdc_cmplt()
146 ret = brcmf_bus_rxctl(drvr->bus_if, (unsigned char *)&bcdc->msg, in brcmf_proto_bcdc_cmplt()
156 brcmf_proto_bcdc_query_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd, in brcmf_proto_bcdc_query_dcmd() argument
159 struct brcmf_bcdc *bcdc = (struct brcmf_bcdc *)drvr->proto->pd; in brcmf_proto_bcdc_query_dcmd()
168 ret = brcmf_proto_bcdc_msg(drvr, ifidx, cmd, buf, len, false); in brcmf_proto_bcdc_query_dcmd()
170 bphy_err(drvr, "brcmf_proto_bcdc_msg failed w/status %d\n", in brcmf_proto_bcdc_query_dcmd()
177 ret = brcmf_proto_bcdc_cmplt(drvr, bcdc->reqid, len); in brcmf_proto_bcdc_query_dcmd()
187 bphy_err(drvr, "%s: unexpected request id %d (expected %d)\n", in brcmf_proto_bcdc_query_dcmd()
188 brcmf_ifname(brcmf_get_ifp(drvr, ifidx)), id, in brcmf_proto_bcdc_query_dcmd()
214 brcmf_proto_bcdc_set_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd, in brcmf_proto_bcdc_set_dcmd() argument
217 struct brcmf_bcdc *bcdc = (struct brcmf_bcdc *)drvr->proto->pd; in brcmf_proto_bcdc_set_dcmd()
225 ret = brcmf_proto_bcdc_msg(drvr, ifidx, cmd, buf, len, true); in brcmf_proto_bcdc_set_dcmd()
229 ret = brcmf_proto_bcdc_cmplt(drvr, bcdc->reqid, len); in brcmf_proto_bcdc_set_dcmd()
237 bphy_err(drvr, "%s: unexpected request id %d (expected %d)\n", in brcmf_proto_bcdc_set_dcmd()
238 brcmf_ifname(brcmf_get_ifp(drvr, ifidx)), id, in brcmf_proto_bcdc_set_dcmd()
255 brcmf_proto_bcdc_hdrpush(struct brcmf_pub *drvr, int ifidx, u8 offset, in brcmf_proto_bcdc_hdrpush() argument
279 brcmf_proto_bcdc_hdrpull(struct brcmf_pub *drvr, bool do_fws, in brcmf_proto_bcdc_hdrpull() argument
297 tmp_if = brcmf_get_ifp(drvr, BCDC_GET_IF_IDX(h)); in brcmf_proto_bcdc_hdrpull()
304 bphy_err(drvr, "%s: non-BCDC packet received, flags 0x%x\n", in brcmf_proto_bcdc_hdrpull()
331 static int brcmf_proto_bcdc_tx_queue_data(struct brcmf_pub *drvr, int ifidx, in brcmf_proto_bcdc_tx_queue_data() argument
334 struct brcmf_if *ifp = brcmf_get_ifp(drvr, ifidx); in brcmf_proto_bcdc_tx_queue_data()
335 struct brcmf_bcdc *bcdc = drvr->proto->pd; in brcmf_proto_bcdc_tx_queue_data()
338 return brcmf_proto_txdata(drvr, ifidx, 0, skb); in brcmf_proto_bcdc_tx_queue_data()
344 brcmf_proto_bcdc_txdata(struct brcmf_pub *drvr, int ifidx, u8 offset, in brcmf_proto_bcdc_txdata() argument
347 brcmf_proto_bcdc_hdrpush(drvr, ifidx, offset, pktbuf); in brcmf_proto_bcdc_txdata()
348 return brcmf_bus_txdata(drvr->bus_if, pktbuf); in brcmf_proto_bcdc_txdata()
354 struct brcmf_pub *drvr = bus_if->drvr; in brcmf_proto_bcdc_txflowblock() local
358 brcmf_fws_bus_blocked(drvr, state); in brcmf_proto_bcdc_txflowblock()
366 struct brcmf_bcdc *bcdc = bus_if->drvr->proto->pd; in brcmf_proto_bcdc_txcomplete()
374 if (brcmf_proto_bcdc_hdrpull(bus_if->drvr, false, txp, &ifp)) in brcmf_proto_bcdc_txcomplete()
382 brcmf_proto_bcdc_configure_addr_mode(struct brcmf_pub *drvr, int ifidx, in brcmf_proto_bcdc_configure_addr_mode() argument
388 brcmf_proto_bcdc_delete_peer(struct brcmf_pub *drvr, int ifidx, in brcmf_proto_bcdc_delete_peer() argument
394 brcmf_proto_bcdc_add_tdls_peer(struct brcmf_pub *drvr, int ifidx, in brcmf_proto_bcdc_add_tdls_peer() argument
424 brcmf_proto_bcdc_init_done(struct brcmf_pub *drvr) in brcmf_proto_bcdc_init_done() argument
426 struct brcmf_bcdc *bcdc = drvr->proto->pd; in brcmf_proto_bcdc_init_done()
429 fws = brcmf_fws_attach(drvr); in brcmf_proto_bcdc_init_done()
437 static void brcmf_proto_bcdc_debugfs_create(struct brcmf_pub *drvr) in brcmf_proto_bcdc_debugfs_create() argument
439 brcmf_fws_debugfs_create(drvr); in brcmf_proto_bcdc_debugfs_create()
442 int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr) in brcmf_proto_bcdc_attach() argument
452 bphy_err(drvr, "struct brcmf_proto_bcdc is not correctly defined\n"); in brcmf_proto_bcdc_attach()
456 drvr->proto->hdrpull = brcmf_proto_bcdc_hdrpull; in brcmf_proto_bcdc_attach()
457 drvr->proto->query_dcmd = brcmf_proto_bcdc_query_dcmd; in brcmf_proto_bcdc_attach()
458 drvr->proto->set_dcmd = brcmf_proto_bcdc_set_dcmd; in brcmf_proto_bcdc_attach()
459 drvr->proto->tx_queue_data = brcmf_proto_bcdc_tx_queue_data; in brcmf_proto_bcdc_attach()
460 drvr->proto->txdata = brcmf_proto_bcdc_txdata; in brcmf_proto_bcdc_attach()
461 drvr->proto->configure_addr_mode = brcmf_proto_bcdc_configure_addr_mode; in brcmf_proto_bcdc_attach()
462 drvr->proto->delete_peer = brcmf_proto_bcdc_delete_peer; in brcmf_proto_bcdc_attach()
463 drvr->proto->add_tdls_peer = brcmf_proto_bcdc_add_tdls_peer; in brcmf_proto_bcdc_attach()
464 drvr->proto->rxreorder = brcmf_proto_bcdc_rxreorder; in brcmf_proto_bcdc_attach()
465 drvr->proto->add_if = brcmf_proto_bcdc_add_if; in brcmf_proto_bcdc_attach()
466 drvr->proto->del_if = brcmf_proto_bcdc_del_if; in brcmf_proto_bcdc_attach()
467 drvr->proto->reset_if = brcmf_proto_bcdc_reset_if; in brcmf_proto_bcdc_attach()
468 drvr->proto->init_done = brcmf_proto_bcdc_init_done; in brcmf_proto_bcdc_attach()
469 drvr->proto->debugfs_create = brcmf_proto_bcdc_debugfs_create; in brcmf_proto_bcdc_attach()
470 drvr->proto->pd = bcdc; in brcmf_proto_bcdc_attach()
472 drvr->hdrlen += BCDC_HEADER_LEN + BRCMF_PROT_FW_SIGNAL_MAX_TXBYTES; in brcmf_proto_bcdc_attach()
473 drvr->bus_if->maxctl = BRCMF_DCMD_MAXLEN + in brcmf_proto_bcdc_attach()
482 void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr) in brcmf_proto_bcdc_detach() argument
484 struct brcmf_bcdc *bcdc = drvr->proto->pd; in brcmf_proto_bcdc_detach()
486 drvr->proto->pd = NULL; in brcmf_proto_bcdc_detach()