summaryrefslogtreecommitdiffstats
path: root/package/rt2x00/src/rt2x00firmware.c
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-08-07 09:12:49 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-08-07 09:12:49 +0000
commite141a9231dc8a20e7ba6e2dd0b29b4f1082ed094 (patch)
tree704340b18ee1594a3af47d6d525c3473edc42572 /package/rt2x00/src/rt2x00firmware.c
parent96455c222d2b7bc4033fc43ffd0411684faba4fc (diff)
Upgrade rt2x00 to a more recent snapshot, master mode now working, thanks to Daniel Gimpelevich
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8367 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/rt2x00/src/rt2x00firmware.c')
-rw-r--r--package/rt2x00/src/rt2x00firmware.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/package/rt2x00/src/rt2x00firmware.c b/package/rt2x00/src/rt2x00firmware.c
index 3aef1073d..4c1ce4cdb 100644
--- a/package/rt2x00/src/rt2x00firmware.c
+++ b/package/rt2x00/src/rt2x00firmware.c
@@ -29,10 +29,12 @@
*/
#define DRV_NAME "rt2x00lib"
+#include <linux/delay.h>
#include <linux/crc-itu-t.h>
#include <linux/firmware.h>
#include "rt2x00.h"
+#include "rt2x00lib.h"
#include "rt2x00firmware.h"
static void rt2x00lib_load_firmware_continued(const struct firmware *fw,
@@ -90,12 +92,17 @@ int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev)
* Read correct firmware from harddisk.
*/
fw_name = rt2x00dev->ops->lib->get_fw_name(rt2x00dev);
- BUG_ON(fw_name == NULL);
+ if (!fw_name) {
+ ERROR(rt2x00dev,
+ "Invalid firmware filename.\n"
+ "Please file bug report to %s.\n", DRV_PROJECT);
+ return -EINVAL;
+ }
INFO(rt2x00dev, "Loading firmware file '%s'.\n", fw_name);
status = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG,
- fw_name, rt2x00dev->device, rt2x00dev,
+ fw_name, wiphy_dev(rt2x00dev->hw->wiphy), rt2x00dev,
&rt2x00lib_load_firmware_continued);
if (status)