[17/26] b43: refuse to load unsupported firmware
From: Greg KH
Date: Fri Nov 18 2011 - 19:08:24 EST
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
[This patch is supposed to be applied in 3.1 (and maybe older) branches only.]
New kernels support newer firmware that users may try to incorrectly use
with older kernels. Display error and explain the problem in such a case
Signed-off-by: RafaÅ? MiÅ?ecki <zajec5@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
drivers/net/wireless/b43/main.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2401,6 +2401,13 @@ static int b43_upload_microcode(struct b
b43_print_fw_helptext(dev->wl, 1);
err = -EOPNOTSUPP;
goto error;
+ } else if (fwrev >= 598) {
+ b43err(dev->wl, "YOUR FIRMWARE IS TOO NEW. Support for "
+ "firmware 598 and up requires kernel 3.2 or newer. You "
+ "have to install older firmware or upgrade kernel.\n");
+ b43_print_fw_helptext(dev->wl, 1);
+ err = -EOPNOTSUPP;
+ goto error;
}
dev->fw.rev = fwrev;
dev->fw.patch = fwpatch;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/