bgmac.c (a4654e9bde4ecedb4921e6c8fe2088114bdff1b3) | bgmac.c (8c7da63978f1672eb4037bbca6e7eac73f908f03) |
---|---|
1/* 2 * Driver for (BCM4706)? GBit MAC core on BCMA bus. 3 * 4 * Copyright (C) 2012 Rafał Miłecki <zajec5@gmail.com> 5 * 6 * Licensed under the GNU/GPL. See COPYING for details. 7 */ 8 --- 1234 unchanged lines hidden (view full) --- 1243 1244 ether_addr_copy(net_dev->dev_addr, sa->sa_data); 1245 bgmac_write_mac_address(bgmac, net_dev->dev_addr); 1246 1247 eth_commit_mac_addr_change(net_dev, addr); 1248 return 0; 1249} 1250 | 1/* 2 * Driver for (BCM4706)? GBit MAC core on BCMA bus. 3 * 4 * Copyright (C) 2012 Rafał Miłecki <zajec5@gmail.com> 5 * 6 * Licensed under the GNU/GPL. See COPYING for details. 7 */ 8 --- 1234 unchanged lines hidden (view full) --- 1243 1244 ether_addr_copy(net_dev->dev_addr, sa->sa_data); 1245 bgmac_write_mac_address(bgmac, net_dev->dev_addr); 1246 1247 eth_commit_mac_addr_change(net_dev, addr); 1248 return 0; 1249} 1250 |
1251static int bgmac_change_mtu(struct net_device *net_dev, int mtu) 1252{ 1253 struct bgmac *bgmac = netdev_priv(net_dev); 1254 1255 bgmac_write(bgmac, BGMAC_RXMAX_LENGTH, 32 + mtu); 1256 return 0; 1257} 1258 |
|
1251static const struct net_device_ops bgmac_netdev_ops = { 1252 .ndo_open = bgmac_open, 1253 .ndo_stop = bgmac_stop, 1254 .ndo_start_xmit = bgmac_start_xmit, 1255 .ndo_set_rx_mode = bgmac_set_rx_mode, 1256 .ndo_set_mac_address = bgmac_set_mac_address, 1257 .ndo_validate_addr = eth_validate_addr, 1258 .ndo_do_ioctl = phy_do_ioctl_running, | 1259static const struct net_device_ops bgmac_netdev_ops = { 1260 .ndo_open = bgmac_open, 1261 .ndo_stop = bgmac_stop, 1262 .ndo_start_xmit = bgmac_start_xmit, 1263 .ndo_set_rx_mode = bgmac_set_rx_mode, 1264 .ndo_set_mac_address = bgmac_set_mac_address, 1265 .ndo_validate_addr = eth_validate_addr, 1266 .ndo_do_ioctl = phy_do_ioctl_running, |
1267 .ndo_change_mtu = bgmac_change_mtu, |
|
1259}; 1260 1261/************************************************** 1262 * ethtool_ops 1263 **************************************************/ 1264 1265struct bgmac_stat { 1266 u8 size; --- 258 unchanged lines hidden (view full) --- 1525 dev_err(bgmac->dev, "Cannot connect to phy\n"); 1526 goto err_dma_free; 1527 } 1528 1529 net_dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; 1530 net_dev->hw_features = net_dev->features; 1531 net_dev->vlan_features = net_dev->features; 1532 | 1268}; 1269 1270/************************************************** 1271 * ethtool_ops 1272 **************************************************/ 1273 1274struct bgmac_stat { 1275 u8 size; --- 258 unchanged lines hidden (view full) --- 1534 dev_err(bgmac->dev, "Cannot connect to phy\n"); 1535 goto err_dma_free; 1536 } 1537 1538 net_dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; 1539 net_dev->hw_features = net_dev->features; 1540 net_dev->vlan_features = net_dev->features; 1541 |
1542 /* Omit FCS from max MTU size */ 1543 net_dev->max_mtu = BGMAC_RX_MAX_FRAME_SIZE - ETH_FCS_LEN; 1544 |
|
1533 err = register_netdev(bgmac->net_dev); 1534 if (err) { 1535 dev_err(bgmac->dev, "Cannot register net device\n"); 1536 goto err_phy_disconnect; 1537 } 1538 1539 netif_carrier_off(net_dev); 1540 --- 74 unchanged lines hidden --- | 1545 err = register_netdev(bgmac->net_dev); 1546 if (err) { 1547 dev_err(bgmac->dev, "Cannot register net device\n"); 1548 goto err_phy_disconnect; 1549 } 1550 1551 netif_carrier_off(net_dev); 1552 --- 74 unchanged lines hidden --- |