Lines Matching refs:netdev
150 static int sr9700_get_eeprom_len(struct net_device *netdev)
155 static int sr9700_get_eeprom(struct net_device *netdev,
158 struct usbnet *dev = netdev_priv(netdev);
176 static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)
178 struct usbnet *dev = netdev_priv(netdev);
183 netdev_dbg(netdev, "Only internal phy supported\n");
201 netdev_dbg(netdev, "sr_mdio_read() phy_id=0x%02x, loc=0x%02x, returns=0x%04x\n",
207 static void sr_mdio_write(struct net_device *netdev, int phy_id, int loc,
210 struct usbnet *dev = netdev_priv(netdev);
214 netdev_dbg(netdev, "Only internal phy supported\n");
218 netdev_dbg(netdev, "sr_mdio_write() phy_id=0x%02x, loc=0x%02x, val=0x%04x\n",
224 static u32 sr9700_get_link(struct net_device *netdev)
226 struct usbnet *dev = netdev_priv(netdev);
238 static int sr9700_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
240 struct usbnet *dev = netdev_priv(netdev);
257 static void sr9700_set_multicast(struct net_device *netdev)
259 struct usbnet *dev = netdev_priv(netdev);
270 if (netdev->flags & IFF_PROMISC) {
272 } else if (netdev->flags & IFF_ALLMULTI ||
273 netdev_mc_count(netdev) > SR_MCAST_MAX) {
275 } else if (!netdev_mc_empty(netdev)) {
278 netdev_for_each_mc_addr(ha, netdev) {
288 static int sr9700_set_mac_address(struct net_device *netdev, void *p)
290 struct usbnet *dev = netdev_priv(netdev);
294 netdev_err(netdev, "not setting invalid mac address %pM\n",
299 memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
300 sr_write_async(dev, SR_PAR, 6, netdev->dev_addr);
320 struct net_device *netdev;
328 netdev = dev->net;
330 netdev->netdev_ops = &sr9700_netdev_ops;
331 netdev->ethtool_ops = &sr9700_ethtool_ops;
332 netdev->hard_header_len += SR_TX_OVERHEAD;
333 dev->hard_mtu = netdev->mtu + netdev->hard_header_len;
338 mii->dev = netdev;
352 if (sr_read(dev, SR_PAR, ETH_ALEN, netdev->dev_addr) < 0) {
353 netdev_err(netdev, "Error reading MAC address\n");
367 sr9700_set_multicast(netdev);
369 sr_mdio_write(netdev, mii->phy_id, MII_BMCR, BMCR_RESET);
370 sr_mdio_write(netdev, mii->phy_id, MII_ADVERTISE, ADVERTISE_ALL |