On Mon, 2023-03-06 at 18:50 +0100, Lorenzo Bianconi wrote: > > +struct ieee80211_ops * > +mt7921_get_mac80211_ops(struct device *dev, void *drv_data, u8 *fw_features) > +{ > + struct ieee80211_ops *ops; > + > + ops = devm_kmemdup(dev, &mt7921_ops, sizeof(mt7921_ops), GFP_KERNEL); It's kind of nice to have static const ops so they can't be a target for overwriting and function pointer injection, maybe just declare two copies with a macro or so, with and without chanctx, and return the appropriate one? It won't even use more memory unless you never run a device w/o chanctx ops. johannes