ath10k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Valo, Kalle" <kvalo@qca.qualcomm.com>
To: Benjamin Berg <benjamin@sipsolutions.net>
Cc: Simon Wunderlich <sw@simonwunderlich.de>,
	"Thiagarajan, Vasanthakumar" <vthiagar@qti.qualcomm.com>,
	Sebastian Gottschall <s.gottschall@dd-wrt.com>,
	"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
	"michal.kazior@tieto.com" <michal.kazior@tieto.com>,
	Mathias Kretschmer <mathias.kretschmer@fit.fraunhofer.de>
Subject: Re: [PATCHv3 5/5] ath10k: Allow setting coverage class
Date: Tue, 13 Sep 2016 12:14:43 +0000	[thread overview]
Message-ID: <8760q0j8st.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20160829144557.11678-6-benjamin@sipsolutions.net> (Benjamin Berg's message of "Mon, 29 Aug 2016 16:45:57 +0200")

Benjamin Berg <benjamin@sipsolutions.net> writes:

> Unfortunately ath10k does not generally allow modifying the coverage class
> with the stock firmware and Qualcomm has so far refused to implement this
> feature so that it can be properly supported in ath10k. If we however know
> the registers that need to be modified for proper operation with a higher
> coverage class, then we can do these modifications from the driver.
>
> This patch implements this hack for first generation cards which are based
> on a core that is similar to ath9k. The registers are modified in place and
> need to be re-written every time the firmware sets them. To achieve this
> the register status is verified after certain WMI events from the firmware.
>
> The coverage class may not be modified temporarily right after the card
> re-initializes the registers. This is for example the case during scanning.
>
> Thanks to Sebastian Gottschall <s.gottschall@dd-wrt.com> for initially
> working on a userspace support for this. This patch wouldn't have been
> possible without this documentation.
>
> Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fit.fraunhofer.de>

To be honest this is an ugly hack and very fragile. But at the same time
this is a quite requested feature, and the firmware doesn't support it,
so I guess this is better than nothing. And it shouldn't affect in
anyway if coverage class is not set from user space so hopefully it's
also safe for others.

I need to review this patch more, but I noticed that it crashes on my
setup with latest master-pending:

[   89.768265] BUG: sleeping function called from invalid context at drivers/net/wireless/ath/ath10k/wmi.c:1802
[   89.768324] in_atomic(): 1, irqs_disabled(): 0, pid: 1809, name: iw
[   89.768374] 5 locks held by iw/1809:
[   89.768422]  #0:  (cb_lock){++++++}, at: [<cc7d5465>] genl_rcv+0x15/0x30
[   89.768727]  #1:  (genl_mutex){+.+.+.}, at: [<cc7d5964>] genl_lock+0x14/0x20
[   89.769041]  #2:  (rtnl_mutex){+.+.+.}, at: [<cc7b0744>] rtnl_lock+0x14/0x20
[   89.769363]  #3:  (&ar->conf_mutex){+.+.+.}, at: [<f8e0d214>] ath10k_hw_qca988x_set_coverage_class+0x24/0x3c0 [ath10k_core]
[   89.769882]  #4:  (&(&ar->data_lock)->rlock){+.-...}, at: [<f8e0d222>] ath10k_hw_qca988x_set_coverage_class+0x32/0x3c0 [ath10k_core]
[   89.770188] CPU: 0 PID: 1809 Comm: iw Tainted: G            E   4.8.0-rc6-wt-ath+ #1468

-- 
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2016-09-13 12:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29 14:45 [PATCHv3 0/5] ath10k: Allow setting coverage class and rx cleanups Benjamin Berg
2016-08-29 14:45 ` [PATCHv3 1/5] ath10k: Move ath10k_hw_params definition to hw.h Benjamin Berg
2016-09-13 12:32   ` [PATCHv3,1/5] " Kalle Valo
2016-08-29 14:45 ` [PATCHv3 2/5] ath10k: Add provision for Rx descriptor abstraction Benjamin Berg
2016-08-29 14:45 ` [PATCHv3 3/5] ath10k: Properly remove padding from the start of rx payload Benjamin Berg
2016-08-29 14:45 ` [PATCHv3 4/5] ath10k: Remove 4-addr padding related hw_param configuration Benjamin Berg
2016-08-29 14:45 ` [PATCHv3 5/5] ath10k: Allow setting coverage class Benjamin Berg
2016-09-13 12:14   ` Valo, Kalle [this message]
2016-09-14 16:32     ` [PATCH] ath10k: Fix spinlock use in coverage class hack Benjamin Berg
2016-09-30 12:58       ` Valo, Kalle
2016-10-04 15:04   ` [PATCHv3,5/5] ath10k: Allow setting coverage class Kalle Valo
2016-09-09 14:59 ` [PATCHv3 0/5] ath10k: Allow setting coverage class and rx cleanups Valo, Kalle
2016-09-12 14:11   ` [PATCH] ath10k: Add missing CONFIG_ATH10K_DEBUGFS check Benjamin Berg
2016-09-14 12:29     ` Valo, Kalle

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=8760q0j8st.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=benjamin@sipsolutions.net \
    --cc=mathias.kretschmer@fit.fraunhofer.de \
    --cc=michal.kazior@tieto.com \
    --cc=s.gottschall@dd-wrt.com \
    --cc=sw@simonwunderlich.de \
    --cc=vthiagar@qti.qualcomm.com \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).