wifi: update bcmdhd.1.579.77.41.1.cn from ampak[3/3]
[GitHub/LineageOS/G12/android_hardware_amlogic_kernel-modules_dhd-driver.git] / bcmdhd.1.579.77.41.1.cn / dhd_ip.c
index ee7d105d231711c1d4c7f5cd73fb2301379441b8..d8be26cd8cef804d60a96ee8034dc68d454c3cd9 100644 (file)
@@ -287,10 +287,20 @@ static void _tdata_psh_info_pool_deinit(dhd_pub_t *dhdp,
        return;
 }
 
-static void dhd_tcpack_send(ulong data)
+static void dhd_tcpack_send(
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+       struct timer_list *t
+#else
+       ulong data
+#endif
+)
 {
        tcpack_sup_module_t *tcpack_sup_mod;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+       tcpack_info_t *cur_tbl = from_timer(cur_tbl, t, timer);
+#else
        tcpack_info_t *cur_tbl = (tcpack_info_t *)data;
+#endif
        dhd_pub_t *dhdp;
        int ifidx;
        void* pkt;
@@ -464,9 +474,13 @@ int dhd_tcpack_suppress_set(dhd_pub_t *dhdp, uint8 mode)
                                tcpack_info_t *tcpack_info_tbl =
                                        &tcpack_sup_module->tcpack_info_tbl[i];
                                tcpack_info_tbl->dhdp = dhdp;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+                               timer_setup(&tcpack_info_tbl->timer, dhd_tcpack_send, 0);
+#else
                                init_timer(&tcpack_info_tbl->timer);
                                tcpack_info_tbl->timer.data = (ulong)tcpack_info_tbl;
                                tcpack_info_tbl->timer.function = dhd_tcpack_send;
+#endif
                        }
                        break;
        }