bes2600: Patch E — skip ps_state_lock when PSM-known-disabled #8
Reference in New Issue
Block a user
Delete Branch "bes2600/ps-state-lock-skip-pm-disabled"
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?
Per the Opus structural critique (PR #8 §2.4) and Sonnet review item 5.
What this patch does
The per-RX-frame early-data path in
bes2600_rx_cb(txrx.c:1945-1951in cleanups+G+D) takesspin_lock_bh(&priv->ps_state_lock)to double-check whether a link entry has transitioned toBES2600_LINK_SOFT(AP-side power-save soft-link state).When c7 has latched
hw_priv->bes_power.pm_unsupported = true(firmware does not honour PSM — seefeedback_bes2600_firmware_no_psmmemory), the AP-side power-save state machine is dead and link entries never transition toLINK_SOFT. The per-framespin_lock_bh+ double-check is wasted work.This patch gates the lock acquisition on
!pm_unsupported. When the latch is on (the steady state on the production-shipped firmware), early_data RX frames bypass the spinlock and deliver directly viaieee80211_rx_irqsafe.If a future firmware drop fixes PSM, c7 self-clears
pm_unsupportedon the first real PM_INDICATION and the locked path resumes — the predicate is dynamic.Scope
Narrower than Sonnet originally framed: only the per-RX-frame hot path. Other
ps_state_locksites in txrx.c (lines 657, 1256, 1420, 1528) are TX submission / multicast-start / link-id paths, NOT per-frame RX, and NOT on the Bug #5 hot path. Left untouched.Diff
1 file (txrx.c), +24/-6 net.
Build verified
bes2600.kobuilds clean on ohm sandbox: srcversionB5922B4933590F33207EE97, 0 warnings, 0 errors.Test plan
/var/tmp/bes2600.patchF.rollback.koon ohm