sr9700.c (ffb1e76f4f32d2b8ea4189df0484980370476395) sr9700.c (49ed8dde371522b2d330a7383aaa213748ad007e)
1/*
2 * CoreChip-sz SR9700 one chip USB 1.1 Ethernet Devices
3 *
4 * Author : Liu Junliang <liujunliang_ljl@163.com>
5 *
6 * Based on dm9601.c
7 *
8 * This file is licensed under the terms of the GNU General Public License

--- 282 unchanged lines hidden (view full) ---

291 struct sockaddr *addr = p;
292
293 if (!is_valid_ether_addr(addr->sa_data)) {
294 netdev_err(netdev, "not setting invalid mac address %pM\n",
295 addr->sa_data);
296 return -EINVAL;
297 }
298
1/*
2 * CoreChip-sz SR9700 one chip USB 1.1 Ethernet Devices
3 *
4 * Author : Liu Junliang <liujunliang_ljl@163.com>
5 *
6 * Based on dm9601.c
7 *
8 * This file is licensed under the terms of the GNU General Public License

--- 282 unchanged lines hidden (view full) ---

291 struct sockaddr *addr = p;
292
293 if (!is_valid_ether_addr(addr->sa_data)) {
294 netdev_err(netdev, "not setting invalid mac address %pM\n",
295 addr->sa_data);
296 return -EINVAL;
297 }
298
299 memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
299 eth_hw_addr_set(netdev, addr->sa_data);
300 sr_write_async(dev, SR_PAR, 6, netdev->dev_addr);
301
302 return 0;
303}
304
305static const struct net_device_ops sr9700_netdev_ops = {
306 .ndo_open = usbnet_open,
307 .ndo_stop = usbnet_stop,

--- 248 unchanged lines hidden ---
300 sr_write_async(dev, SR_PAR, 6, netdev->dev_addr);
301
302 return 0;
303}
304
305static const struct net_device_ops sr9700_netdev_ops = {
306 .ndo_open = usbnet_open,
307 .ndo_stop = usbnet_stop,

--- 248 unchanged lines hidden ---