aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2015-11-18 10:28:41 +0000
committerSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2015-11-18 10:28:41 +0000
commit37ec80c078a8e445aa52b17a723319330ece824f (patch)
tree424ece4c7fd9f0b70b72b40663b8623c9d7951f9 /drivers/net/wireless/ath/wcn36xx/wcn36xx.h
parentef0a4a9ca81e480258d66a6521aa31f9e617e80a (diff)
parent317ea8bec2785cf4f9db263b35f257528a4c4087 (diff)
Merge branch 'tracking-qcomlt-wcnss' into integration-linux-qcomlt
* tracking-qcomlt-wcnss: (23 commits) wcn36xx: avoid alloc mem with GFP_KERNEL in smd callback. wcn36xx: eliminate the warning for unsupported SMD_EVENT wcn36xx: Update the smd client driver to use new smd channel match method. Bluetooth: btqcomsmd: Qualcomm WCNSS HCI driver Bluetooth: Add HCI device identifier for Qualcomm SMD wcn36xx: add locking around ring buffer accesses Migrate the wifi driver from old smd driver to new smd driver. Update the initialization sequence to enable DB410c. Set the dma mask for platform device which is not created from DT. ARM64 has requirement that all the dma operations has assigned devices. Otherwise, following message shown and dma allocation fails: Got workable wireless driver. wcn36xx: add later fw capabilities net wireless wcn36xx adapt wcnss platform to select module by DT net wireless wcn36xx add wcnss platform code wcn3620: use new response format for wcn3620 remove_bsskey wcn3620: use new response format for wcn3620 trigger_ba wcn36xx: handle new hal response format wcn36xx: remove powersaving for wcn3620 wcn36xx: swallow two wcn3620 IND messages wcn36xx: introduce WCN36XX_HAL_AVOID_FREQ_RANGE_IND ...
Diffstat (limited to 'drivers/net/wireless/ath/wcn36xx/wcn36xx.h')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/wcn36xx.h44
1 files changed, 36 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
index 7b41e833e18c..f88cf7e8715b 100644
--- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
+++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
@@ -103,19 +103,49 @@ struct nv_data {
u8 table;
};
+enum wcn36xx_chip_type {
+ WCN36XX_CHIP_UNKNOWN,
+ WCN36XX_CHIP_3660,
+ WCN36XX_CHIP_3680,
+ WCN36XX_CHIP_3620,
+};
+
/* Interface for platform control path
*
* @open: hook must be called when wcn36xx wants to open control channel.
* @tx: sends a buffer.
*/
struct wcn36xx_platform_ctrl_ops {
- int (*open)(void *drv_priv, void *rsp_cb);
- void (*close)(void);
- int (*tx)(char *buf, size_t len);
- int (*get_hw_mac)(u8 *addr);
+ int (*open)(struct wcn36xx *wcn, void *rsp_cb);
+ void (*close)(struct wcn36xx *wcn);
+ int (*tx)(struct wcn36xx *wcn, char *buf, size_t len);
+ int (*get_hw_mac)(struct wcn36xx *wcn, u8 *addr);
+ int (*get_chip_type)(struct wcn36xx *wcn);
int (*smsm_change_state)(u32 clear_mask, u32 set_mask);
};
+struct wcn36xx_platform_data {
+ enum wcn36xx_chip_type chip_type;
+
+ struct platform_device *core;
+
+ struct qcom_smd_device *sdev;
+ struct qcom_smd_channel *wlan_ctrl_channel;
+ struct completion wlan_ctrl_ack;
+ struct mutex wlan_ctrl_lock;
+
+ struct pinctrl *pinctrl;
+
+ struct wcn36xx *wcn;
+
+ void (*cb)(struct wcn36xx *wcn, void *buf, size_t len);
+ struct wcn36xx_platform_ctrl_ops ctrl_ops;
+
+ struct work_struct packet_process_work;
+ spinlock_t packet_lock;
+ struct list_head packet_list;
+};
+
/**
* struct wcn36xx_vif - holds VIF related fields
*
@@ -193,7 +223,7 @@ struct wcn36xx {
u8 fw_minor;
u8 fw_major;
u32 fw_feat_caps[WCN36XX_HAL_CAPS_SIZE];
- u32 chip_version;
+ enum wcn36xx_chip_type chip_version;
/* extra byte for the NULL termination */
u8 crm_version[WCN36XX_HAL_VERSION_LENGTH + 1];
@@ -204,6 +234,7 @@ struct wcn36xx {
int rx_irq;
void __iomem *mmio;
+ struct wcn36xx_platform_data *wcn36xx_data;
struct wcn36xx_platform_ctrl_ops *ctrl_ops;
/*
* smd_buf must be protected with smd_mutex to garantee
@@ -241,9 +272,6 @@ struct wcn36xx {
};
-#define WCN36XX_CHIP_3660 0
-#define WCN36XX_CHIP_3680 1
-
static inline bool wcn36xx_is_fw_version(struct wcn36xx *wcn,
u8 major,
u8 minor,