Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] d80211: Fix ieee80211_ptr check
@ 2007-02-20 23:13 Michael Wu
  2007-02-21 18:01 ` Jiri Benc
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Wu @ 2007-02-20 23:13 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

d80211: Fix ieee80211_ptr check

dev->ieee80211_ptr can no longer be directly compared to check if a virtual
interface belongs to a master device.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
---

 net/d80211/ieee80211.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/d80211/ieee80211.c b/net/d80211/ieee80211.c
index adce657..70eb9be 100644
--- a/net/d80211/ieee80211.c
+++ b/net/d80211/ieee80211.c
@@ -1093,7 +1093,8 @@ __ieee80211_tx_prepare(struct ieee80211_
 static int inline is_ieee80211_device(struct net_device *dev,
 				      struct net_device *master)
 {
-	return (dev->ieee80211_ptr == master->ieee80211_ptr);
+	return (wdev_priv(dev->ieee80211_ptr) ==
+		wdev_priv(master->ieee80211_ptr));
 }
 
 /* Device in tx->dev has a reference added; use dev_put(tx->dev) when

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] d80211: Fix ieee80211_ptr check
  2007-02-20 23:13 [PATCH] d80211: Fix ieee80211_ptr check Michael Wu
@ 2007-02-21 18:01 ` Jiri Benc
  2007-02-22 14:06   ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Benc @ 2007-02-21 18:01 UTC (permalink / raw)
  To: Michael Wu; +Cc: John Linville, linux-wireless

On Tue, 20 Feb 2007 18:13:54 -0500, Michael Wu wrote:
> dev->ieee80211_ptr can no longer be directly compared to check if a virtual
> interface belongs to a master device.

Hm, apparently the regexp I tried when resolving conflicts with John's
tree wasn't good enough to catch this :-(

Let's hope there are no more such things left.

Thanks for finding this,

 Jiri

-- 
Jiri Benc
SUSE Labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] d80211: Fix ieee80211_ptr check
  2007-02-21 18:01 ` Jiri Benc
@ 2007-02-22 14:06   ` Johannes Berg
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2007-02-22 14:06 UTC (permalink / raw)
  To: Jiri Benc; +Cc: Michael Wu, John Linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

On Wed, 2007-02-21 at 19:01 +0100, Jiri Benc wrote:
> On Tue, 20 Feb 2007 18:13:54 -0500, Michael Wu wrote:
> > dev->ieee80211_ptr can no longer be directly compared to check if a virtual
> > interface belongs to a master device.
> 
> Hm, apparently the regexp I tried when resolving conflicts with John's
> tree wasn't good enough to catch this :-(

No, that's an error I made.

> Let's hope there are no more such things left.

I doubt it. I should have remembered this special case but forgot about
it. The thing is that in earlier wiphy versions I had ieee80211_ptr
point to the wiphy directly so I *intentionally* kept the comparison
like that when reviewing all uses of ieee80211_ptr. When I realised that
we need per-netdev wireless state I put that behind ieee80211_ptr and
then forgot to update this spot.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-22 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-20 23:13 [PATCH] d80211: Fix ieee80211_ptr check Michael Wu
2007-02-21 18:01 ` Jiri Benc
2007-02-22 14:06   ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox