Unverified Commit 8403302d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9764 wifi: ar5523: enable proper endpoint verification

parents 26e1a642 ed8a6583
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -1590,6 +1590,20 @@ static int ar5523_probe(struct usb_interface *intf,
	struct ar5523 *ar;
	int error = -ENOMEM;

	static const u8 bulk_ep_addr[] = {
		AR5523_CMD_TX_PIPE | USB_DIR_OUT,
		AR5523_DATA_TX_PIPE | USB_DIR_OUT,
		AR5523_CMD_RX_PIPE | USB_DIR_IN,
		AR5523_DATA_RX_PIPE | USB_DIR_IN,
		0};

	if (!usb_check_bulk_endpoints(intf, bulk_ep_addr)) {
		dev_err(&dev->dev,
			"Could not find all expected endpoints\n");
		error = -ENODEV;
		goto out;
	}

	/*
	 * Load firmware if the device requires it.  This will return
	 * -ENXIO on success and we'll get called back afer the usb