bes2600: wsm_join_confirm failure leaves firmware dirty — wsm_reset missing in join failure path (backlog) #24
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Backlog issue. Full analysis in commit 8dcacc4 on branch bes2600/join-confirm-failure-reset in marfrit/bes2600-dkms.
Root cause
After
wsm_join_confirm()returns status 1 (failure), bes2600 clears bookkeeping but does not reset firmware. A rapid second JOIN hits inconsistent firmware state, causingbes2600_sdio_read_rx_batchSDIO error →wifi_force_closecascade.Observed: boot -1 on pkgrel=5, two JOIN failures to wohnzimmer 5 GHz AP (
c0:25:06:e6:5b:32) 10 min apart, second triggers full cascade.cw1200 ancestor (sta.c:1339-1344)
cw1200 queues
unjoin_workon join failure: "Tx lock still held, unjoin will clear it."cw1200_do_unjoin()callswsm_reset()whenjoin_status == STA.bes2600 divergence
bes2600_unjoin_work()gateswsm_resetonjoin_status != PASSIVE. After a failed JOIN,join_statusstays PASSIVE (set to STA only on success) → wsm_reset never fires → firmware left in post-reject limbo.Fix (commit 8dcacc4)
Direct
wsm_reset(hw_priv, &join_fail_reset, priv->if_id)in the failure path (compensates for PASSIVE gate). Contract: wsm_reset takes only wsm_cmd_lock; conf_lock held here is compatible; wsm_oper_unlock already called in wsm_join_confirm before error return.queue_work(hw_priv->workqueue, &priv->unjoin_work)instead of directwsm_unlock_tx()— serialises next association attempt through workqueue, preventing race between second JOIN and first failure aftermath.Testing needed