Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [PATCH 1/5] ath9k: warn when we get a ATH9K_INT_TIM_TIMER and are idle
From: Ben Greear @ 2011-01-19  1:42 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linville, johannes, linux-wireless, amod.bodas, pstew
In-Reply-To: <AANLkTi=cWF0UrHG2DXoYp1NLP6F179A6pQ3P-tLFBNTg@mail.gmail.com>

On 01/18/2011 05:38 PM, Luis R. Rodriguez wrote:
> On Tue, Jan 18, 2011 at 5:34 PM, Ben Greear<greearb@candelatech.com>  wrote:
>> On 12/06/2010 06:48 PM, Luis R. Rodriguez wrote:
>>>
>>> We should not be idle when we get the ATH9K_INT_TIM_TIMER,
>>> otherwise we wake up the chip and that throws off the idle
>>> state, the driver needs to be in full sleep when idle and
>>> nothing should turn it awake without turning it back to
>>> full sleep again. If we leave the chip idle and suspend,
>>> upon resume the device will become unusable and we get:
>>>
>>> ath: Starting driver with initial channel: 5745 MHz
>>> ath: timeout (100000 us) on reg 0x7000: 0xdeadbeef&    0x00000003 !=
>>> 0x00000000
>>>
>>> Cc: Paul Stewart<pstew@google.com>
>>> Cc: Amod Bodas<amod.bodas@atheros.com>
>>> signed-off-by: Luis R. Rodriguez<lrodriguez@atheros.com>
>>> ---
>>>   drivers/net/wireless/ath/ath9k/main.c |    1 +
>>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/ath/ath9k/main.c
>>> b/drivers/net/wireless/ath/ath9k/main.c
>>> index f026a03..fd27ec9 100644
>>> --- a/drivers/net/wireless/ath/ath9k/main.c
>>> +++ b/drivers/net/wireless/ath/ath9k/main.c
>>> @@ -770,6 +770,7 @@ irqreturn_t ath_isr(int irq, void *dev)
>>>                 if (status&    ATH9K_INT_TIM_TIMER) {
>>>                         /* Clear RxAbort bit so that we can
>>>                          * receive frames */
>>> +                       WARN_ON(sc->ps_idle);
>>>                         ath9k_setpower(sc, ATH9K_PM_AWAKE);
>>>                         ath9k_hw_setrxabort(sc->sc_ah, 0);
>>>                         sc->ps_flags |= PS_WAIT_FOR_BEACON;
>>
>> Looks like this patch never made it in.
>>
>> Should it be in, or should I just drop it from my queue?
>>
>
> Eh, it shouldn't happen and if we warn we should use the new debugging
> warn once thingy you added. I never saw that trigger so probably we
> can just ignore it.

I've been running this patch for months and haven't noticed the
WARN_ON hit, so probably it's not needed.  Of course, I disable
power-saving..so maybe I'm not a good test case :P

Thanks,
Ben

>
>    Luis


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply

* Re: [PATCH 1/5] ath9k: warn when we get a ATH9K_INT_TIM_TIMER and are idle
From: Luis R. Rodriguez @ 2011-01-19  1:43 UTC (permalink / raw)
  To: Ben Greear
  Cc: Luis Rodriguez, linville@tuxdriver.com, johannes@sipsolutions.net,
	linux-wireless@vger.kernel.org, Amod Bodas, pstew@google.com
In-Reply-To: <4D36417C.4080000@candelatech.com>

On Tue, Jan 18, 2011 at 05:42:20PM -0800, Ben Greear wrote:
> On 01/18/2011 05:38 PM, Luis R. Rodriguez wrote:
> > On Tue, Jan 18, 2011 at 5:34 PM, Ben Greear<greearb@candelatech.com>  wrote:
> >> On 12/06/2010 06:48 PM, Luis R. Rodriguez wrote:
> >>>
> >>> We should not be idle when we get the ATH9K_INT_TIM_TIMER,
> >>> otherwise we wake up the chip and that throws off the idle
> >>> state, the driver needs to be in full sleep when idle and
> >>> nothing should turn it awake without turning it back to
> >>> full sleep again. If we leave the chip idle and suspend,
> >>> upon resume the device will become unusable and we get:
> >>>
> >>> ath: Starting driver with initial channel: 5745 MHz
> >>> ath: timeout (100000 us) on reg 0x7000: 0xdeadbeef&    0x00000003 !=
> >>> 0x00000000
> >>>
> >>> Cc: Paul Stewart<pstew@google.com>
> >>> Cc: Amod Bodas<amod.bodas@atheros.com>
> >>> signed-off-by: Luis R. Rodriguez<lrodriguez@atheros.com>
> >>> ---
> >>>   drivers/net/wireless/ath/ath9k/main.c |    1 +
> >>>   1 files changed, 1 insertions(+), 0 deletions(-)
> >>>
> >>> diff --git a/drivers/net/wireless/ath/ath9k/main.c
> >>> b/drivers/net/wireless/ath/ath9k/main.c
> >>> index f026a03..fd27ec9 100644
> >>> --- a/drivers/net/wireless/ath/ath9k/main.c
> >>> +++ b/drivers/net/wireless/ath/ath9k/main.c
> >>> @@ -770,6 +770,7 @@ irqreturn_t ath_isr(int irq, void *dev)
> >>>                 if (status&    ATH9K_INT_TIM_TIMER) {
> >>>                         /* Clear RxAbort bit so that we can
> >>>                          * receive frames */
> >>> +                       WARN_ON(sc->ps_idle);
> >>>                         ath9k_setpower(sc, ATH9K_PM_AWAKE);
> >>>                         ath9k_hw_setrxabort(sc->sc_ah, 0);
> >>>                         sc->ps_flags |= PS_WAIT_FOR_BEACON;
> >>
> >> Looks like this patch never made it in.
> >>
> >> Should it be in, or should I just drop it from my queue?
> >>
> >
> > Eh, it shouldn't happen and if we warn we should use the new debugging
> > warn once thingy you added. I never saw that trigger so probably we
> > can just ignore it.
> 
> I've been running this patch for months and haven't noticed the
> WARN_ON hit, so probably it's not needed.  Of course, I disable
> power-saving..so maybe I'm not a good test case :P

Which is why its OK if this goes in with the debug message thingy
only.

  Luis

^ permalink raw reply

* Re: [PATCH v2] wl12xx: Add channel 14 to list of supported 2ghz channels
From: Luciano Coelho @ 2011-01-19  7:05 UTC (permalink / raw)
  To: Arik Nemtsov; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <1295379592-6223-1-git-send-email-arik@wizery.com>

On Tue, 2011-01-18 at 20:39 +0100, Arik Nemtsov wrote:
> Channel 14 is only supported in Japan (JP country code in).
> The FW limits tranmissions to CCK only on this channel.
> 
> Tested in both STA and AP modes to work correctly.
> 
> Signed-off-by: Arik Nemtsov <arik@wizery.com>
> ---

Good, thanks Arik!

I guess instead of (JP country code in) you meant (JP country code in
regdb), right? I'll fix that manually before applying.

-- 
Cheers,
Luca.


^ permalink raw reply

* Re: [PATCH v2] wl12xx: Add channel 14 to list of supported 2ghz channels
From: Arik Nemtsov @ 2011-01-19  7:06 UTC (permalink / raw)
  To: Luciano Coelho; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <1295420717.10758.111.camel@pimenta>

On Wed, Jan 19, 2011 at 09:05, Luciano Coelho <coelho@ti.com> wrote:
>
> On Tue, 2011-01-18 at 20:39 +0100, Arik Nemtsov wrote:
> > Channel 14 is only supported in Japan (JP country code in).
> > The FW limits tranmissions to CCK only on this channel.
> >
> > Tested in both STA and AP modes to work correctly.
> >
> > Signed-off-by: Arik Nemtsov <arik@wizery.com>
> > ---
>
> Good, thanks Arik!
>
> I guess instead of (JP country code in) you meant (JP country code in
> regdb), right? I'll fix that manually before applying.
>

Yes Luca. Thanks.

Regards,
Arik

^ permalink raw reply

* Re: [PATCH 2.6.32.y] hostap_cs: fix sleeping function called from invalid context
From: Stanislaw Gruszka @ 2011-01-19  7:36 UTC (permalink / raw)
  To: Tim Gardner; +Cc: stable, Dominik Brodowski, linux-wireless, linux-pcmcia
In-Reply-To: <4D3601BA.8040907@canonical.com>

On Tue, Jan 18, 2011 at 02:10:18PM -0700, Tim Gardner wrote:
> I don't know either, but this device is becoming rare enough that
> I'm not gonna lose any sleep over it.

Ok, so defer any change since we see a bug report (I hope
we do not see, patch was tested by 2 users, it fix bug 
and device work for them).

Stanislaw

^ permalink raw reply

* [PATCH 0/8] ath5k 802.11j preparation and cleanup
From: Bruno Randolf @ 2011-01-19  9:20 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

This series prepares ath5k for 802.11j (4.9GHz) support but most of the patches
are just cleaning up things i found in the process. 802.11j is still not
enabled.

bruno

---

Bruno Randolf (8):
      ath5k: Use mac80211 channel mapping function
      ath5k: Simplify loop when setting up channels
      ath5k: Rename ath5k_copy_channels
      ath5k: ath5k_setup_channels cleanup and whitespace
      ath5k: Add 802.11j 4.9GHz channels to allowed channels
      ath5: Remove unused CTL definitions
      ath5k: Remove unused sc->curmode
      ath5k: Remove redundant sc->curband


 drivers/net/wireless/ath/ath5k/base.c   |   95 +++++++++++--------------------
 drivers/net/wireless/ath/ath5k/base.h   |    3 -
 drivers/net/wireless/ath/ath5k/eeprom.h |   23 --------
 3 files changed, 34 insertions(+), 87 deletions(-)

-- 
Signature

^ permalink raw reply

* [PATCH 1/8] ath5k: Use mac80211 channel mapping function
From: Bruno Randolf @ 2011-01-19  9:20 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless
In-Reply-To: <20110119091949.19628.28309.stgit@localhost6.localdomain6>

Use mac80211 channel mapping function instead of own homegrown version.

Signed-off-by: Bruno Randolf <br1@einfach.org>
---
 drivers/net/wireless/ath/ath5k/base.c |   23 ++++++++---------------
 1 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 09ae4ef..6850112 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -242,18 +242,6 @@ static int ath5k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *re
 \********************/
 
 /*
- * Convert IEEE channel number to MHz frequency.
- */
-static inline short
-ath5k_ieee2mhz(short chan)
-{
-	if (chan <= 14 || chan >= 27)
-		return ieee80211chan2mhz(chan);
-	else
-		return 2212 + chan * 20;
-}
-
-/*
  * Returns true for the channel numbers used without all_channels modparam.
  */
 static bool ath5k_is_standard_channel(short chan)
@@ -274,6 +262,7 @@ ath5k_copy_channels(struct ath5k_hw *ah,
 		unsigned int max)
 {
 	unsigned int i, count, size, chfreq, freq, ch;
+	enum ieee80211_band band;
 
 	if (!test_bit(mode, ah->ah_modes))
 		return 0;
@@ -283,11 +272,13 @@ ath5k_copy_channels(struct ath5k_hw *ah,
 		/* 1..220, but 2GHz frequencies are filtered by check_channel */
 		size = 220 ;
 		chfreq = CHANNEL_5GHZ;
+		band = IEEE80211_BAND_5GHZ;
 		break;
 	case AR5K_MODE_11B:
 	case AR5K_MODE_11G:
 		size = 26;
 		chfreq = CHANNEL_2GHZ;
+		band = IEEE80211_BAND_2GHZ;
 		break;
 	default:
 		ATH5K_WARN(ah->ah_sc, "bad mode, not copying channels\n");
@@ -296,7 +287,10 @@ ath5k_copy_channels(struct ath5k_hw *ah,
 
 	for (i = 0, count = 0; i < size && max > 0; i++) {
 		ch = i + 1 ;
-		freq = ath5k_ieee2mhz(ch);
+		freq = ieee80211_channel_to_frequency(ch, band);
+
+		if (freq == 0) /* mapping failed - not a standard channel */
+			continue;
 
 		/* Check if channel is supported by the chipset */
 		if (!ath5k_channel_ok(ah, freq, chfreq))
@@ -307,8 +301,7 @@ ath5k_copy_channels(struct ath5k_hw *ah,
 
 		/* Write channel info and increment counter */
 		channels[count].center_freq = freq;
-		channels[count].band = (chfreq == CHANNEL_2GHZ) ?
-			IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
+		channels[count].band = band;
 		switch (mode) {
 		case AR5K_MODE_11A:
 		case AR5K_MODE_11G:


^ permalink raw reply related

* [PATCH 2/8] ath5k: Simplify loop when setting up channels
From: Bruno Randolf @ 2011-01-19  9:20 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless
In-Reply-To: <20110119091949.19628.28309.stgit@localhost6.localdomain6>

Simplify confusing code and get rid of an unnecessary variable.

Signed-off-by: Bruno Randolf <br1@einfach.org>
---
 drivers/net/wireless/ath/ath5k/base.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 6850112..0387acb 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -261,7 +261,7 @@ ath5k_copy_channels(struct ath5k_hw *ah,
 		unsigned int mode,
 		unsigned int max)
 {
-	unsigned int i, count, size, chfreq, freq, ch;
+	unsigned int count, size, chfreq, freq, ch;
 	enum ieee80211_band band;
 
 	if (!test_bit(mode, ah->ah_modes))
@@ -285,8 +285,8 @@ ath5k_copy_channels(struct ath5k_hw *ah,
 		return 0;
 	}
 
-	for (i = 0, count = 0; i < size && max > 0; i++) {
-		ch = i + 1 ;
+	count = 0;
+	for (ch = 1; ch < size && count <= max; ch++) {
 		freq = ieee80211_channel_to_frequency(ch, band);
 
 		if (freq == 0) /* mapping failed - not a standard channel */
@@ -312,7 +312,6 @@ ath5k_copy_channels(struct ath5k_hw *ah,
 		}
 
 		count++;
-		max--;
 	}
 
 	return count;


^ permalink raw reply related

* [PATCH 3/8] ath5k: Rename ath5k_copy_channels
From: Bruno Randolf @ 2011-01-19  9:20 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless
In-Reply-To: <20110119091949.19628.28309.stgit@localhost6.localdomain6>

Rename ath5k_copy_channels() to ath5k_setup_channels() - nothing is copied
here.

Signed-off-by: Bruno Randolf <br1@einfach.org>
---
 drivers/net/wireless/ath/ath5k/base.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 0387acb..9e8b1f4 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -256,7 +256,7 @@ static bool ath5k_is_standard_channel(short chan)
 }
 
 static unsigned int
-ath5k_copy_channels(struct ath5k_hw *ah,
+ath5k_setup_channels(struct ath5k_hw *ah,
 		struct ieee80211_channel *channels,
 		unsigned int mode,
 		unsigned int max)
@@ -356,7 +356,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
 		sband->n_bitrates = 12;
 
 		sband->channels = sc->channels;
-		sband->n_channels = ath5k_copy_channels(ah, sband->channels,
+		sband->n_channels = ath5k_setup_channels(ah, sband->channels,
 					AR5K_MODE_11G, max_c);
 
 		hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
@@ -382,7 +382,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
 		}
 
 		sband->channels = sc->channels;
-		sband->n_channels = ath5k_copy_channels(ah, sband->channels,
+		sband->n_channels = ath5k_setup_channels(ah, sband->channels,
 					AR5K_MODE_11B, max_c);
 
 		hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
@@ -402,7 +402,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
 		sband->n_bitrates = 8;
 
 		sband->channels = &sc->channels[count_c];
-		sband->n_channels = ath5k_copy_channels(ah, sband->channels,
+		sband->n_channels = ath5k_setup_channels(ah, sband->channels,
 					AR5K_MODE_11A, max_c);
 
 		hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband;


^ permalink raw reply related

* [PATCH 4/8] ath5k: ath5k_setup_channels cleanup and whitespace
From: Bruno Randolf @ 2011-01-19  9:20 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless
In-Reply-To: <20110119091949.19628.28309.stgit@localhost6.localdomain6>

Remove useless test_bit - it's not going to happen because of the way this
function is called only when that bit is set.

And fix some whitespace.

Signed-off-by: Bruno Randolf <br1@einfach.org>
---
 drivers/net/wireless/ath/ath5k/base.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 9e8b1f4..a28ad58 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -256,21 +256,16 @@ static bool ath5k_is_standard_channel(short chan)
 }
 
 static unsigned int
-ath5k_setup_channels(struct ath5k_hw *ah,
-		struct ieee80211_channel *channels,
-		unsigned int mode,
-		unsigned int max)
+ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels,
+		unsigned int mode, unsigned int max)
 {
 	unsigned int count, size, chfreq, freq, ch;
 	enum ieee80211_band band;
 
-	if (!test_bit(mode, ah->ah_modes))
-		return 0;
-
 	switch (mode) {
 	case AR5K_MODE_11A:
 		/* 1..220, but 2GHz frequencies are filtered by check_channel */
-		size = 220 ;
+		size = 220;
 		chfreq = CHANNEL_5GHZ;
 		band = IEEE80211_BAND_5GHZ;
 		break;


^ permalink raw reply related

* [PATCH 5/8] ath5k: Add 802.11j 4.9GHz channels to allowed channels
From: Bruno Randolf @ 2011-01-19  9:20 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless
In-Reply-To: <20110119091949.19628.28309.stgit@localhost6.localdomain6>

Add the 802.11j (20MHz channel width) channels to the allowed channels. This
still does not enable 802.11j in ath5k since these frequencies are out of the
configured range. A later patch will deal with that.

Signed-off-by: Bruno Randolf <br1@einfach.org>
---
 drivers/net/wireless/ath/ath5k/base.c |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index a28ad58..6900543 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -244,15 +244,21 @@ static int ath5k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *re
 /*
  * Returns true for the channel numbers used without all_channels modparam.
  */
-static bool ath5k_is_standard_channel(short chan)
+static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band)
 {
-	return ((chan <= 14) ||
-		/* UNII 1,2 */
-		((chan & 3) == 0 && chan >= 36 && chan <= 64) ||
+	if (band == IEEE80211_BAND_2GHZ && chan <= 14)
+		return true;
+
+	return	/* UNII 1,2 */
+		(((chan & 3) == 0 && chan >= 36 && chan <= 64) ||
 		/* midband */
 		((chan & 3) == 0 && chan >= 100 && chan <= 140) ||
 		/* UNII-3 */
-		((chan & 3) == 1 && chan >= 149 && chan <= 165));
+		((chan & 3) == 1 && chan >= 149 && chan <= 165) ||
+		/* 802.11j 5.030-5.080 GHz (20MHz) */
+		(chan == 8 || chan == 12 || chan == 16) ||
+		/* 802.11j 4.9GHz (20MHz) */
+		(chan == 184 || chan == 188 || chan == 192 || chan == 196));
 }
 
 static unsigned int
@@ -291,7 +297,8 @@ ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels,
 		if (!ath5k_channel_ok(ah, freq, chfreq))
 			continue;
 
-		if (!modparam_all_channels && !ath5k_is_standard_channel(ch))
+		if (!modparam_all_channels &&
+		    !ath5k_is_standard_channel(ch, band))
 			continue;
 
 		/* Write channel info and increment counter */


^ permalink raw reply related

* [PATCH 6/8] ath5: Remove unused CTL definitions
From: Bruno Randolf @ 2011-01-19  9:21 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless
In-Reply-To: <20110119091949.19628.28309.stgit@localhost6.localdomain6>

They are unused in ath5k and a more detailled definition is in
ath/regd_common.h.

Signed-off-by: Bruno Randolf <br1@einfach.org>
---
 drivers/net/wireless/ath/ath5k/eeprom.h |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/eeprom.h b/drivers/net/wireless/ath/ath5k/eeprom.h
index d46f105..6511c27 100644
--- a/drivers/net/wireless/ath/ath5k/eeprom.h
+++ b/drivers/net/wireless/ath/ath5k/eeprom.h
@@ -268,29 +268,6 @@ enum ath5k_ctl_mode {
 	AR5K_CTL_MODE_M = 15,
 };
 
-/* Default CTL ids for the 3 main reg domains.
- * Atheros only uses these by default but vendors
- * can have up to 32 different CTLs for different
- * scenarios. Note that theese values are ORed with
- * the mode id (above) so we can have up to 24 CTL
- * datasets out of these 3 main regdomains. That leaves
- * 8 ids that can be used by vendors and since 0x20 is
- * missing from HAL sources i guess this is the set of
- * custom CTLs vendors can use. */
-#define	AR5K_CTL_FCC	0x10
-#define	AR5K_CTL_CUSTOM	0x20
-#define	AR5K_CTL_ETSI	0x30
-#define	AR5K_CTL_MKK	0x40
-
-/* Indicates a CTL with only mode set and
- * no reg domain mapping, such CTLs are used
- * for world roaming domains or simply when
- * a reg domain is not set */
-#define	AR5K_CTL_NO_REGDOMAIN	0xf0
-
-/* Indicates an empty (invalid) CTL */
-#define AR5K_CTL_NO_CTL		0xff
-
 /* Per channel calibration data, used for power table setup */
 struct ath5k_chan_pcal_info_rf5111 {
 	/* Power levels in half dbm units


^ permalink raw reply related

* [PATCH 7/8] ath5k: Remove unused sc->curmode
From: Bruno Randolf @ 2011-01-19  9:21 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless
In-Reply-To: <20110119091949.19628.28309.stgit@localhost6.localdomain6>

sc->curmode is set but never used. Remove it and the helper function. Also the
ath5k_rate_update which is refered to in the comment does not exist (any more?)
so we don't need to setup the band in that place.

Signed-off-by: Bruno Randolf <br1@einfach.org>
---
 drivers/net/wireless/ath/ath5k/base.c |   18 ------------------
 drivers/net/wireless/ath/ath5k/base.h |    1 -
 2 files changed, 0 insertions(+), 19 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 6900543..a00cc11 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -439,18 +439,6 @@ ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan)
 	return ath5k_reset(sc, chan, true);
 }
 
-static void
-ath5k_setcurmode(struct ath5k_softc *sc, unsigned int mode)
-{
-	sc->curmode = mode;
-
-	if (mode == AR5K_MODE_11A) {
-		sc->curband = &sc->sbands[IEEE80211_BAND_5GHZ];
-	} else {
-		sc->curband = &sc->sbands[IEEE80211_BAND_2GHZ];
-	}
-}
-
 struct ath_vif_iter_data {
 	const u8	*hw_macaddr;
 	u8		mask[ETH_ALEN];
@@ -2776,12 +2764,6 @@ ath5k_init(struct ieee80211_hw *hw)
 		goto err;
 	}
 
-	/* NB: setup here so ath5k_rate_update is happy */
-	if (test_bit(AR5K_MODE_11A, ah->ah_modes))
-		ath5k_setcurmode(sc, AR5K_MODE_11A);
-	else
-		ath5k_setcurmode(sc, AR5K_MODE_11B);
-
 	/*
 	 * Allocate tx+rx descriptors and populate the lists.
 	 */
diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
index 6d51147..58660e4 100644
--- a/drivers/net/wireless/ath/ath5k/base.h
+++ b/drivers/net/wireless/ath/ath5k/base.h
@@ -202,7 +202,6 @@ struct ath5k_softc {
 #define ATH_STAT_STARTED	4		/* opened & irqs enabled */
 
 	unsigned int		filter_flags;	/* HW flags, AR5K_RX_FILTER_* */
-	unsigned int		curmode;	/* current phy mode */
 	struct ieee80211_channel *curchan;	/* current h/w channel */
 
 	u16			nvifs;


^ permalink raw reply related

* [PATCH 8/8] ath5k: Remove redundant sc->curband
From: Bruno Randolf @ 2011-01-19  9:21 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless
In-Reply-To: <20110119091949.19628.28309.stgit@localhost6.localdomain6>

Remove sc->curband because the band is already stored in the current channel.

Signed-off-by: Bruno Randolf <br1@einfach.org>
---
 drivers/net/wireless/ath/ath5k/base.c |   11 ++++-------
 drivers/net/wireless/ath/ath5k/base.h |    2 --
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index a00cc11..0e39ee8 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -551,7 +551,7 @@ ath5k_hw_to_driver_rix(struct ath5k_softc *sc, int hw_rix)
 			"hw_rix out of bounds: %x\n", hw_rix))
 		return 0;
 
-	rix = sc->rate_idx[sc->curband->band][hw_rix];
+	rix = sc->rate_idx[sc->curchan->band][hw_rix];
 	if (WARN(rix < 0, "invalid hw_rix: %x\n", hw_rix))
 		rix = 0;
 
@@ -1361,7 +1361,7 @@ ath5k_receive_frame(struct ath5k_softc *sc, struct sk_buff *skb,
 	rxs->flag |= RX_FLAG_TSFT;
 
 	rxs->freq = sc->curchan->center_freq;
-	rxs->band = sc->curband->band;
+	rxs->band = sc->curchan->band;
 
 	rxs->signal = sc->ah->ah_noise_floor + rs->rs_rssi;
 
@@ -1376,7 +1376,7 @@ ath5k_receive_frame(struct ath5k_softc *sc, struct sk_buff *skb,
 	rxs->flag |= ath5k_rx_decrypted(sc, skb, rs);
 
 	if (rxs->rate_idx >= 0 && rs->rs_rate ==
-	    sc->curband->bitrates[rxs->rate_idx].hw_value_short)
+	    sc->sbands[sc->curchan->band].bitrates[rxs->rate_idx].hw_value_short)
 		rxs->flag |= RX_FLAG_SHORTPRE;
 
 	ath5k_debug_dump_skb(sc, skb, "RX  ", 0);
@@ -2536,7 +2536,6 @@ ath5k_init_hw(struct ath5k_softc *sc)
 	 * and then setup of the interrupt mask.
 	 */
 	sc->curchan = sc->hw->conf.channel;
-	sc->curband = &sc->sbands[sc->curchan->band];
 	sc->imask = AR5K_INT_RXOK | AR5K_INT_RXERR | AR5K_INT_RXEOL |
 		AR5K_INT_RXORN | AR5K_INT_TXDESC | AR5K_INT_TXEOL |
 		AR5K_INT_FATAL | AR5K_INT_GLOBAL | AR5K_INT_MIB;
@@ -2663,10 +2662,8 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
 	 * so we should also free any remaining
 	 * tx buffers */
 	ath5k_drain_tx_buffs(sc);
-	if (chan) {
+	if (chan)
 		sc->curchan = chan;
-		sc->curband = &sc->sbands[chan->band];
-	}
 	ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, chan != NULL,
 								skip_pcu);
 	if (ret) {
diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
index 58660e4..8f919dc 100644
--- a/drivers/net/wireless/ath/ath5k/base.h
+++ b/drivers/net/wireless/ath/ath5k/base.h
@@ -183,8 +183,6 @@ struct ath5k_softc {
 	enum nl80211_iftype	opmode;
 	struct ath5k_hw		*ah;		/* Atheros HW */
 
-	struct ieee80211_supported_band		*curband;
-
 #ifdef CONFIG_ATH5K_DEBUG
 	struct ath5k_dbg_info	debug;		/* debug info */
 #endif /* CONFIG_ATH5K_DEBUG */


^ permalink raw reply related

* [PATCH] RFC: ath5k: Enable 802.11j 4.9GHz frequencies
From: Bruno Randolf @ 2011-01-19  9:22 UTC (permalink / raw)
  To: linux-wireless; +Cc: bob, lrodriguez, bprodoehl, mickflemm

RFC:

This enables 4.9GHz frequencies in ath5k if the regdomain is set to MKK9_MKKC
(0xfe).

I have added a helper function to common ath/regd.c since we know about
MKK9_MKKC there, however in the place where i'm using the function we don't
have an ath_regulatory structure yet, so i'm passing the regdomain code as u16.

I'm using MKK9_MKKC only because this is the regdomain in the 802.11j enabled
sample cards we got from our vendor. I'm not sure if this is commonly used or
if there are other domain codes which indicate 802.11j support for Atheros
hardware (allthough some comments in the HAL suggest that). Also I don't know
if this is common between ath9k and ath5k.

Could someone from Atheros shed some light on this? Other comments?
---
 drivers/net/wireless/ath/ath5k/caps.c |   13 ++++++++-----
 drivers/net/wireless/ath/regd.c       |    6 ++++++
 drivers/net/wireless/ath/regd.h       |    1 +
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/caps.c b/drivers/net/wireless/ath/ath5k/caps.c
index 31cad80..52fa808 100644
--- a/drivers/net/wireless/ath/ath5k/caps.c
+++ b/drivers/net/wireless/ath/ath5k/caps.c
@@ -56,9 +56,8 @@ int ath5k_hw_set_capabilities(struct ath5k_hw *ah)
 		 * XXX current ieee80211 implementation because the IEEE
 		 * XXX channel mapping does not support negative channel
 		 * XXX numbers (2312MHz is channel -19). Of course, this
-		 * XXX doesn't matter because these channels are out of range
-		 * XXX but some regulation domains like MKK (Japan) will
-		 * XXX support frequencies somewhere around 4.8GHz.
+		 * XXX doesn't matter because these channels are out of the
+		 * XXX legal range.
 		 */
 
 		/*
@@ -66,8 +65,12 @@ int ath5k_hw_set_capabilities(struct ath5k_hw *ah)
 		 */
 
 		if (AR5K_EEPROM_HDR_11A(ee_header)) {
-			/* 4920 */
-			ah->ah_capabilities.cap_range.range_5ghz_min = 5005;
+			if (ath_is_11j_regd(
+			      ah->ah_capabilities.cap_eeprom.ee_regdomain))
+				/* 802.11j enabled card */
+				ah->ah_capabilities.cap_range.range_5ghz_min = 4920; /* 4910? */
+			else
+				ah->ah_capabilities.cap_range.range_5ghz_min = 5005;
 			ah->ah_capabilities.cap_range.range_5ghz_max = 6100;
 
 			/* Set supported modes */
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index 2b14775..8d60089 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -158,6 +158,12 @@ ieee80211_regdomain *ath_world_regdomain(struct ath_regulatory *reg)
 	}
 }
 
+bool ath_is_11j_regd(u16 regdomain)
+{
+	return regdomain == MKK9_MKKC;
+}
+EXPORT_SYMBOL(ath_is_11j_regd);
+
 /* Frequency is one where radar detection is required */
 static bool ath_is_radar_freq(u16 center_freq)
 {
diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
index 345dd97..18d9acb 100644
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -250,6 +250,7 @@ enum CountryCode {
 };
 
 bool ath_is_world_regd(struct ath_regulatory *reg);
+bool ath_is_11j_regd(u16 redomain);
 int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy,
 		  int (*reg_notifier)(struct wiphy *wiphy,
 		  struct regulatory_request *request));


^ permalink raw reply related

* [2.6.38-rc1] iwlagn lock misuse...
From: Daniel J Blueman @ 2011-01-19  9:44 UTC (permalink / raw)
  To: Reinette Chatre, Wey-Yi Guy, Intel Linux Wireless
  Cc: linux-wireless, Linux Kernel

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

Booting an instrumented 2.6.38-rc1 kernel with an Intel WiFi Link 5300
card and associating with an access point, I see a lockdep warning
[attached].

This is essentially (struct iwl_priv)->lock being taken with
interrupts disabled in iwl-agn-ict.c:152 [1] and the same lock taken
with interrupts enabled in rx.c:2476 [2] (confirmed via disassembly).

It feels like this would have been introduced in this commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6e8cc38d5b05bb812f89a35bd9bf52405e67d0df

Shall I raise a kernel.org bugzilla entry?

Thanks,
  Daniel

--- [1] iwl-agn-ict.c:152

static irqreturn_t iwl_isr(int irq, void *data)
{
	struct iwl_priv *priv = data;
	u32 inta, inta_mask;
	unsigned long flags;
#ifdef CONFIG_IWLWIFI_DEBUG
	u32 inta_fh;
#endif
	if (!priv)
		return IRQ_NONE;

	spin_lock_irqsave(&priv->lock, flags); <---

--- [2] rx.c:2476

static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx)
{
	ieee80211_rx_result res = RX_DROP_MONITOR;
	struct sk_buff *skb;

#define CALL_RXH(rxh)			\
	do {				\
		res = rxh(rx);		\
		if (res != RX_CONTINUE)	\
			goto rxh_next;  \
	} while (0);

	spin_lock(&rx->local->rx_skb_queue.lock);  <---
-- 
Daniel J Blueman

[-- Attachment #2: 2.6.38-rc1-iwlagn.txt --]
[-- Type: text/plain, Size: 32260 bytes --]

[   32.034539] ======================================================
[   32.034544] [ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ]
[   32.034547] 2.6.38-rc1-340cd+ #3
[   32.034549] ------------------------------------------------------
[   32.034553] dbus-daemon/490 [HC0[0]:SC1[1]:HE0:SE0] is trying to acquire:
[   32.034557]  (&(&list->lock)->rlock#4){+.-...}, at: [<ffffffff81562a46>] skb_queue_tail+0x26/0x60
[   32.034568] 
[   32.034569] and this task is already holding:
[   32.034572]  (&(&priv->sta_lock)->rlock){..-...}, at: [<ffffffffa01f4a3c>] iwlagn_rx_reply_tx+0x14c/0xc20 [iwlagn]
[   32.034586] which would create a new lock dependency:
[   32.034589]  (&(&priv->sta_lock)->rlock){..-...} -> (&(&list->lock)->rlock#4){+.-...}
[   32.034599] 
[   32.034599] but this new dependency connects a HARDIRQ-irq-safe lock:
[   32.034602]  (&(&priv->lock)->rlock){-.-...}
[   32.034606] ... which became HARDIRQ-irq-safe at:
[   32.034608]   [<ffffffff810a7644>] __lock_acquire+0xc74/0x1d10
[   32.034616]   [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.034621]   [<ffffffff816d32eb>] _raw_spin_lock_irqsave+0x6b/0xb0
[   32.034628]   [<ffffffffa02008ff>] iwl_isr_ict+0x4bf/0x1510 [iwlagn]
[   32.034638]   [<ffffffff810db4bd>] handle_IRQ_event+0x7d/0x350
[   32.034645]   [<ffffffff810ddf86>] handle_edge_irq+0xb6/0x160
[   32.034650]   [<ffffffff81006824>] handle_irq+0x44/0x90
[   32.034656]   [<ffffffff810058d8>] do_IRQ+0x58/0xd0
[   32.034661]   [<ffffffff816d4613>] ret_from_intr+0x0/0x1a
[   32.034666]   [<ffffffff8136a0a8>] __udelay+0x28/0x30
[   32.034672]   [<ffffffffa00180c1>] sclhi+0x71/0x90 [i2c_algo_bit]
[   32.034679]   [<ffffffffa0018548>] bit_xfer+0x198/0x4c0 [i2c_algo_bit]
[   32.034684]   [<ffffffff814d31c9>] i2c_transfer+0xc9/0x110
[   32.034691]   [<ffffffffa00a4cca>] drm_do_probe_ddc_edid+0x4a/0x60 [drm]
[   32.034704]   [<ffffffffa00a4f0c>] drm_get_edid+0x8c/0x240 [drm]
[   32.034715]   [<ffffffffa0267fad>] radeon_modeset_init+0x4cd/0x8f0 [radeon]
[   32.034737]   [<ffffffffa02414c8>] radeon_driver_load_kms+0x108/0x180 [radeon]
[   32.034752]   [<ffffffffa009c032>] drm_get_pci_dev+0x192/0x2b0 [drm]
[   32.034764]   [<ffffffffa02d5a91>] radeon_pci_probe+0xaa/0x619 [radeon]
[   32.034782]   [<ffffffff8138753a>] local_pci_probe+0x5a/0xd0
[   32.034787]   [<ffffffff813886e9>] pci_device_probe+0x109/0x110
[   32.034793]   [<ffffffff8140f5c6>] driver_probe_device+0x96/0x1c0
[   32.034799]   [<ffffffff8140f78b>] __driver_attach+0x9b/0xa0
[   32.034804]   [<ffffffff8140ec68>] bus_for_each_dev+0x68/0x90
[   32.034809]   [<ffffffff8140f3e9>] driver_attach+0x19/0x20
[   32.034814]   [<ffffffff8140e4d8>] bus_add_driver+0x1b8/0x280
[   32.034819]   [<ffffffff8140fa98>] driver_register+0x78/0x140
[   32.034824]   [<ffffffff81388941>] __pci_register_driver+0x61/0xe0
[   32.034830]   [<ffffffffa009c21f>] drm_pci_init+0xcf/0xe0 [drm]
[   32.034842]   [<ffffffffa0093763>] drm_init+0x53/0x70 [drm]
[   32.034852]   [<ffffffffa03180c4>] 0xffffffffa03180c4
[   32.034857]   [<ffffffff810001de>] do_one_initcall+0x3e/0x1a0
[   32.034862]   [<ffffffff810b7e12>] sys_init_module+0xf2/0x250
[   32.034868]   [<ffffffff81003192>] system_call_fastpath+0x16/0x1b
[   32.034874] 
[   32.034874] to a HARDIRQ-irq-unsafe lock:
[   32.034877]  (&(&list->lock)->rlock#4){+.-...}
[   32.034881] ... which became HARDIRQ-irq-unsafe at:
[   32.034884] ...  [<ffffffff810a74ed>] __lock_acquire+0xb1d/0x1d10
[   32.034890]   [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.034896]   [<ffffffff816d317b>] _raw_spin_lock+0x3b/0x70
[   32.034901]   [<ffffffffa0058686>] ieee80211_rx_handlers+0x36/0x1e80 [mac80211]
[   32.034914]   [<ffffffffa005a6e4>] ieee80211_prepare_and_rx_handle+0x214/0xa70 [mac80211]
[   32.034926]   [<ffffffffa005b3e7>] ieee80211_rx+0x3c7/0xbb0 [mac80211]
[   32.034938]   [<ffffffffa01eee68>] iwlagn_rx_reply_rx+0x428/0x670 [iwlagn]
[   32.034948]   [<ffffffffa01b9250>] iwl_rx_handle+0x160/0x710 [iwlagn]
[   32.034956]   [<ffffffffa01bb9e5>] iwl_irq_tasklet+0x525/0x1aa0 [iwlagn]
[   32.034964]   [<ffffffff8106e759>] tasklet_action+0x159/0x230
[   32.034970]   [<ffffffff8106f915>] __do_softirq+0xf5/0x420
[   32.034975]   [<ffffffff8100411c>] call_softirq+0x1c/0x30
[   32.034980]   [<ffffffff81006775>] do_softirq+0x85/0xf0
[   32.034984]   [<ffffffff8106f605>] irq_exit+0xa5/0xb0
[   32.034989]   [<ffffffff810058e1>] do_IRQ+0x61/0xd0
[   32.034994]   [<ffffffff816d4613>] ret_from_intr+0x0/0x1a
[   32.034999] 
[   32.035000] other info that might help us debug this:
[   32.035001] 
[   32.035004] 2 locks held by dbus-daemon/490:
[   32.035006]  #0:  (&mm->mmap_sem){++++++}, at: [<ffffffff810334e3>] do_page_fault+0x113/0x510
[   32.035016]  #1:  (&(&priv->sta_lock)->rlock){..-...}, at: [<ffffffffa01f4a3c>] iwlagn_rx_reply_tx+0x14c/0xc20 [iwlagn]
[   32.035030] 
[   32.035031] the dependencies between HARDIRQ-irq-safe lock and the holding lock:
[   32.035052]  -> (&(&priv->lock)->rlock){-.-...} ops: 3571 {
[   32.035060]     IN-HARDIRQ-W at:
[   32.035063]                                          [<ffffffff810a7644>] __lock_acquire+0xc74/0x1d10
[   32.035070]                                          [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.035075]                                          [<ffffffff816d32eb>] _raw_spin_lock_irqsave+0x6b/0xb0
[   32.035082]                                          [<ffffffffa02008ff>] iwl_isr_ict+0x4bf/0x1510 [iwlagn]
[   32.035092]                                          [<ffffffff810db4bd>] handle_IRQ_event+0x7d/0x350
[   32.035099]                                          [<ffffffff810ddf86>] handle_edge_irq+0xb6/0x160
[   32.035104]                                          [<ffffffff81006824>] handle_irq+0x44/0x90
[   32.035110]                                          [<ffffffff810058d8>] do_IRQ+0x58/0xd0
[   32.035115]                                          [<ffffffff816d4613>] ret_from_intr+0x0/0x1a
[   32.035121]                                          [<ffffffff8136a0a8>] __udelay+0x28/0x30
[   32.035126]                                          [<ffffffffa00180c1>] sclhi+0x71/0x90 [i2c_algo_bit]
[   32.035133]                                          [<ffffffffa0018548>] bit_xfer+0x198/0x4c0 [i2c_algo_bit]
[   32.035139]                                          [<ffffffff814d31c9>] i2c_transfer+0xc9/0x110
[   32.035145]                                          [<ffffffffa00a4cca>] drm_do_probe_ddc_edid+0x4a/0x60 [drm]
[   32.035157]                                          [<ffffffffa00a4f0c>] drm_get_edid+0x8c/0x240 [drm]
[   32.035169]                                          [<ffffffffa0267fad>] radeon_modeset_init+0x4cd/0x8f0 [radeon]
[   32.035190]                                          [<ffffffffa02414c8>] radeon_driver_load_kms+0x108/0x180 [radeon]
[   32.035206]                                          [<ffffffffa009c032>] drm_get_pci_dev+0x192/0x2b0 [drm]
[   32.035219]                                          [<ffffffffa02d5a91>] radeon_pci_probe+0xaa/0x619 [radeon]
[   32.035237]                                          [<ffffffff8138753a>] local_pci_probe+0x5a/0xd0
[   32.035243]                                          [<ffffffff813886e9>] pci_device_probe+0x109/0x110
[   32.035249]                                          [<ffffffff8140f5c6>] driver_probe_device+0x96/0x1c0
[   32.035255]                                          [<ffffffff8140f78b>] __driver_attach+0x9b/0xa0
[   32.035261]                                          [<ffffffff8140ec68>] bus_for_each_dev+0x68/0x90
[   32.035267]                                          [<ffffffff8140f3e9>] driver_attach+0x19/0x20
[   32.035272]                                          [<ffffffff8140e4d8>] bus_add_driver+0x1b8/0x280
[   32.035278]                                          [<ffffffff8140fa98>] driver_register+0x78/0x140
[   32.035284]                                          [<ffffffff81388941>] __pci_register_driver+0x61/0xe0
[   32.035290]                                          [<ffffffffa009c21f>] drm_pci_init+0xcf/0xe0 [drm]
[   32.035303]                                          [<ffffffffa0093763>] drm_init+0x53/0x70 [drm]
[   32.035314]                                          [<ffffffffa03180c4>] 0xffffffffa03180c4
[   32.035319]                                          [<ffffffff810001de>] do_one_initcall+0x3e/0x1a0
[   32.035325]                                          [<ffffffff810b7e12>] sys_init_module+0xf2/0x250
[   32.035331]                                          [<ffffffff81003192>] system_call_fastpath+0x16/0x1b
[   32.035337]     IN-SOFTIRQ-W at:
[   32.035341]                                          [<ffffffff810a74c8>] __lock_acquire+0xaf8/0x1d10
[   32.035347]                                          [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.035353]                                          [<ffffffff816d32eb>] _raw_spin_lock_irqsave+0x6b/0xb0
[   32.035359]                                          [<ffffffffa01bb4e3>] iwl_irq_tasklet+0x23/0x1aa0 [iwlagn]
[   32.035368]                                          [<ffffffff8106e759>] tasklet_action+0x159/0x230
[   32.035374]                                          [<ffffffff8106f915>] __do_softirq+0xf5/0x420
[   32.035380]                                          [<ffffffff8100411c>] call_softirq+0x1c/0x30
[   32.035385]                                          [<ffffffff81006775>] do_softirq+0x85/0xf0
[   32.035390]                                          [<ffffffff8106f605>] irq_exit+0xa5/0xb0
[   32.035396]                                          [<ffffffff810058e1>] do_IRQ+0x61/0xd0
[   32.035401]                                          [<ffffffff816d4613>] ret_from_intr+0x0/0x1a
[   32.035407]                                          [<ffffffff8136a0a8>] __udelay+0x28/0x30
[   32.035412]                                          [<ffffffffa00180c1>] sclhi+0x71/0x90 [i2c_algo_bit]
[   32.035419]                                          [<ffffffffa0018548>] bit_xfer+0x198/0x4c0 [i2c_algo_bit]
[   32.035425]                                          [<ffffffff814d31c9>] i2c_transfer+0xc9/0x110
[   32.035431]                                          [<ffffffffa00a4cca>] drm_do_probe_ddc_edid+0x4a/0x60 [drm]
[   32.035444]                                          [<ffffffffa00a4f0c>] drm_get_edid+0x8c/0x240 [drm]
[   32.035456]                                          [<ffffffffa0267fad>] radeon_modeset_init+0x4cd/0x8f0 [radeon]
[   32.035476]                                          [<ffffffffa02414c8>] radeon_driver_load_kms+0x108/0x180 [radeon]
[   32.035492]                                          [<ffffffffa009c032>] drm_get_pci_dev+0x192/0x2b0 [drm]
[   32.035505]                                          [<ffffffffa02d5a91>] radeon_pci_probe+0xaa/0x619 [radeon]
[   32.035523]                                          [<ffffffff8138753a>] local_pci_probe+0x5a/0xd0
[   32.035529]                                          [<ffffffff813886e9>] pci_device_probe+0x109/0x110
[   32.035535]                                          [<ffffffff8140f5c6>] driver_probe_device+0x96/0x1c0
[   32.035541]                                          [<ffffffff8140f78b>] __driver_attach+0x9b/0xa0
[   32.035547]                                          [<ffffffff8140ec68>] bus_for_each_dev+0x68/0x90
[   32.035553]                                          [<ffffffff8140f3e9>] driver_attach+0x19/0x20
[   32.035558]                                          [<ffffffff8140e4d8>] bus_add_driver+0x1b8/0x280
[   32.035564]                                          [<ffffffff8140fa98>] driver_register+0x78/0x140
[   32.035570]                                          [<ffffffff81388941>] __pci_register_driver+0x61/0xe0
[   32.035576]                                          [<ffffffffa009c21f>] drm_pci_init+0xcf/0xe0 [drm]
[   32.035589]                                          [<ffffffffa0093763>] drm_init+0x53/0x70 [drm]
[   32.035600]                                          [<ffffffffa03180c4>] 0xffffffffa03180c4
[   32.035605]                                          [<ffffffff810001de>] do_one_initcall+0x3e/0x1a0
[   32.035611]                                          [<ffffffff810b7e12>] sys_init_module+0xf2/0x250
[   32.035617]                                          [<ffffffff81003192>] system_call_fastpath+0x16/0x1b
[   32.035624]     INITIAL USE at:
[   32.035627]                                         [<ffffffff810a6e3a>] __lock_acquire+0x46a/0x1d10
[   32.035633]                                         [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.035639]                                         [<ffffffff816d32eb>] _raw_spin_lock_irqsave+0x6b/0xb0
[   32.035645]                                         [<ffffffffa01b37f9>] iwl_pci_probe+0xac9/0x1db0 [iwlagn]
[   32.035654]                                         [<ffffffff8138753a>] local_pci_probe+0x5a/0xd0
[   32.035660]                                         [<ffffffff813886e9>] pci_device_probe+0x109/0x110
[   32.035665]                                         [<ffffffff8140f5c6>] driver_probe_device+0x96/0x1c0
[   32.035671]                                         [<ffffffff8140f78b>] __driver_attach+0x9b/0xa0
[   32.035677]                                         [<ffffffff8140ec68>] bus_for_each_dev+0x68/0x90
[   32.035683]                                         [<ffffffff8140f3e9>] driver_attach+0x19/0x20
[   32.035689]                                         [<ffffffff8140e4d8>] bus_add_driver+0x1b8/0x280
[   32.035695]                                         [<ffffffff8140fa98>] driver_register+0x78/0x140
[   32.035700]                                         [<ffffffff81388941>] __pci_register_driver+0x61/0xe0
[   32.035706]                                         [<ffffffffa012b05c>] arc4_set_key+0x5c/0x90 [arc4]
[   32.035712]                                         [<ffffffff810001de>] do_one_initcall+0x3e/0x1a0
[   32.035718]                                         [<ffffffff810b7e12>] sys_init_module+0xf2/0x250
[   32.035724]                                         [<ffffffff81003192>] system_call_fastpath+0x16/0x1b
[   32.035730]   }
[   32.035732]   ... key      at: [<ffffffffa021b25a>] __key.56621+0x0/0xfffffffffffecda6 [iwlagn]
[   32.035741]   ... acquired at:
[   32.035743]    [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.035748]    [<ffffffff816d317b>] _raw_spin_lock+0x3b/0x70
[   32.035754]    [<ffffffffa01e43d9>] iwlagn_tx_skb+0x199/0x1570 [iwlagn]
[   32.035763]    [<ffffffffa01b7845>] iwlagn_mac_tx+0x125/0x1c0 [iwlagn]
[   32.035771]    [<ffffffffa005c767>] __ieee80211_tx+0x147/0x230 [mac80211]
[   32.035784]    [<ffffffffa005def6>] ieee80211_tx+0x106/0x300 [mac80211]
[   32.035796]    [<ffffffffa005e1d2>] ieee80211_xmit+0xe2/0x2e0 [mac80211]
[   32.035807]    [<ffffffffa005e41f>] ieee80211_tx_skb+0x4f/0x60 [mac80211]
[   32.035820]    [<ffffffffa0062136>] ieee80211_send_auth+0x176/0x1f0 [mac80211]
[   32.035832]    [<ffffffffa004f6e3>] ieee80211_work_work+0xac3/0x1570 [mac80211]
[   32.035843]    [<ffffffff810888d8>] process_one_work+0x1c8/0x6b0
[   32.035849]    [<ffffffff810891bd>] worker_thread+0x15d/0x3c0
[   32.035854]    [<ffffffff8108d456>] kthread+0xb6/0xc0
[   32.035859]    [<ffffffff81004024>] kernel_thread_helper+0x4/0x10
[   32.035864] 
[   32.035866] -> (&(&priv->sta_lock)->rlock){..-...} ops: 37 {
[   32.035874]    IN-SOFTIRQ-W at:
[   32.035877]                                        [<ffffffff810a74c8>] __lock_acquire+0xaf8/0x1d10
[   32.035883]                                        [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.035889]                                        [<ffffffff816d32eb>] _raw_spin_lock_irqsave+0x6b/0xb0
[   32.035895]                                        [<ffffffffa01f4a3c>] iwlagn_rx_reply_tx+0x14c/0xc20 [iwlagn]
[   32.035905]                                        [<ffffffffa01b9250>] iwl_rx_handle+0x160/0x710 [iwlagn]
[   32.035915]                                        [<ffffffffa01bb9e5>] iwl_irq_tasklet+0x525/0x1aa0 [iwlagn]
[   32.035923]                                        [<ffffffff8106e759>] tasklet_action+0x159/0x230
[   32.035929]                                        [<ffffffff8106f915>] __do_softirq+0xf5/0x420
[   32.035935]                                        [<ffffffff8100411c>] call_softirq+0x1c/0x30
[   32.035940]                                        [<ffffffff81006775>] do_softirq+0x85/0xf0
[   32.035945]                                        [<ffffffff8106f605>] irq_exit+0xa5/0xb0
[   32.035951]                                        [<ffffffff810058e1>] do_IRQ+0x61/0xd0
[   32.035956]                                        [<ffffffff816d4613>] ret_from_intr+0x0/0x1a
[   32.035962]                                        [<ffffffff81371b0f>] __debug_check_no_obj_freed+0x16f/0x200
[   32.035968]                                        [<ffffffff81371bb5>] debug_check_no_obj_freed+0x15/0x20
[   32.035973]                                        [<ffffffff81111f44>] free_pages_prepare+0x114/0x230
[   32.035980]                                        [<ffffffff81112282>] free_hot_cold_page+0x42/0x220
[   32.035986]                                        [<ffffffff81112495>] __free_pages+0x35/0x40
[   32.035991]                                        [<ffffffff811317f7>] __pte_alloc+0x127/0x1c0
[   32.035997]                                        [<ffffffff811319d6>] handle_mm_fault+0x146/0x300
[   32.036003]                                        [<ffffffff81033551>] do_page_fault+0x181/0x510
[   32.036008]                                        [<ffffffff816d4915>] page_fault+0x25/0x30
[   32.036014]    INITIAL USE at:
[   32.036018]                                       [<ffffffff810a6e3a>] __lock_acquire+0x46a/0x1d10
[   32.036024]                                       [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.036030]                                       [<ffffffff816d32eb>] _raw_spin_lock_irqsave+0x6b/0xb0
[   32.036036]                                       [<ffffffffa01fc361>] iwlagn_alloc_bcast_station+0x31/0x120 [iwlagn]
[   32.036047]                                       [<ffffffffa01b0188>] __iwl_up+0x8e8/0x14a0 [iwlagn]
[   32.036055]                                       [<ffffffffa01b7977>] iwlagn_mac_start+0x97/0x2b0 [iwlagn]
[   32.036064]                                       [<ffffffffa0051d34>] ieee80211_do_open+0x354/0x6b0 [mac80211]
[   32.036077]                                       [<ffffffffa00520eb>] ieee80211_open+0x5b/0x80 [mac80211]
[   32.036089]                                       [<ffffffff81572797>] __dev_open+0xb7/0x100
[   32.036096]                                       [<ffffffff8156e8bc>] __dev_change_flags+0x9c/0x180
[   32.036102]                                       [<ffffffff81572693>] dev_change_flags+0x23/0x70
[   32.036108]                                       [<ffffffff81580ca2>] do_setlink+0x1f2/0x8c0
[   32.036113]                                       [<ffffffff81581462>] rtnl_setlink+0xf2/0x140
[   32.036119]                                       [<ffffffff81581d57>] rtnetlink_rcv_msg+0x177/0x2a0
[   32.036125]                                       [<ffffffff81598d21>] netlink_rcv_skb+0xa1/0xd0
[   32.036131]                                       [<ffffffff81581bd0>] rtnetlink_rcv+0x20/0x30
[   32.036137]                                       [<ffffffff8159896a>] netlink_unicast+0x2ba/0x300
[   32.036142]                                       [<ffffffff81599344>] netlink_sendmsg+0x274/0x3f0
[   32.036148]                                       [<ffffffff81559824>] sock_sendmsg+0xe4/0x110
[   32.036154]                                       [<ffffffff8155a863>] sys_sendmsg+0x253/0x3b0
[   32.036159]                                       [<ffffffff81003192>] system_call_fastpath+0x16/0x1b
[   32.036165]  }
[   32.036167]  ... key      at: [<ffffffffa021b282>] __key.56503+0x0/0xfffffffffffecd7e [iwlagn]
[   32.036176]  ... acquired at:
[   32.036178]    [<ffffffff810a52b0>] check_irq_usage+0x60/0xf0
[   32.036184]    [<ffffffff810a7b53>] __lock_acquire+0x1183/0x1d10
[   32.036189]    [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.036194]    [<ffffffff816d32eb>] _raw_spin_lock_irqsave+0x6b/0xb0
[   32.036200]    [<ffffffff81562a46>] skb_queue_tail+0x26/0x60
[   32.036204]    [<ffffffffa00413d8>] ieee80211_tx_status_irqsafe+0x38/0xa0 [mac80211]
[   32.036214]    [<ffffffffa01d9278>] iwlagn_tx_queue_reclaim+0xc8/0x240 [iwlagn]
[   32.036223]    [<ffffffffa01f525e>] iwlagn_rx_reply_tx+0x96e/0xc20 [iwlagn]
[   32.036233]    [<ffffffffa01b9250>] iwl_rx_handle+0x160/0x710 [iwlagn]
[   32.036242]    [<ffffffffa01bb9e5>] iwl_irq_tasklet+0x525/0x1aa0 [iwlagn]
[   32.036250]    [<ffffffff8106e759>] tasklet_action+0x159/0x230
[   32.036255]    [<ffffffff8106f915>] __do_softirq+0xf5/0x420
[   32.036261]    [<ffffffff8100411c>] call_softirq+0x1c/0x30
[   32.036265]    [<ffffffff81006775>] do_softirq+0x85/0xf0
[   32.036270]    [<ffffffff8106f605>] irq_exit+0xa5/0xb0
[   32.036275]    [<ffffffff810058e1>] do_IRQ+0x61/0xd0
[   32.036279]    [<ffffffff816d4613>] ret_from_intr+0x0/0x1a
[   32.036284]    [<ffffffff81371b0f>] __debug_check_no_obj_freed+0x16f/0x200
[   32.036289]    [<ffffffff81371bb5>] debug_check_no_obj_freed+0x15/0x20
[   32.036294]    [<ffffffff81111f44>] free_pages_prepare+0x114/0x230
[   32.036300]    [<ffffffff81112282>] free_hot_cold_page+0x42/0x220
[   32.036305]    [<ffffffff81112495>] __free_pages+0x35/0x40
[   32.036310]    [<ffffffff811317f7>] __pte_alloc+0x127/0x1c0
[   32.036315]    [<ffffffff811319d6>] handle_mm_fault+0x146/0x300
[   32.036320]    [<ffffffff81033551>] do_page_fault+0x181/0x510
[   32.036325]    [<ffffffff816d4915>] page_fault+0x25/0x30
[   32.036330] 
[   32.036332] 
[   32.036332] the dependencies between the lock to be acquired and HARDIRQ-irq-unsafe lock:
[   32.036354] -> (&(&list->lock)->rlock#4){+.-...} ops: 2437 {
[   32.036363]    HARDIRQ-ON-W at:
[   32.036366]                                        [<ffffffff810a74ed>] __lock_acquire+0xb1d/0x1d10
[   32.036372]                                        [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.036378]                                        [<ffffffff816d317b>] _raw_spin_lock+0x3b/0x70
[   32.036384]                                        [<ffffffffa0058686>] ieee80211_rx_handlers+0x36/0x1e80 [mac80211]
[   32.036397]                                        [<ffffffffa005a6e4>] ieee80211_prepare_and_rx_handle+0x214/0xa70 [mac80211]
[   32.036410]                                        [<ffffffffa005b3e7>] ieee80211_rx+0x3c7/0xbb0 [mac80211]
[   32.036422]                                        [<ffffffffa01eee68>] iwlagn_rx_reply_rx+0x428/0x670 [iwlagn]
[   32.036433]                                        [<ffffffffa01b9250>] iwl_rx_handle+0x160/0x710 [iwlagn]
[   32.036442]                                        [<ffffffffa01bb9e5>] iwl_irq_tasklet+0x525/0x1aa0 [iwlagn]
[   32.036451]                                        [<ffffffff8106e759>] tasklet_action+0x159/0x230
[   32.036457]                                        [<ffffffff8106f915>] __do_softirq+0xf5/0x420
[   32.036462]                                        [<ffffffff8100411c>] call_softirq+0x1c/0x30
[   32.036468]                                        [<ffffffff81006775>] do_softirq+0x85/0xf0
[   32.036473]                                        [<ffffffff8106f605>] irq_exit+0xa5/0xb0
[   32.036479]                                        [<ffffffff810058e1>] do_IRQ+0x61/0xd0
[   32.036484]                                        [<ffffffff816d4613>] ret_from_intr+0x0/0x1a
[   32.036490]    IN-SOFTIRQ-W at:
[   32.036493]                                        [<ffffffff810a74c8>] __lock_acquire+0xaf8/0x1d10
[   32.036499]                                        [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.036505]                                        [<ffffffff816d32eb>] _raw_spin_lock_irqsave+0x6b/0xb0
[   32.036511]                                        [<ffffffff81562a46>] skb_queue_tail+0x26/0x60
[   32.036516]                                        [<ffffffffa005a6dc>] ieee80211_prepare_and_rx_handle+0x20c/0xa70 [mac80211]
[   32.036529]                                        [<ffffffffa005b3e7>] ieee80211_rx+0x3c7/0xbb0 [mac80211]
[   32.036542]                                        [<ffffffffa01eee68>] iwlagn_rx_reply_rx+0x428/0x670 [iwlagn]
[   32.036552]                                        [<ffffffffa01b9250>] iwl_rx_handle+0x160/0x710 [iwlagn]
[   32.036561]                                        [<ffffffffa01bb9e5>] iwl_irq_tasklet+0x525/0x1aa0 [iwlagn]
[   32.036570]                                        [<ffffffff8106e759>] tasklet_action+0x159/0x230
[   32.036576]                                        [<ffffffff8106f915>] __do_softirq+0xf5/0x420
[   32.036582]                                        [<ffffffff8100411c>] call_softirq+0x1c/0x30
[   32.036587]                                        [<ffffffff81006775>] do_softirq+0x85/0xf0
[   32.036593]                                        [<ffffffff8106f605>] irq_exit+0xa5/0xb0
[   32.036598]                                        [<ffffffff810058e1>] do_IRQ+0x61/0xd0
[   32.036603]                                        [<ffffffff816d4613>] ret_from_intr+0x0/0x1a
[   32.036609]    INITIAL USE at:
[   32.036613]                                       [<ffffffff810a6e3a>] __lock_acquire+0x46a/0x1d10
[   32.036619]                                       [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.036625]                                       [<ffffffff816d32eb>] _raw_spin_lock_irqsave+0x6b/0xb0
[   32.036631]                                       [<ffffffff81562a46>] skb_queue_tail+0x26/0x60
[   32.036636]                                       [<ffffffffa005a6dc>] ieee80211_prepare_and_rx_handle+0x20c/0xa70 [mac80211]
[   32.036649]                                       [<ffffffffa005b3e7>] ieee80211_rx+0x3c7/0xbb0 [mac80211]
[   32.036661]                                       [<ffffffffa01eee68>] iwlagn_rx_reply_rx+0x428/0x670 [iwlagn]
[   32.036672]                                       [<ffffffffa01b9250>] iwl_rx_handle+0x160/0x710 [iwlagn]
[   32.036681]                                       [<ffffffffa01bb9e5>] iwl_irq_tasklet+0x525/0x1aa0 [iwlagn]
[   32.036690]                                       [<ffffffff8106e759>] tasklet_action+0x159/0x230
[   32.036696]                                       [<ffffffff8106f915>] __do_softirq+0xf5/0x420
[   32.036702]                                       [<ffffffff8100411c>] call_softirq+0x1c/0x30
[   32.036707]                                       [<ffffffff81006775>] do_softirq+0x85/0xf0
[   32.036712]                                       [<ffffffff8106f605>] irq_exit+0xa5/0xb0
[   32.036718]                                       [<ffffffff810058e1>] do_IRQ+0x61/0xd0
[   32.036723]                                       [<ffffffff816d4613>] ret_from_intr+0x0/0x1a
[   32.036729]  }
[   32.036731]  ... key      at: [<ffffffffa00706b2>] __key.26244+0x0/0xffffffffffffb94e [mac80211]
[   32.036741]  ... acquired at:
[   32.036743]    [<ffffffff810a52b0>] check_irq_usage+0x60/0xf0
[   32.036748]    [<ffffffff810a7b53>] __lock_acquire+0x1183/0x1d10
[   32.036754]    [<ffffffff810a87a6>] lock_acquire+0xc6/0x280
[   32.036759]    [<ffffffff816d32eb>] _raw_spin_lock_irqsave+0x6b/0xb0
[   32.036764]    [<ffffffff81562a46>] skb_queue_tail+0x26/0x60
[   32.036769]    [<ffffffffa00413d8>] ieee80211_tx_status_irqsafe+0x38/0xa0 [mac80211]
[   32.036778]    [<ffffffffa01d9278>] iwlagn_tx_queue_reclaim+0xc8/0x240 [iwlagn]
[   32.036788]    [<ffffffffa01f525e>] iwlagn_rx_reply_tx+0x96e/0xc20 [iwlagn]
[   32.036798]    [<ffffffffa01b9250>] iwl_rx_handle+0x160/0x710 [iwlagn]
[   32.036806]    [<ffffffffa01bb9e5>] iwl_irq_tasklet+0x525/0x1aa0 [iwlagn]
[   32.036815]    [<ffffffff8106e759>] tasklet_action+0x159/0x230
[   32.036820]    [<ffffffff8106f915>] __do_softirq+0xf5/0x420
[   32.036825]    [<ffffffff8100411c>] call_softirq+0x1c/0x30
[   32.036829]    [<ffffffff81006775>] do_softirq+0x85/0xf0
[   32.036834]    [<ffffffff8106f605>] irq_exit+0xa5/0xb0
[   32.036839]    [<ffffffff810058e1>] do_IRQ+0x61/0xd0
[   32.036844]    [<ffffffff816d4613>] ret_from_intr+0x0/0x1a
[   32.036849]    [<ffffffff81371b0f>] __debug_check_no_obj_freed+0x16f/0x200
[   32.036854]    [<ffffffff81371bb5>] debug_check_no_obj_freed+0x15/0x20
[   32.036859]    [<ffffffff81111f44>] free_pages_prepare+0x114/0x230
[   32.036864]    [<ffffffff81112282>] free_hot_cold_page+0x42/0x220
[   32.036869]    [<ffffffff81112495>] __free_pages+0x35/0x40
[   32.036875]    [<ffffffff811317f7>] __pte_alloc+0x127/0x1c0
[   32.036880]    [<ffffffff811319d6>] handle_mm_fault+0x146/0x300
[   32.036885]    [<ffffffff81033551>] do_page_fault+0x181/0x510
[   32.036889]    [<ffffffff816d4915>] page_fault+0x25/0x30
[   32.036895] 
[   32.036896] 
[   32.036897] stack backtrace:
[   32.036901] Pid: 490, comm: dbus-daemon Not tainted 2.6.38-rc1-340cd+ #3
[   32.036904] Call Trace:
[   32.036907]  <IRQ>  [<ffffffff810a51a8>] ? check_usage+0x4c8/0x570
[   32.036919]  [<ffffffff810a52b0>] ? check_irq_usage+0x60/0xf0
[   32.036924]  [<ffffffff810a7b53>] ? __lock_acquire+0x1183/0x1d10
[   32.036929]  [<ffffffff8100bdfc>] ? native_sched_clock+0x2c/0x80
[   32.036936]  [<ffffffff810a87a6>] ? lock_acquire+0xc6/0x280
[   32.036940]  [<ffffffff81562a46>] ? skb_queue_tail+0x26/0x60
[   32.036945]  [<ffffffff8100bdfc>] ? native_sched_clock+0x2c/0x80
[   32.036950]  [<ffffffff816d32eb>] ? _raw_spin_lock_irqsave+0x6b/0xb0
[   32.036955]  [<ffffffff81562a46>] ? skb_queue_tail+0x26/0x60
[   32.036959]  [<ffffffff81562a46>] ? skb_queue_tail+0x26/0x60
[   32.036968]  [<ffffffffa00413d8>] ? ieee80211_tx_status_irqsafe+0x38/0xa0 [mac80211]
[   32.036978]  [<ffffffffa01d9278>] ? iwlagn_tx_queue_reclaim+0xc8/0x240 [iwlagn]
[   32.036987]  [<ffffffffa01d930e>] ? iwlagn_tx_queue_reclaim+0x15e/0x240 [iwlagn]
[   32.036996]  [<ffffffffa01f4a3c>] ? iwlagn_rx_reply_tx+0x14c/0xc20 [iwlagn]
[   32.037006]  [<ffffffffa01f525e>] ? iwlagn_rx_reply_tx+0x96e/0xc20 [iwlagn]
[   32.037012]  [<ffffffff8137fb69>] ? debug_dma_unmap_page+0x59/0x60
[   32.037021]  [<ffffffffa01b9250>] ? iwl_rx_handle+0x160/0x710 [iwlagn]
[   32.037027]  [<ffffffff810a41f7>] ? trace_hardirqs_on_caller+0x67/0x1b0
[   32.037035]  [<ffffffffa01bb9e5>] ? iwl_irq_tasklet+0x525/0x1aa0 [iwlagn]
[   32.037041]  [<ffffffff810a3f97>] ? mark_held_locks+0x67/0x90
[   32.037046]  [<ffffffff8106e665>] ? tasklet_action+0x65/0x230
[   32.037051]  [<ffffffff8106e759>] ? tasklet_action+0x159/0x230
[   32.037056]  [<ffffffff8106f915>] ? __do_softirq+0xf5/0x420
[   32.037061]  [<ffffffff8100411c>] ? call_softirq+0x1c/0x30
[   32.037065]  [<ffffffff81006775>] ? do_softirq+0x85/0xf0
[   32.037070]  [<ffffffff8106f605>] ? irq_exit+0xa5/0xb0
[   32.037075]  [<ffffffff810058e1>] ? do_IRQ+0x61/0xd0
[   32.037080]  [<ffffffff816d4613>] ? ret_from_intr+0x0/0x1a
[   32.037083]  <EOI>  [<ffffffff816d3f74>] ? _raw_spin_unlock_irqrestore+0x84/0xa0
[   32.037092]  [<ffffffff81371b0f>] ? __debug_check_no_obj_freed+0x16f/0x200
[   32.037098]  [<ffffffff810a42ed>] ? trace_hardirqs_on_caller+0x15d/0x1b0
[   32.037103]  [<ffffffff810a434d>] ? trace_hardirqs_on+0xd/0x10
[   32.037108]  [<ffffffff81371bb5>] ? debug_check_no_obj_freed+0x15/0x20
[   32.037113]  [<ffffffff81111f44>] ? free_pages_prepare+0x114/0x230
[   32.037118]  [<ffffffff81112282>] ? free_hot_cold_page+0x42/0x220
[   32.037124]  [<ffffffff81055ce1>] ? get_parent_ip+0x11/0x50
[   32.037130]  [<ffffffff81112495>] ? __free_pages+0x35/0x40
[   32.037134]  [<ffffffff811317f7>] ? __pte_alloc+0x127/0x1c0
[   32.037139]  [<ffffffff811319d6>] ? handle_mm_fault+0x146/0x300
[   32.037144]  [<ffffffff81033551>] ? do_page_fault+0x181/0x510
[   32.037150]  [<ffffffff8116dfdf>] ? fget_light+0x1df/0x3c0
[   32.037156]  [<ffffffff816d2f28>] ? trace_hardirqs_off_thunk+0x3a/0x3c
[   32.037161]  [<ffffffff816d4915>] ? page_fault+0x25/0x30


^ permalink raw reply

* Re: [2.6.38-rc1] iwlagn lock misuse...
From: Johannes Berg @ 2011-01-19  9:51 UTC (permalink / raw)
  To: Daniel J Blueman
  Cc: Reinette Chatre, Wey-Yi Guy, Intel Linux Wireless, linux-wireless,
	Linux Kernel
In-Reply-To: <AANLkTi=DLpfpLYAftktUKa5grNyTeT0-reyjEsrr-NwR@mail.gmail.com>

On Wed, 2011-01-19 at 16:44 +0700, Daniel J Blueman wrote:
> Booting an instrumented 2.6.38-rc1 kernel with an Intel WiFi Link 5300
> card and associating with an access point, I see a lockdep warning
> [attached].
> 
> This is essentially (struct iwl_priv)->lock being taken with
> interrupts disabled in iwl-agn-ict.c:152 [1] and the same lock taken
> with interrupts enabled in rx.c:2476 [2] (confirmed via disassembly).
> 
> It feels like this would have been introduced in this commit:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6e8cc38d5b05bb812f89a35bd9bf52405e67d0df

I think you're running into a lockdep false positive, it's not actually
the same lock and lockdep confuses a few skb queue locks. Please apply
this patch
http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=commitdiff;h=53c16b8e752e8e58f4313f1155f3afadf78311bb
and see if the problem persists.

johannes


^ permalink raw reply

* Re: [2.6.38-rc1] iwlagn lock misuse...
From: Daniel J Blueman @ 2011-01-19 10:11 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Reinette Chatre, Wey-Yi Guy, Intel Linux Wireless, linux-wireless,
	Linux Kernel
In-Reply-To: <1295430682.4685.1.camel@jlt3.sipsolutions.net>

Hi Johannes,

On 19 January 2011 16:51, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Wed, 2011-01-19 at 16:44 +0700, Daniel J Blueman wrote:
>> Booting an instrumented 2.6.38-rc1 kernel with an Intel WiFi Link 5300
>> card and associating with an access point, I see a lockdep warning
>> [attached].
>>
>> This is essentially (struct iwl_priv)->lock being taken with
>> interrupts disabled in iwl-agn-ict.c:152 [1] and the same lock taken
>> with interrupts enabled in rx.c:2476 [2] (confirmed via disassembly).
>>
>> It feels like this would have been introduced in this commit:
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6e8cc38d5b05bb812f89a35bd9bf52405e67d0df
>
> I think you're running into a lockdep false positive, it's not actually
> the same lock and lockdep confuses a few skb queue locks. Please apply
> this patch
> http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=commitdiff;h=53c16b8e752e8e58f4313f1155f3afadf78311bb
> and see if the problem persists.

Good move; it addresses the false-positive. I hope it can hit 2.6.38-rc2.

Thanks,
  Daniel
-- 
Daniel J Blueman

^ permalink raw reply

* Re: [PATCH 2/8] ath5k: Simplify loop when setting up channels
From: Bob Copeland @ 2011-01-19 11:07 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092042.19628.81667.stgit@localhost6.localdomain6>

On Wed, Jan 19, 2011 at 4:20 AM, Bruno Randolf <br1@einfach.org> wrote:
> Simplify confusing code and get rid of an unnecessary variable.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>


> @@ -285,8 +285,8 @@ ath5k_copy_channels(struct ath5k_hw *ah,
>                return 0;
>        }
>
> -       for (i = 0, count = 0; i < size && max > 0; i++) {
> -               ch = i + 1 ;
> +       count = 0;
> +       for (ch = 1; ch < size && count <= max; ch++) {

Should be <= size now, right?  And maybe rename size to max_channel
or something like that.

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply

* Re: [PATCH 3/8] ath5k: Rename ath5k_copy_channels
From: Bob Copeland @ 2011-01-19 11:08 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092047.19628.99228.stgit@localhost6.localdomain6>

On Wed, Jan 19, 2011 at 4:20 AM, Bruno Randolf <br1@einfach.org> wrote:
> Rename ath5k_copy_channels() to ath5k_setup_channels() - nothing is copied
> here.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---
>  drivers/net/wireless/ath/ath5k/base.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index 0387acb..9e8b1f4 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -256,7 +256,7 @@ static bool ath5k_is_standard_channel(short chan)
>  }
>
>  static unsigned int
> -ath5k_copy_channels(struct ath5k_hw *ah,
> +ath5k_setup_channels(struct ath5k_hw *ah,
>                struct ieee80211_channel *channels,
>                unsigned int mode,
>                unsigned int max)
> @@ -356,7 +356,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
>                sband->n_bitrates = 12;
>
>                sband->channels = sc->channels;
> -               sband->n_channels = ath5k_copy_channels(ah, sband->channels,
> +               sband->n_channels = ath5k_setup_channels(ah, sband->channels,
>                                        AR5K_MODE_11G, max_c);
>
>                hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
> @@ -382,7 +382,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
>                }
>
>                sband->channels = sc->channels;
> -               sband->n_channels = ath5k_copy_channels(ah, sband->channels,
> +               sband->n_channels = ath5k_setup_channels(ah, sband->channels,
>                                        AR5K_MODE_11B, max_c);
>
>                hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
> @@ -402,7 +402,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
>                sband->n_bitrates = 8;
>
>                sband->channels = &sc->channels[count_c];
> -               sband->n_channels = ath5k_copy_channels(ah, sband->channels,
> +               sband->n_channels = ath5k_setup_channels(ah, sband->channels,
>                                        AR5K_MODE_11A, max_c);
>
>                hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband;
>

Acked-by: Bob Copeland <me@bobcopeland.com>

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply

* Re: [PATCH 4/8] ath5k: ath5k_setup_channels cleanup and whitespace
From: Bob Copeland @ 2011-01-19 11:09 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092052.19628.61933.stgit@localhost6.localdomain6>

On Wed, Jan 19, 2011 at 4:20 AM, Bruno Randolf <br1@einfach.org> wrote:
> Remove useless test_bit - it's not going to happen because of the way this
> function is called only when that bit is set.
>
> And fix some whitespace.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>

Acked-by: Bob Copeland <me@bobcopeland.com>

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply

* Re: [PATCH 5/8] ath5k: Add 802.11j 4.9GHz channels to allowed channels
From: Bob Copeland @ 2011-01-19 11:14 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092057.19628.9296.stgit@localhost6.localdomain6>

On Wed, Jan 19, 2011 at 4:20 AM, Bruno Randolf <br1@einfach.org> wrote:
> Add the 802.11j (20MHz channel width) channels to the allowed channels. This
> still does not enable 802.11j in ath5k since these frequencies are out of the
> configured range. A later patch will deal with that.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---

> -static bool ath5k_is_standard_channel(short chan)
> +static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band)
>  {
> -       return ((chan <= 14) ||
> -               /* UNII 1,2 */
> -               ((chan & 3) == 0 && chan >= 36 && chan <= 64) ||
> +       if (band == IEEE80211_BAND_2GHZ && chan <= 14)
> +               return true;

This routine is only used to post-filter the channels so I don't
think we need to check the band.  It's mostly just to weed out all
of the 10 mhz-spaced 5 ghz channels we used to export.

> -               ((chan & 3) == 1 && chan >= 149 && chan <= 165));
> +               ((chan & 3) == 1 && chan >= 149 && chan <= 165) ||
> +               /* 802.11j 5.030-5.080 GHz (20MHz) */
> +               (chan == 8 || chan == 12 || chan == 16) ||

Ok I was also going to complain that some channel numbers < 14 were
valid in the 5 ghz band but you know that :)

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply

* Re: [PATCH 6/8] ath5: Remove unused CTL definitions
From: Bob Copeland @ 2011-01-19 11:15 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092102.19628.68971.stgit@localhost6.localdomain6>

On Wed, Jan 19, 2011 at 4:21 AM, Bruno Randolf <br1@einfach.org> wrote:
> They are unused in ath5k and a more detailled definition is in
> ath/regd_common.h.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>

Acked-by: Bob Copeland <me@bobcopeland.com>

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply

* Re: [PATCH 7/8] ath5k: Remove unused sc->curmode
From: Bob Copeland @ 2011-01-19 11:17 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092108.19628.43971.stgit@localhost6.localdomain6>

On Wed, Jan 19, 2011 at 4:21 AM, Bruno Randolf <br1@einfach.org> wrote:
> sc->curmode is set but never used. Remove it and the helper function. Also the
> ath5k_rate_update which is refered to in the comment does not exist (any more?)
> so we don't need to setup the band in that place.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>

Acked-by: Bob Copeland <me@bobcopeland.com>

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply

* Re: [PATCH 8/8] ath5k: Remove redundant sc->curband
From: Bob Copeland @ 2011-01-19 11:19 UTC (permalink / raw)
  To: Bruno Randolf; +Cc: linville, linux-wireless
In-Reply-To: <20110119092113.19628.33322.stgit@localhost6.localdomain6>

On Wed, Jan 19, 2011 at 4:21 AM, Bruno Randolf <br1@einfach.org> wrote:
> Remove sc->curband because the band is already stored in the current channel.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>

Nice cleanup series!

Acked-by: Bob Copeland <me@bobcopeland.com>

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply


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