data->responder = true;
 }
 
-static bool iwl_mvm_is_ftm_responder_chanctx(struct iwl_mvm *mvm,
-                                            struct ieee80211_chanctx_conf *ctx)
+bool iwl_mvm_is_ftm_responder_chanctx(struct iwl_mvm *mvm,
+                                     struct ieee80211_chanctx_conf *ctx)
 {
        struct iwl_mvm_ftm_responder_iter_data data = {
                .responder = false,
 {
        u16 *phy_ctxt_id = (u16 *)ctx->drv_priv;
        struct iwl_mvm_phy_ctxt *phy_ctxt;
-       bool use_def = iwl_mvm_is_ftm_responder_chanctx(mvm, ctx) ||
-               iwl_mvm_enable_fils(mvm, ctx);
-       struct cfg80211_chan_def *def = use_def ? &ctx->def : &ctx->min_def;
+       struct cfg80211_chan_def *def = iwl_mvm_chanctx_def(mvm, ctx);
        int ret;
 
        lockdep_assert_held(&mvm->mutex);
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
        u16 *phy_ctxt_id = (u16 *)ctx->drv_priv;
        struct iwl_mvm_phy_ctxt *phy_ctxt = &mvm->phy_ctxts[*phy_ctxt_id];
-       bool use_def = iwl_mvm_is_ftm_responder_chanctx(mvm, ctx) ||
-               iwl_mvm_enable_fils(mvm, ctx);
-       struct cfg80211_chan_def *def = use_def ? &ctx->def : &ctx->min_def;
+       struct cfg80211_chan_def *def = iwl_mvm_chanctx_def(mvm, ctx);
 
        if (WARN_ONCE((phy_ctxt->ref > 1) &&
                      (changed & ~(IEEE80211_CHANCTX_CHANGE_WIDTH |
 
 int iwl_mvm_mld_get_primary_link(struct iwl_mvm *mvm,
                                 struct ieee80211_vif *vif,
                                 unsigned long usable_links);
+
+bool iwl_mvm_is_ftm_responder_chanctx(struct iwl_mvm *mvm,
+                                     struct ieee80211_chanctx_conf *ctx);
+
+static inline struct cfg80211_chan_def *
+iwl_mvm_chanctx_def(struct iwl_mvm *mvm, struct ieee80211_chanctx_conf *ctx)
+{
+       bool use_def = iwl_mvm_is_ftm_responder_chanctx(mvm, ctx) ||
+               iwl_mvm_enable_fils(mvm, ctx);
+
+       return use_def ? &ctx->def : &ctx->min_def;
+}
+
 #endif /* __IWL_MVM_H__ */