cnss2: Add support for USB transport

Changes in state machine and boot flow to support usb bus
based behaviour. Handler functions added to support USB
boot flow.

Change-Id: I51c4751c8d8669a8b54ae692ae3ec1bb32d1e7be
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
diff --git a/include/net/cnss2.h b/include/net/cnss2.h
index 8a1772e..1bad01a 100644
--- a/include/net/cnss2.h
+++ b/include/net/cnss2.h
@@ -14,6 +14,7 @@
 #define _NET_CNSS2_H
 
 #include <linux/pci.h>
+#include <linux/usb.h>
 
 #define CNSS_MAX_FILE_NAME		20
 #define CNSS_MAX_TIMESTAMP_LEN		32
@@ -83,6 +84,21 @@
 	const struct pci_device_id *id_table;
 };
 
+struct cnss_usb_wlan_driver {
+	char *name;
+	int  (*probe)(struct usb_interface *pintf, const struct usb_device_id
+		      *id);
+	void (*remove)(struct usb_interface *pintf);
+	int  (*reinit)(struct usb_interface *pintf, const struct usb_device_id
+		       *id);
+	void (*shutdown)(struct usb_interface *pintf);
+	void (*crash_shutdown)(struct usb_interface *pintf);
+	int  (*suspend)(struct usb_interface *pintf, pm_message_t state);
+	int  (*resume)(struct usb_interface *pintf);
+	int  (*reset_resume)(struct usb_interface *pintf);
+	const struct usb_device_id *id_table;
+};
+
 enum cnss_driver_status {
 	CNSS_UNINITIALIZED,
 	CNSS_INITIALIZED,
@@ -205,5 +221,7 @@
 			      uint32_t mem_type, uint32_t data_len,
 			      uint8_t *input);
 extern int cnss_set_fw_log_mode(struct device *dev, uint8_t fw_log_mode);
-
+extern int cnss_usb_wlan_register_driver(struct cnss_usb_wlan_driver *driver);
+extern void cnss_usb_wlan_unregister_driver(struct cnss_usb_wlan_driver *
+					    driver);
 #endif /* _NET_CNSS2_H */