From patchwork Tue Oct 6 20:29:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John W. Linville" X-Patchwork-Id: 52008 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n96Kd7Jj026162 for ; Tue, 6 Oct 2009 20:39:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933182AbZJFUbn (ORCPT ); Tue, 6 Oct 2009 16:31:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933181AbZJFUbn (ORCPT ); Tue, 6 Oct 2009 16:31:43 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:44321 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933053AbZJFUbm (ORCPT ); Tue, 6 Oct 2009 16:31:42 -0400 Received: from uucp by smtp.tuxdriver.com with local-rmail (Exim 4.63) (envelope-from ) id 1MvGgb-00024D-BH; Tue, 06 Oct 2009 16:31:05 -0400 Received: from linville-t400.local (linville-t400.local [127.0.0.1]) by linville-t400.local (8.14.3/8.14.3) with ESMTP id n96KTaDI007369; Tue, 6 Oct 2009 16:29:36 -0400 Received: (from linville@localhost) by linville-t400.local (8.14.3/8.14.3/Submit) id n96KTaTp007367; Tue, 6 Oct 2009 16:29:36 -0400 From: "John W. Linville" To: linux-wireless@vger.kernel.org Cc: Johannes Berg , "John W. Linville" Subject: [PATCH] mac80211: support ETHTOOL_GPERMADDR Date: Tue, 6 Oct 2009 16:29:36 -0400 Message-Id: <1254860976-7336-1-git-send-email-linville@tuxdriver.com> X-Mailer: git-send-email 1.6.2.5 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index b8295cb..3004492 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -184,10 +184,12 @@ static int ieee80211_open(struct net_device *dev) * No need to check netif_running since we do not allow * it to start up with this invalid address. */ - if (compare_ether_addr(null_addr, ndev->dev_addr) == 0) + if (compare_ether_addr(null_addr, ndev->dev_addr) == 0) { memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN); + memcpy(ndev->perm_addr, ndev->dev_addr, ETH_ALEN); + } } /* @@ -788,6 +790,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, goto fail; memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN); + memcpy(ndev->perm_addr, ndev->dev_addr, ETH_ALEN); SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy)); SET_NETDEV_DEVTYPE(ndev, &wiphy_type);