+static int usb_manipulate_feature(const struct usb_ctrlrequest *ctrl, bool __unused clear)
+{
+ unsigned int feature;
+ if (USB_CHECK_REQTYPE(ctrl, USB_RECIP_DEVICE, USB_DIR_OUT))
+ return -1;
+
+ if (usb_configured() == false)
+ return -1;
+
+ feature = le16_to_cpu(ctrl->wValue);
+
+#ifdef CONFIG_CARL9170FW_WOL
+ if (feature & USB_DEVICE_REMOTE_WAKEUP) {
+ if (clear)
+ usb_disable_remote_wakeup();
+ else
+ usb_enable_remote_wakeup();
+ }
+#endif /* CONFIG_CARL9170FW_WOL */
+
+ if (clear)
+ fw.usb.device_feature &= ~feature;
+ else
+ fw.usb.device_feature |= feature;
+
+ return 1;
+}
+