summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorLiangwei Dong <liangwei@codeaurora.org>2015-12-04 02:32:55 -0500
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:13:17 -0700
commitfa7db29c1fe2d1ac1686e50cac4f86b1becd0a3b (patch)
tree7d432772cb55e63c0f1453b300636a438c459d1e /include/net
parent1b10409872b970f241e42ca2d68676ca554ab897 (diff)
Net: CNSS_SDIO: add sdio wlan driver registration
Move sdio wlan func driver interface(includes Suspend and Resume)registration from wlan cld driver to cnss_sdio driver. wlan cld driver provides callback functions to cnss_sdio driver by cnss_sdio_wlan_register_driver API. CRs-Fixed: 944931 Change-Id: If9cec25024c5840e043fc652a7f0c7df4d83f4e9 Signed-off-by: Liangwei Dong <liangwei@codeaurora.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cnss.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/include/net/cnss.h b/include/net/cnss.h
index 7b54546310df..9fd505d38685 100644
--- a/include/net/cnss.h
+++ b/include/net/cnss.h
@@ -15,11 +15,11 @@
#include <linux/device.h>
#include <linux/skbuff.h>
#include <linux/pci.h>
+#ifdef CONFIG_CNSS_SDIO
+#include <linux/mmc/sdio_func.h>
+#endif
#ifdef CONFIG_CNSS
-/* max 20mhz channel count */
-#define CNSS_MAX_CH_NUM 45
-
#define CNSS_MAX_FILE_NAME 20
#define MAX_FIRMWARE_SIZE (1 * 1024 * 1024)
@@ -165,6 +165,9 @@ extern int cnss_is_auto_suspend_allowed(const char *caller_func);
extern int cnss_pm_runtime_request(struct device *dev, enum
cnss_runtime_request request);
#endif
+/* max 20mhz channel count */
+#define CNSS_MAX_CH_NUM 45
+
extern void cnss_init_work(struct work_struct *work, work_func_t func);
extern void cnss_flush_work(void *work);
extern void cnss_flush_delayed_work(void *dwork);
@@ -185,4 +188,20 @@ extern int cnss_get_wlan_unsafe_channel(u16 *unsafe_ch_list,
u16 *ch_count, u16 buf_len);
extern int cnss_wlan_set_dfs_nol(const void *info, u16 info_len);
extern int cnss_wlan_get_dfs_nol(void *info, u16 info_len);
+
+#ifdef CONFIG_CNSS_SDIO
+struct cnss_sdio_wlan_driver {
+ const char *name;
+ const struct sdio_device_id *id_table;
+ int (*probe)(struct sdio_func *, const struct sdio_device_id *);
+ void (*remove)(struct sdio_func *);
+ int (*suspend)(struct device *);
+ int (*resume)(struct device *);
+};
+
+extern int cnss_sdio_wlan_register_driver(
+ struct cnss_sdio_wlan_driver *driver);
+extern void cnss_sdio_wlan_unregister_driver(
+ struct cnss_sdio_wlan_driver *driver);
+#endif
#endif /* _NET_CNSS_H_ */