Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: pull request: bluetooth 2013-06-23
From: Pavel Machek @ 2013-07-15 12:28 UTC (permalink / raw)
  To: Gustavo Padovan, Marcel Holtmann, linville, linux-wireless,
	linux-bluetooth, linux-kernel, Rafael J. Wysocki
In-Reply-To: <20130626124736.GA3337@joana>

>On Wed 2013-06-26 13:47:36, Gustavo Padovan wrote:
> * Pavel Machek <pavel@ucw.cz> [2013-06-26 13:52:55 +0200]:
> 
> > On Tue 2013-06-25 22:00:39, Gustavo Padovan wrote:
> > > Hi Marcel,
> > > 
> > > * Marcel Holtmann <marcel@holtmann.org> [2013-06-25 13:49:19 -0700]:
> > > 
> > > > Hi Pavel,
> > > > 
> > > > >> Jaganath Kanakkassery (1):
> > > > >>      Bluetooth: Fix invalid length check in l2cap_information_rsp()
> > > > > 
> > > > > Could we add the "3.10 vs. thinkpad x60" patch that fixes regression?
> > > > > It is from Johan Hedberg…
> > > > 
> > > > that one went into net-next tree. It is scheduled for 3.11 right now.
> > > > 
> > > > After 3.10 is out, maybe it can go into -stable, but otherwise I think it is bit late now. Unless someone wants to cherry-pick it.
> > > 
> > > That patch is actually in 3.10 already, it was included in the last pull
> > > request and John took it to wireless.git.
> > 
> > Is it? I tried pulling yesterday (some updates) and today (no
> > changes), am on:
> 
> Dave already pulled it so it should land in mainline anytime soon.

It seems to work in 3.10 and 3.11-rc1. Thanks!
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply

* [PATCH 3.11] mac80211/minstrel: fix NULL pointer dereference issue
From: Felix Fietkau @ 2013-07-15 12:35 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, krzysiek

When priv_sta == NULL, mi->prev_sample is dereferenced too early. Move
the assignment further down, after the rate_control_send_low call.

Reported-by: Krzysztof Mazur <krzysiek@podlesie.net>
Cc: stable@vger.kernel.org # 3.10
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 net/mac80211/rc80211_minstrel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index ac7ef54..e6512e2 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -290,7 +290,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
 	struct minstrel_rate *msr, *mr;
 	unsigned int ndx;
 	bool mrr_capable;
-	bool prev_sample = mi->prev_sample;
+	bool prev_sample;
 	int delta;
 	int sampling_ratio;
 
@@ -314,6 +314,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
 			(mi->sample_count + mi->sample_deferred / 2);
 
 	/* delta < 0: no sampling required */
+	prev_sample = mi->prev_sample;
 	mi->prev_sample = false;
 	if (delta < 0 || (!mrr_capable && prev_sample))
 		return;
-- 
1.8.0.2


^ permalink raw reply related

* Re: [PATCH 3.11] mac80211/minstrel: fix NULL pointer dereference issue
From: Joe Perches @ 2013-07-15 12:50 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, johannes, krzysiek
In-Reply-To: <1373891706-1071-1-git-send-email-nbd@openwrt.org>

On Mon, 2013-07-15 at 14:35 +0200, Felix Fietkau wrote:
> When priv_sta == NULL, mi->prev_sample is dereferenced too early. Move
> the assignment further down, after the rate_control_send_low call.
> 
> Reported-by: Krzysztof Mazur <krzysiek@podlesie.net>
> Cc: stable@vger.kernel.org # 3.10
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>

Why should this be marked for stable?

It's a local reference only, it's not used.

It's like suggesting that all the initialized
automatics should not be set until after
rate_control_set_low is called.

> ---
>  net/mac80211/rc80211_minstrel.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
> index ac7ef54..e6512e2 100644
> --- a/net/mac80211/rc80211_minstrel.c
> +++ b/net/mac80211/rc80211_minstrel.c
> @@ -290,7 +290,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
>  	struct minstrel_rate *msr, *mr;
>  	unsigned int ndx;
>  	bool mrr_capable;
> -	bool prev_sample = mi->prev_sample;
> +	bool prev_sample;
>  	int delta;
>  	int sampling_ratio;
>  
> @@ -314,6 +314,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
>  			(mi->sample_count + mi->sample_deferred / 2);
>  
>  	/* delta < 0: no sampling required */
> +	prev_sample = mi->prev_sample;
>  	mi->prev_sample = false;
>  	if (delta < 0 || (!mrr_capable && prev_sample))
>  		return;




^ permalink raw reply

* Re: [PATCH 3.11] mac80211/minstrel: fix NULL pointer dereference issue
From: Felix Fietkau @ 2013-07-15 12:54 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-wireless, johannes, krzysiek
In-Reply-To: <1373892651.2062.11.camel@joe-AO722>

On 2013-07-15 2:50 PM, Joe Perches wrote:
> On Mon, 2013-07-15 at 14:35 +0200, Felix Fietkau wrote:
>> When priv_sta == NULL, mi->prev_sample is dereferenced too early. Move
>> the assignment further down, after the rate_control_send_low call.
>> 
>> Reported-by: Krzysztof Mazur <krzysiek@podlesie.net>
>> Cc: stable@vger.kernel.org # 3.10
>> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> 
> Why should this be marked for stable?
> 
> It's a local reference only, it's not used.
> 
> It's like suggesting that all the initialized
> automatics should not be set until after
> rate_control_set_low is called.
mi is set to priv_sta. It can be NULL. The case of priv_sta==NULL is
caught by rate_control_send_low and causes it to bail out.

- Felix


^ permalink raw reply

* Re: Help adding trace events to xHCI
From: Mathieu Desnoyers @ 2013-07-15 12:55 UTC (permalink / raw)
  To: Mark Wielaard
  Cc: Sarah Sharp, Kalle Valo, Johannes Berg, Xenia Ragiadakou,
	OPW Kernel Interns List, linux-usb, linux-wireless,
	Steven Rostedt, linux-trace-users, lttng-dev
In-Reply-To: <20130712193531.GA6954@toonder.wildebeest.org>

* Mark Wielaard (mjw@redhat.com) wrote:
> Hi Mathieu,
> 
> On Fri, Jul 12, 2013 at 01:08:28PM -0400, Mathieu Desnoyers wrote:
> > * Sarah Sharp (sarah.a.sharp@linux.intel.com) wrote:
> > > Thanks for the suggestion.  I'm not familiar with all the userspace
> > > tools for trace events, so I didn't know about the command parser.  Is
> > > there documentation or a list of resources for all the userspace trace
> > > event plugins?  If so, can you give us a pointer to it?
> > 
> > You might want to try out LTTng-UST. It provides TRACEPOINT_EVENT() and
> > tracepoint() for user-space instrumentation. See:
> > 
> > - https://lttng.org/files/doc/man-pages/man3/lttng-ust.3.html
> 
> Is that build on the <sys/sdt.h> ust probe points as embedded in glibc
> for example that gdb and systemtap use to access user space trace
> points?

LTTng-UST tracepoints are not built on sdt.h, but they can optionally
emit sdt.h instrumentation. All you need to do is run:

./configure --with-sdt

when configuring lttng-ust, and after a make install, sdt.h
STAP_PROBEV() will be emitted whenever a lttng-ust tracepoint() macro is
used in the system.

> Can tools use lttng-ust and <sys/sdt.h> tracepoints
> interchangeably by parsing the ELF notes described in
> http://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation

Since lttng-ust tracepoints emit sdt.h instrumentation, yes. However,
please note that the reverse is not possible: sdt.h instrumentation does
not allow tracing with LTTng-UST.

Thanks,

Mathieu

> 
> Thanks,
> 
> Mark

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply

* [PATCH v2] brcmsmac: Further reduce log spam from tx phy messages
From: John Greene @ 2013-07-15 13:31 UTC (permalink / raw)
  To: linville; +Cc: arend, linux-wireless

Relegate 2 phy messages to debug status as they create excessive
log spam, noted in multiple bugzillas for brcmsmac v3.8 and up.
This is a follow on to net-next 99e94940697adec4f84758adb2db71f4a82c7ba5:
brcmsmac: Reduce log spam in heavy tx, make err print in debug

 brcmsmac bcma0:0: phyerr 0x10, rate 0x14
 brcmsmac bcma0:0: brcms_c_ampdu_dotxstatus_complete:
ampdu tx phy error (0x10)

ver 2: Two trivial whitespace fixes.

Signed-off-by: John Greene <jogreene@redhat.com>
---
 drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 6 +++---
 drivers/net/wireless/brcm80211/brcmsmac/main.c  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
index bd98285..fa391e4 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
@@ -928,9 +928,9 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
 			}
 		} else if (txs->phyerr) {
 			update_rate = false;
-			brcms_err(wlc->hw->d11core,
-				  "%s: ampdu tx phy error (0x%x)\n",
-				  __func__, txs->phyerr);
+			brcms_dbg_ht(wlc->hw->d11core,
+				     "%s: ampdu tx phy error (0x%x)\n",
+				     __func__, txs->phyerr);
 		}
 	}
 
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index 9fd6f2f..7ca10bf 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -882,8 +882,8 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
 	mcl = le16_to_cpu(txh->MacTxControlLow);
 
 	if (txs->phyerr)
-		brcms_err(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n",
-			  txs->phyerr, txh->MainRates);
+		brcms_dbg_tx(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n",
+			     txs->phyerr, txh->MainRates);
 
 	if (txs->frameid != le16_to_cpu(txh->TxFrameID)) {
 		brcms_err(wlc->hw->d11core, "frameid != txh->TxFrameID\n");
-- 
1.7.11.7


^ permalink raw reply related

* Re: [PATCH 3.11] mac80211/minstrel: fix NULL pointer dereference issue
From: Joe Perches @ 2013-07-15 13:31 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, johannes, krzysiek
In-Reply-To: <51E3F0EA.3060603@openwrt.org>

On Mon, 2013-07-15 at 14:54 +0200, Felix Fietkau wrote:
> On 2013-07-15 2:50 PM, Joe Perches wrote:
> > On Mon, 2013-07-15 at 14:35 +0200, Felix Fietkau wrote:
> >> When priv_sta == NULL, mi->prev_sample is dereferenced too early. Move
> >> the assignment further down, after the rate_control_send_low call.
[]
> mi is set to priv_sta. It can be NULL. The case of priv_sta==NULL is
> caught by rate_control_send_low and causes it to bail out.

OK, thanks.


^ permalink raw reply

* Re: Help adding trace events to xHCI
From: Jiri Olsa @ 2013-07-15 13:47 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Sarah Sharp, Kalle Valo, Johannes Berg, Xenia Ragiadakou,
	OPW Kernel Interns List, linux-usb, linux-wireless,
	linux-trace-users
In-Reply-To: <1373648143.17876.98.camel@gandalf.local.home>

On Fri, Jul 12, 2013 at 12:55:43PM -0400, Steven Rostedt wrote:
> On Fri, 2013-07-12 at 09:41 -0700, Sarah Sharp wrote:
> > On Fri, Jul 12, 2013 at 07:25:59AM +0300, Kalle Valo wrote:
> 
> > Thanks for the suggestion.  I'm not familiar with all the userspace
> > tools for trace events, so I didn't know about the command parser.  Is
> > there documentation or a list of resources for all the userspace trace
> > event plugins?  If so, can you give us a pointer to it?
> > 
> 
> Currently the plugins only exist in trace-cmd. But there's going to be
> work done to get them into the kernel tools directory. I was just
> talking with Jiri about this today. Perf will require it.

hi,
I made initial backport but got distracted.. ;-)
I'll refresh those patches and resend them out soon..

jirka

^ permalink raw reply

* Re: [Ilw] Re: Slow throughput on Ultimate-N 6300
From: Emmanuel Grumbach @ 2013-07-15 15:27 UTC (permalink / raw)
  To: Mariano Aliaga
  Cc: Grumbach, Emmanuel, Steve Freitas, ilw@linux.intel.com,
	linux-wireless@vger.kernel.org
In-Reply-To: <CAGLHXEnKS-Yz4uia=-KW7HLYUZ9nt_Pba_ZDyfEoehWGaHsUmg@mail.gmail.com>

Hi Mariano,

>    I've been also experiencing the "fail to flush tx fifo" bug for a
> long time, so I'll provide my environment and logs in case it's
> helpful:
>
>    - System: Thinkpad T410
>    - Chipset: Intel Corporation Centrino Advanced-N 6200 [8086:4239] (rev 35)
>    - Kernel: 3.10.0 x86_64 (tried 3.2, 3.5, 3.8 and 3.9 also. It got a
> lot better on 3.10 btw)
>    - Firmware: 9.221.4.1 build 25532
>    - AP: Linksys E1200 fw ver 1.0.00 build 11 (but happens also with
> other N AP's)
>    - Log on dmesg: this repeated 12 times when I booted and connected
> to my wifi network
>
> [   19.576029] iwlwifi 0000:03:00.0: fail to flush all tx fifo queues Q 0
> [   19.576039] iwlwifi 0000:03:00.0: Current SW read_ptr 3 write_ptr 4
> [   19.576089] iwl data: 00000000: 08 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00  ................
> [   19.576125] iwlwifi 0000:03:00.0: FH TRBs(0) = 0x00000000
> [   19.576183] iwlwifi 0000:03:00.0: FH TRBs(1) = 0x80102004
> [   19.576196] iwlwifi 0000:03:00.0: FH TRBs(2) = 0x00000000
> [   19.576209] iwlwifi 0000:03:00.0: FH TRBs(3) = 0x80300003
> [   19.576222] iwlwifi 0000:03:00.0: FH TRBs(4) = 0x00000000
> [   19.576235] iwlwifi 0000:03:00.0: FH TRBs(5) = 0x00000000
> [   19.576248] iwlwifi 0000:03:00.0: FH TRBs(6) = 0x00000000
> [   19.576261] iwlwifi 0000:03:00.0: FH TRBs(7) = 0x00704040
> [   19.576317] iwlwifi 0000:03:00.0: Q 0 is active and mapped to fifo
> 3 ra_tid 0x0000 [3,4]
> [   19.576373] iwlwifi 0000:03:00.0: Q 1 is active and mapped to fifo
> 2 ra_tid 0x0000 [0,0]
> [   19.576429] iwlwifi 0000:03:00.0: Q 2 is active and mapped to fifo
> 1 ra_tid 0x0000 [4,5]
> [   19.576484] iwlwifi 0000:03:00.0: Q 3 is active and mapped to fifo
> 0 ra_tid 0x0000 [0,0]
> [   19.576540] iwlwifi 0000:03:00.0: Q 4 is active and mapped to fifo
> 7 ra_tid 0x0000 [65,65]
> [   19.576595] iwlwifi 0000:03:00.0: Q 5 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.576651] iwlwifi 0000:03:00.0: Q 6 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.576705] iwlwifi 0000:03:00.0: Q 7 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.576761] iwlwifi 0000:03:00.0: Q 8 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.576815] iwlwifi 0000:03:00.0: Q 9 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.576871] iwlwifi 0000:03:00.0: Q 10 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.576928] iwlwifi 0000:03:00.0: Q 11 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.576983] iwlwifi 0000:03:00.0: Q 12 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.577038] iwlwifi 0000:03:00.0: Q 13 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.577094] iwlwifi 0000:03:00.0: Q 14 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.577149] iwlwifi 0000:03:00.0: Q 15 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.577204] iwlwifi 0000:03:00.0: Q 16 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.577261] iwlwifi 0000:03:00.0: Q 17 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.577317] iwlwifi 0000:03:00.0: Q 18 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.577372] iwlwifi 0000:03:00.0: Q 19 is inactive and mapped to
> fifo 0 ra_tid 0x0000 [0,0]
> [   19.628329] cfg80211: Calling CRDA to update world regulatory domain
> [   19.632242] cfg80211: World regulatory domain updated:
> [   19.632245] cfg80211:   (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp)
> [   19.632247] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz),
> (300 mBi, 2000 mBm)
> [   19.632249] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz),
> (300 mBi, 2000 mBm)
> [   19.632250] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz),
> (300 mBi, 2000 mBm)
> [   19.632252] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz),
> (300 mBi, 2000 mBm)
> [   19.632253] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz),
> (300 mBi, 2000 mBm)
> [   23.041735] wlan0: authenticate with 58:6d:8f:c3:47:2e
> [   23.068235] wlan0: send auth to 58:6d:8f:c3:47:2e (try 1/3)
> [   23.081353] wlan0: authenticated
> [   23.082190] wlan0: associate with 58:6d:8f:c3:47:2e (try 1/3)
> [   23.085720] wlan0: RX AssocResp from 58:6d:8f:c3:47:2e (capab=0x411
> status=0 aid=6)
> [   23.091628] wlan0: associated
>
>    This does not always happen, it's kind of random. I think it
> happens more frequently in places with a lot of wifi networks
> available.
>    I'll try with older firmwares as suggested and let you know. I can
> provide more info if you need.
>

Yes, we know about this. You are (really) not the first to complain.
Unfortunately, I can't point to any fix right now.

^ permalink raw reply

* Re: [PATCH] mac80211: fix duplicate retransmission detection
From: Jason Andryuk @ 2013-07-15 16:15 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <1373747861.5549.0.camel@jlt4.sipsolutions.net>

On Sat, Jul 13, 2013 at 4:37 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Sat, 2013-07-13 at 12:28 -0400, Jason Andryuk wrote:
>
>> > +       if (rx->skb->len >= 24 && rx->sta &&
>>
>> Shouldn't this check rx->skb first?
>> if (rx->sta && rx->sta->len >= 24 &&
>
> Hmm? did you mean rx->skb? But what makes you think it can be NULL???

Whoops, I totally misread sta v skb.  Sorry for the noise.

Jason

^ permalink raw reply

* Re: [PATCH v2] brcmsmac: Further reduce log spam from tx phy messages
From: Arend van Spriel @ 2013-07-15 16:26 UTC (permalink / raw)
  To: John Greene; +Cc: linville, linux-wireless
In-Reply-To: <1373895092-27057-1-git-send-email-jogreene@redhat.com>

On 07/15/13 15:31, John Greene wrote:
> Relegate 2 phy messages to debug status as they create excessive
> log spam, noted in multiple bugzillas for brcmsmac v3.8 and up.
> This is a follow on to net-next 99e94940697adec4f84758adb2db71f4a82c7ba5:
> brcmsmac: Reduce log spam in heavy tx, make err print in debug
>
>   brcmsmac bcma0:0: phyerr 0x10, rate 0x14
>   brcmsmac bcma0:0: brcms_c_ampdu_dotxstatus_complete:
> ampdu tx phy error (0x10)

Hi John,

Thanks for the patch. Still trying to find where these are coming from, 
but we seem to have slight variation of this device not showing this.

> ver 2: Two trivial whitespace fixes.

this kind of info recommended to be placed under the signed-off line so 
it does not end up in the git log. Apart from that you can add my ack.

Acked-by: Arend van Spriel <arend@broadcom.com>
> Signed-off-by: John Greene<jogreene@redhat.com>
> ---
so here
---
>   drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 6 +++---
>   drivers/net/wireless/brcm80211/brcmsmac/main.c  | 4 ++--
>   2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
> index bd98285..fa391e4 100644
> --- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
> +++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
> @@ -928,9 +928,9 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
>   			}
>   		} else if (txs->phyerr) {
>   			update_rate = false;
> -			brcms_err(wlc->hw->d11core,
> -				  "%s: ampdu tx phy error (0x%x)\n",
> -				  __func__, txs->phyerr);
> +			brcms_dbg_ht(wlc->hw->d11core,
> +				     "%s: ampdu tx phy error (0x%x)\n",
> +				     __func__, txs->phyerr);
>   		}
>   	}
>
> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
> index 9fd6f2f..7ca10bf 100644
> --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
> +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
> @@ -882,8 +882,8 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
>   	mcl = le16_to_cpu(txh->MacTxControlLow);
>
>   	if (txs->phyerr)
> -		brcms_err(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n",
> -			  txs->phyerr, txh->MainRates);
> +		brcms_dbg_tx(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n",
> +			     txs->phyerr, txh->MainRates);
>
>   	if (txs->frameid != le16_to_cpu(txh->TxFrameID)) {
>   		brcms_err(wlc->hw->d11core, "frameid != txh->TxFrameID\n");



^ permalink raw reply

* Re: [PATCH v2] brcmsmac: Further reduce log spam from tx phy messages
From: John Greene @ 2013-07-15 17:26 UTC (permalink / raw)
  To: Arend van Spriel; +Cc: linville, linux-wireless
In-Reply-To: <51E4229A.5070803@broadcom.com>

On 07/15/2013 12:26 PM, Arend van Spriel wrote:
> On 07/15/13 15:31, John Greene wrote:
>> Relegate 2 phy messages to debug status as they create excessive
>> log spam, noted in multiple bugzillas for brcmsmac v3.8 and up.
>> This is a follow on to net-next 99e94940697adec4f84758adb2db71f4a82c7ba5:
>> brcmsmac: Reduce log spam in heavy tx, make err print in debug
>>
>>   brcmsmac bcma0:0: phyerr 0x10, rate 0x14
>>   brcmsmac bcma0:0: brcms_c_ampdu_dotxstatus_complete:
>> ampdu tx phy error (0x10)
>
> Hi John,
>
> Thanks for the patch. Still trying to find where these are coming from,
> but we seem to have slight variation of this device not showing this.
>
>> ver 2: Two trivial whitespace fixes.
>
> this kind of info recommended to be placed under the signed-off line so
> it does not end up in the git log. Apart from that you can add my ack.
>
> Acked-by: Arend van Spriel <arend@broadcom.com>
>> Signed-off-by: John Greene<jogreene@redhat.com>
>> ---
> so here
> ---
>>   drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 6 +++---
>>   drivers/net/wireless/brcm80211/brcmsmac/main.c  | 4 ++--
>>   2 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
>> b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
>> index bd98285..fa391e4 100644
>> --- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
>> +++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
>> @@ -928,9 +928,9 @@ brcms_c_ampdu_dotxstatus_complete(struct
>> ampdu_info *ampdu, struct scb *scb,
>>               }
>>           } else if (txs->phyerr) {
>>               update_rate = false;
>> -            brcms_err(wlc->hw->d11core,
>> -                  "%s: ampdu tx phy error (0x%x)\n",
>> -                  __func__, txs->phyerr);
>> +            brcms_dbg_ht(wlc->hw->d11core,
>> +                     "%s: ampdu tx phy error (0x%x)\n",
>> +                     __func__, txs->phyerr);
>>           }
>>       }
>>
>> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c
>> b/drivers/net/wireless/brcm80211/brcmsmac/main.c
>> index 9fd6f2f..7ca10bf 100644
>> --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
>> +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
>> @@ -882,8 +882,8 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc,
>> struct tx_status *txs)
>>       mcl = le16_to_cpu(txh->MacTxControlLow);
>>
>>       if (txs->phyerr)
>> -        brcms_err(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n",
>> -              txs->phyerr, txh->MainRates);
>> +        brcms_dbg_tx(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n",
>> +                 txs->phyerr, txh->MainRates);
>>
>>       if (txs->frameid != le16_to_cpu(txh->TxFrameID)) {
>>           brcms_err(wlc->hw->d11core, "frameid != txh->TxFrameID\n");
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thanks Arend.  Look forward to hearing about root cause.  From what I've 
seen, it's not a low signal issue: users have strong signal (>-60) but 
PHY is reporting errors because the rate fallback exhausted rates list? 
  Anything I can do to gather info from users?  Have some willing users.

Third time the charm for this patch. It's Monday.  v3 on the way.

-- 
John Greene


^ permalink raw reply

* [PATCH v3] brcmsmac: Further reduce log spam from tx phy messages
From: John Greene @ 2013-07-15 17:30 UTC (permalink / raw)
  To: linville; +Cc: arend, linux-wireless

Relegate 2 phy messages to debug status as they create excessive
log spam, noted in multiple bugzillas for brcmsmac v3.8 and up.
This is a follow on to net-next 99e94940697adec4f84758adb2db71f4a82c7ba5:
brcmsmac: Reduce log spam in heavy tx, make err print in debug

 brcmsmac bcma0:0: phyerr 0x10, rate 0x14
 brcmsmac bcma0:0: brcms_c_ampdu_dotxstatus_complete:
ampdu tx phy error (0x10)

Signed-off-by: John Greene <jogreene@redhat.com>

ver 2: Two trivial whitespace fixes.
ver 3: My ver 2 comment in wrong place.
---
 drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 6 +++---
 drivers/net/wireless/brcm80211/brcmsmac/main.c  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
index bd98285..fa391e4 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
@@ -928,9 +928,9 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
 			}
 		} else if (txs->phyerr) {
 			update_rate = false;
-			brcms_err(wlc->hw->d11core,
-				  "%s: ampdu tx phy error (0x%x)\n",
-				  __func__, txs->phyerr);
+			brcms_dbg_ht(wlc->hw->d11core,
+				     "%s: ampdu tx phy error (0x%x)\n",
+				     __func__, txs->phyerr);
 		}
 	}
 
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index 9fd6f2f..7ca10bf 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -882,8 +882,8 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
 	mcl = le16_to_cpu(txh->MacTxControlLow);
 
 	if (txs->phyerr)
-		brcms_err(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n",
-			  txs->phyerr, txh->MainRates);
+		brcms_dbg_tx(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n",
+			     txs->phyerr, txh->MainRates);
 
 	if (txs->frameid != le16_to_cpu(txh->TxFrameID)) {
 		brcms_err(wlc->hw->d11core, "frameid != txh->TxFrameID\n");
-- 
1.7.11.7


^ permalink raw reply related

* Re: [PATCH 3.11] mac80211/minstrel: fix NULL pointer dereference issue
From: Krzysztof Mazur @ 2013-07-15 17:32 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, johannes
In-Reply-To: <1373891706-1071-1-git-send-email-nbd@openwrt.org>

On Mon, Jul 15, 2013 at 02:35:06PM +0200, Felix Fietkau wrote:
> When priv_sta == NULL, mi->prev_sample is dereferenced too early. Move
> the assignment further down, after the rate_control_send_low call.
> 
> Reported-by: Krzysztof Mazur <krzysiek@podlesie.net>
> Cc: stable@vger.kernel.org # 3.10
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> ---
>  net/mac80211/rc80211_minstrel.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Works for me.

Thanks,
Krzysiek

^ permalink raw reply

* Re: [PATCH v3] brcmsmac: Further reduce log spam from tx phy messages
From: John W. Linville @ 2013-07-15 17:55 UTC (permalink / raw)
  To: John Greene; +Cc: arend, linux-wireless
In-Reply-To: <1373909435-29811-1-git-send-email-jogreene@redhat.com>

On Mon, Jul 15, 2013 at 01:30:35PM -0400, John Greene wrote:
> Relegate 2 phy messages to debug status as they create excessive
> log spam, noted in multiple bugzillas for brcmsmac v3.8 and up.
> This is a follow on to net-next 99e94940697adec4f84758adb2db71f4a82c7ba5:
> brcmsmac: Reduce log spam in heavy tx, make err print in debug
> 
>  brcmsmac bcma0:0: phyerr 0x10, rate 0x14
>  brcmsmac bcma0:0: brcms_c_ampdu_dotxstatus_complete:
> ampdu tx phy error (0x10)
> 
> Signed-off-by: John Greene <jogreene@redhat.com>
> 
> ver 2: Two trivial whitespace fixes.
> ver 3: My ver 2 comment in wrong place.

These lines...

> ---

Should go here, after the "---" line...

>  drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 6 +++---
>  drivers/net/wireless/brcm80211/brcmsmac/main.c  | 4 ++--
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
> index bd98285..fa391e4 100644
> --- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
> +++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
> @@ -928,9 +928,9 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
>  			}
>  		} else if (txs->phyerr) {
>  			update_rate = false;
> -			brcms_err(wlc->hw->d11core,
> -				  "%s: ampdu tx phy error (0x%x)\n",
> -				  __func__, txs->phyerr);
> +			brcms_dbg_ht(wlc->hw->d11core,
> +				     "%s: ampdu tx phy error (0x%x)\n",
> +				     __func__, txs->phyerr);
>  		}
>  	}
>  
> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
> index 9fd6f2f..7ca10bf 100644
> --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
> +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
> @@ -882,8 +882,8 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
>  	mcl = le16_to_cpu(txh->MacTxControlLow);
>  
>  	if (txs->phyerr)
> -		brcms_err(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n",
> -			  txs->phyerr, txh->MainRates);
> +		brcms_dbg_tx(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n",
> +			     txs->phyerr, txh->MainRates);
>  
>  	if (txs->frameid != le16_to_cpu(txh->TxFrameID)) {
>  		brcms_err(wlc->hw->d11core, "frameid != txh->TxFrameID\n");
> -- 
> 1.7.11.7
> 
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* [PATCH v4] brcmsmac: Further reduce log spam from tx phy messages
From: John Greene @ 2013-07-15 18:33 UTC (permalink / raw)
  To: linville; +Cc: arend, linux-wireless

Relegate 2 phy messages to debug status as they create excessive
log spam, noted in multiple bugzillas for brcmsmac v3.8 and up.
This is a follow on to net-next 99e94940697adec4f84758adb2db71f4a82c7ba5:
brcmsmac: Reduce log spam in heavy tx, make err print in debug

 brcmsmac bcma0:0: phyerr 0x10, rate 0x14
 brcmsmac bcma0:0: brcms_c_ampdu_dotxstatus_complete:
ampdu tx phy error (0x10)

Signed-off-by: John Greene <jogreene@redhat.com>
---
ver 2: Two trivial whitespace fixes.
ver 3: My ver 2 comment in wrong place.
ver 4: Missing --- above version block here
---
 drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 6 +++---
 drivers/net/wireless/brcm80211/brcmsmac/main.c  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
index bd98285..fa391e4 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
@@ -928,9 +928,9 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
 			}
 		} else if (txs->phyerr) {
 			update_rate = false;
-			brcms_err(wlc->hw->d11core,
-				  "%s: ampdu tx phy error (0x%x)\n",
-				  __func__, txs->phyerr);
+			brcms_dbg_ht(wlc->hw->d11core,
+				     "%s: ampdu tx phy error (0x%x)\n",
+				     __func__, txs->phyerr);
 		}
 	}
 
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index 9fd6f2f..7ca10bf 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -882,8 +882,8 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
 	mcl = le16_to_cpu(txh->MacTxControlLow);
 
 	if (txs->phyerr)
-		brcms_err(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n",
-			  txs->phyerr, txh->MainRates);
+		brcms_dbg_tx(wlc->hw->d11core, "phyerr 0x%x, rate 0x%x\n",
+			     txs->phyerr, txh->MainRates);
 
 	if (txs->frameid != le16_to_cpu(txh->TxFrameID)) {
 		brcms_err(wlc->hw->d11core, "frameid != txh->TxFrameID\n");
-- 
1.7.11.7


^ permalink raw reply related

* Re: [PATCH 0/6] initval patches
From: Luis R. Rodriguez @ 2013-07-15 19:06 UTC (permalink / raw)
  To: Sujith Manoharan; +Cc: linux-wireless
In-Reply-To: <1373601613-31616-1-git-send-email-sujith@msujith.org>

On Thu, Jul 11, 2013 at 9:00 PM, Sujith Manoharan <sujith@msujith.org> wrote:
> From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
>
> This is a resend of the pending initval patches, rebased over
> master.
>
> Sujith Manoharan (6):
>   initvals: Update inivals for AR9462 2.0
>   initvals: Add 5g-XLNA table for AR9462
>   initvals: Add ar9462_2p0_5g_xlna_only_rxgain table
>   initvals: Add rxgain tables for AR9462
>   initvals: Add support for AR9462 2.1
>   initvals: Add mix ob/db tx gain table for AR9462 2.0

Thanks, applied and pushed!

  Luis

^ permalink raw reply

* [BUG] 3.10 regression: hang on suspend
From: Ortwin Glück @ 2013-07-15 19:40 UTC (permalink / raw)
  To: linux-kernel, sgruszka, linux-wireless

Hi,

My Samsung ultrabook hangs when suspending to RAM since this commit (bisected). 
Disabling wifi before suspend works around the issue. All works fine with 3.9.y.

12e7f517029dad819c45eca9ca01fdb9ba57616b 

Author: Stanislaw Gruszka <sgruszka@redhat.com> 

Date:   Thu Feb 28 10:55:26 2013 +0100

     mac80211: cleanup generic suspend/resume procedures

     Since now we disconnect before suspend, various code which save
     connection state can now be removed from suspend and resume
     procedure. Cleanup on resume side is smaller as ieee80211_reconfig()
     is also used for H/W restart.

     Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
     Signed-off-by: Johannes Berg <johannes.berg@intel.com>


Hardware:
01:00.0 Network controller: Intel Corporation Centrino Advanced-N 6235 (rev 24)

Sorry for not noticing this earlier.

Ortwin

^ permalink raw reply

* 802.11p and ath5k v3.10-rc1
From: Emine Nr @ 2013-07-15 21:47 UTC (permalink / raw)
  To: linux-wireless

Hello, I'am working on the driver ath5k and the ieee 802.11p. I'am a beginner 
on this domain an I need to enable 802.11p on the last version of ath5k driver 
(ie backport-3.10-rc1). So I would like to know if somebody know wich are the 
main steps to do it. 
Thanks for any help.


^ permalink raw reply

* [PATCH 3/6] ath9k: Fix FastChannelChange for AR9462/AR9565
From: Sujith Manoharan @ 2013-07-16  6:33 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless
In-Reply-To: <1373956402-22169-1-git-send-email-sujith@msujith.org>

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Right now, even though these chips support cross-band
FCC, the code is non-functional since we bail out early if
the channelFlags differ. Fix this so that cross-band
FCC works for cards that support this feature.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/hw.c | 45 ++++++++++++++++++++++---------------
 1 file changed, 27 insertions(+), 18 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 2d385c2..50e5979 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1496,16 +1496,18 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
 				    struct ath9k_channel *chan)
 {
 	struct ath_common *common = ath9k_hw_common(ah);
+	struct ath9k_hw_capabilities *pCap = &ah->caps;
+	bool band_switch = false, mode_diff = false;
+	u8 ini_reloaded;
 	u32 qnum;
 	int r;
-	bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA);
-	bool band_switch, mode_diff;
-	u8 ini_reloaded;
 
-	band_switch = (chan->channelFlags & (CHANNEL_2GHZ | CHANNEL_5GHZ)) !=
-		      (ah->curchan->channelFlags & (CHANNEL_2GHZ |
-						    CHANNEL_5GHZ));
-	mode_diff = (chan->chanmode != ah->curchan->chanmode);
+	if (pCap->hw_caps & ATH9K_HW_CAP_FCC_BAND_SWITCH) {
+		u32 cur = ah->curchan->channelFlags & (CHANNEL_2GHZ | CHANNEL_5GHZ);
+		u32 new = chan->channelFlags & (CHANNEL_2GHZ | CHANNEL_5GHZ);
+		band_switch = (cur != new);
+		mode_diff = (chan->chanmode != ah->curchan->chanmode);
+	}
 
 	for (qnum = 0; qnum < AR_NUM_QCU; qnum++) {
 		if (ath9k_hw_numtxpending(ah, qnum)) {
@@ -1520,7 +1522,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
 		return false;
 	}
 
-	if (edma && (band_switch || mode_diff)) {
+	if (band_switch || mode_diff) {
 		ath9k_hw_mark_phy_inactive(ah);
 		udelay(5);
 
@@ -1548,7 +1550,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
 
 	ath9k_hw_spur_mitigate_freq(ah, chan);
 
-	if (edma && (band_switch || mode_diff)) {
+	if (band_switch || mode_diff) {
 		ah->ah_flags |= AH_FASTCC;
 		if (band_switch || ini_reloaded)
 			ah->eep_ops->set_board_values(ah, chan);
@@ -1778,16 +1780,11 @@ static void ath9k_hw_init_desc(struct ath_hw *ah)
 /*
  * Fast channel change:
  * (Change synthesizer based on channel freq without resetting chip)
- *
- * Don't do FCC when
- *   - Flag is not set
- *   - Chip is just coming out of full sleep
- *   - Channel to be set is same as current channel
- *   - Channel flags are different, (eg.,moving from 2GHz to 5GHz channel)
  */
 static int ath9k_hw_do_fastcc(struct ath_hw *ah, struct ath9k_channel *chan)
 {
 	struct ath_common *common = ath9k_hw_common(ah);
+	struct ath9k_hw_capabilities *pCap = &ah->caps;
 	int ret;
 
 	if (AR_SREV_9280(ah) && common->bus_ops->ath_bus_type == ATH_PCI)
@@ -1806,9 +1803,21 @@ static int ath9k_hw_do_fastcc(struct ath_hw *ah, struct ath9k_channel *chan)
 	    (CHANNEL_HALF | CHANNEL_QUARTER))
 		goto fail;
 
-	if ((chan->channelFlags & CHANNEL_ALL) !=
-	    (ah->curchan->channelFlags & CHANNEL_ALL))
-		goto fail;
+	/*
+	 * If cross-band fcc is not supoprted, bail out if
+	 * either channelFlags or chanmode differ.
+	 *
+	 * chanmode will be different if the HT operating mode
+	 * changes because of CSA.
+	 */
+	if (!(pCap->hw_caps & ATH9K_HW_CAP_FCC_BAND_SWITCH)) {
+		if ((chan->channelFlags & CHANNEL_ALL) !=
+		    (ah->curchan->channelFlags & CHANNEL_ALL))
+			goto fail;
+
+		if (chan->chanmode != ah->curchan->chanmode)
+			goto fail;
+	}
 
 	if (!ath9k_hw_check_alive(ah))
 		goto fail;
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 2/6] ath9k: Add a HW flag for FCC
From: Sujith Manoharan @ 2013-07-16  6:33 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless
In-Reply-To: <1373956402-22169-1-git-send-email-sujith@msujith.org>

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Fast Channel Change across 2G/5G bands is supported
only by AR9462 and AR9565. Add a HW capability field
to indicate this.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/hw.c | 7 +++++++
 drivers/net/wireless/ath/ath9k/hw.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 4ca0cb0..2d385c2 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2610,6 +2610,13 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
 	    ah->eep_ops->get_eeprom(ah, EEP_PAPRD))
 			pCap->hw_caps |= ATH9K_HW_CAP_PAPRD;
 
+	/*
+	 * Fast channel change across bands is available
+	 * only for AR9462 and AR9565.
+	 */
+	if (AR_SREV_9462(ah) || AR_SREV_9565(ah))
+		pCap->hw_caps |= ATH9K_HW_CAP_FCC_BAND_SWITCH;
+
 	return 0;
 }
 
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index cd74b3a..fd009e5 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -247,6 +247,7 @@ enum ath9k_hw_caps {
 	ATH9K_HW_CAP_DFS			= BIT(16),
 	ATH9K_HW_WOW_DEVICE_CAPABLE		= BIT(17),
 	ATH9K_HW_CAP_PAPRD			= BIT(18),
+	ATH9K_HW_CAP_FCC_BAND_SWITCH		= BIT(19),
 };
 
 /*
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 1/6] ath9k: Move INI overrides to ar9003_hw_override_ini
From: Sujith Manoharan @ 2013-07-16  6:33 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_phy.c | 33 ++++++++++++++---------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index 1f694ab..57e345a 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -632,6 +632,22 @@ static void ar9003_hw_override_ini(struct ath_hw *ah)
 
 	REG_SET_BIT(ah, AR_PHY_CCK_DETECT,
 		    AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV);
+
+	if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) {
+		REG_WRITE(ah, AR_GLB_SWREG_DISCONT_MODE,
+			  AR_GLB_SWREG_DISCONT_EN_BT_WLAN);
+
+		if (REG_READ_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_0,
+				   AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL))
+			ah->enabled_cals |= TX_IQ_CAL;
+		else
+			ah->enabled_cals &= ~TX_IQ_CAL;
+
+		if (REG_READ(ah, AR_PHY_CL_CAL_CTL) & AR_PHY_CL_CAL_ENABLE)
+			ah->enabled_cals |= TX_CL_CAL;
+		else
+			ah->enabled_cals &= ~TX_CL_CAL;
+	}
 }
 
 static void ar9003_hw_prog_ini(struct ath_hw *ah,
@@ -814,29 +830,12 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
 	if (chan->channel == 2484)
 		ar9003_hw_prog_ini(ah, &ah->iniCckfirJapan2484, 1);
 
-	if (AR_SREV_9462(ah) || AR_SREV_9565(ah))
-		REG_WRITE(ah, AR_GLB_SWREG_DISCONT_MODE,
-			  AR_GLB_SWREG_DISCONT_EN_BT_WLAN);
-
 	ah->modes_index = modesIndex;
 	ar9003_hw_override_ini(ah);
 	ar9003_hw_set_channel_regs(ah, chan);
 	ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask);
 	ath9k_hw_apply_txpower(ah, chan, false);
 
-	if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) {
-		if (REG_READ_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_0,
-				   AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL))
-			ah->enabled_cals |= TX_IQ_CAL;
-		else
-			ah->enabled_cals &= ~TX_IQ_CAL;
-
-		if (REG_READ(ah, AR_PHY_CL_CAL_CTL) & AR_PHY_CL_CAL_ENABLE)
-			ah->enabled_cals |= TX_CL_CAL;
-		else
-			ah->enabled_cals &= ~TX_CL_CAL;
-	}
-
 	return 0;
 }
 
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 4/6] ath9k: Use correct channel when switching bands
From: Sujith Manoharan @ 2013-07-16  6:33 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless
In-Reply-To: <1373956402-22169-1-git-send-email-sujith@msujith.org>

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 50e5979..1dac46d 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1526,7 +1526,8 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
 		ath9k_hw_mark_phy_inactive(ah);
 		udelay(5);
 
-		ath9k_hw_init_pll(ah, NULL);
+		if (band_switch)
+			ath9k_hw_init_pll(ah, chan);
 
 		if (ath9k_hw_fast_chan_change(ah, chan, &ini_reloaded)) {
 			ath_err(common, "Failed to do fast channel change\n");
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 5/6] ath9k: Program correct initvals for FCC
From: Sujith Manoharan @ 2013-07-16  6:33 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless
In-Reply-To: <1373956402-22169-1-git-send-email-sujith@msujith.org>

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

* CUS217 specific initvals have to be programmed.
* iniAdditional is not used for AR9462/AR9565, remove it.
* Handle channel 2484 for regulatory compliance.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_phy.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index 57e345a..2db4ddf 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -1517,6 +1517,18 @@ static int ar9003_hw_fast_chan_change(struct ath_hw *ah,
 
 	REG_WRITE_ARRAY(&ah->iniModesTxGain, modesIndex, regWrites);
 
+	if (AR_SREV_9462_20_OR_LATER(ah)) {
+		/*
+		 * CUS217 mix LNA mode.
+		 */
+		if (ar9003_hw_get_rx_gain_idx(ah) == 2) {
+			REG_WRITE_ARRAY(&ah->ini_modes_rxgain_bb_core,
+					1, regWrites);
+			REG_WRITE_ARRAY(&ah->ini_modes_rxgain_bb_postamble,
+					modesIndex, regWrites);
+		}
+	}
+
 	/*
 	 * For 5GHz channels requiring Fast Clock, apply
 	 * different modal values.
@@ -1527,7 +1539,11 @@ static int ar9003_hw_fast_chan_change(struct ath_hw *ah,
 	if (AR_SREV_9565(ah))
 		REG_WRITE_ARRAY(&ah->iniModesFastClock, 1, regWrites);
 
-	REG_WRITE_ARRAY(&ah->iniAdditional, 1, regWrites);
+	/*
+	 * JAPAN regulatory.
+	 */
+	if (chan->channel == 2484)
+		ar9003_hw_prog_ini(ah, &ah->iniCckfirJapan2484, 1);
 
 	ah->modes_index = modesIndex;
 	*ini_reloaded = true;
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 6/6] ath9k: Release the RF bus after setting board values
From: Sujith Manoharan @ 2013-07-16  6:33 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless
In-Reply-To: <1373956402-22169-1-git-send-email-sujith@msujith.org>

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/hw.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 1dac46d..ebc9f53 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1498,7 +1498,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
 	struct ath_common *common = ath9k_hw_common(ah);
 	struct ath9k_hw_capabilities *pCap = &ah->caps;
 	bool band_switch = false, mode_diff = false;
-	u8 ini_reloaded;
+	u8 ini_reloaded = 0;
 	u32 qnum;
 	int r;
 
@@ -1544,22 +1544,21 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
 	}
 	ath9k_hw_set_clockrate(ah);
 	ath9k_hw_apply_txpower(ah, chan, false);
-	ath9k_hw_rfbus_done(ah);
 
 	if (IS_CHAN_OFDM(chan) || IS_CHAN_HT(chan))
 		ath9k_hw_set_delta_slope(ah, chan);
 
 	ath9k_hw_spur_mitigate_freq(ah, chan);
 
-	if (band_switch || mode_diff) {
-		ah->ah_flags |= AH_FASTCC;
-		if (band_switch || ini_reloaded)
-			ah->eep_ops->set_board_values(ah, chan);
+	if (band_switch || ini_reloaded)
+		ah->eep_ops->set_board_values(ah, chan);
 
-		ath9k_hw_init_bb(ah, chan);
+	ath9k_hw_init_bb(ah, chan);
+	ath9k_hw_rfbus_done(ah);
 
-		if (band_switch || ini_reloaded)
-			ath9k_hw_init_cal(ah, chan);
+	if (band_switch || ini_reloaded) {
+		ah->ah_flags |= AH_FASTCC;
+		ath9k_hw_init_cal(ah, chan);
 		ah->ah_flags &= ~AH_FASTCC;
 	}
 
-- 
1.8.3.2


^ permalink raw reply related


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