Skip to content

VER-887: wifi: ath12k: handle XRETRY peer kickout as beacon loss for station mode#82

Merged
GadiAvr merged 2 commits into
tg-v6.18-ath12k-nextfrom
BUG-887-Link-stay-up-in-station-when-power-off-AP
May 7, 2026
Merged

VER-887: wifi: ath12k: handle XRETRY peer kickout as beacon loss for station mode#82
GadiAvr merged 2 commits into
tg-v6.18-ath12k-nextfrom
BUG-887-Link-stay-up-in-station-when-power-off-AP

Conversation

@GadiAvr
Copy link
Copy Markdown

@GadiAvr GadiAvr commented May 7, 2026

Root cause found: The firmware sends reason=1 (WMI_PEER_STA_KICKOUT_REASON_XRETRY — excessive TX retries) when the AP disappears, but the code only handled reason=2 (INACTIVITY) for beacon miss. XRETRY was falling through to default which just reports low ACK without triggering connection loss.
I added WMI_PEER_STA_KICKOUT_REASON_XRETRY as a case that also triggers ath12k_mac_handle_beacon_miss for station mode. This is the same approach used by ath10k/ath11k for the same scenario — when a station can't reach the AP (excessive retries), it should be treated as a lost connection.
It's working. The full flow is now correct:

  1. Firmware sends kickout with reason=1 (XRETRY)
  2. Beacon miss is reported → ieee80211_beacon_loss()
  3. mac80211 probes the AP (fails since AP is off)
  4. "Connection to AP lost" is declared (~6 seconds after first miss)
  5. mac80211 tries to reconnect (auth attempts time out since AP is still off)
    The fix is: adding WMI_PEER_STA_KICKOUT_REASON_XRETRY to the case that triggers beacon miss handling for station mode.

@GadiAvr GadiAvr changed the title BUG-887-Link-stay-up-in-station-when-power-off-AP BUG-887-wifi: ath12k: handle XRETRY peer kickout as beacon loss for station mode May 7, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Treats ath12k firmware “peer sta kickout” events with reason XRETRY (excessive TX retries) as a beacon-loss equivalent in station mode, so mac80211’s connection-loss flow is triggered rather than only reporting low ACK.

Changes:

  • Adds WMI_PEER_STA_KICKOUT_REASON_XRETRY to the kickout-reason switch cases that invoke ath12k_mac_handle_beacon_miss() for NL80211_IFTYPE_STATION.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@GadiAvr GadiAvr marked this pull request as ready for review May 7, 2026 10:30
@GadiAvr GadiAvr requested a review from Copilot May 7, 2026 10:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@adrian-nicolau adrian-nicolau changed the title BUG-887-wifi: ath12k: handle XRETRY peer kickout as beacon loss for station mode VER-887: wifi: ath12k: handle XRETRY peer kickout as beacon loss for station mode May 7, 2026
@GadiAvr GadiAvr merged commit e97cb01 into tg-v6.18-ath12k-next May 7, 2026
9 checks passed
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.

3 participants