aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>2011-06-02 16:28:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-06-03 14:22:06 -0400
commit59e7e7078d6c2c6294caf454c6e3695f9d3e46a2 (patch)
tree6ef8de26cd28e6ac4fff34258300889ef989e98c /net/mac80211
parent6f213ff1919fab6f8244ceae55631b5d6ef750a7 (diff)
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 <cascardo@holoscopio.com> Cc: Jiri Pirko <jpirko@redhat.com> Cc: David S. Miller <davem@davemloft.net> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/iface.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 49d4f869e0bc..dee30aea9ab3 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,
1145 + IEEE80211_ENCRYPT_HEADROOM; 1145 + IEEE80211_ENCRYPT_HEADROOM;
1146 ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM; 1146 ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM;
1147 1147
1148 ret = dev_alloc_name(ndev, ndev->name);
1149 if (ret < 0)
1150 goto fail;
1151
1148 ieee80211_assign_perm_addr(local, ndev, type); 1152 ieee80211_assign_perm_addr(local, ndev, type);
1149 memcpy(ndev->dev_addr, ndev->perm_addr, ETH_ALEN); 1153 memcpy(ndev->dev_addr, ndev->perm_addr, ETH_ALEN);
1150 SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy)); 1154 SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));