Re: [PATCH] wifi: zd1211rw: unwind failed interface additions

From: Johannes Berg

Date: Wed Oct 21 2026 - 06:14:53 EST


On Mon, 2026-10-19 at 09:32 +0800, Jiale Yao wrote:
> zd1211rw stores the vif and interface type before programming the MAC
> and receive configuration. If that setup fails, mac80211 does not call
> remove_interface and the stale type prevents another interface from
> being added.
>
> Clear the vif and type and restore the hardware MAC state before
> returning the setup error.

This is completely crazy. "I have an LLM and it found something that
doesn't make sense to it" is not a reason to send a patch.

Does this actually matter at all? This driver only supports a single
interface anyway - who cares about the hardware state when it's going to
be shut down right away?!

johannes