aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/b43.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43/b43.h')
-rw-r--r--drivers/net/wireless/b43/b43.h37
1 files changed, 32 insertions, 5 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index a53c378e7484..e9d60f0910be 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -655,10 +655,39 @@ struct b43_wl {
655 struct work_struct txpower_adjust_work; 655 struct work_struct txpower_adjust_work;
656}; 656};
657 657
658/* The type of the firmware file. */
659enum b43_firmware_file_type {
660 B43_FWTYPE_PROPRIETARY,
661 B43_FWTYPE_OPENSOURCE,
662 B43_NR_FWTYPES,
663};
664
665/* Context data for fetching firmware. */
666struct b43_request_fw_context {
667 /* The device we are requesting the fw for. */
668 struct b43_wldev *dev;
669 /* The type of firmware to request. */
670 enum b43_firmware_file_type req_type;
671 /* Error messages for each firmware type. */
672 char errors[B43_NR_FWTYPES][128];
673 /* Temporary buffer for storing the firmware name. */
674 char fwname[64];
675 /* A fatal error occured while requesting. Firmware reqest
676 * can not continue, as any other reqest will also fail. */
677 int fatal_failure;
678};
679
658/* In-memory representation of a cached microcode file. */ 680/* In-memory representation of a cached microcode file. */
659struct b43_firmware_file { 681struct b43_firmware_file {
660 const char *filename; 682 const char *filename;
661 const struct firmware *data; 683 const struct firmware *data;
684 /* Type of the firmware file name. Note that this does only indicate
685 * the type by the firmware name. NOT the file contents.
686 * If you want to check for proprietary vs opensource, use (struct b43_firmware)->opensource
687 * instead! The (struct b43_firmware)->opensource flag is derived from the actual firmware
688 * binary code, not just the filename.
689 */
690 enum b43_firmware_file_type type;
662}; 691};
663 692
664/* Pointers to the firmware data and meta information about it. */ 693/* Pointers to the firmware data and meta information about it. */
@@ -677,7 +706,8 @@ struct b43_firmware {
677 /* Firmware patchlevel */ 706 /* Firmware patchlevel */
678 u16 patch; 707 u16 patch;
679 708
680 /* Set to true, if we are using an opensource firmware. */ 709 /* Set to true, if we are using an opensource firmware.
710 * Use this to check for proprietary vs opensource. */
681 bool opensource; 711 bool opensource;
682 /* Set to true, if the core needs a PCM firmware, but 712 /* Set to true, if the core needs a PCM firmware, but
683 * we failed to load one. This is always false for 713 * we failed to load one. This is always false for
@@ -848,12 +878,9 @@ void b43err(struct b43_wl *wl, const char *fmt, ...)
848 __attribute__ ((format(printf, 2, 3))); 878 __attribute__ ((format(printf, 2, 3)));
849void b43warn(struct b43_wl *wl, const char *fmt, ...) 879void b43warn(struct b43_wl *wl, const char *fmt, ...)
850 __attribute__ ((format(printf, 2, 3))); 880 __attribute__ ((format(printf, 2, 3)));
851#if B43_DEBUG
852void b43dbg(struct b43_wl *wl, const char *fmt, ...) 881void b43dbg(struct b43_wl *wl, const char *fmt, ...)
853 __attribute__ ((format(printf, 2, 3))); 882 __attribute__ ((format(printf, 2, 3)));
854#else /* DEBUG */ 883
855# define b43dbg(wl, fmt...) do { /* nothing */ } while (0)
856#endif /* DEBUG */
857 884
858/* A WARN_ON variant that vanishes when b43 debugging is disabled. 885/* A WARN_ON variant that vanishes when b43 debugging is disabled.
859 * This _also_ evaluates the arg with debugging disabled. */ 886 * This _also_ evaluates the arg with debugging disabled. */