linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: John Linville <linville@tuxdriver.com>, Jiri Benc <jbenc@suse.cz>
Subject: [PATCH 07/10] bcm43xx-d80211: update for wiphy api
Date: Thu, 15 Feb 2007 15:42:48 +0100	[thread overview]
Message-ID: <20070215144259.397393000@sipsolutions.net> (raw)
In-Reply-To: 20070215144241.847938000@sipsolutions.net

update bcm43xx-d80211.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

---
Really bcm43xx should be using the new wiphy debugfs stuff as well,
but I can't figure out what the hell it is doing when multiple
devices exist in a system. Thing is the new debugfs dir is only
created for d80211 drivers when calling register_hw() and all items
must be gone from it when calling free_hw()...

---
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_debugfs.c |    2 +-
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c    |   15 ++++++---------
 2 files changed, 7 insertions(+), 10 deletions(-)

--- wireless-dev.orig/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c	2007-02-15 13:50:28.967940064 +0100
+++ wireless-dev/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c	2007-02-15 14:01:33.486635438 +0100
@@ -3282,7 +3282,7 @@ static int bcm43xx_wireless_core_init(st
 	ssb_bus_powerup(bus, 1); /* Enable dynamic PCTL */
 	bcm43xx_macfilter_clear(dev, BCM43xx_MACFILTER_ASSOC);
 	bcm43xx_macfilter_set(dev, BCM43xx_MACFILTER_SELF,
-			      (u8 *)(wl->hw->perm_addr));
+			      (u8 *)(wl->hw->wiphy->perm_addr));
 	bcm43xx_security_init(dev);
 	bcm43xx_measure_channel_change_time(dev);
 
@@ -3743,14 +3743,11 @@ static int bcm43xx_wireless_init(struct 
 		    IEEE80211_HW_WEP_INCLUDE_IV;
 	hw->maxssi = BCM43xx_RX_MAX_SSI;
 	hw->queues = 1;
-	hw->dev = &dev->dev;
-	if (is_valid_ether_addr(sprom->r1.et1mac)) {
-		memcpy(hw->perm_addr, sprom->r1.et1mac,
-		       ARRAY_SIZE(hw->perm_addr));
-	} else {
-		memcpy(hw->perm_addr, sprom->r1.il0mac,
-		       ARRAY_SIZE(hw->perm_addr));
-	}
+	SET_IEEE80211_DEV(hw, &dev->dev);
+	if (is_valid_ether_addr(sprom->r1.et1mac))
+		SET_IEEE80211_PERM_ADDR(hw, sprom->r1.et1mac);
+	else
+		SET_IEEE80211_PERM_ADDR(hw, sprom->r1.il0mac);
 
 	/* Get and initialize struct bcm43xx_wl */
 	wl = hw_to_bcm43xx_wl(hw);
--- wireless-dev.orig/drivers/net/wireless/d80211/bcm43xx/bcm43xx_debugfs.c	2007-02-15 13:50:28.917940064 +0100
+++ wireless-dev/drivers/net/wireless/d80211/bcm43xx/bcm43xx_debugfs.c	2007-02-15 14:02:18.646635438 +0100
@@ -308,7 +308,7 @@ void bcm43xx_debugfs_add_device(struct b
 
 	dev->dfsentry = e;
 
-	snprintf(devdir, sizeof(devdir), "wiphy%d", dev->wl->hw->index);
+	snprintf(devdir, sizeof(devdir), "%s", wiphy_name(dev->wl->hw->wiphy));
 	e->subdir = debugfs_create_dir(devdir, fs.root);
 	e->dentry_tsf = debugfs_create_file("tsf", 0666, e->subdir,
 	                                    dev, &tsf_fops);

--


  parent reply	other threads:[~2007-02-15 14:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-15 14:42 [PATCH 00/10] cfg80211 updates Johannes Berg
2007-02-15 14:42 ` [PATCH 01/10] remove cfg80211/wext-nl compatibility Johannes Berg
2007-02-15 14:42 ` [PATCH 02/10] update cfg80211/wext and wext code Johannes Berg
2007-02-15 14:42 ` [PATCH 03/10] introduce wiphy concept Johannes Berg
2007-02-19 20:37   ` Jiri Benc
2007-02-19 20:55     ` Johannes Berg
2007-02-15 14:42 ` [PATCH 04/10] cfg/nl80211: make association explicit Johannes Berg
2007-02-15 14:42 ` [PATCH 05/10] wext: clean up Johannes Berg
2007-02-15 14:42 ` [PATCH 06/10] d80211: update for wiphy api Johannes Berg
2007-02-15 16:16   ` Johannes Berg
2007-02-19 20:49   ` Jiri Benc
2007-02-19 21:03     ` Johannes Berg
2007-02-15 14:42 ` Johannes Berg [this message]
2007-02-15 15:09   ` [PATCH 07/10] bcm43xx-d80211: " Michael Buesch
2007-02-15 15:18     ` Johannes Berg
2007-02-15 14:42 ` [PATCH 08/10] zd1211rw-d80211: " Johannes Berg
2007-02-15 14:42 ` [PATCH 09/10] cfg80211: pending config Johannes Berg
2007-02-16 19:10   ` Dan Williams
2007-02-16 20:22     ` Johannes Berg
2007-02-16 20:49     ` Michael Wu
2007-02-15 14:42 ` [PATCH 10/10] cfg/nl80211: remove legacy network id Johannes Berg
2007-02-16 19:12   ` Dan Williams
2007-02-16 20:16     ` Johannes Berg
2007-02-15 16:02 ` [PATCH 00/10] cfg80211 updates Johannes Berg

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=20070215144259.397393000@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=jbenc@suse.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).