Update GO operating frequency after interface setup is completed.

Once the GO/AP interface initialization is completed, check
if the operating frequency set in wpa_supplicant group interface structure is
different than the one set in hostapd interface structure associated
with the group interface. If yes, update frequency in wpa_supplicant group interface
and Network configuration to the frequency set in hostapd interface
structure. The frequency set in hostapd interface is the correct/final
frequency supplicant configured in kernel/driver.
This is done because supplicant may switch the initially
requested primary and seconday frequencies to get secondary frequency with no beacons
(To avoid interference or 20/40 coex logic). And the updated frequency
is informed by driver only after the interface setup is completed
through channel switch event - EVENT_CH_SWITCH. But supplicant
update the frequency to applications through P2P_GROUP_STARTED event
which is triggered before EVENT_CH_SWITCH event. To send the correct
frequency to applications the frequency must be updated before sending

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

Change-Id: I70910365b8acebfbefdd853e7a6cd3f9f6ec6a5c
1 file changed