Skip to content

Conversation

@duc3503
Copy link

@duc3503 duc3503 commented Nov 13, 2025

This change resolves P2P GO/client pairing failures by:

  • Ensuring the correct SSID is always used during connection through an exact (BSSID, SSID) match rather than a wildcard lookup.
  • Fixing the P2P group formation fails on 5 GHz bands.

Duc Huynh BV added 2 commits November 13, 2025 14:29
During Wi-Fi Direct (P2P) connection setup, the peer device advertises
both a wildcard “DIRECT-” Probe Response (for P2P-Device
discoverability) and a full SSID Probe Response/Beacon (for P2P-GO).
Both share the same BSSID, causing cfg80211_get_bss() — which previously
looked up by BSSID only — to sometimes return the wildcard entry
(“DIRECT-”, len=7) instead of the actual GO SSID. This led to connection
failures when cfg80211_connect_bss() received incorrect SSID information.

This patch updates the BSS lookup logic in ioctl_cfg80211.c to prefer an
exact (BSSID, SSID) match first. If no exact entry is found, it falls
back to the legacy BSSID-only search. This ensures correct SSID
association during P2P connection without affecting normal discovery
behavior.

Signed-off-by: Duc Huynh BV <[email protected]>
The update_BCNTIM() function was always adding a fixed +3 offset assuming that
the DS Parameter Set IE (length 3) was present. However, on 5 GHz beacons, the
DS IE is typically absent. As a result, TIM was inserted 3 bytes past the
correct offset, overwriting the first bytes of the following IE (usually RSN),
which led to corrupted RSN contents (e.g., “RSN ver 0x0501”) and failed
associations.

This patch fixes the issue by checking for the presence of _DSSET_IE_ using
rtw_get_ie() and adding the +3 offset only if the DS Parameter IE actually
exists.  This preserves RSN and other IEs, ensures correct beacon formatting on
5 GHz, and restores stable P2P and 5 GHz connectivity.

Signed-off-by: Duc Huynh BV <[email protected]>
@duc3503 duc3503 changed the title Fix P2P pairing issue between rtl8812au devices Fix Android P2P pairing issue between rtl8812au devices Nov 13, 2025
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