93fdc6f084461060e3b1c0f932c78c8baad2797e
[openwrt.git] / package / carl9170 / patches / 100-request_firmware_compat.patch
1 --- a/drivers/net/wireless/ath/carl9170/usb.c
2 +++ b/drivers/net/wireless/ath/carl9170/usb.c
3 @@ -983,11 +983,28 @@ err_failed:
4 ar9170_usb_firmware_failed(aru);
5 }
6
7 +
8 +
9 static int ar9170_usb_request_firmware(struct ar9170_usb *aru)
10 {
11 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
12 + const struct firmware *fw;
13 + int ret;
14 +
15 + ret = request_firmware(&fw,
16 + ar9170_fws[aru->fw_load].files[aru->fw_files].name,
17 + &aru->udev->dev);
18 +
19 + if (ret < 0)
20 + return ret;
21 +
22 + ar9170_usb_firmware_step2(fw, aru);
23 + return 0;
24 +#else
25 return request_firmware_nowait(THIS_MODULE, 1,
26 ar9170_fws[aru->fw_load].files[aru->fw_files].name,
27 &aru->udev->dev, GFP_KERNEL, aru, ar9170_usb_firmware_step2);
28 +#endif
29 }
30
31 static void ar9170_usb_disconnect(struct usb_interface *intf)
This page took 0.03697 seconds and 3 git commands to generate.