summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/b43/b43.h
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-01-23 21:21:51 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:01:30 -0500
commit1a9f509368ceb24fc66be961be15c69966f5eb5d (patch)
treec038db8330a52ad757ef630cbe8738e1f5afc1ca /drivers/net/wireless/b43/b43.h
parent2f47690ed42a85820783dee7f16ae47edadf8fad (diff)
b43: Automatically probe for opensource firmware
First probe for proprietary firmware and then probe for opensource firmware. This way around it's a win-win situation. 1) If proprietary fw is available, it will work. 2) If opensource firmware is available, but no proprietary (Distros can only ship open fw) it might work. 3) If both open and proprietary are available, it will work, because it selects the proprietary. We currently don't prefer the open fw in this case, because it doesn't work on all devices. It would introduce a regression otherwise. The remaining FIXMEs in this patch are harmless, because they only matter on multiband devices, which are not implemented yet anyway. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/b43.h')
-rw-r--r--drivers/net/wireless/b43/b43.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index a53c378e7484..9e0da212f8ce 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -655,10 +655,39 @@ struct b43_wl {
struct work_struct txpower_adjust_work;
};
+/* The type of the firmware file. */
+enum b43_firmware_file_type {
+ B43_FWTYPE_PROPRIETARY,
+ B43_FWTYPE_OPENSOURCE,
+ B43_NR_FWTYPES,
+};
+
+/* Context data for fetching firmware. */
+struct b43_request_fw_context {
+ /* The device we are requesting the fw for. */
+ struct b43_wldev *dev;
+ /* The type of firmware to request. */
+ enum b43_firmware_file_type req_type;
+ /* Error messages for each firmware type. */
+ char errors[B43_NR_FWTYPES][128];
+ /* Temporary buffer for storing the firmware name. */
+ char fwname[64];
+ /* A fatal error occured while requesting. Firmware reqest
+ * can not continue, as any other reqest will also fail. */
+ int fatal_failure;
+};
+
/* In-memory representation of a cached microcode file. */
struct b43_firmware_file {
const char *filename;
const struct firmware *data;
+ /* Type of the firmware file name. Note that this does only indicate
+ * the type by the firmware name. NOT the file contents.
+ * If you want to check for proprietary vs opensource, use (struct b43_firmware)->opensource
+ * instead! The (struct b43_firmware)->opensource flag is derived from the actual firmware
+ * binary code, not just the filename.
+ */
+ enum b43_firmware_file_type type;
};
/* Pointers to the firmware data and meta information about it. */
@@ -677,7 +706,8 @@ struct b43_firmware {
/* Firmware patchlevel */
u16 patch;
- /* Set to true, if we are using an opensource firmware. */
+ /* Set to true, if we are using an opensource firmware.
+ * Use this to check for proprietary vs opensource. */
bool opensource;
/* Set to true, if the core needs a PCM firmware, but
* we failed to load one. This is always false for