wifi: update driver to 100.10.545.2 to support STA/AP concurrent [1/2]
[GitHub/LineageOS/G12/android_hardware_amlogic_kernel-modules_dhd-driver.git] / bcmdhd.100.10.315.x / wl_cfgp2p.h
index 339b10a9181ef35a13e6b2d64490c8e77e67456d..128ab5bcf7792f95ad75854728f76466de91acd7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Linux cfgp2p driver
  *
- * Copyright (C) 1999-2018, Broadcom.
+ * Copyright (C) 1999-2019, Broadcom.
  *
  *      Unless you and Broadcom execute a separate written software license
  * agreement governing use of this software, this software is licensed to you
@@ -24,7 +24,7 @@
  *
  * <<Broadcom-WL-IPTag/Open:>>
  *
- * $Id: wl_cfgp2p.h 710886 2017-07-14 08:39:03Z $
+ * $Id: wl_cfgp2p.h 794110 2018-12-12 05:03:21Z $
  */
 #ifndef _wl_cfgp2p_h_
 #define _wl_cfgp2p_h_
@@ -71,16 +71,13 @@ struct p2p_bss {
 };
 
 struct p2p_info {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
-       struct bcm_cfg80211 *cfg;
-#endif
        bool on;    /**< p2p on/off switch */
        bool scan;
        int16 search_state;
        s8 vir_ifname[IFNAMSIZ];
        unsigned long status;
        struct p2p_bss bss[P2PAPI_BSSCFG_MAX];
-       struct timer_list listen_timer;
+       timer_list_compat_t listen_timer;
        wl_p2p_sched_t noa;
        wl_p2p_ops_t ops;
        wlc_ssid_t ssid;
@@ -160,6 +157,16 @@ enum wl_cfgp2p_status {
                        DHD_LOG_DUMP_WRITE args;        \
                }                                                                       \
        } while (0)
+#define        CFGP2P_ACTION(args)                                                             \
+       do {                                                                    \
+               if (wl_dbg_level & WL_DBG_P2P_ACTION) {                 \
+                       printk(KERN_DEBUG "CFGP2P-ACTION) %s :", __func__);     \
+                       printk args;                                                    \
+                       DHD_LOG_DUMP_WRITE("[%s] %s: ", \
+                       dhd_log_dump_get_timestamp(), __func__);        \
+                       DHD_LOG_DUMP_WRITE args;        \
+               }                                                                       \
+       } while (0)
 #else
 #define CFGP2P_ERR(args)                                                                       \
        do {                                                                            \
@@ -175,39 +182,29 @@ enum wl_cfgp2p_status {
                        printk args;                                            \
                }                                                                       \
        } while (0)
-#endif /* DHD_LOG_DUMP */
-#define        CFGP2P_DBG(args)                                                                \
+#define        CFGP2P_ACTION(args)                                                             \
        do {                                                                    \
-               if (wl_dbg_level & WL_DBG_DBG) {                        \
-                       printk(KERN_INFO "CFGP2P-DEBUG) %s :", __func__);       \
+               if (wl_dbg_level & WL_DBG_P2P_ACTION) {                 \
+                       printk(KERN_INFO "CFGP2P-ACTION) %s :", __func__);      \
                        printk args;                                                    \
                }                                                                       \
        } while (0)
+#endif /* DHD_LOG_DUMP */
 
-#define        CFGP2P_ACTION(args)                                                             \
+#define        CFGP2P_DBG(args)                                                                \
        do {                                                                    \
-               if (wl_dbg_level & WL_DBG_P2P_ACTION) {                 \
-                       printk(KERN_INFO "CFGP2P-ACTION) %s :", __func__);      \
+               if (wl_dbg_level & WL_DBG_DBG) {                        \
+                       printk(KERN_INFO "CFGP2P-DEBUG) %s :", __func__);       \
                        printk args;                                                    \
                }                                                                       \
        } while (0)
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
-#define INIT_TIMER(timer, func, duration, extra_delay) \
-       do {                               \
-               timer_setup(timer, func, 0); \
-               timer->expires = jiffies + msecs_to_jiffies(duration + extra_delay); \
-               add_timer(timer); \
-       } while (0);
-#else
+
 #define INIT_TIMER(timer, func, duration, extra_delay) \
        do {                               \
-               init_timer(timer); \
-               timer->function = func; \
-               timer->expires = jiffies + msecs_to_jiffies(duration + extra_delay); \
-               timer->data = (unsigned long) cfg; \
+               init_timer_compat(timer, func, cfg); \
+               timer_expires(timer) = jiffies + msecs_to_jiffies(duration + extra_delay); \
                add_timer(timer); \
        } while (0);
-#endif
 
 #if (LINUX_VERSION_CODE <= KERNEL_VERSION(3, 0, 8))
 #ifdef WL_SUPPORT_BACKPORTED_KPATCHES
@@ -256,13 +253,7 @@ enum wl_cfgp2p_status {
 #define P2P_ECSA_CNT 50
 
 extern void
-wl_cfgp2p_listen_expired(
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
-       struct timer_list *t
-#else
-       unsigned long data
-#endif
-);
+wl_cfgp2p_listen_expired(unsigned long data);
 extern bool
 wl_cfgp2p_is_pub_action(void *frame, u32 frame_len);
 extern bool