# bes2600/join-confirm-reset-danctnix Danctnix-flavor patch closing besser#25 (wsm_join_confirm failure cascade). ## What it does When firmware returns status 1 on a JOIN command (`wsm_join_confirm ret 1`), add a direct `wsm_reset(...)` call so the firmware returns to a clean IDLE state, plus `queue_work(workqueue, &priv->unjoin_work)` for serialisation of the next association attempt. ## Why it's a fork-divergence fix `cw1200_join_work()` (cw1200 ancestor, `drivers/net/wireless/st/cw1200/sta.c:1339-1344`) queues `unjoin_work` on join failure: `cw1200_do_unjoin()` calls `wsm_reset` when `join_status == STA`. bes2600's `bes2600_unjoin_work()` gates the same `wsm_reset` on `join_status != PASSIVE`. After a failed JOIN, `join_status` stays PASSIVE (only set to STA on success) — queuing `unjoin_work` alone is insufficient on bes2600. The danctnix variant carries a direct `wsm_reset` in the failure path *and* the queue_work serialisation. ## Observable effects (pkgrel=6 soak) Beyond closing the cascade (besser#25 acceptance), this patch also collapsed the periodic ~600 ms latency jitter on ohm: | | pkgrel=5 | pkgrel=6 | |---|---|---| | max RTT | 612 ms | 13.9 ms | | mdev | 103.5 ms | 1.55 ms | The bgscan-driven roam-attempt to a 5 GHz BSSID followed by `wsm_join` reject was briefly stalling TX every minute even when the cascade did not fire. ## Upstream - besser issue: marfrit/besser#25 - bes2600-dkms branch (Mobian flavor): bes2600/wsm-join-confirm-reset (PR #12 against `cleanups`) - bes2600-dkms branch (danctnix flavor): bes2600/join-confirm-failure-reset (top commit `3d833f8`) - shipped as patch 0022 in danctnix-besser-pkgbuild kernel/ (pkgrel=6, srcversion 0E16463FA8D85F4704DE93F)