aboutsummaryrefslogtreecommitdiffstats
path: root/net/ethernet/eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ethernet/eth.c')
-rw-r--r--net/ethernet/eth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 36e58800a9e3..4efad533e5f6 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -232,6 +232,7 @@ EXPORT_SYMBOL(eth_header_parse);
232 * @neigh: source neighbour 232 * @neigh: source neighbour
233 * @hh: destination cache entry 233 * @hh: destination cache entry
234 * @type: Ethernet type field 234 * @type: Ethernet type field
235 *
235 * Create an Ethernet header template from the neighbour. 236 * Create an Ethernet header template from the neighbour.
236 */ 237 */
237int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh, __be16 type) 238int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh, __be16 type)
@@ -274,6 +275,7 @@ EXPORT_SYMBOL(eth_header_cache_update);
274 * eth_mac_addr - set new Ethernet hardware address 275 * eth_mac_addr - set new Ethernet hardware address
275 * @dev: network device 276 * @dev: network device
276 * @p: socket address 277 * @p: socket address
278 *
277 * Change hardware address of device. 279 * Change hardware address of device.
278 * 280 *
279 * This doesn't change hardware matching, so needs to be overridden 281 * This doesn't change hardware matching, so needs to be overridden
@@ -283,7 +285,7 @@ int eth_mac_addr(struct net_device *dev, void *p)
283{ 285{
284 struct sockaddr *addr = p; 286 struct sockaddr *addr = p;
285 287
286 if (netif_running(dev)) 288 if (!(dev->priv_flags & IFF_LIVE_ADDR_CHANGE) && netif_running(dev))
287 return -EBUSY; 289 return -EBUSY;
288 if (!is_valid_ether_addr(addr->sa_data)) 290 if (!is_valid_ether_addr(addr->sa_data))
289 return -EADDRNOTAVAIL; 291 return -EADDRNOTAVAIL;
@@ -331,6 +333,7 @@ const struct header_ops eth_header_ops ____cacheline_aligned = {
331/** 333/**
332 * ether_setup - setup Ethernet network device 334 * ether_setup - setup Ethernet network device
333 * @dev: network device 335 * @dev: network device
336 *
334 * Fill in the fields of the device structure with Ethernet-generic values. 337 * Fill in the fields of the device structure with Ethernet-generic values.
335 */ 338 */
336void ether_setup(struct net_device *dev) 339void ether_setup(struct net_device *dev)