Lines Matching refs:ifr
1687 struct ifreq ifr; in dev_ifname() local
1693 if (copy_from_user(&ifr, arg, sizeof(struct ifreq))) in dev_ifname()
1697 dev = __dev_get_by_index(ifr.ifr_ifindex); in dev_ifname()
1703 strcpy(ifr.ifr_name, dev->name); in dev_ifname()
1706 if (copy_to_user(arg, &ifr, sizeof(struct ifreq))) in dev_ifname()
2052 static int dev_ifsioc(struct ifreq *ifr, unsigned int cmd) in dev_ifsioc() argument
2057 if ((dev = __dev_get_by_name(ifr->ifr_name)) == NULL) in dev_ifsioc()
2063 ifr->ifr_flags = (dev->flags&~(IFF_PROMISC|IFF_ALLMULTI|IFF_RUNNING)) in dev_ifsioc()
2066 ifr->ifr_flags |= IFF_RUNNING; in dev_ifsioc()
2070 return dev_change_flags(dev, ifr->ifr_flags); in dev_ifsioc()
2073 ifr->ifr_metric = 0; in dev_ifsioc()
2080 ifr->ifr_mtu = dev->mtu; in dev_ifsioc()
2084 if (ifr->ifr_mtu == dev->mtu) in dev_ifsioc()
2091 if (ifr->ifr_mtu<0) in dev_ifsioc()
2098 err = dev->change_mtu(dev, ifr->ifr_mtu); in dev_ifsioc()
2100 dev->mtu = ifr->ifr_mtu; in dev_ifsioc()
2108 memcpy(ifr->ifr_hwaddr.sa_data,dev->dev_addr, MAX_ADDR_LEN); in dev_ifsioc()
2109 ifr->ifr_hwaddr.sa_family=dev->type; in dev_ifsioc()
2115 if (ifr->ifr_hwaddr.sa_family!=dev->type) in dev_ifsioc()
2119 err = dev->set_mac_address(dev, &ifr->ifr_hwaddr); in dev_ifsioc()
2125 if (ifr->ifr_hwaddr.sa_family!=dev->type) in dev_ifsioc()
2127 memcpy(dev->broadcast, ifr->ifr_hwaddr.sa_data, MAX_ADDR_LEN); in dev_ifsioc()
2132 ifr->ifr_map.mem_start=dev->mem_start; in dev_ifsioc()
2133 ifr->ifr_map.mem_end=dev->mem_end; in dev_ifsioc()
2134 ifr->ifr_map.base_addr=dev->base_addr; in dev_ifsioc()
2135 ifr->ifr_map.irq=dev->irq; in dev_ifsioc()
2136 ifr->ifr_map.dma=dev->dma; in dev_ifsioc()
2137 ifr->ifr_map.port=dev->if_port; in dev_ifsioc()
2144 return dev->set_config(dev,&ifr->ifr_map); in dev_ifsioc()
2150 ifr->ifr_hwaddr.sa_family != AF_UNSPEC) in dev_ifsioc()
2154 dev_mc_add(dev,ifr->ifr_hwaddr.sa_data, dev->addr_len, 1); in dev_ifsioc()
2159 ifr->ifr_hwaddr.sa_family!=AF_UNSPEC) in dev_ifsioc()
2163 dev_mc_delete(dev,ifr->ifr_hwaddr.sa_data,dev->addr_len, 1); in dev_ifsioc()
2167 ifr->ifr_ifindex = dev->ifindex; in dev_ifsioc()
2171 ifr->ifr_qlen = dev->tx_queue_len; in dev_ifsioc()
2175 if (ifr->ifr_qlen<0) in dev_ifsioc()
2177 dev->tx_queue_len = ifr->ifr_qlen; in dev_ifsioc()
2184 if (strchr(ifr->ifr_newname, '%')) { in dev_ifsioc()
2187 memcpy(format, ifr->ifr_newname, IFNAMSIZ); in dev_ifsioc()
2196 strncpy(ifr->ifr_newname, dev->name, IFNAMSIZ); in dev_ifsioc()
2198 if (__dev_get_by_name(ifr->ifr_newname)) in dev_ifsioc()
2200 memcpy(dev->name, ifr->ifr_newname, IFNAMSIZ); in dev_ifsioc()
2226 return dev->do_ioctl(dev, ifr, cmd); in dev_ifsioc()
2253 struct ifreq ifr; in dev_ioctl() local
2272 if (copy_from_user(&ifr, arg, sizeof(struct ifreq))) in dev_ioctl()
2275 ifr.ifr_name[IFNAMSIZ-1] = 0; in dev_ioctl()
2277 colon = strchr(ifr.ifr_name, ':'); in dev_ioctl()
2302 dev_load(ifr.ifr_name); in dev_ioctl()
2304 ret = dev_ifsioc(&ifr, cmd); in dev_ioctl()
2309 if (copy_to_user(arg, &ifr, sizeof(struct ifreq))) in dev_ioctl()
2315 dev_load(ifr.ifr_name); in dev_ioctl()
2317 ret = dev_ethtool(&ifr); in dev_ioctl()
2322 if (copy_to_user(arg, &ifr, in dev_ioctl()
2340 dev_load(ifr.ifr_name); in dev_ioctl()
2343 ret = dev_ifsioc(&ifr, cmd); in dev_ioctl()
2349 if (copy_to_user(arg, &ifr, sizeof(struct ifreq))) in dev_ioctl()
2380 dev_load(ifr.ifr_name); in dev_ioctl()
2383 ret = dev_ifsioc(&ifr, cmd); in dev_ioctl()
2404 dev_load(ifr.ifr_name); in dev_ioctl()
2407 ret = dev_ifsioc(&ifr, cmd); in dev_ioctl()
2410 if (!ret && copy_to_user(arg, &ifr, sizeof(struct ifreq))) in dev_ioctl()
2424 dev_load(ifr.ifr_name); in dev_ioctl()
2427 ret = wireless_process_ioctl(&ifr, cmd); in dev_ioctl()
2430 copy_to_user(arg, &ifr, sizeof(struct ifreq))) in dev_ioctl()