+ case USB_RECIP_ENDPOINT: {
+ unsigned int ep = le16_to_cpu(ctrl->wIndex) & 0xf;
+ unsigned int dir = le16_to_cpu(ctrl->wIndex) & USB_DIR_MASK;
+
+ if (ep == 0) {
+ status = !!(getb(AR9170_USB_REG_CX_CONFIG_STATUS) & BIT(2));
+ } else {
+ unsigned int addr;
+
+ if (dir == USB_DIR_IN)
+ addr = AR9170_USB_REG_EP_IN_MAX_SIZE_HIGH;
+ else
+ addr = AR9170_USB_REG_EP_OUT_MAX_SIZE_HIGH;
+
+ addr += (ep << 1);
+
+ /*
+ * AR9170_USB_EP_OUT_STALL == AR9170_USB_EP_IN_STALL
+ * so it doesn't matter which one we use
+ */
+ status = !!(getb(addr) & AR9170_USB_EP_OUT_STALL);
+ }
+ break;
+ }