STRUCT IWL_MVM_SWITCH_VIF_CHANCTX_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct iwl_mvm_switch_vif_chanctx_ops(9) β€” kernel API manual, bestie edition

okay so picture this: you're deep in the iwlwifi kernel tree, in the Linux kernel API manual β€” the struct iwl_..._chanctx_ops(9) page specifically β€” and you've found the little struct that makes switch_vif_chanctx() work. welcome, we're learning her together 🫢


✨ NAME ✨

struct iwl_mvm_switch_vif_chanctx_ops β€” the callbacks for switch_vif_chanctx(). that's it, that's the whole vibe. literally just a container of function pointers. lowkey iconic of her πŸ’…


🌸 SYNOPSIS 🌸

struct iwl_mvm_switch_vif_chanctx_ops {
    int (*__assign_vif_chanctx)(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct ieee80211_bss_conf *link_conf, struct ieee80211_chanctx_conf *ctx, bool switching_chanctx);
    void (*__unassign_vif_chanctx)(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct ieee80211_bss_conf *link_conf, struct ieee80211_chanctx_conf *ctx, bool switching_chanctx);
 };

two members. two function pointers. that's the whole struct, no cap. copy those signatures exactly if you're ever typing them out, fr fr πŸ”₯


πŸŽ€ Members πŸŽ€

  • __assign_vif_chanctx β€” pointer to the function that assigns a chanctx to a given vif. she's the "you get a channel context!!" one πŸ¦‹
  • __unassign_vif_chanctx β€” pointer to the function that unassigns a chanctx to a given vif. the take-backsies one πŸ™ˆ

(yes, the description literally says "unassigns a chanctx to a given vif" β€” I'm not fixing it, I'm just delivering it to you verbatim. we respect the source πŸ’€)


πŸ’– Description πŸ’–

so here's the tea β˜• β€” the MLD version and the non-MLD version of switch_vif_chanctx are basically twinsies. the only difference between them? these function calls right here. that's it. that's the entire divergence.

so instead of duplicating a whole chunk of logic, each version just sends its own specific function calls into iwl_mvm_switch_vif_chanctx_common. shared code, different callbacks, main character energy all around πŸ‘‘

like… that's good design bestie. we love a DRY moment ✨


🌈 SEE ALSO 🌈

all the neighbors in Kernel file ./drivers/net/wireless/intel/iwlwifi/mvm/mvm.h β€” go say hi πŸ‘‹

  • struct iwl_mvm_mod_params(9)
  • enum iwl_power_scheme(9)
  • enum iwl_mvm_low_latency_force(9)
  • enum iwl_mvm_low_latency_cause(9)
  • struct iwl_mvm_link_bf_data(9)
  • struct iwl_probe_resp_data(9)
  • struct iwl_mvm_vif_link_info(9)
  • struct iwl_mvm_vif(9)
  • struct iwl_mvm_tt_mgmt(9)
  • struct iwl_mvm_thermal_device(9)
  • struct iwl_mvm_reorder_buffer(9)
  • struct iwl_mvm_reorder_buf_entry(9)
  • struct iwl_mvm_baid_data(9)
  • struct iwl_mvm_tvqm_txq_info(9)
  • struct iwl_mvm_acs_survey_channel(9)
  • enum iwl_mvm_status(9)
  • struct iwl_mvm_roc_ops(9)

that's seventeen references, all present and accounted for πŸ’œ iykyk


lowkey a reminder that this is kernel wireless driver internals β€” if you're poking at ieee80211_vif and ieee80211_chanctx_conf you're already in the deep end, so read the actual source before trusting a group chat 🫢

and that's the page!! mwah πŸ’‹ this gem is from the Kernel API Manual, sourced from ./drivers/net/wireless/intel/i..., dated October 2026. go slay your channel contexts, bestie 🧚⭐

πŸ“¦ where this page comes from