notify.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. /*
  2. * wpa_supplicant - Event notifications
  3. * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #include "utils/includes.h"
  9. #include "utils/common.h"
  10. #include "common/wpa_ctrl.h"
  11. #include "config.h"
  12. #include "wpa_supplicant_i.h"
  13. #include "wps_supplicant.h"
  14. #include "dbus/dbus_common.h"
  15. #include "dbus/dbus_old.h"
  16. #include "dbus/dbus_new.h"
  17. #include "rsn_supp/wpa.h"
  18. #include "driver_i.h"
  19. #include "scan.h"
  20. #include "p2p_supplicant.h"
  21. #include "sme.h"
  22. #include "notify.h"
  23. int wpas_notify_supplicant_initialized(struct wpa_global *global)
  24. {
  25. #ifdef CONFIG_DBUS
  26. if (global->params.dbus_ctrl_interface) {
  27. global->dbus = wpas_dbus_init(global);
  28. if (global->dbus == NULL)
  29. return -1;
  30. }
  31. #endif /* CONFIG_DBUS */
  32. return 0;
  33. }
  34. void wpas_notify_supplicant_deinitialized(struct wpa_global *global)
  35. {
  36. #ifdef CONFIG_DBUS
  37. if (global->dbus)
  38. wpas_dbus_deinit(global->dbus);
  39. #endif /* CONFIG_DBUS */
  40. }
  41. int wpas_notify_iface_added(struct wpa_supplicant *wpa_s)
  42. {
  43. if (wpas_dbus_register_iface(wpa_s))
  44. return -1;
  45. if (wpas_dbus_register_interface(wpa_s))
  46. return -1;
  47. return 0;
  48. }
  49. void wpas_notify_iface_removed(struct wpa_supplicant *wpa_s)
  50. {
  51. /* unregister interface in old DBus ctrl iface */
  52. wpas_dbus_unregister_iface(wpa_s);
  53. /* unregister interface in new DBus ctrl iface */
  54. wpas_dbus_unregister_interface(wpa_s);
  55. }
  56. void wpas_notify_state_changed(struct wpa_supplicant *wpa_s,
  57. enum wpa_states new_state,
  58. enum wpa_states old_state)
  59. {
  60. /* notify the old DBus API */
  61. wpa_supplicant_dbus_notify_state_change(wpa_s, new_state,
  62. old_state);
  63. /* notify the new DBus API */
  64. wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_STATE);
  65. if (new_state == WPA_COMPLETED)
  66. wpas_p2p_notif_connected(wpa_s);
  67. else if (old_state >= WPA_ASSOCIATED && new_state < WPA_ASSOCIATED)
  68. wpas_p2p_notif_disconnected(wpa_s);
  69. sme_state_changed(wpa_s);
  70. #ifdef ANDROID
  71. wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_STATE_CHANGE
  72. "id=%d state=%d BSSID=" MACSTR " SSID=%s",
  73. wpa_s->current_ssid ? wpa_s->current_ssid->id : -1,
  74. new_state,
  75. MAC2STR(wpa_s->bssid),
  76. wpa_s->current_ssid && wpa_s->current_ssid->ssid ?
  77. wpa_ssid_txt(wpa_s->current_ssid->ssid,
  78. wpa_s->current_ssid->ssid_len) : "");
  79. #endif /* ANDROID */
  80. }
  81. void wpas_notify_disconnect_reason(struct wpa_supplicant *wpa_s)
  82. {
  83. wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_DISCONNECT_REASON);
  84. }
  85. void wpas_notify_network_changed(struct wpa_supplicant *wpa_s)
  86. {
  87. wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_CURRENT_NETWORK);
  88. }
  89. void wpas_notify_ap_scan_changed(struct wpa_supplicant *wpa_s)
  90. {
  91. wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_AP_SCAN);
  92. }
  93. void wpas_notify_bssid_changed(struct wpa_supplicant *wpa_s)
  94. {
  95. wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_CURRENT_BSS);
  96. }
  97. void wpas_notify_auth_changed(struct wpa_supplicant *wpa_s)
  98. {
  99. wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_CURRENT_AUTH_MODE);
  100. }
  101. void wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s,
  102. struct wpa_ssid *ssid)
  103. {
  104. wpas_dbus_signal_network_enabled_changed(wpa_s, ssid);
  105. }
  106. void wpas_notify_network_selected(struct wpa_supplicant *wpa_s,
  107. struct wpa_ssid *ssid)
  108. {
  109. wpas_dbus_signal_network_selected(wpa_s, ssid->id);
  110. }
  111. void wpas_notify_network_request(struct wpa_supplicant *wpa_s,
  112. struct wpa_ssid *ssid,
  113. enum wpa_ctrl_req_type rtype,
  114. const char *default_txt)
  115. {
  116. wpas_dbus_signal_network_request(wpa_s, ssid, rtype, default_txt);
  117. }
  118. void wpas_notify_scanning(struct wpa_supplicant *wpa_s)
  119. {
  120. /* notify the old DBus API */
  121. wpa_supplicant_dbus_notify_scanning(wpa_s);
  122. /* notify the new DBus API */
  123. wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_SCANNING);
  124. }
  125. void wpas_notify_scan_done(struct wpa_supplicant *wpa_s, int success)
  126. {
  127. wpas_dbus_signal_scan_done(wpa_s, success);
  128. }
  129. void wpas_notify_scan_results(struct wpa_supplicant *wpa_s)
  130. {
  131. /* notify the old DBus API */
  132. wpa_supplicant_dbus_notify_scan_results(wpa_s);
  133. wpas_wps_notify_scan_results(wpa_s);
  134. }
  135. void wpas_notify_wps_credential(struct wpa_supplicant *wpa_s,
  136. const struct wps_credential *cred)
  137. {
  138. #ifdef CONFIG_WPS
  139. /* notify the old DBus API */
  140. wpa_supplicant_dbus_notify_wps_cred(wpa_s, cred);
  141. /* notify the new DBus API */
  142. wpas_dbus_signal_wps_cred(wpa_s, cred);
  143. #endif /* CONFIG_WPS */
  144. }
  145. void wpas_notify_wps_event_m2d(struct wpa_supplicant *wpa_s,
  146. struct wps_event_m2d *m2d)
  147. {
  148. #ifdef CONFIG_WPS
  149. wpas_dbus_signal_wps_event_m2d(wpa_s, m2d);
  150. #endif /* CONFIG_WPS */
  151. }
  152. void wpas_notify_wps_event_fail(struct wpa_supplicant *wpa_s,
  153. struct wps_event_fail *fail)
  154. {
  155. #ifdef CONFIG_WPS
  156. wpas_dbus_signal_wps_event_fail(wpa_s, fail);
  157. #endif /* CONFIG_WPS */
  158. }
  159. void wpas_notify_wps_event_success(struct wpa_supplicant *wpa_s)
  160. {
  161. #ifdef CONFIG_WPS
  162. wpas_dbus_signal_wps_event_success(wpa_s);
  163. #endif /* CONFIG_WPS */
  164. }
  165. void wpas_notify_network_added(struct wpa_supplicant *wpa_s,
  166. struct wpa_ssid *ssid)
  167. {
  168. /*
  169. * Networks objects created during any P2P activities should not be
  170. * exposed out. They might/will confuse certain non-P2P aware
  171. * applications since these network objects won't behave like
  172. * regular ones.
  173. */
  174. if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s)
  175. wpas_dbus_register_network(wpa_s, ssid);
  176. }
  177. void wpas_notify_persistent_group_added(struct wpa_supplicant *wpa_s,
  178. struct wpa_ssid *ssid)
  179. {
  180. #ifdef CONFIG_P2P
  181. wpas_dbus_register_persistent_group(wpa_s, ssid);
  182. #endif /* CONFIG_P2P */
  183. }
  184. void wpas_notify_persistent_group_removed(struct wpa_supplicant *wpa_s,
  185. struct wpa_ssid *ssid)
  186. {
  187. #ifdef CONFIG_P2P
  188. wpas_dbus_unregister_persistent_group(wpa_s, ssid->id);
  189. #endif /* CONFIG_P2P */
  190. }
  191. void wpas_notify_network_removed(struct wpa_supplicant *wpa_s,
  192. struct wpa_ssid *ssid)
  193. {
  194. if (wpa_s->next_ssid == ssid)
  195. wpa_s->next_ssid = NULL;
  196. if (wpa_s->wpa)
  197. wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid);
  198. if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s)
  199. wpas_dbus_unregister_network(wpa_s, ssid->id);
  200. wpas_p2p_network_removed(wpa_s, ssid);
  201. }
  202. void wpas_notify_bss_added(struct wpa_supplicant *wpa_s,
  203. u8 bssid[], unsigned int id)
  204. {
  205. wpas_dbus_register_bss(wpa_s, bssid, id);
  206. wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_BSS_ADDED "%u " MACSTR,
  207. id, MAC2STR(bssid));
  208. }
  209. void wpas_notify_bss_removed(struct wpa_supplicant *wpa_s,
  210. u8 bssid[], unsigned int id)
  211. {
  212. wpas_dbus_unregister_bss(wpa_s, bssid, id);
  213. wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_BSS_REMOVED "%u " MACSTR,
  214. id, MAC2STR(bssid));
  215. }
  216. void wpas_notify_bss_freq_changed(struct wpa_supplicant *wpa_s,
  217. unsigned int id)
  218. {
  219. wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_FREQ, id);
  220. }
  221. void wpas_notify_bss_signal_changed(struct wpa_supplicant *wpa_s,
  222. unsigned int id)
  223. {
  224. wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_SIGNAL,
  225. id);
  226. }
  227. void wpas_notify_bss_privacy_changed(struct wpa_supplicant *wpa_s,
  228. unsigned int id)
  229. {
  230. wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_PRIVACY,
  231. id);
  232. }
  233. void wpas_notify_bss_mode_changed(struct wpa_supplicant *wpa_s,
  234. unsigned int id)
  235. {
  236. wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_MODE, id);
  237. }
  238. void wpas_notify_bss_wpaie_changed(struct wpa_supplicant *wpa_s,
  239. unsigned int id)
  240. {
  241. wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_WPA, id);
  242. }
  243. void wpas_notify_bss_rsnie_changed(struct wpa_supplicant *wpa_s,
  244. unsigned int id)
  245. {
  246. wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_RSN, id);
  247. }
  248. void wpas_notify_bss_wps_changed(struct wpa_supplicant *wpa_s,
  249. unsigned int id)
  250. {
  251. #ifdef CONFIG_WPS
  252. wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_WPS, id);
  253. #endif /* CONFIG_WPS */
  254. }
  255. void wpas_notify_bss_ies_changed(struct wpa_supplicant *wpa_s,
  256. unsigned int id)
  257. {
  258. wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_IES, id);
  259. }
  260. void wpas_notify_bss_rates_changed(struct wpa_supplicant *wpa_s,
  261. unsigned int id)
  262. {
  263. wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_RATES, id);
  264. }
  265. void wpas_notify_bss_seen(struct wpa_supplicant *wpa_s, unsigned int id)
  266. {
  267. wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_AGE, id);
  268. }
  269. void wpas_notify_blob_added(struct wpa_supplicant *wpa_s, const char *name)
  270. {
  271. wpas_dbus_signal_blob_added(wpa_s, name);
  272. }
  273. void wpas_notify_blob_removed(struct wpa_supplicant *wpa_s, const char *name)
  274. {
  275. wpas_dbus_signal_blob_removed(wpa_s, name);
  276. }
  277. void wpas_notify_debug_level_changed(struct wpa_global *global)
  278. {
  279. wpas_dbus_signal_debug_level_changed(global);
  280. }
  281. void wpas_notify_debug_timestamp_changed(struct wpa_global *global)
  282. {
  283. wpas_dbus_signal_debug_timestamp_changed(global);
  284. }
  285. void wpas_notify_debug_show_keys_changed(struct wpa_global *global)
  286. {
  287. wpas_dbus_signal_debug_show_keys_changed(global);
  288. }
  289. void wpas_notify_suspend(struct wpa_global *global)
  290. {
  291. struct wpa_supplicant *wpa_s;
  292. os_get_time(&global->suspend_time);
  293. wpa_printf(MSG_DEBUG, "System suspend notification");
  294. for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next)
  295. wpa_drv_suspend(wpa_s);
  296. }
  297. void wpas_notify_resume(struct wpa_global *global)
  298. {
  299. struct os_time now;
  300. int slept;
  301. struct wpa_supplicant *wpa_s;
  302. if (global->suspend_time.sec == 0)
  303. slept = -1;
  304. else {
  305. os_get_time(&now);
  306. slept = now.sec - global->suspend_time.sec;
  307. }
  308. wpa_printf(MSG_DEBUG, "System resume notification (slept %d seconds)",
  309. slept);
  310. for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next) {
  311. wpa_drv_resume(wpa_s);
  312. if (wpa_s->wpa_state == WPA_DISCONNECTED)
  313. wpa_supplicant_req_scan(wpa_s, 0, 100000);
  314. }
  315. }
  316. #ifdef CONFIG_P2P
  317. void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s,
  318. const u8 *dev_addr, int new_device)
  319. {
  320. if (new_device) {
  321. /* Create the new peer object */
  322. wpas_dbus_register_peer(wpa_s, dev_addr);
  323. }
  324. /* Notify a new peer has been detected*/
  325. wpas_dbus_signal_peer_device_found(wpa_s, dev_addr);
  326. }
  327. void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
  328. const u8 *dev_addr)
  329. {
  330. wpas_dbus_unregister_peer(wpa_s, dev_addr);
  331. /* Create signal on interface object*/
  332. wpas_dbus_signal_peer_device_lost(wpa_s, dev_addr);
  333. }
  334. void wpas_notify_p2p_group_removed(struct wpa_supplicant *wpa_s,
  335. const struct wpa_ssid *ssid,
  336. const char *role)
  337. {
  338. wpas_dbus_signal_p2p_group_removed(wpa_s, role);
  339. wpas_dbus_unregister_p2p_group(wpa_s, ssid);
  340. }
  341. void wpas_notify_p2p_go_neg_req(struct wpa_supplicant *wpa_s,
  342. const u8 *src, u16 dev_passwd_id)
  343. {
  344. wpas_dbus_signal_p2p_go_neg_req(wpa_s, src, dev_passwd_id);
  345. }
  346. void wpas_notify_p2p_go_neg_completed(struct wpa_supplicant *wpa_s,
  347. struct p2p_go_neg_results *res)
  348. {
  349. wpas_dbus_signal_p2p_go_neg_resp(wpa_s, res);
  350. }
  351. void wpas_notify_p2p_invitation_result(struct wpa_supplicant *wpa_s,
  352. int status, const u8 *bssid)
  353. {
  354. wpas_dbus_signal_p2p_invitation_result(wpa_s, status, bssid);
  355. }
  356. void wpas_notify_p2p_sd_request(struct wpa_supplicant *wpa_s,
  357. int freq, const u8 *sa, u8 dialog_token,
  358. u16 update_indic, const u8 *tlvs,
  359. size_t tlvs_len)
  360. {
  361. wpas_dbus_signal_p2p_sd_request(wpa_s, freq, sa, dialog_token,
  362. update_indic, tlvs, tlvs_len);
  363. }
  364. void wpas_notify_p2p_sd_response(struct wpa_supplicant *wpa_s,
  365. const u8 *sa, u16 update_indic,
  366. const u8 *tlvs, size_t tlvs_len)
  367. {
  368. wpas_dbus_signal_p2p_sd_response(wpa_s, sa, update_indic,
  369. tlvs, tlvs_len);
  370. }
  371. /**
  372. * wpas_notify_p2p_provision_discovery - Notification of provision discovery
  373. * @dev_addr: Who sent the request or responded to our request.
  374. * @request: Will be 1 if request, 0 for response.
  375. * @status: Valid only in case of response (0 in case of success)
  376. * @config_methods: WPS config methods
  377. * @generated_pin: PIN to be displayed in case of WPS_CONFIG_DISPLAY method
  378. *
  379. * This can be used to notify:
  380. * - Requests or responses
  381. * - Various config methods
  382. * - Failure condition in case of response
  383. */
  384. void wpas_notify_p2p_provision_discovery(struct wpa_supplicant *wpa_s,
  385. const u8 *dev_addr, int request,
  386. enum p2p_prov_disc_status status,
  387. u16 config_methods,
  388. unsigned int generated_pin)
  389. {
  390. wpas_dbus_signal_p2p_provision_discovery(wpa_s, dev_addr, request,
  391. status, config_methods,
  392. generated_pin);
  393. }
  394. void wpas_notify_p2p_group_started(struct wpa_supplicant *wpa_s,
  395. struct wpa_ssid *ssid, int network_id,
  396. int client)
  397. {
  398. /* Notify a group has been started */
  399. wpas_dbus_register_p2p_group(wpa_s, ssid);
  400. wpas_dbus_signal_p2p_group_started(wpa_s, ssid, client, network_id);
  401. }
  402. void wpas_notify_p2p_wps_failed(struct wpa_supplicant *wpa_s,
  403. struct wps_event_fail *fail)
  404. {
  405. wpas_dbus_signal_p2p_wps_failed(wpa_s, fail);
  406. }
  407. #endif /* CONFIG_P2P */
  408. static void wpas_notify_ap_sta_authorized(struct wpa_supplicant *wpa_s,
  409. const u8 *sta,
  410. const u8 *p2p_dev_addr)
  411. {
  412. #ifdef CONFIG_P2P
  413. wpas_p2p_notify_ap_sta_authorized(wpa_s, p2p_dev_addr);
  414. /*
  415. * Create 'peer-joined' signal on group object -- will also
  416. * check P2P itself.
  417. */
  418. wpas_dbus_signal_p2p_peer_joined(wpa_s, p2p_dev_addr);
  419. #endif /* CONFIG_P2P */
  420. /* Notify listeners a new station has been authorized */
  421. wpas_dbus_signal_sta_authorized(wpa_s, sta);
  422. }
  423. static void wpas_notify_ap_sta_deauthorized(struct wpa_supplicant *wpa_s,
  424. const u8 *sta,
  425. const u8 *p2p_dev_addr)
  426. {
  427. #ifdef CONFIG_P2P
  428. /*
  429. * Create 'peer-disconnected' signal on group object if this
  430. * is a P2P group.
  431. */
  432. wpas_dbus_signal_p2p_peer_disconnected(wpa_s, p2p_dev_addr);
  433. #endif /* CONFIG_P2P */
  434. /* Notify listeners a station has been deauthorized */
  435. wpas_dbus_signal_sta_deauthorized(wpa_s, sta);
  436. }
  437. void wpas_notify_sta_authorized(struct wpa_supplicant *wpa_s,
  438. const u8 *mac_addr, int authorized,
  439. const u8 *p2p_dev_addr)
  440. {
  441. if (authorized)
  442. wpas_notify_ap_sta_authorized(wpa_s, mac_addr, p2p_dev_addr);
  443. else
  444. wpas_notify_ap_sta_deauthorized(wpa_s, mac_addr, p2p_dev_addr);
  445. }
  446. void wpas_notify_certification(struct wpa_supplicant *wpa_s, int depth,
  447. const char *subject, const char *cert_hash,
  448. const struct wpabuf *cert)
  449. {
  450. wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_EAP_PEER_CERT
  451. "depth=%d subject='%s'%s%s",
  452. depth, subject,
  453. cert_hash ? " hash=" : "",
  454. cert_hash ? cert_hash : "");
  455. if (cert) {
  456. char *cert_hex;
  457. size_t len = wpabuf_len(cert) * 2 + 1;
  458. cert_hex = os_malloc(len);
  459. if (cert_hex) {
  460. wpa_snprintf_hex(cert_hex, len, wpabuf_head(cert),
  461. wpabuf_len(cert));
  462. wpa_msg_ctrl(wpa_s, MSG_INFO,
  463. WPA_EVENT_EAP_PEER_CERT
  464. "depth=%d subject='%s' cert=%s",
  465. depth, subject, cert_hex);
  466. os_free(cert_hex);
  467. }
  468. }
  469. /* notify the old DBus API */
  470. wpa_supplicant_dbus_notify_certification(wpa_s, depth, subject,
  471. cert_hash, cert);
  472. /* notify the new DBus API */
  473. wpas_dbus_signal_certification(wpa_s, depth, subject, cert_hash, cert);
  474. }
  475. void wpas_notify_preq(struct wpa_supplicant *wpa_s,
  476. const u8 *addr, const u8 *dst, const u8 *bssid,
  477. const u8 *ie, size_t ie_len, u32 ssi_signal)
  478. {
  479. #ifdef CONFIG_AP
  480. wpas_dbus_signal_preq(wpa_s, addr, dst, bssid, ie, ie_len, ssi_signal);
  481. #endif /* CONFIG_AP */
  482. }
  483. void wpas_notify_eap_status(struct wpa_supplicant *wpa_s, const char *status,
  484. const char *parameter)
  485. {
  486. wpas_dbus_signal_eap_status(wpa_s, status, parameter);
  487. wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_EAP_STATUS
  488. "status='%s' parameter='%s'",
  489. status, parameter);
  490. }
  491. void wpas_notify_network_bssid_set_changed(struct wpa_supplicant *wpa_s,
  492. struct wpa_ssid *ssid)
  493. {
  494. if (wpa_s->current_ssid != ssid)
  495. return;
  496. wpa_dbg(wpa_s, MSG_DEBUG,
  497. "Network bssid config changed for the current network - within-ESS roaming %s",
  498. ssid->bssid_set ? "disabled" : "enabled");
  499. wpa_drv_roaming(wpa_s, !ssid->bssid_set,
  500. ssid->bssid_set ? ssid->bssid : NULL);
  501. }