All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: "Linux Wireless List" <linux-wireless@vger.kernel.org>,
	"Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 3/9] brcm80211: fmac: register primary net device with device mac address
Date: Wed, 11 Apr 2012 11:52:45 +0200	[thread overview]
Message-ID: <1334137971-3972-4-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1334137971-3972-1-git-send-email-arend@broadcom.com>

The primary net device was registered with a primary mac address and
upon IFUP it was set to match the actual mac address from the device.
This patch changes that and moves the brcmf_add_if() call to the common
part of the driver.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 .../net/wireless/brcm80211/brcmfmac/dhd_linux.c    |    5 +++++
 drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c |    6 ------
 drivers/net/wireless/brcm80211/brcmfmac/usb.c      |    8 --------
 3 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index 07836a8..00b6270 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -1073,6 +1073,11 @@ int brcmf_bus_start(struct device *dev)
 	if (ret < 0)
 		return ret;
 
+	/* add primary networking interface */
+	ret = brcmf_add_if(dev, 0, "wlan%d", drvr->mac);
+	if (ret < 0)
+		return ret;
+
 	/* signal bus ready */
 	bus_if->state = BRCMF_BUS_DATA;
 	return 0;
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index 2bf5dda..a83fbea 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -3948,12 +3948,6 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev)
 		}
 	}
 
-	/* add interface and open for business */
-	if (brcmf_add_if(bus->sdiodev->dev, 0, "wlan%d", NULL)) {
-		brcmf_dbg(ERROR, "Add primary net device interface failed!!\n");
-		goto fail;
-	}
-
 	return bus;
 
 fail:
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
index 8236422..1d67ecf 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
@@ -1383,14 +1383,6 @@ static int brcmf_usb_probe_cb(struct device *dev, const char *desc,
 		goto fail;
 	}
 
-	/* add interface and open for business */
-	ret = brcmf_add_if(dev, 0, "wlan%d", NULL);
-	if (ret) {
-		brcmf_dbg(ERROR, "Add primary net device interface failed!!\n");
-		brcmf_detach(dev);
-		goto fail;
-	}
-
 	return 0;
 fail:
 	/* Release resources in reverse order */
-- 
1.7.5.4



  parent reply	other threads:[~2012-04-11  9:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11  9:52 [PATCH 0/9] brcm80211: minor bug fixes for broadcom driver Arend van Spriel
2012-04-11  9:52 ` [PATCH 1/9] brcm80211: fmac: make brcmf_net_attach() static Arend van Spriel
2012-04-11  9:52 ` [PATCH 2/9] brcm80211: fmac: remove primary mac address handling from brcmf_net_attach Arend van Spriel
2012-04-11  9:52 ` Arend van Spriel [this message]
2012-04-11  9:52 ` [PATCH 4/9] brcm80211: fmac: add frame header extension support Arend van Spriel
2012-04-11  9:52 ` [PATCH 5/9] brcm80211: fmac: postpone dongle RF enabling Arend van Spriel
2012-04-11  9:52 ` [PATCH 6/9] brcm80211: fmac: clean up chip id table Arend van Spriel
2012-04-11  9:52 ` [PATCH 7/9] brcm80211: smac: do not use US as fallback regulatory hint Arend van Spriel
2012-04-13 14:48   ` Seth Forshee
2012-04-16  8:20     ` Arend van Spriel
2012-04-11  9:52 ` [PATCH 8/9] brcm80211: smac: only provide valid " Arend van Spriel
2012-04-11  9:52 ` [PATCH 9/9] brcm80211: smac: resume transmit fifo upon receiving frames Arend van Spriel
2012-04-13 17:57 ` [PATCH 0/9] brcm80211: minor bug fixes for broadcom driver John W. Linville
2012-04-16  8:51   ` Arend van Spriel
2012-04-16 17:18     ` John W. Linville

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334137971-3972-4-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.