wiphy_delayed_work_pending(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual page for wiphy_delayed_work_pending(9) โ€” this is part 1 of 3, so buckle up ๐Ÿ’…

โœจ NAME โœจ

wiphy_delayed_work_pending โ€” find out whether a wiphy delayable work item is currently pending. that's the whole job. it's giving detective energy ๐Ÿ”

๐ŸŒธ SYNOPSIS ๐ŸŒธ

bool wiphy_delayed_work_pending (struct wiphy *wiphy , struct
wiphy_delayed_work *dwork );

๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • wiphy โ€” the wiphy, and it's literally there for debug purposes ๐Ÿ›
  • dwork โ€” the delayed work in question, aka the one you're side-eyeing ๐Ÿ‘€

๐Ÿ’– RETURN ๐Ÿ’–

true if the timer is pending, false otherwise โ€” no in-between, no "maybe", periodt ๐Ÿ’…

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so the way wiphy_delayed_work_queue works is by setting a timer which, when it expires, calls wiphy_work_queue to queue the wiphy work. because wiphy_delayed_work_queue uses mod_timer, if it is called twice and the second call happens before the first call deadline, the work will be rescheduled for the second deadline and won't run before that. no cap ๐Ÿ•

wiphy_delayed_work_pending can be used to detect if calling wiphy_work_delayed_work_queue would start a new work schedule or delay a previous one. as seen below, it cannot be used to detect precisely if the work has finished to execute nor if it is currently executing. so like, it's a vibe check, not a full background check ๐Ÿ’€

here's the timeline the page draws out โ€” yes the alignment is giving "group project at 3am", but every token is doing its job:

       CPU0                                CPU1 wiphy_delayed_work_queue(wk)
       mod_timer(wk->timer) wiphy_delayed_work_pending(wk) -> true

       [...]  expire_timers(wk->timer) detach_timer(wk->timer)
       wiphy_delayed_work_pending(wk) -> false wk->timer->function
       | wiphy_work_queue(wk)                          | delayed work pending
       list_add_tail                              | returns false but
       queue_work(cfg80211_wiphy_work)              | wk->func has not | been
       run yet [...]                                           |
       cfg80211_wiphy_work                          | wk->func
       V

so on CPU0 you've got the mod_timer(wk->timer) moment, and CPU1 checks wiphy_delayed_work_pending(wk) and gets true โœจ. then later expire_timers(wk->timer) and detach_timer(wk->timer) happen, and wiphy_delayed_work_pending(wk) -> false shows up while wk->timer->function is doing its thing โ€” and the diagram name-drops wiphy_work_queue(wk), list_add_tail, queue_work(cfg80211_wiphy_work), cfg80211_wiphy_work, and wk->func along the way ๐ŸŒ€

and the key detail is literally right there: wiphy_delayed_work_pending(wk) -> false can happen while wk->func has not been run yet. it's highkey not a perfect "is it done?" detector, and that's the tea ๐Ÿต

so likeโ€ฆ the whole entire rest of the kernel literally lives in there?? bestie. anyway, everything below hangs off the kernel file ./include/net/cfg80211.h, and every single one of these is a real page you can go read. buckle up ๐Ÿ’…


okay that was the channel/capability girlies โœจ now we get into the actual doing-stuff zone:


scanning arc!! ๐Ÿ” this is the "where are the access points" part and it's giving main character energy:

  • Scanning and BSS list handling(9)
  • struct cfg80211_ssid(9)
  • struct cfg80211_scan_info(9)
  • struct cfg80211_scan_6ghz_params(9)
  • struct cfg80211_scan_request(9)
  • struct cfg80211_match_set(9)
  • struct cfg80211_sched_scan_plan(9)
  • struct cfg80211_bss_select_adjust(9)
  • struct cfg80211_sched_scan_request(9)
  • enum cfg80211_signal_type(9)
  • struct cfg80211_inform_bss(9)
  • struct cfg80211_bss_ies(9)
  • struct cfg80211_bss(9)
  • ieee80211_bss_get_elem(9)
  • ieee80211_bss_get_ie(9)
  • struct cfg80211_auth_request(9)
  • struct cfg80211_assoc_link(9)
  • struct cfg80211_ml_reconf_req(9)
  • enum cfg80211_assoc_req_flags(9)
  • struct cfg80211_assoc_request(9)
  • struct cfg80211_deauth_request(9)
  • struct cfg80211_disassoc_request(9)
  • struct cfg80211_ibss_params(9)
  • struct cfg80211_bss_selection(9)
  • struct cfg80211_connect_params(9)
  • enum cfg80211_connect_params_changed(9)
  • enum wiphy_params_flags(9)
  • struct cfg80211_pmksa(9)
  • struct cfg80211_pkt_pattern(9)
  • struct cfg80211_wowlan_tcp(9)
  • struct cfg80211_wowlan(9)
  • struct cfg80211_coalesce_rules(9)
  • struct cfg80211_coalesce(9)
  • struct cfg80211_wowlan_nd_match(9)
  • struct cfg80211_wowlan_nd_info(9)
  • struct cfg80211_wowlan_wakeup(9)
  • struct cfg80211_gtk_rekey_data(9)
  • struct cfg80211_update_ft_ies_params(9)
  • struct cfg80211_mgmt_tx_params(9)
  • struct cfg80211_dscp_exception(9)
  • struct cfg80211_dscp_range(9)
  • struct cfg80211_qos_map(9)
  • Neighbor Awareness Networking (NAN)(9)
  • struct cfg80211_nan_band_config(9)
  • struct cfg80211_nan_conf(9)
  • struct cfg80211_nan_channel(9)
  • struct cfg80211_nan_local_sched(9)
  • struct cfg80211_nan_peer_map(9)
  • struct cfg80211_nan_peer_sched(9)
  • enum cfg80211_nan_conf_changes(9)
  • struct cfg80211_nan_func_filter(9)
  • struct cfg80211_nan_func(9)
  • struct cfg80211_pmk_conf(9)
  • struct cfg80211_external_auth_params(9)
  • struct cfg80211_ftm_responder_stats(9)
  • struct cfg80211_pmsr_ftm_result(9)
  • struct cfg80211_pmsr_result(9)
  • struct cfg80211_pmsr_ftm_request_peer(9)
  • struct cfg80211_pmsr_request_peer(9)
  • struct cfg80211_pmsr_request(9)
  • struct cfg80211_update_owe_info(9)
  • struct mgmt_frame_regs(9)

the big structural ones โ€” ops, flags, caps, and the wiphy itself ๐Ÿ‘‘ (yes the page you're literally on is in this list, we're being so meta):


utility girlies ๐Ÿงฐ the little helpers that do the math so you don't have to:

โ€ฆand yeah, the list keeps going, bestie ๐Ÿ˜ญ because this kernel has range and we respect it. Buckle up, here's the rest of the cross-reference wall of fame ๐Ÿซถ


And that's a wrap on this whole page, bestie ๐Ÿ’– it lives over in ./include/net and it's dated October 2026, so likeโ€ฆ future-coded of it. Go read the actual functions now, you're gonna slay โœจ๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from