Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348629
b: refs/heads/master
c: d07d750
h: refs/heads/master
i:
  348627: c9cdb0d
v: v3
  • Loading branch information
Stanislaw Gruszka authored and David S. Miller committed Jan 11, 2013
1 parent b0fcd51 commit 634a000
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f7e9e230f41f991a6e3e7cb6096424fdfb626081
refs/heads/master: d07d7507bfb4e23735c9b83e397c43e1e8a173e8
3 changes: 3 additions & 0 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ struct wireless_dev;
#define SET_ETHTOOL_OPS(netdev,ops) \
( (netdev)->ethtool_ops = (ops) )

extern void netdev_set_default_ethtool_ops(struct net_device *dev,
const struct ethtool_ops *ops);

/* hardware address assignment types */
#define NET_ADDR_PERM 0 /* address is permanent (default) */
#define NET_ADDR_RANDOM 1 /* address is generated randomly */
Expand Down
8 changes: 8 additions & 0 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -6121,6 +6121,14 @@ struct netdev_queue *dev_ingress_queue_create(struct net_device *dev)

static const struct ethtool_ops default_ethtool_ops;

void netdev_set_default_ethtool_ops(struct net_device *dev,
const struct ethtool_ops *ops)
{
if (dev->ethtool_ops == &default_ethtool_ops)
dev->ethtool_ops = ops;
}
EXPORT_SYMBOL_GPL(netdev_set_default_ethtool_ops);

/**
* alloc_netdev_mqs - allocate network device
* @sizeof_priv: size of private data to allocate space for
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
/* allow mac80211 to determine the timeout */
wdev->ps_timeout = -1;

if (!dev->ethtool_ops)
dev->ethtool_ops = &cfg80211_ethtool_ops;
netdev_set_default_ethtool_ops(dev, &cfg80211_ethtool_ops);

if ((wdev->iftype == NL80211_IFTYPE_STATION ||
wdev->iftype == NL80211_IFTYPE_P2P_CLIENT ||
Expand Down

0 comments on commit 634a000

Please sign in to comment.