]> git.ipfire.org Git - thirdparty/hostap.git/commit
P2P: Update GO operating frequency after interface setup is completed
authorSunil Ravi <sunilravi@google.com>
Tue, 29 Jun 2021 18:18:20 +0000 (11:18 -0700)
committerJouni Malinen <j@w1.fi>
Wed, 2 Feb 2022 22:35:49 +0000 (00:35 +0200)
commit9aaf3e1d138a2a3125d791b65c26793428cc9bf0
treeb143aa2e6fc9c6d01e12b0a6410ff839437051e4
parent263daa30b593fbdb458af97ae8ba8b74eca83f13
P2P: Update GO operating frequency after interface setup is completed

Once the GO/AP interface initialization is completed, check if the
operating frequency set in the wpa_supplicant group interface structure
is different than the one set in the hostapd interface structure
associated with the group interface. If yes, update the frequency in the
wpa_supplicant group interface and network configuration to the
frequency set in the hostapd interface structure.

The frequency set in the hostapd interface is the correct/final
frequency wpa_supplicant configured in the kernel/driver. This is done
because wpa_supplicant may switch the initially requested primary and
secondary frequencies to get a secondary frequency with no beacons (to
avoid interference or 20/40 MHz coex logic). And the updated frequency
is informed by the driver only after the interface setup is completed
through the channel switch event - EVENT_CH_SWITCH. But wpa_supplicant
updates the frequency to applications through the P2P_GROUP_STARTED
event which is triggered before the EVENT_CH_SWITCH event. To send the
correct frequency to applications the frequency must be updated before
sending the P2P_GROUP_STARTED event.

Bug: 191272346
Test: Manual - Verified that GO frequency is updated and reported
correctly to Nearby application.

Signed-off-by: Sunil Ravi <sunilravi@google.com>
wpa_supplicant/ap.c