aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-05-28 17:36:04 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-06-03 14:05:11 -0400
commitc768b58d62d3106f0f670d35d1e7820c14ba769a (patch)
tree66e67ac973cc4508cea81ea7939c514d10e9bc30 /drivers
parent546256fbd06d70a87381020ea8553fb78c9abf43 (diff)
ar9170: add support for 1-stage firmware
You can get the stage 1 firmware from here: http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170/ar9170.fw md5sum: 34feec4ec0eae3bb92c7c1ea2dfb4530 sha1sum: 6e5250498b815c2940d97242de31e054ae44e079 Its license: http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170/LICENSE This is a new firmware, tested with WNDA3100. Cc: Peter Grabienski <Peter.Grabienski@Atheros.com> Cc: Stephen Chen <Stephen.Chen@Atheros.com> Cc: Michael Fortin <Michael.Fortin@Atheros.com> Cc: Johnny Cheng <Johnny.Cheng@Atheros.com> Cc: Yuan-Gu Wei <Yuan-Gu.Wei@atheros.com> Cc: Joerg Albert <jal2@gmx.de> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ar9170/usb.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c
index d7c13c0177ca..3c97c0985e2a 100644
--- a/drivers/net/wireless/ath/ar9170/usb.c
+++ b/drivers/net/wireless/ath/ar9170/usb.c
@@ -51,6 +51,7 @@ MODULE_AUTHOR("Johannes Berg <johannes@sipsolutions.net>");
51MODULE_AUTHOR("Christian Lamparter <chunkeey@web.de>"); 51MODULE_AUTHOR("Christian Lamparter <chunkeey@web.de>");
52MODULE_LICENSE("GPL"); 52MODULE_LICENSE("GPL");
53MODULE_DESCRIPTION("Atheros AR9170 802.11n USB wireless"); 53MODULE_DESCRIPTION("Atheros AR9170 802.11n USB wireless");
54MODULE_FIRMWARE("ar9170.fw");
54MODULE_FIRMWARE("ar9170-1.fw"); 55MODULE_FIRMWARE("ar9170-1.fw");
55MODULE_FIRMWARE("ar9170-2.fw"); 56MODULE_FIRMWARE("ar9170-2.fw");
56 57
@@ -504,17 +505,23 @@ static int ar9170_usb_request_firmware(struct ar9170_usb *aru)
504{ 505{
505 int err = 0; 506 int err = 0;
506 507
507 err = request_firmware(&aru->init_values, "ar9170-1.fw", 508 err = request_firmware(&aru->firmware, "ar9170.fw",
508 &aru->udev->dev); 509 &aru->udev->dev);
509 if (err) { 510 if (!err) {
510 dev_err(&aru->udev->dev, "file with init values not found.\n"); 511 aru->init_values = NULL;
511 return err; 512 return 0;
512 } 513 }
513 514
515 dev_err(&aru->udev->dev, "ar9170.fw firmware file "
516 "not found, trying old firmware...\n");
517
518 err = request_firmware(&aru->init_values, "ar9170-1.fw",
519 &aru->udev->dev);
520
514 err = request_firmware(&aru->firmware, "ar9170-2.fw", &aru->udev->dev); 521 err = request_firmware(&aru->firmware, "ar9170-2.fw", &aru->udev->dev);
515 if (err) { 522 if (err) {
516 release_firmware(aru->init_values); 523 release_firmware(aru->init_values);
517 dev_err(&aru->udev->dev, "firmware file not found.\n"); 524 dev_err(&aru->udev->dev, "file with init values not found.\n");
518 return err; 525 return err;
519 } 526 }
520 527
@@ -548,6 +555,9 @@ static int ar9170_usb_upload_firmware(struct ar9170_usb *aru)
548{ 555{
549 int err; 556 int err;
550 557
558 if (!aru->init_values)
559 goto upload_fw_start;
560
551 /* First, upload initial values to device RAM */ 561 /* First, upload initial values to device RAM */
552 err = ar9170_usb_upload(aru, aru->init_values->data, 562 err = ar9170_usb_upload(aru, aru->init_values->data,
553 aru->init_values->size, 0x102800, false); 563 aru->init_values->size, 0x102800, false);
@@ -557,6 +567,8 @@ static int ar9170_usb_upload_firmware(struct ar9170_usb *aru)
557 return err; 567 return err;
558 } 568 }
559 569
570upload_fw_start:
571
560 /* Then, upload the firmware itself and start it */ 572 /* Then, upload the firmware itself and start it */
561 return ar9170_usb_upload(aru, aru->firmware->data, aru->firmware->size, 573 return ar9170_usb_upload(aru, aru->firmware->data, aru->firmware->size,
562 0x200000, true); 574 0x200000, true);