5 #include <linux/sched.h>
7 #include <linux/module.h>
12 static void load_next_firmware_from_table(
struct lbs_private *
private);
19 lbs_deb_fw(
"firmware load complete, code %d\n", ret);
30 static void do_load_firmware(
struct lbs_private *priv,
const char *
name,
39 lbs_deb_fw(
"request_firmware_nowait error %d\n", ret);
40 lbs_fw_loaded(priv, ret,
NULL,
NULL);
50 load_next_firmware_from_table(priv);
55 lbs_fw_loaded(priv, 0, priv->
helper_fw, firmware);
58 static void helper_firmware_cb(
const struct firmware *firmware,
void *context)
64 load_next_firmware_from_table(priv);
71 do_load_firmware(priv, priv->
fw_iter->fwname, main_firmware_cb);
74 lbs_fw_loaded(priv, 0, firmware,
NULL);
78 static void load_next_firmware_from_table(
struct lbs_private *priv)
105 do_load_firmware(priv, iter->
helper, helper_firmware_cb);
133 lbs_deb_fw(
"firmware load already in progress\n");
146 load_next_firmware_from_table(priv);
168 const struct firmware **helper,
169 const struct firmware **mainfw)
179 while (iter && iter->
helper) {
180 if (iter->
model != card_model)
183 if (*helper ==
NULL) {
196 if (*mainfw ==
NULL) {
207 if (*helper && *mainfw)