Lines Matching refs:link

15 static int link_get_wlan_interface(Link *link) {  in link_get_wlan_interface()  argument
19 assert(link); in link_get_wlan_interface()
21 … r = sd_genl_message_new(link->manager->genl, NL80211_GENL_NAME, NL80211_CMD_GET_INTERFACE, &req); in link_get_wlan_interface()
23 … return log_link_debug_errno(link, r, "Failed to create generic netlink message: %m"); in link_get_wlan_interface()
25 r = sd_netlink_message_append_u32(req, NL80211_ATTR_IFINDEX, link->ifindex); in link_get_wlan_interface()
27 … return log_link_debug_errno(link, r, "Could not append NL80211_ATTR_IFINDEX attribute: %m"); in link_get_wlan_interface()
29 r = sd_netlink_call(link->manager->genl, req, 0, &reply); in link_get_wlan_interface()
31 … return log_link_debug_errno(link, r, "Failed to request information about wlan interface: %m"); in link_get_wlan_interface()
33 …log_link_debug(link, "No reply received to request for information about wifi interface, ignoring.… in link_get_wlan_interface()
37 return manager_genl_process_nl80211_config(link->manager->genl, reply, link->manager); in link_get_wlan_interface()
46 Link *link; in manager_genl_process_nl80211_config() local
91 r = link_get_by_index(manager, ifindex, &link); in manager_genl_process_nl80211_config()
100 …log_link_debug_errno(link, r, "nl80211: received %s(%u) message without valid interface name, igno… in manager_genl_process_nl80211_config()
105 if (!streq(ifname, link->ifname)) { in manager_genl_process_nl80211_config()
106 …log_link_debug_errno(link, r, "nl80211: received %s(%u) message with invalid interface name '%s', … in manager_genl_process_nl80211_config()
113 …log_link_debug_errno(link, r, "nl80211: received %s(%u) message without valid wlan interface type,… in manager_genl_process_nl80211_config()
120 … log_link_debug_errno(link, r, "nl80211: received %s(%u) message without valid SSID, ignoring: %m", in manager_genl_process_nl80211_config()
126 … log_link_debug(link, "nl80211: received SSID has zero length, ignoring the received SSID: %m"); in manager_genl_process_nl80211_config()
129 …log_link_debug(link, "nl80211: received SSID contains NUL character(s), ignoring the received SSID… in manager_genl_process_nl80211_config()
134 log_link_debug(link, "nl80211: received %s(%u) message: iftype=%s, ssid=%s", in manager_genl_process_nl80211_config()
141 link->wlan_iftype = wlan_iftype; in manager_genl_process_nl80211_config()
142 free_and_replace(link->ssid, ssid); in manager_genl_process_nl80211_config()
146 link->wlan_iftype = NL80211_IFTYPE_UNSPECIFIED; in manager_genl_process_nl80211_config()
147 link->ssid = mfree(link->ssid); in manager_genl_process_nl80211_config()
161 Link *link; in manager_genl_process_nl80211_mlme() local
199 r = link_get_by_index(manager, ifindex, &link); in manager_genl_process_nl80211_mlme()
213 …log_link_debug_errno(link, r, "nl80211: received %s(%u) message without valid BSSID, ignoring: %m", in manager_genl_process_nl80211_mlme()
218 log_link_debug(link, "nl80211: received %s(%u) message: bssid=%s", in manager_genl_process_nl80211_mlme()
222 link->bssid = ETHER_ADDR_NULL; in manager_genl_process_nl80211_mlme()
226 link->bssid = bssid; in manager_genl_process_nl80211_mlme()
229 link->wlan_iftype == NL80211_IFTYPE_STATION && link->ssid) in manager_genl_process_nl80211_mlme()
230 log_link_info(link, "Connected WiFi access point: %s (%s)", in manager_genl_process_nl80211_mlme()
231 link->ssid, ETHER_ADDR_TO_STR(&link->bssid)); in manager_genl_process_nl80211_mlme()
240 …log_link_debug_errno(link, r, "nl80211: received %s(%u) message without valid BSSID, ignoring: %m", in manager_genl_process_nl80211_mlme()
247 …log_link_debug_errno(link, r, "nl80211: received %s(%u) message without valid status code, ignorin… in manager_genl_process_nl80211_mlme()
252 log_link_debug(link, "nl80211: received %s(%u) message: status=%u, bssid=%s", in manager_genl_process_nl80211_mlme()
258 link->bssid = bssid; in manager_genl_process_nl80211_mlme()
261 r = link_get_wlan_interface(link); in manager_genl_process_nl80211_mlme()
263 … log_link_warning_errno(link, r, "Failed to update wireless LAN interface: %m"); in manager_genl_process_nl80211_mlme()
264 link_enter_failed(link); in manager_genl_process_nl80211_mlme()
269 if (link->wlan_iftype == NL80211_IFTYPE_STATION && link->ssid) in manager_genl_process_nl80211_mlme()
270 log_link_info(link, "Connected WiFi access point: %s (%s)", in manager_genl_process_nl80211_mlme()
271 link->ssid, ETHER_ADDR_TO_STR(&link->bssid)); in manager_genl_process_nl80211_mlme()
275 log_link_debug(link, "nl80211: received %s(%u) message.", in manager_genl_process_nl80211_mlme()
278 link->bssid = ETHER_ADDR_NULL; in manager_genl_process_nl80211_mlme()
279 free_and_replace(link->previous_ssid, link->ssid); in manager_genl_process_nl80211_mlme()
283 log_link_debug(link, "nl80211: received %s(%u) message.", in manager_genl_process_nl80211_mlme()