b43: Fix firmware caching
PATCH 1/1 b43: Fix firmware caching
We must also store the ID string (filename) for the cached firmware blobs and verify that we really have the right firmware cached before using it. If we don't have the right fw cached, we must free it and request the correct blobs.
This fixes bandswitch on A/B/G multi-PHY devices.
Signed-off-by Michael Buesch <[email protected]>
---
John, as we don't support A-PHY operation, yet, we don't need to apply this patch to 2.6.24. Please queue this patch for 2.6.25.
drivers/net/wireless/b43/b43.h +11 -4
@@ -663,22 +663,29 @@ struct b43_wl {* This beacon stuff is protected by the irq_lock. */ struct sk_buff *current_beacon;bool beacon0_uploaded;bool beacon1_uploaded; }; +/* In-memory representation of a cached microcode file. */ +struct b43_firmware_file { +const char *filename; +const struct firmware *data; +}; +/* Pointers to the firmware data and meta information about it. */ struct b43_firmware {/* Microcode */ -const struct firmware *ucode; +struct b43_firmware_file ucode;/* PCM code */ -const struct firmware *pcm; +struct b43_firmware_file pcm;/* Initial MMIO values for the firmware */ -const struct firmware *initvals; +struct b43_firmware_file initvals;/* Initial MMIO values for the firmware, band-specific */ -const struct firmware *initvals_band; +struct b43_firmware_file initvals_band; +/* Firmware revision */ u16 rev;/* Firmware patchlevel */ u16 patch; };
drivers/net/wireless/b43/main.c +123 -106
349 lines not on this page · raw message