Lines Matching refs:ifname
783 struct wpa_driver_nl80211_data *drv, const char *ifname) in wpa_driver_nl80211_event_newlink() argument
787 if (os_strcmp(drv->first_bss->ifname, ifname) == 0) { in wpa_driver_nl80211_event_newlink()
788 if (if_nametoindex(drv->first_bss->ifname) == 0) { in wpa_driver_nl80211_event_newlink()
790 drv->first_bss->ifname); in wpa_driver_nl80211_event_newlink()
796 drv->first_bss->ifname); in wpa_driver_nl80211_event_newlink()
801 os_strlcpy(event.interface_status.ifname, ifname, in wpa_driver_nl80211_event_newlink()
802 sizeof(event.interface_status.ifname)); in wpa_driver_nl80211_event_newlink()
809 struct wpa_driver_nl80211_data *drv, const char *ifname) in wpa_driver_nl80211_event_dellink() argument
813 if (os_strcmp(drv->first_bss->ifname, ifname) == 0) { in wpa_driver_nl80211_event_dellink()
816 ifname); in wpa_driver_nl80211_event_dellink()
820 ifname); in wpa_driver_nl80211_event_dellink()
824 ifname); in wpa_driver_nl80211_event_dellink()
828 os_strlcpy(event.interface_status.ifname, ifname, in wpa_driver_nl80211_event_dellink()
829 sizeof(event.interface_status.ifname)); in wpa_driver_nl80211_event_dellink()
848 drv->first_bss->ifname) == 0) in wpa_driver_nl80211_own_ifname()
902 char ifname[IFNAMSIZ + 1]; in wpa_driver_nl80211_event_rtm_newlink() local
915 ifname[0] = '\0'; in wpa_driver_nl80211_event_rtm_newlink()
924 os_memcpy(ifname, RTA_DATA(attr), RTA_PAYLOAD(attr)); in wpa_driver_nl80211_event_rtm_newlink()
925 ifname[RTA_PAYLOAD(attr)] = '\0'; in wpa_driver_nl80211_event_rtm_newlink()
948 ifi->ifi_index, ifname, extra, ifi->ifi_family, in wpa_driver_nl80211_event_rtm_newlink()
965 namebuf, ifname); in wpa_driver_nl80211_event_rtm_newlink()
966 if (os_strcmp(drv->first_bss->ifname, ifname) != 0) { in wpa_driver_nl80211_event_rtm_newlink()
969 drv->first_bss->ifname); in wpa_driver_nl80211_event_rtm_newlink()
997 } else if (if_nametoindex(drv->first_bss->ifname) == 0) { in wpa_driver_nl80211_event_rtm_newlink()
1000 drv->first_bss->ifname); in wpa_driver_nl80211_event_rtm_newlink()
1004 "removed", drv->first_bss->ifname); in wpa_driver_nl80211_event_rtm_newlink()
1013 bss->ifname, addr) < 0) { in wpa_driver_nl80211_event_rtm_newlink()
1016 bss->ifname); in wpa_driver_nl80211_event_rtm_newlink()
1022 ifi->ifi_index, bss->ifname, in wpa_driver_nl80211_event_rtm_newlink()
1049 if (ifname[0]) in wpa_driver_nl80211_event_rtm_newlink()
1050 wpa_driver_nl80211_event_newlink(drv, ifname); in wpa_driver_nl80211_event_rtm_newlink()
1067 if (os_strcmp(ifname, bss->ifname) == 0) { in wpa_driver_nl80211_event_rtm_newlink()
1085 char ifname[IFNAMSIZ + 1]; in wpa_driver_nl80211_event_rtm_dellink() local
1098 ifname[0] = '\0'; in wpa_driver_nl80211_event_rtm_dellink()
1107 os_memcpy(ifname, RTA_DATA(attr), RTA_PAYLOAD(attr)); in wpa_driver_nl80211_event_rtm_dellink()
1108 ifname[RTA_PAYLOAD(attr)] = '\0'; in wpa_driver_nl80211_event_rtm_dellink()
1128 ifi->ifi_index, ifname, extra, ifi->ifi_family, in wpa_driver_nl80211_event_rtm_dellink()
1135 if (ifname[0] && (ifi->ifi_family != AF_BRIDGE || !brid)) in wpa_driver_nl80211_event_rtm_dellink()
1136 wpa_driver_nl80211_event_dellink(drv, ifname); in wpa_driver_nl80211_event_rtm_dellink()
1624 static void * wpa_driver_nl80211_drv_init(void *ctx, const char *ifname, in wpa_driver_nl80211_drv_init() argument
1662 os_strlcpy(bss->ifname, ifname, sizeof(bss->ifname)); in wpa_driver_nl80211_drv_init()
1675 os_strlcpy(rcfg->ifname, ifname, sizeof(rcfg->ifname)); in wpa_driver_nl80211_drv_init()
1684 if (linux_iface_up(drv->global->ioctl_sock, ifname) > 0) in wpa_driver_nl80211_drv_init()
1734 static void * wpa_driver_nl80211_init(void *ctx, const char *ifname, in wpa_driver_nl80211_init() argument
1737 return wpa_driver_nl80211_drv_init(ctx, ifname, global_priv, 0, NULL, in wpa_driver_nl80211_init()
2072 bss->ifname, (long long unsigned int) bss->wdev_id, in nl80211_del_p2pdev()
2088 bss->ifname, (long long unsigned int) bss->wdev_id, in nl80211_set_p2pdev()
2101 bss->ifname, up); in i802_set_iface_flags()
2172 drv->ifindex = if_nametoindex(bss->ifname); in wpa_driver_nl80211_finish_drv_init()
2191 bss->ifname, drv->phyname); in wpa_driver_nl80211_finish_drv_init()
2194 (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 0) || in wpa_driver_nl80211_finish_drv_init()
2195 linux_set_ifhwaddr(drv->global->ioctl_sock, bss->ifname, in wpa_driver_nl80211_finish_drv_init()
2221 "interface '%s' UP", bss->ifname); in wpa_driver_nl80211_finish_drv_init()
2228 "interface '%s' due to rfkill", bss->ifname); in wpa_driver_nl80211_finish_drv_init()
2239 if (linux_get_ifhwaddr(drv->global->ioctl_sock, bss->ifname, in wpa_driver_nl80211_finish_drv_init()
2279 bss->ifname, drv->disabled_11b_rates); in wpa_driver_nl80211_deinit()
2291 bss->ifname) < 0) in wpa_driver_nl80211_deinit()
2294 bss->ifname, bss->brname, strerror(errno)); in wpa_driver_nl80211_deinit()
2337 if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, in wpa_driver_nl80211_deinit()
2342 if (linux_set_ifhwaddr(drv->global->ioctl_sock, bss->ifname, in wpa_driver_nl80211_deinit()
2495 static int wpa_driver_nl80211_set_key(const char *ifname, struct i802_bss *bss, in wpa_driver_nl80211_set_key() argument
2511 ifindex = if_nametoindex(ifname); in wpa_driver_nl80211_set_key()
2514 __func__, ifindex, ifname, alg, addr, key_idx, set_tx, in wpa_driver_nl80211_set_key()
2861 bss->ifname); in nl80211_unmask_11b_rates()
2907 wpa_driver_nl80211_set_key(bss->ifname, bss, WPA_ALG_WEP, in wpa_driver_nl80211_authenticate()
3516 bss->ifname, bss->bandwidth, in wpa_driver_nl80211_set_ap()
3907 bss->ifname, MAC2STR(addr), ret, strerror(-ret)); in wpa_driver_nl80211_sta_remove()
3967 const char *ifname, in nl80211_create_iface_once() argument
3982 nla_put_string(msg, NL80211_ATTR_IFNAME, ifname) || in nl80211_create_iface_once()
4013 ifname, ret, strerror(-ret)); in nl80211_create_iface_once()
4020 ifidx = if_nametoindex(ifname); in nl80211_create_iface_once()
4022 ifname, ifidx); in nl80211_create_iface_once()
4040 linux_set_ifhwaddr(drv->global->ioctl_sock, ifname, addr)) { in nl80211_create_iface_once()
4050 const char *ifname, enum nl80211_iftype iftype, in nl80211_create_iface() argument
4057 ret = nl80211_create_iface_once(drv, ifname, iftype, addr, wds, handler, in nl80211_create_iface()
4061 if (ret == -ENFILE && if_nametoindex(ifname)) { in nl80211_create_iface()
4064 ifname); in nl80211_create_iface()
4066 linux_set_ifhwaddr(drv->global->ioctl_sock, ifname, in nl80211_create_iface()
4069 ifname, 0) < 0 || in nl80211_create_iface()
4070 linux_set_ifhwaddr(drv->global->ioctl_sock, ifname, in nl80211_create_iface()
4073 ifname, 1) < 0)) in nl80211_create_iface()
4077 wpa_printf(MSG_INFO, "Try to remove and re-create %s", ifname); in nl80211_create_iface()
4080 nl80211_remove_iface(drv, if_nametoindex(ifname)); in nl80211_create_iface()
4083 ret = nl80211_create_iface_once(drv, ifname, iftype, addr, in nl80211_create_iface()
4090 ifname); in nl80211_create_iface()
4103 bss->ifname, drv->device_ap_sme, drv->use_monitor); in nl80211_setup_ap()
4142 bss->ifname, drv->device_ap_sme, drv->use_monitor); in nl80211_teardown_ap()
4262 bss->ifname, MAC2STR(addr), total_flags, flags_or, flags_and, in wpa_driver_nl80211_sta_set_flags()
4943 res = linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1); in wpa_driver_nl80211_set_mode_impl()
4960 bss->ifname); in wpa_driver_nl80211_set_mode_impl()
4965 bss->ifname); in wpa_driver_nl80211_set_mode_impl()
5035 bss->ifname, drv->operstate, state, in wpa_driver_nl80211_set_operstate()
5202 bss->ifname); in i802_flush()
5352 const char *ifname, int vlan_id) in i802_set_sta_vlan() argument
5360 bss->ifname, if_nametoindex(bss->ifname), in i802_set_sta_vlan()
5361 MAC2STR(addr), ifname, if_nametoindex(ifname), vlan_id); in i802_set_sta_vlan()
5364 nla_put_u32(msg, NL80211_ATTR_STA_VLAN, if_nametoindex(ifname))) { in i802_set_sta_vlan()
5373 MAC2STR(addr), ifname, vlan_id, ret, in i802_set_sta_vlan()
5559 os_snprintf(name, sizeof(name), "%s.sta%d", bss->ifname, aid); in i802_set_wds_sta()
5587 i802_set_sta_vlan(priv, addr, bss->ifname, 0); in i802_set_wds_sta()
5617 const char *brname, const char *ifname) in i802_check_bridge() argument
5641 if (linux_br_get(in_br, ifname) == 0) { in i802_check_bridge()
5646 "bridge %s", ifname, in_br); in i802_check_bridge()
5647 if (linux_br_del_if(drv->global->ioctl_sock, in_br, ifname) < in i802_check_bridge()
5652 ifname, brname, strerror(errno)); in i802_check_bridge()
5658 ifname, brname); in i802_check_bridge()
5659 if (linux_br_add_if(drv->global->ioctl_sock, brname, ifname) < 0) { in i802_check_bridge()
5662 ifname, brname, strerror(errno)); in i802_check_bridge()
5681 bss = wpa_driver_nl80211_drv_init(hapd, params->ifname, in i802_init()
5689 if (linux_br_get(brname, params->ifname) == 0) { in i802_init()
5691 params->ifname, brname); in i802_init()
5715 params->ifname) < 0) in i802_init()
5754 if (linux_get_ifhwaddr(drv->global->ioctl_sock, bss->ifname, in i802_init()
5864 const char *ifname, const u8 *addr, in wpa_driver_nl80211_if_add() argument
5882 ifidx = nl80211_create_iface(drv, ifname, nlmode, addr, in wpa_driver_nl80211_if_add()
5887 ifname); in wpa_driver_nl80211_if_add()
5896 ifname, in wpa_driver_nl80211_if_add()
5899 ifidx = nl80211_create_iface(drv, ifname, nlmode, addr, in wpa_driver_nl80211_if_add()
5903 ifidx = if_nametoindex(ifname); in wpa_driver_nl80211_if_add()
5913 ifname, if_addr) < 0) { in wpa_driver_nl80211_if_add()
5927 if (linux_get_ifhwaddr(drv->global->ioctl_sock, ifname, in wpa_driver_nl80211_if_add()
5935 "for interface %s type %d", ifname, type); in wpa_driver_nl80211_if_add()
5941 if (linux_set_ifhwaddr(drv->global->ioctl_sock, ifname, in wpa_driver_nl80211_if_add()
5960 i802_check_bridge(drv, new_bss, bridge, ifname) < 0) { in wpa_driver_nl80211_if_add()
5963 ifname, bridge); in wpa_driver_nl80211_if_add()
5970 if (linux_set_iface_flags(drv->global->ioctl_sock, ifname, 1)) in wpa_driver_nl80211_if_add()
5977 os_strlcpy(new_bss->ifname, ifname, IFNAMSIZ); in wpa_driver_nl80211_if_add()
6015 const char *ifname) in wpa_driver_nl80211_if_remove() argument
6018 int ifindex = if_nametoindex(ifname); in wpa_driver_nl80211_if_remove()
6021 __func__, type, ifname, ifindex, bss->added_if); in wpa_driver_nl80211_if_remove()
6036 bss->ifname) < 0) in wpa_driver_nl80211_if_remove()
6039 bss->ifname, bss->brname, strerror(errno)); in wpa_driver_nl80211_if_remove()
7195 static int driver_nl80211_set_key(const char *ifname, void *priv, in driver_nl80211_set_key() argument
7202 return wpa_driver_nl80211_set_key(ifname, bss, alg, addr, key_idx, in driver_nl80211_set_key()
7239 const char *ifname) in driver_nl80211_if_remove() argument
7242 return wpa_driver_nl80211_if_remove(bss, type, ifname); in driver_nl80211_if_remove()
7264 const char *ifname, int vlan_id) in driver_nl80211_set_sta_vlan() argument
7267 return i802_set_sta_vlan(bss, addr, ifname, vlan_id); in driver_nl80211_set_sta_vlan()
7382 bss->ifname, in wpa_driver_nl80211_status()
7884 if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 0) < 0) in nl80211_set_mac_addr()
7887 if (linux_set_ifhwaddr(drv->global->ioctl_sock, bss->ifname, addr) < 0) in nl80211_set_mac_addr()
7891 bss->ifname, MAC2STR(addr)); in nl80211_set_mac_addr()
7892 if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, in nl80211_set_mac_addr()
7901 bss->ifname, MAC2STR(addr)); in nl80211_set_mac_addr()
7905 if (linux_set_iface_flags(drv->global->ioctl_sock, bss->ifname, 1) < 0) in nl80211_set_mac_addr()
8299 bss->ifname, attr_txt); in wpa_driver_br_port_set_attr()