STRUCT IWL_MVM_SWITCH_VIF_CHANCTX_OPS(9)
π 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 atieee80211_vifandieee80211_chanctx_confyou'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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms