diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-09-19 15:00:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-19 15:00:16 -0400 |
commit | b53d63ecce17c4ddf8636def9f6e8b865c3927f9 (patch) | |
tree | 683ef774fcfb423fa35f61e4326d0ce3f6a7c283 /drivers/net/wireless/libertas | |
parent | 765cf9976e937f1cfe9159bf4534967c8bf8eb6d (diff) | |
parent | 12e62d6f7ec475e546b40bece2045da15d6c21ef (diff) |
Merge branch 'master' of ssh://infradead/~/public_git/wireless-next into for-davem
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index 0c846f5a646a..8147f1e2a0b0 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -973,6 +973,23 @@ static const struct { | |||
973 | { MODEL_8682, "libertas/usb8682.bin" } | 973 | { MODEL_8682, "libertas/usb8682.bin" } |
974 | }; | 974 | }; |
975 | 975 | ||
976 | #ifdef CONFIG_OLPC | ||
977 | |||
978 | static int try_olpc_fw(struct if_usb_card *cardp) | ||
979 | { | ||
980 | int retval = -ENOENT; | ||
981 | |||
982 | /* try the OLPC firmware first; fall back to fw_table list */ | ||
983 | if (machine_is_olpc() && cardp->model == MODEL_8388) | ||
984 | retval = request_firmware(&cardp->fw, | ||
985 | "libertas/usb8388_olpc.bin", &cardp->udev->dev); | ||
986 | return retval; | ||
987 | } | ||
988 | |||
989 | #else | ||
990 | static int try_olpc_fw(struct if_usb_card *cardp) { return -ENOENT; } | ||
991 | #endif /* !CONFIG_OLPC */ | ||
992 | |||
976 | static int get_fw(struct if_usb_card *cardp, const char *fwname) | 993 | static int get_fw(struct if_usb_card *cardp, const char *fwname) |
977 | { | 994 | { |
978 | int i; | 995 | int i; |
@@ -981,6 +998,10 @@ static int get_fw(struct if_usb_card *cardp, const char *fwname) | |||
981 | if (fwname) | 998 | if (fwname) |
982 | return request_firmware(&cardp->fw, fwname, &cardp->udev->dev); | 999 | return request_firmware(&cardp->fw, fwname, &cardp->udev->dev); |
983 | 1000 | ||
1001 | /* Handle OLPC firmware */ | ||
1002 | if (try_olpc_fw(cardp) == 0) | ||
1003 | return 0; | ||
1004 | |||
984 | /* Otherwise search for firmware to use */ | 1005 | /* Otherwise search for firmware to use */ |
985 | for (i = 0; i < ARRAY_SIZE(fw_table); i++) { | 1006 | for (i = 0; i < ARRAY_SIZE(fw_table); i++) { |
986 | if (fw_table[i].model != cardp->model) | 1007 | if (fw_table[i].model != cardp->model) |