dbus: Share BSSID of AP in Credentials signal

Message ID 20180703111723epcas5p2774ab55fd2401b31522802ab75f12353~917pjfbjV1016810168epcas5p2F@epcas5p2.samsung.com
State New
Headers show
Series
  • dbus: Share BSSID of AP in Credentials signal
Related show

Commit Message

Saurav Babu July 3, 2018, 11:17 a.m.
wpa_s->current_ssid->bssid is empty when Credentials signal is sent
whereas cred->mac_addr contains actual MAC Address of AP for which
Credentials signal is being sent.
This patch sends cred->mac_addr as BSSID in Credentials signal so that
application is aware about the actual MAC Address of the AP for which
signal is received

Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
---
 wpa_supplicant/dbus/dbus_new.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch

diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c
index e0f16bb..1a4ffc4 100644
--- a/wpa_supplicant/dbus/dbus_new.c
+++ b/wpa_supplicant/dbus/dbus_new.c
@@ -764,10 +764,9 @@  void wpas_dbus_signal_wps_cred(struct wpa_supplicant *wpa_s,
 	if (cred->encr_type & WPS_ENCR_AES)
 		encr_type[et_num++] = "aes";
 
-	if ((wpa_s->current_ssid &&
-	     !wpa_dbus_dict_append_byte_array(
+	if (!wpa_dbus_dict_append_byte_array(
 		     &dict_iter, "BSSID",
-		     (const char *) wpa_s->current_ssid->bssid, ETH_ALEN)) ||
+		     (const char *) cred->mac_addr, ETH_ALEN) ||
 	    !wpa_dbus_dict_append_byte_array(&dict_iter, "SSID",
 					     (const char *) cred->ssid,
 					     cred->ssid_len) ||