diff options
| author | Dmitry Shmidt <dimitrysh@google.com> | 2014-04-29 10:53:02 -0700 |
|---|---|---|
| committer | Dmitry Shmidt <dimitrysh@google.com> | 2014-04-29 10:53:02 -0700 |
| commit | 7832adbbd72a1b784b7fb74a71a5d4085b0cb0d3 (patch) | |
| tree | 10a92c1068bf401c047f88baa658cafd2710f433 /wpa_supplicant | |
| parent | f9bdef99ce3b2858f2812c745a3d6bb093fb0e5d (diff) | |
| download | android_external_wpa_supplicant_8-7832adbbd72a1b784b7fb74a71a5d4085b0cb0d3.tar.gz android_external_wpa_supplicant_8-7832adbbd72a1b784b7fb74a71a5d4085b0cb0d3.tar.bz2 android_external_wpa_supplicant_8-7832adbbd72a1b784b7fb74a71a5d4085b0cb0d3.zip | |
Cumulative patch from commit c0333c8dd59b9e254d3fc725c984b1c0cd3d496a
c0333c8 Check rx_mgmt::frame more consistently against NULL
d6c6b1f Make sta NULL-check easier for static analyzers
0bceb8d Make dl_list_first() and dl_list_last() uses easier for static analyzers
5f693cb WPS HTTP: Remove unused assignment
ee4fefc Remove duplicated variable zeroing
4a9d0eb Make PMKID check easier for static analyzers
06df2aa Remove floating constant suffix 'd' from test coee
9670f87 ACS: Clean up ifdef CONFIG_ACS to avoid unreachable code
ece88f7 Make last_scan_res update easier for static analyzers
d06e9ac P2P: Verify operating channel validity for NFC connection handover
13a524a nl80211: Remove unnecessary wpa_driver_nl80211_set_freq() wrapper
e87ef75 nl80211: Add support for changing AP mode channel bandwidth
3057518 Sync with mac80211-next.git nl80211.h
5f0bca7 Retry initial 20/40 MHz co-ex scan if the driver is busy
587d60d Add AP mode support for HT 20/40 co-ex Action frame
9c47f6a hostapd: Extend support for HT 20/40 coexistence feature
196c9c7 Make channel parameters available in set_ap() driver operation
b7a6702 Indicate disconnection event on interface disabled
b89962b Fix wpa_config_read() with existing config block
27b4187 WPS: Print setsockopt() failure in debug log
52cb207 trace: Replace demangle.h with internal defines
0e80ea2 nl80211: Fix some coding style issues
a26582c Make qca-vendor.h independent of other header files
4a64d5a nl80211: Allocate QCA vendor subcmd for extended statistics
Change-Id: Ibabee77b2b87f04f99d6b1ca0f1ac741cb9222c0
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'wpa_supplicant')
| -rw-r--r-- | wpa_supplicant/bss.c | 3 | ||||
| -rw-r--r-- | wpa_supplicant/config_file.c | 12 | ||||
| -rw-r--r-- | wpa_supplicant/events.c | 8 | ||||
| -rw-r--r-- | wpa_supplicant/p2p_supplicant.c | 9 |
4 files changed, 22 insertions, 10 deletions
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index 482fc64f..f99a8a71 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -674,7 +674,8 @@ void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s, wpa_s->last_scan_res_size = siz; } - wpa_s->last_scan_res[wpa_s->last_scan_res_used++] = bss; + if (wpa_s->last_scan_res) + wpa_s->last_scan_res[wpa_s->last_scan_res_used++] = bss; } diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index 8d59f496..38429467 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -352,8 +352,8 @@ struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp) FILE *f; char buf[512], *pos; int errors = 0, line = 0; - struct wpa_ssid *ssid, *tail = NULL, *head = NULL; - struct wpa_cred *cred, *cred_tail = NULL, *cred_head = NULL; + struct wpa_ssid *ssid, *tail, *head; + struct wpa_cred *cred, *cred_tail, *cred_head; struct wpa_config *config; int id = 0; int cred_id = 0; @@ -369,8 +369,12 @@ struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp) "structure"); return NULL; } - head = config->ssid; - cred_head = config->cred; + tail = head = config->ssid; + while (tail && tail->next) + tail = tail->next; + cred_tail = cred_head = config->cred; + while (cred_tail && cred_tail->next) + cred_tail = cred_tail->next; wpa_printf(MSG_DEBUG, "Reading configuration file '%s'", name); f = fopen(name, "r"); diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 7eedd837..9b7323bb 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -3366,6 +3366,14 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, } #endif /* CONFIG_P2P */ + if (wpa_s->wpa_state >= WPA_AUTHENTICATING) { + /* + * Indicate disconnection to keep ctrl_iface events + * consistent. + */ + wpa_supplicant_event_disassoc( + wpa_s, WLAN_REASON_DEAUTH_LEAVING, 1); + } wpa_supplicant_mark_disassoc(wpa_s); radio_remove_works(wpa_s, NULL, 0); diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 49b2cd28..522d277a 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -6781,7 +6781,7 @@ void wpas_p2p_new_psk_cb(struct wpa_supplicant *wpa_s, const u8 *mac_addr, { struct wpa_ssid *ssid = wpa_s->current_ssid; struct wpa_ssid *persistent; - struct psk_list_entry *p; + struct psk_list_entry *p, *last; if (psk_len != sizeof(p->psk)) return; @@ -6841,10 +6841,9 @@ void wpas_p2p_new_psk_cb(struct wpa_supplicant *wpa_s, const u8 *mac_addr, } os_memcpy(p->psk, psk, psk_len); - if (dl_list_len(&persistent->psk_list) > P2P_MAX_STORED_CLIENTS) { - struct psk_list_entry *last; - last = dl_list_last(&persistent->psk_list, - struct psk_list_entry, list); + if (dl_list_len(&persistent->psk_list) > P2P_MAX_STORED_CLIENTS && + (last = dl_list_last(&persistent->psk_list, + struct psk_list_entry, list))) { wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Remove oldest PSK entry for " MACSTR " (p2p=%u) to make room for a new one", MAC2STR(last->addr), last->p2p); |
