Lines Matching refs:fwvid
60 static int brcmf_fwvid_request_module(enum brcmf_fwvendor fwvid) in brcmf_fwvid_request_module() argument
64 if (!fwvid_list[fwvid].vmod) { in brcmf_fwvid_request_module()
65 struct completion *reg_done = &fwvid_list[fwvid].reg_done; in brcmf_fwvid_request_module()
69 ret = request_module("brcmfmac-%s", fwvid_list[fwvid].name); in brcmf_fwvid_request_module()
82 brcmf_err("mod=%s: failed %d\n", fwvid_list[fwvid].name, ret); in brcmf_fwvid_request_module()
86 int brcmf_fwvid_register_vendor(enum brcmf_fwvendor fwvid, struct module *vmod, in brcmf_fwvid_register_vendor() argument
89 if (fwvid >= BRCMF_FWVENDOR_NUM) in brcmf_fwvid_register_vendor()
96 if (WARN_ON(fwvid_list[fwvid].vmod)) in brcmf_fwvid_register_vendor()
99 brcmf_dbg(TRACE, "mod=%s: enter\n", fwvid_list[fwvid].name); in brcmf_fwvid_register_vendor()
103 fwvid_list[fwvid].vmod = vmod; in brcmf_fwvid_register_vendor()
104 fwvid_list[fwvid].vops = vops; in brcmf_fwvid_register_vendor()
108 complete_all(&fwvid_list[fwvid].reg_done); in brcmf_fwvid_register_vendor()
114 int brcmf_fwvid_unregister_vendor(enum brcmf_fwvendor fwvid, struct module *mod) in brcmf_fwvid_unregister_vendor() argument
118 if (fwvid >= BRCMF_FWVENDOR_NUM) in brcmf_fwvid_unregister_vendor()
121 if (WARN_ON(fwvid_list[fwvid].vmod != mod)) in brcmf_fwvid_unregister_vendor()
126 list_for_each_entry_safe(bus, tmp, &fwvid_list[fwvid].drvr_list, list) { in brcmf_fwvid_unregister_vendor()
129 brcmf_dbg(INFO, "mod=%s: removing %s\n", fwvid_list[fwvid].name, in brcmf_fwvid_unregister_vendor()
136 fwvid_list[fwvid].vmod = NULL; in brcmf_fwvid_unregister_vendor()
137 fwvid_list[fwvid].vops = NULL; in brcmf_fwvid_unregister_vendor()
138 reinit_completion(&fwvid_list[fwvid].reg_done); in brcmf_fwvid_unregister_vendor()
140 brcmf_dbg(TRACE, "mod=%s: exit\n", fwvid_list[fwvid].name); in brcmf_fwvid_unregister_vendor()
147 static inline int brcmf_fwvid_request_module(enum brcmf_fwvendor fwvid) in brcmf_fwvid_request_module() argument
155 enum brcmf_fwvendor fwvid = drvr->bus_if->fwvid; in brcmf_fwvid_attach() local
158 if (fwvid >= ARRAY_SIZE(fwvid_list)) in brcmf_fwvid_attach()
161 brcmf_dbg(TRACE, "mod=%s: enter: dev %s\n", fwvid_list[fwvid].name, in brcmf_fwvid_attach()
166 ret = brcmf_fwvid_request_module(fwvid); in brcmf_fwvid_attach()
170 drvr->vops = fwvid_list[fwvid].vops; in brcmf_fwvid_attach()
171 list_add(&drvr->bus_if->list, &fwvid_list[fwvid].drvr_list); in brcmf_fwvid_attach()
180 enum brcmf_fwvendor fwvid = drvr->bus_if->fwvid; in brcmf_fwvid_detach() local
182 if (fwvid >= ARRAY_SIZE(fwvid_list)) in brcmf_fwvid_detach()
185 brcmf_dbg(TRACE, "mod=%s: enter: dev %s\n", fwvid_list[fwvid].name, in brcmf_fwvid_detach()
199 return fwvid_list[drvr->bus_if->fwvid].name; in brcmf_fwvid_vendor_name()