diff --git a/net/core/dev.c b/net/core/dev.c index fa88dcd..af3cab3 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -198,7 +198,13 @@ EXPORT_SYMBOL(dev_base_lock); static inline struct hlist_head *dev_name_hash(struct net *net, const char *name) { - unsigned hash = full_name_hash(name, strnlen(name, IFNAMSIZ)); + unsigned hash = 0; + int len = strnlen(name, IFNAMSIZ); + int i; + + for (i = 0; i < len; ++i) + hash = 31 * hash + name[i]; + return &net->dev_name_head[hash & ((1 << NETDEV_HASHBITS) - 1)]; }