WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/bcmsdstd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ sdstd_3_osclean_tuning(sdioh_info_t *sd)
struct sdos_info *sdos = (struct sdos_info *)sd->sdos_info;
if (atomic_read(&sdos->timer_enab) == TRUE) {
/* disable timer if it was running */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&sdos->tuning_timer);
#else
del_timer_sync(&sdos->tuning_timer);
#endif
atomic_set(&sdos->timer_enab, FALSE);
}
tasklet_kill(&sdos->tuning_tasklet);
Expand Down Expand Up @@ -495,7 +499,11 @@ void sdstd_enable_disable_periodic_timer(sdioh_info_t *sd, uint val)
}
if (val == SD_DHD_DISABLE_PERIODIC_TUNING) {
/* stop periodic timer */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&sdos->tuning_timer);
#else
del_timer_sync(&sdos->tuning_timer);
#endif
}
}
#endif /* debugging purpose */
Expand Down
12 changes: 12 additions & 0 deletions src/dhd_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,11 @@ int dhd_tcpack_suppress_set(dhd_pub_t *dhdp, uint8 mode)
tcpack_info_t *tcpack_info_tbl =
&tcpack_sup_module->tcpack_info_tbl[i];
#ifndef TCPACK_SUPPRESS_HOLD_HRT
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete(&tcpack_info_tbl->timer);
#else
del_timer(&tcpack_info_tbl->timer);
#endif
#else
hrtimer_cancel(&tcpack_info_tbl->timer.timer);
#endif /* TCPACK_SUPPRESS_HOLD_HRT */
Expand Down Expand Up @@ -558,7 +562,11 @@ dhd_tcpack_info_tbl_clean(dhd_pub_t *dhdp)
if (dhdp->tcpack_sup_mode == TCPACK_SUP_HOLD) {
for (i = 0; i < TCPACK_INFO_MAXNUM; i++) {
#ifndef TCPACK_SUPPRESS_HOLD_HRT
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&tcpack_sup_mod->tcpack_info_tbl[i].timer);
#else
del_timer_sync(&tcpack_sup_mod->tcpack_info_tbl[i].timer);
#endif
#else
hrtimer_cancel(&tcpack_sup_mod->tcpack_info_tbl[i].timer.timer);
#endif /* TCPACK_SUPPRESS_HOLD_HRT */
Expand Down Expand Up @@ -1343,7 +1351,11 @@ dhd_tcpack_hold(dhd_pub_t *dhdp, void *pkt, int ifidx)

if (!hold) {
#ifndef TCPACK_SUPPRESS_HOLD_HRT
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&tcpack_info_tbl[i].timer);
#else
del_timer_sync(&tcpack_info_tbl[i].timer);
#endif
#else
hrtimer_cancel(&tcpack_sup_mod->tcpack_info_tbl[i].timer.timer);
#endif /* TCPACK_SUPPRESS_HOLD_HRT */
Expand Down
20 changes: 20 additions & 0 deletions src/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -10166,7 +10166,11 @@ dhd_bus_start(dhd_pub_t *dhdp)
DHD_GENERAL_LOCK(&dhd->pub, flags);
dhd->wd_timer_valid = FALSE;
DHD_GENERAL_UNLOCK(&dhd->pub, flags);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&dhd->timer);
#else
del_timer_sync(&dhd->timer);
#endif

#endif /* !BCMPCIE_OOB_HOST_WAKE */
DHD_STOP_RPM_TIMER(&dhd->pub);
Expand Down Expand Up @@ -10225,7 +10229,11 @@ dhd_bus_start(dhd_pub_t *dhdp)
DHD_GENERAL_LOCK(&dhd->pub, flags);
dhd->wd_timer_valid = FALSE;
DHD_GENERAL_UNLOCK(&dhd->pub, flags);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&dhd->timer);
#else
del_timer_sync(&dhd->timer);
#endif
DHD_ERROR(("%s failed bus is not ready\n", __FUNCTION__));
DHD_STOP_RPM_TIMER(&dhd->pub);
#ifdef BCMSDIO
Expand All @@ -10248,7 +10256,11 @@ dhd_bus_start(dhd_pub_t *dhdp)
DHD_GENERAL_LOCK(&dhd->pub, flags);
dhd->wd_timer_valid = FALSE;
DHD_GENERAL_UNLOCK(&dhd->pub, flags);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&dhd->timer);
#else
del_timer_sync(&dhd->timer);
#endif
DHD_ERROR(("%s failed to sync with dongle\n", __FUNCTION__));
DHD_OS_WD_WAKE_UNLOCK(&dhd->pub);
return ret;
Expand Down Expand Up @@ -14341,7 +14353,11 @@ void dhd_detach(dhd_pub_t *dhdp)
dhd->wd_timer_valid = FALSE;
DHD_GENERAL_UNLOCK(&dhd->pub, flags);
if (timer_valid)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&dhd->timer);
#else
del_timer_sync(&dhd->timer);
#endif
DHD_STOP_RPM_TIMER(&dhd->pub);

#ifdef BCMDBUS
Expand Down Expand Up @@ -15352,7 +15368,11 @@ dhd_os_wd_timer(void *bus, uint wdtick)
if (!wdtick && dhd->wd_timer_valid == TRUE) {
dhd->wd_timer_valid = FALSE;
DHD_GENERAL_UNLOCK(pub, flags);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&dhd->timer);
#else
del_timer_sync(&dhd->timer);
#endif
#ifdef BCMSDIO
DHD_OS_WD_WAKE_UNLOCK(pub);
#endif /* BCMSDIO */
Expand Down
12 changes: 12 additions & 0 deletions src/dhd_linux_pktdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,11 @@ dhd_dump_mod_pkt_timer(dhd_pub_t *dhdp, uint16 rsn)

pktcnts = (pkt_cnts_log_t *)(dhdp->pktcnts);
if (timer_pending(&pktcnts->pktcnt_timer)) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&pktcnts->pktcnt_timer);
#else
del_timer_sync(&pktcnts->pktcnt_timer);
#endif
}

bzero(&pktcnts->arp_cnt, sizeof(pkt_cnt_t));
Expand Down Expand Up @@ -623,7 +627,11 @@ dhd_dump_pkt_deinit(dhd_pub_t *dhdp)

pktcnts = (pkt_cnts_log_t *)(dhdp->pktcnts);
pktcnts->enabled = FALSE;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&pktcnts->pktcnt_timer);
#else
del_timer_sync(&pktcnts->pktcnt_timer);
#endif
MFREE(dhdp->osh, dhdp->pktcnts, sizeof(pkt_cnts_log_t));
dhdp->pktcnts = NULL;
}
Expand All @@ -640,7 +648,11 @@ dhd_dump_pkt_clear(dhd_pub_t *dhdp)

pktcnts = (pkt_cnts_log_t *)(dhdp->pktcnts);
pktcnts->enabled = FALSE;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&pktcnts->pktcnt_timer);
#else
del_timer_sync(&pktcnts->pktcnt_timer);
#endif
pktcnts->reason = 0;
bzero(&pktcnts->arp_cnt, sizeof(pkt_cnt_t));
bzero(&pktcnts->dns_cnt, sizeof(pkt_cnt_t));
Expand Down
12 changes: 12 additions & 0 deletions src/include/linuxver.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,17 @@ extern void timer_cb_compat(struct timer_list *tl);
#define timer_set_private(timer_compat, priv) (timer_compat)->arg = priv
#define timer_expires(timer_compat) (timer_compat)->timer.expires

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
#define timer_delete(t) timer_delete(&((t)->timer))
#ifndef timer_delete_sync
#define timer_delete_sync(t) timer_delete_sync(&((t)->timer))
#endif
#else
#define del_timer(t) del_timer(&((t)->timer))
#ifndef del_timer_sync
#define del_timer_sync(t) del_timer_sync(&((t)->timer))
#endif
#endif
#define timer_pending(t) timer_pending(&((t)->timer))
#define add_timer(t) add_timer(&((t)->timer))
#define mod_timer(t, j) mod_timer(&((t)->timer), j)
Expand Down Expand Up @@ -487,8 +494,13 @@ static inline void tasklet_init(struct tasklet_struct *tasklet,

#define tasklet_kill(tasklet) { do {} while (0); }

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
/* 6.15.x introduced timer_delete_sync() */
#define timer_delete_sync(timer) timer_delete(timer)
#else
/* 2.4.x introduced del_timer_sync() */
#define del_timer_sync(timer) del_timer(timer)
#endif

#else

Expand Down
4 changes: 4 additions & 0 deletions src/include/wlioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24856,7 +24856,11 @@ typedef struct wl_mlo_emlsr_ctrl_v1 {
typedef struct wl_mlo_mld_ap_op {
uint8 op_code; /* WL_MLO_CMD_MLD_AP_OP_ADD/DEL */
uint8 link_id;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
uint16 timer_delete; /* delete timer in units of TBTT */
#else
uint16 del_timer; /* delete timer in units of TBTT */
#endif
} wl_mlo_mld_ap_op_t;

/* Current version for wlc_clm_power_limits_req_t structure and flags */
Expand Down
4 changes: 4 additions & 0 deletions src/linux_osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,11 @@ osl_timer_del(osl_t *osh, osl_timer_t *t)
if (t->set) {
t->set = FALSE;
if (t->timer) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete(t->timer);
#else
del_timer(t->timer);
#endif
MFREE(NULL, t->timer, sizeof(timer_list_compat_t));
}
#ifdef BCMDBG
Expand Down
47 changes: 46 additions & 1 deletion src/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -16667,7 +16667,11 @@ wl_stop_wait_next_action_frame(struct bcm_cfg80211 *cfg, struct net_device *ndev
s32 err = 0;

if (wl_get_drv_status_all(cfg, FINDING_COMMON_CHANNEL)) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&cfg->p2p->listen_timer);
#else
del_timer_sync(&cfg->p2p->listen_timer);
#endif
if (cfg->afx_hdl != NULL) {
if (cfg->afx_hdl->dev != NULL) {
wl_clr_drv_status(cfg, SCANNING, cfg->afx_hdl->dev);
Expand Down Expand Up @@ -17697,7 +17701,11 @@ static void wl_del_roam_timeout(struct bcm_cfg80211 *cfg)

/* restore prec_map to ALLPRIO */
dhdp->dequeue_prec_map = ALLPRIO;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&cfg->roam_timeout);
#else
del_timer_sync(&cfg->roam_timeout);
#endif
#if defined(BCMDONGLEHOST) && defined(OEM_ANDROID)
DHD_ENABLE_RUNTIME_PM(dhdp);
#endif /* BCMDONGLEHOST && OEM_ANDROID */
Expand Down Expand Up @@ -18362,10 +18370,17 @@ static void wl_deinit_priv(struct bcm_cfg80211 *cfg)
#ifdef WL_SCHED_SCAN
cancel_delayed_work_sync(&cfg->sched_scan_stop_work);
#endif /* WL_SCHED_SCAN */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&cfg->scan_timeout);
#ifdef DHD_LOSSLESS_ROAMING
timer_delete_sync(&cfg->roam_timeout);
#endif
#else
del_timer_sync(&cfg->scan_timeout);
#ifdef DHD_LOSSLESS_ROAMING
del_timer_sync(&cfg->roam_timeout);
#endif
#endif
#ifdef WL_CELLULAR_CHAN_AVOID
wl_cellavoid_deinit(cfg);
#endif /* WL_CELLULAR_CHAN_AVOID */
Expand Down Expand Up @@ -18695,11 +18710,17 @@ void wl_cfg80211_detach(struct bcm_cfg80211 *cfg)
#ifdef WL_WPS_SYNC
wl_deinit_wps_reauth_sm(cfg);
#endif /* WL_WPS_SYNC */

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&cfg->scan_timeout);
#ifdef DHD_LOSSLESS_ROAMING
timer_delete_sync(&cfg->roam_timeout);
#endif /* DHD_LOSSLESS_ROAMING */
#else
del_timer_sync(&cfg->scan_timeout);
#ifdef DHD_LOSSLESS_ROAMING
del_timer_sync(&cfg->roam_timeout);
#endif /* DHD_LOSSLESS_ROAMING */
#endif

#ifdef WL_STATIC_IF
wl_cfg80211_unregister_static_if(cfg);
Expand Down Expand Up @@ -20757,7 +20778,11 @@ static s32 __wl_cfg80211_up(struct bcm_cfg80211 *cfg)
#endif /* WL_RAV_MSCS_NEG_IN_ASSOC */

#ifdef DHD_LOSSLESS_ROAMING
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&cfg->roam_timeout);
#else
del_timer_sync(&cfg->roam_timeout);
#endif
#endif /* DHD_LOSSLESS_ROAMING */

err = dhd_monitor_init(cfg->pub);
Expand Down Expand Up @@ -21014,7 +21039,11 @@ static s32 __wl_cfg80211_down(struct bcm_cfg80211 *cfg)
/* Force clear of scan_suppress */
if (cfg->scan_suppressed)
wl_cfg80211_scan_suppress(ndev, 0);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&cfg->scan_supp_timer);
#else
del_timer_sync(&cfg->scan_supp_timer);
#endif
cancel_work_sync(&cfg->wlan_work);
#endif /* DHCP_SCAN_SUPPRESS */

Expand Down Expand Up @@ -21164,14 +21193,22 @@ static s32 __wl_cfg80211_down(struct bcm_cfg80211 *cfg)
wl_link_down(cfg);
if (cfg->p2p_supported) {
if (timer_pending(&cfg->p2p->listen_timer))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&cfg->p2p->listen_timer);
#else
del_timer_sync(&cfg->p2p->listen_timer);
#endif
wl_cfgp2p_down(cfg);
} else {
// avoid memory leak
wl_cfgp2p_deinit_priv(cfg);
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&cfg->scan_timeout);
#else
del_timer_sync(&cfg->scan_timeout);
#endif

wl_cfg80211_clear_mgmt_vndr_ies(cfg);

Expand Down Expand Up @@ -24642,7 +24679,11 @@ static void wl_deinit_wps_reauth_sm(struct bcm_cfg80211 *cfg)
for (i = 0; i < WPS_MAX_SESSIONS; i++) {
cfg->wps_session[i].in_use = false;
cfg->wps_session[i].state = WPS_STATE_IDLE;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&cfg->wps_session[i].timer);
#else
del_timer_sync(&cfg->wps_session[i].timer);
#endif
}

}
Expand Down Expand Up @@ -24734,7 +24775,11 @@ wl_wps_session_del(struct net_device *ndev)
WL_CFG_WPS_SYNC_UNLOCK(&cfg->wps_sync, flags);

/* Ensure this API is called from sleepable context. */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&cfg->wps_session[inst].timer);
#else
del_timer_sync(&cfg->wps_session[inst].timer);
#endif

WL_INFORM_MEM(("[%s][WPS] session deleted\n", ndev->name));
}
Expand Down
12 changes: 12 additions & 0 deletions src/wl_cfg_btcoex.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,11 @@ static void wl_cfg80211_bt_handler(struct work_struct *work)

if (btcx_inf->timer_on) {
btcx_inf->timer_on = 0;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&btcx_inf->timer);
#else
del_timer_sync(&btcx_inf->timer);
#endif
}

switch (btcx_inf->bt_state) {
Expand Down Expand Up @@ -444,7 +448,11 @@ void wl_cfg80211_btcoex_kill_handler(void)

if (btcoex_info_loc->timer_on) {
btcoex_info_loc->timer_on = 0;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&btcoex_info_loc->timer);
#else
del_timer_sync(&btcoex_info_loc->timer);
#endif
}
cancel_work_sync(&btcoex_info_loc->work);
wl_cfg80211_btcoex_init_handler_status();
Expand Down Expand Up @@ -601,7 +609,11 @@ int wl_cfg80211_set_btcoex_dhcp(struct net_device *dev, dhd_pub_t *dhd, char *co
WL_TRACE(("disable BT DHCP Timer\n"));
if (btco_inf->timer_on) {
btco_inf->timer_on = 0;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&btco_inf->timer);
#else
del_timer_sync(&btco_inf->timer);
#endif

if (btco_inf->bt_state != BT_DHCP_IDLE) {
/* ANDREY: case when framework signals DHCP end before STM timeout */
Expand Down
Loading