]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
b43: refuse to load unsupported firmware
authorRafał Miłecki <zajec5@gmail.com>
Tue, 8 Nov 2011 16:15:03 +0000 (17:15 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Nov 2011 22:35:24 +0000 (14:35 -0800)
[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@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/b43/main.c

index e293a7921bf073483a4a3bae8eb97318248dea2f..fdb4df2dd2adcb647308d49c724d97b1caa47a4b 100644 (file)
@@ -2508,6 +2508,13 @@ static int b43_upload_microcode(struct b43_wldev *dev)
                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;