wpa_supplicant: Notify freq change on CH_SWITCH
wpa_supplicant does not send a D-Bus notification of the BSS frequency change when a CSA happens. Sending a PropertyChanged signal with the updated frequency will notify the network manager quickly, instead of waiting for the next scan results. Signed-off-by: Arowa Suliman <arowa@chromium.org> Reviewed-by: Brian Norris <briannorris@chromium.org>
This commit is contained in:
parent
a033e886b2
commit
b829b7003a
3 changed files with 20 additions and 14 deletions
|
@ -19,18 +19,6 @@
|
|||
#include "scan.h"
|
||||
#include "bss.h"
|
||||
|
||||
|
||||
#define WPA_BSS_FREQ_CHANGED_FLAG BIT(0)
|
||||
#define WPA_BSS_SIGNAL_CHANGED_FLAG BIT(1)
|
||||
#define WPA_BSS_PRIVACY_CHANGED_FLAG BIT(2)
|
||||
#define WPA_BSS_MODE_CHANGED_FLAG BIT(3)
|
||||
#define WPA_BSS_WPAIE_CHANGED_FLAG BIT(4)
|
||||
#define WPA_BSS_RSNIE_CHANGED_FLAG BIT(5)
|
||||
#define WPA_BSS_WPS_CHANGED_FLAG BIT(6)
|
||||
#define WPA_BSS_RATES_CHANGED_FLAG BIT(7)
|
||||
#define WPA_BSS_IES_CHANGED_FLAG BIT(8)
|
||||
|
||||
|
||||
static void wpa_bss_set_hessid(struct wpa_bss *bss)
|
||||
{
|
||||
#ifdef CONFIG_INTERWORKING
|
||||
|
@ -588,8 +576,8 @@ static u32 wpa_bss_compare_res(const struct wpa_bss *old,
|
|||
}
|
||||
|
||||
|
||||
static void notify_bss_changes(struct wpa_supplicant *wpa_s, u32 changes,
|
||||
const struct wpa_bss *bss)
|
||||
void notify_bss_changes(struct wpa_supplicant *wpa_s, u32 changes,
|
||||
const struct wpa_bss *bss)
|
||||
{
|
||||
if (changes & WPA_BSS_FREQ_CHANGED_FLAG)
|
||||
wpas_notify_bss_freq_changed(wpa_s, bss->id);
|
||||
|
|
|
@ -20,6 +20,16 @@ struct wpa_scan_res;
|
|||
#define WPA_BSS_ANQP_FETCH_TRIED BIT(6)
|
||||
#define WPA_BSS_OWE_TRANSITION BIT(7)
|
||||
|
||||
#define WPA_BSS_FREQ_CHANGED_FLAG BIT(0)
|
||||
#define WPA_BSS_SIGNAL_CHANGED_FLAG BIT(1)
|
||||
#define WPA_BSS_PRIVACY_CHANGED_FLAG BIT(2)
|
||||
#define WPA_BSS_MODE_CHANGED_FLAG BIT(3)
|
||||
#define WPA_BSS_WPAIE_CHANGED_FLAG BIT(4)
|
||||
#define WPA_BSS_RSNIE_CHANGED_FLAG BIT(5)
|
||||
#define WPA_BSS_WPS_CHANGED_FLAG BIT(6)
|
||||
#define WPA_BSS_RATES_CHANGED_FLAG BIT(7)
|
||||
#define WPA_BSS_IES_CHANGED_FLAG BIT(8)
|
||||
|
||||
struct wpa_bss_anqp_elem {
|
||||
struct dl_list list;
|
||||
u16 infoid;
|
||||
|
@ -120,6 +130,8 @@ static inline const u8 * wpa_bss_ie_ptr(const struct wpa_bss *bss)
|
|||
return bss->ies;
|
||||
}
|
||||
|
||||
void notify_bss_changes(struct wpa_supplicant *wpa_s, u32 changes,
|
||||
const struct wpa_bss *bss);
|
||||
void wpa_bss_update_start(struct wpa_supplicant *wpa_s);
|
||||
void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s,
|
||||
struct wpa_scan_res *res,
|
||||
|
|
|
@ -4986,6 +4986,12 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||
|
||||
wpa_s->assoc_freq = data->ch_switch.freq;
|
||||
wpa_s->current_ssid->frequency = data->ch_switch.freq;
|
||||
if (wpa_s->current_bss &&
|
||||
wpa_s->current_bss->freq != data->ch_switch.freq) {
|
||||
wpa_s->current_bss->freq = data->ch_switch.freq;
|
||||
notify_bss_changes(wpa_s, WPA_BSS_FREQ_CHANGED_FLAG,
|
||||
wpa_s->current_bss);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SME
|
||||
switch (data->ch_switch.ch_offset) {
|
||||
|
|
Loading…
Reference in a new issue