Skip to content

Conversation

@zbowling
Copy link

@zbowling zbowling commented Jan 1, 2026

Add lockdep_assert_held() calls to critical MCU functions to help catch mutex violations during development and debugging. This follows the pattern used in other mt76 drivers (mt7996, mt7915, mt7615).

Functions with new assertions

  • mt7925_mcu_add_bss_info(): Core BSS configuration MCU command
  • mt7925_mcu_sta_update(): Station record update MCU command
  • mt7925_mcu_uni_bss_ps(): Power save state MCU command

Purpose

These functions modify firmware state and must be called with the device mutex held to prevent race conditions. The lockdep assertions will:

  1. Help catch mutex violations during development with CONFIG_LOCKDEP=y
  2. Document the locking requirements for these functions
  3. Make debugging easier when new callers are added

Background

This is a follow-up to my mutex protection patches (PRs #1029, #1030, #1031, #1032, #1033, #1034) and helps ensure the locking requirements are properly enforced.

Related PRs:

Signed-off-by: Zac Bowling zac@zacbowling.com

Add lockdep_assert_held() calls to critical MCU functions to help catch
mutex violations during development and debugging. This follows the
pattern used in other mt76 drivers (mt7996, mt7915, mt7615).

Functions with new assertions:
- mt7925_mcu_add_bss_info(): Core BSS configuration MCU command
- mt7925_mcu_sta_update(): Station record update MCU command
- mt7925_mcu_uni_bss_ps(): Power save state MCU command

These functions modify firmware state and must be called with the
device mutex held to prevent race conditions.

Signed-off-by: Zac Bowling <zac@zacbowling.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant