|
Hello,
As attachment you will find a patch. I don't which version of the libertas driver you are using but the patch is based on linux-3.0-rc7 and it seems to be ok:
root@at91sam9g20ek:~# insmod libertas.ko root@at91sam9g20ek:~# insmod libertas_sdio.ko helper_name="helper_sd.bin" fw_nam e="sd8686.bin" [ 28.130000] libertas_sdio: Libertas SDIO driver [ 28.130000] libertas_sdio: Copyright Pierre Ossman root@at91sam9g20ek:~# [ 31.950000] mmc1: new SDIO card at address 0001 [ 31.960000] libertas_sdio mmc1:0001:1: load user helper firmware: helper_sd.bin [ 32.220000] libertas_sdio mmc1:0001:1: load user main firmware: sd8686.bin [ 33.470000] libertas_sdio mmc1:0001:1: (unregistered net_device): 00:1a:6b:93:33:27, fw 9.70.3p24, cap 0x00000303 [ 33.490000] libertas_sdio mmc1:0001:1: wlan0: Marvell WLAN 802.11 adapter
I can't explain why I need this patch, it just comes from a feeling. I am trying to get more information about the subject.
Regards,
Ludovic
edit: attachment is rejected so the path is:
commit 53ad5481c1d659da920e950f47ae25cbfc288239 Author: Ludovic Desroches <ludovic.desroches@atmel.com> Date: Tue Jul 19 15:52:26 2011 +0200
libertas: separate helper and main firmware request Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index 224e985..01e530c 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c @@ -723,7 +723,7 @@ static int if_sdio_prog_firmware(struct if_sdio_card *card) } ret = lbs_get_firmware(&card->func->dev, lbs_helper_name, lbs_fw_name, - card->model, &fw_table[0], &helper, &mainfw); + card->model, &fw_table[0], &helper, NULL); if (ret) { pr_err("failed to find firmware (%d)\n", ret); goto out; @@ -735,6 +735,10 @@ static int if_sdio_prog_firmware(struct if_sdio_card *card) lbs_deb_sdio("Helper firmware loaded\n"); + ret = lbs_get_firmware(&card->func->dev, lbs_helper_name, lbs_fw_name, + card->model, &fw_table[0], NULL, &mainfw); + + ret = if_sdio_prog_real(card, mainfw); if (ret) goto out; diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 8c40949..b35ca07 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c @@ -1075,11 +1075,9 @@ int lbs_get_firmware(struct device *dev, const char *user_helper, const struct lbs_fw_table *iter; int ret; - BUG_ON(helper == NULL); - BUG_ON(mainfw == NULL); - /* Try user-specified firmware first */ - if (user_helper) { + if (user_helper && helper) { + dev_info(dev, "load user helper firmware: %s\n", user_helper); ret = request_firmware(helper, user_helper, dev); if (ret) { dev_err(dev, "couldn't find helper firmware %s\n", @@ -1087,7 +1085,8 @@ int lbs_get_firmware(struct device *dev, const char *user_helper, goto fail; } } - if (user_mainfw) { + if (user_mainfw && mainfw) { + dev_info(dev, "load user main firmware: %s\n", user_mainfw); ret = request_firmware(mainfw, user_mainfw, dev); if (ret) { dev_err(dev, "couldn't find main firmware %s\n", @@ -1096,8 +1095,7 @@ int lbs_get_firmware(struct device *dev, const char *user_helper, } } - if (*helper && *mainfw) - return 0; + return 0; /* Otherwise search for firmware to use. If neither the helper or * the main firmware were specified by the user, then we need to
|