From: Thadeu Lima de Souza Cascardo Date: Thu, 2 Jun 2011 20:28:37 +0000 (-0300) Subject: mac80211: call dev_alloc_name before copying name to sdata X-Git-Tag: v3.0-rc4~5^2~13^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=59e7e7078d6c2c6294caf454c6e3695f9d3e46a2;p=profile%2Fivi%2Fkernel-x86-ivi.git mac80211: call dev_alloc_name before copying name to sdata This partially reverts 1c5cae815d19ffe02bdfda1260949ef2b1806171, because the netdev name is copied into sdata->name, which is used for debugging messages, for example. Otherwise, we get messages like this: wlan%d: authenticated Signed-off-by: Thadeu Lima de Souza Cascardo Cc: Jiri Pirko Cc: David S. Miller Cc: Johannes Berg Cc: "John W. Linville" Signed-off-by: John W. Linville --- diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 49d4f86..dee30ae 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -1145,6 +1145,10 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, + IEEE80211_ENCRYPT_HEADROOM; ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM; + ret = dev_alloc_name(ndev, ndev->name); + if (ret < 0) + goto fail; + ieee80211_assign_perm_addr(local, ndev, type); memcpy(ndev->dev_addr, ndev->perm_addr, ETH_ALEN); SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));