]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/ath/wcn36xx/wcn36xx.h
wcn36xx: Replace with latest development version
[karo-tx-linux.git] / drivers / net / wireless / ath / wcn36xx / wcn36xx.h
index 7b41e833e18c3e1edaf2be1f11c636fea50212d7..35a6590c3ee51db0c5f9f2e3e1aa927e1b0531c8 100644 (file)
@@ -35,6 +35,9 @@
 /* How many frames until we start a-mpdu TX session */
 #define WCN36XX_AMPDU_START_THRESH     20
 
+#define WCN36XX_MAX_SCAN_SSIDS         9
+#define WCN36XX_MAX_SCAN_IE_LEN                500
+
 extern unsigned int wcn36xx_dbg_mask;
 
 enum wcn36xx_debug_mask {
@@ -103,19 +106,6 @@ struct nv_data {
        u8      table;
 };
 
-/* 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 (*smsm_change_state)(u32 clear_mask, u32 set_mask);
-};
-
 /**
  * struct wcn36xx_vif - holds VIF related fields
  *
@@ -125,10 +115,10 @@ struct wcn36xx_platform_ctrl_ops {
  */
 struct wcn36xx_vif {
        struct list_head list;
-       struct wcn36xx_sta *sta;
        u8 dtim_period;
        enum ani_ed_type encrypt_type;
        bool is_joining;
+       bool sta_assoc;
        struct wcn36xx_hal_mac_ssid ssid;
 
        /* Power management */
@@ -193,7 +183,7 @@ struct wcn36xx {
        u8                      fw_minor;
        u8                      fw_major;
        u32                     fw_feat_caps[WCN36XX_HAL_CAPS_SIZE];
-       u32                     chip_version;
+       bool                    is_pronto;
 
        /* extra byte for the NULL termination */
        u8                      crm_version[WCN36XX_HAL_VERSION_LENGTH + 1];
@@ -202,9 +192,16 @@ struct wcn36xx {
        /* IRQs */
        int                     tx_irq;
        int                     rx_irq;
-       void __iomem            *mmio;
+       void __iomem            *ccu_base;
+       void __iomem            *dxe_base;
+
+       struct qcom_smd_channel *smd_channel;
+
+       struct qcom_smem_state  *tx_enable_state;
+       unsigned                tx_enable_state_bit;
+       struct qcom_smem_state  *tx_rings_empty_state;
+       unsigned                tx_rings_empty_state_bit;
 
-       struct wcn36xx_platform_ctrl_ops *ctrl_ops;
        /*
         * smd_buf must be protected with smd_mutex to garantee
         * that all messages are sent one after another
@@ -215,9 +212,15 @@ struct wcn36xx {
        struct completion       hal_rsp_compl;
        struct workqueue_struct *hal_ind_wq;
        struct work_struct      hal_ind_work;
-       struct mutex            hal_ind_mutex;
+       spinlock_t              hal_ind_lock;
        struct list_head        hal_ind_queue;
 
+       struct work_struct      scan_work;
+       struct cfg80211_scan_request *scan_req;
+       int                     scan_freq;
+       int                     scan_band;
+       struct mutex            scan_lock;
+
        /* DXE channels */
        struct wcn36xx_dxe_ch   dxe_tx_l_ch;    /* TX low */
        struct wcn36xx_dxe_ch   dxe_tx_h_ch;    /* TX high */
@@ -241,9 +244,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,
@@ -263,4 +263,22 @@ struct ieee80211_sta *wcn36xx_priv_to_sta(struct wcn36xx_sta *sta_priv)
        return container_of((void *)sta_priv, struct ieee80211_sta, drv_priv);
 }
 
+static inline
+struct wcn36xx_vif *wcn36xx_vif_to_priv(struct ieee80211_vif *vif)
+{
+       return (struct wcn36xx_vif *) vif->drv_priv;
+}
+
+static inline
+struct ieee80211_vif *wcn36xx_priv_to_vif(struct wcn36xx_vif *vif_priv)
+{
+       return container_of((void *) vif_priv, struct ieee80211_vif, drv_priv);
+}
+
+static inline
+struct wcn36xx_sta *wcn36xx_sta_to_priv(struct ieee80211_sta *sta)
+{
+       return (struct wcn36xx_sta *)sta->drv_priv;
+}
+
 #endif /* _WCN36XX_H_ */