Lines Matching refs:netdev
151 static int sr9700_get_eeprom_len(struct net_device *netdev)
156 static int sr9700_get_eeprom(struct net_device *netdev,
159 struct usbnet *dev = netdev_priv(netdev);
177 static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)
179 struct usbnet *dev = netdev_priv(netdev);
184 netdev_dbg(netdev, "Only internal phy supported\n");
202 netdev_dbg(netdev, "sr_mdio_read() phy_id=0x%02x, loc=0x%02x, returns=0x%04x\n",
208 static void sr_mdio_write(struct net_device *netdev, int phy_id, int loc,
211 struct usbnet *dev = netdev_priv(netdev);
215 netdev_dbg(netdev, "Only internal phy supported\n");
219 netdev_dbg(netdev, "sr_mdio_write() phy_id=0x%02x, loc=0x%02x, val=0x%04x\n",
225 static u32 sr9700_get_link(struct net_device *netdev)
227 struct usbnet *dev = netdev_priv(netdev);
239 static int sr9700_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
241 struct usbnet *dev = netdev_priv(netdev);
258 static void sr9700_set_multicast(struct net_device *netdev)
260 struct usbnet *dev = netdev_priv(netdev);
271 if (netdev->flags & IFF_PROMISC) {
273 } else if (netdev->flags & IFF_ALLMULTI ||
274 netdev_mc_count(netdev) > SR_MCAST_MAX) {
276 } else if (!netdev_mc_empty(netdev)) {
279 netdev_for_each_mc_addr(ha, netdev) {
289 static int sr9700_set_mac_address(struct net_device *netdev, void *p)
291 struct usbnet *dev = netdev_priv(netdev);
295 netdev_err(netdev, "not setting invalid mac address %pM\n",
300 eth_hw_addr_set(netdev, addr->sa_data);
301 sr_write_async(dev, SR_PAR, 6, netdev->dev_addr);
321 struct net_device *netdev;
330 netdev = dev->net;
332 netdev->netdev_ops = &sr9700_netdev_ops;
333 netdev->ethtool_ops = &sr9700_ethtool_ops;
334 netdev->hard_header_len += SR_TX_OVERHEAD;
335 dev->hard_mtu = netdev->mtu + netdev->hard_header_len;
340 mii->dev = netdev;
355 netdev_err(netdev, "Error reading MAC address\n");
359 eth_hw_addr_set(netdev, addr);
370 sr9700_set_multicast(netdev);
372 sr_mdio_write(netdev, mii->phy_id, MII_BMCR, BMCR_RESET);
373 sr_mdio_write(netdev, mii->phy_id, MII_ADVERTISE, ADVERTISE_ALL |