linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ath10k: assign 'n_cipher_suites' for WCN3990
@ 2018-11-02 17:17 Brian Norris
  2018-11-02 17:17 ` [PATCH 2/3] ath10k: don't assume this is a PCI dev in generic code Brian Norris
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Brian Norris @ 2018-11-02 17:17 UTC (permalink / raw)
  To: ath10k
  Cc: linux-wireless, Rakesh Pillai, Govind Singh, linux-kernel, Brian Norris

Commit 2ea9f12cefe4 ("ath10k: add new cipher suite support") added a new
n_cipher_suites HW param with a fallback value and a warning log. Commit
03a72288c546 ("ath10k: wmi: add hw params entry for wcn3990") later
added WCN3990 HW entries, but it missed the n_cipher_suites.

Rather than seeing this warning every boot

  ath10k_snoc 18800000.wifi: invalid hw_params.n_cipher_suites 0

let's provide the appropriate value.

Cc: Rakesh Pillai <pillair@qti.qualcomm.com>
Cc: Govind Singh <govinds@qti.qualcomm.com>
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
 drivers/net/wireless/ath/ath10k/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index da607febfd82..bdc81f1cdb94 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -561,6 +561,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 		.hw_ops = &wcn3990_ops,
 		.decap_align_bytes = 1,
 		.num_peers = TARGET_HL_10_TLV_NUM_PEERS,
+		.n_cipher_suites = 8,
 		.ast_skid_limit = TARGET_HL_10_TLV_AST_SKID_LIMIT,
 		.num_wds_entries = TARGET_HL_10_TLV_NUM_WDS_ENTRIES,
 		.target_64bit = true,
-- 
2.19.1.930.g4563a0d9d0-goog


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

* [PATCH 2/3] ath10k: don't assume this is a PCI dev in generic code
  2018-11-02 17:17 [PATCH 1/3] ath10k: assign 'n_cipher_suites' for WCN3990 Brian Norris
@ 2018-11-02 17:17 ` Brian Norris
  2018-11-02 17:17 ` [PATCH 3/3] ath10k: fix struct init whitespace in SNOC driver Brian Norris
  2018-11-06 16:23 ` [PATCH 1/3] ath10k: assign 'n_cipher_suites' for WCN3990 Kalle Valo
  2 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2018-11-02 17:17 UTC (permalink / raw)
  To: ath10k
  Cc: linux-wireless, Rakesh Pillai, Govind Singh, linux-kernel, Brian Norris

Not all devices using this driver are backed by a PCI device, so it's
not fair to assume 'to_pci_dev()' is valid. Fortunately, we only were
using this to convert straight back to a bare 'device', which means we
were only doing no-op pointer arithmetic, and not actually accessing
potentially out-of-bounds memory. But this is still bad practice.

Just use 'ar->dev' directly, since that's really all we're looking for.

Fixes: 209b2a68de76 ("ath10k: add platform regulatory domain support")
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
 drivers/net/wireless/ath/ath10k/mac.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index a1c2801ded10..5c4ee66382d9 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -8313,7 +8313,6 @@ static u32 ath10k_mac_wrdd_get_mcc(struct ath10k *ar, union acpi_object *wrdd)
 
 static int ath10k_mac_get_wrdd_regulatory(struct ath10k *ar, u16 *rd)
 {
-	struct pci_dev __maybe_unused *pdev = to_pci_dev(ar->dev);
 	acpi_handle root_handle;
 	acpi_handle handle;
 	struct acpi_buffer wrdd = {ACPI_ALLOCATE_BUFFER, NULL};
@@ -8321,7 +8320,7 @@ static int ath10k_mac_get_wrdd_regulatory(struct ath10k *ar, u16 *rd)
 	u32 alpha2_code;
 	char alpha2[3];
 
-	root_handle = ACPI_HANDLE(&pdev->dev);
+	root_handle = ACPI_HANDLE(ar->dev);
 	if (!root_handle)
 		return -EOPNOTSUPP;
 
-- 
2.19.1.930.g4563a0d9d0-goog


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

* [PATCH 3/3] ath10k: fix struct init whitespace in SNOC driver
  2018-11-02 17:17 [PATCH 1/3] ath10k: assign 'n_cipher_suites' for WCN3990 Brian Norris
  2018-11-02 17:17 ` [PATCH 2/3] ath10k: don't assume this is a PCI dev in generic code Brian Norris
@ 2018-11-02 17:17 ` Brian Norris
  2018-11-06 16:23 ` [PATCH 1/3] ath10k: assign 'n_cipher_suites' for WCN3990 Kalle Valo
  2 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2018-11-02 17:17 UTC (permalink / raw)
  To: ath10k
  Cc: linux-wireless, Rakesh Pillai, Govind Singh, linux-kernel, Brian Norris

Signed-off-by: Brian Norris <briannorris@chromium.org>
---
 drivers/net/wireless/ath/ath10k/snoc.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index 8d3d9bca410f..ffdebf9a5ac6 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1641,12 +1641,12 @@ static int ath10k_snoc_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver ath10k_snoc_driver = {
-		.probe  = ath10k_snoc_probe,
-		.remove = ath10k_snoc_remove,
-		.driver = {
-			.name   = "ath10k_snoc",
-			.of_match_table = ath10k_snoc_dt_match,
-		},
+	.probe  = ath10k_snoc_probe,
+	.remove = ath10k_snoc_remove,
+	.driver = {
+		.name   = "ath10k_snoc",
+		.of_match_table = ath10k_snoc_dt_match,
+	},
 };
 module_platform_driver(ath10k_snoc_driver);
 
-- 
2.19.1.930.g4563a0d9d0-goog


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

* Re: [PATCH 1/3] ath10k: assign 'n_cipher_suites' for WCN3990
  2018-11-02 17:17 [PATCH 1/3] ath10k: assign 'n_cipher_suites' for WCN3990 Brian Norris
  2018-11-02 17:17 ` [PATCH 2/3] ath10k: don't assume this is a PCI dev in generic code Brian Norris
  2018-11-02 17:17 ` [PATCH 3/3] ath10k: fix struct init whitespace in SNOC driver Brian Norris
@ 2018-11-06 16:23 ` Kalle Valo
  2 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2018-11-06 16:23 UTC (permalink / raw)
  To: Brian Norris
  Cc: ath10k, linux-wireless, Rakesh Pillai, Govind Singh,
	linux-kernel, Brian Norris

Brian Norris <briannorris@chromium.org> wrote:

> Commit 2ea9f12cefe4 ("ath10k: add new cipher suite support") added a new
> n_cipher_suites HW param with a fallback value and a warning log. Commit
> 03a72288c546 ("ath10k: wmi: add hw params entry for wcn3990") later
> added WCN3990 HW entries, but it missed the n_cipher_suites.
> 
> Rather than seeing this warning every boot
> 
>   ath10k_snoc 18800000.wifi: invalid hw_params.n_cipher_suites 0
> 
> let's provide the appropriate value.
> 
> Cc: Rakesh Pillai <pillair@qti.qualcomm.com>
> Cc: Govind Singh <govinds@qti.qualcomm.com>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

3 patches applied to ath-next branch of ath.git, thanks.

2bd345cd2bfc ath10k: assign 'n_cipher_suites' for WCN3990
79169f148655 ath10k: don't assume this is a PCI dev in generic code
cea04e3d8e37 ath10k: fix struct init whitespace in SNOC driver

-- 
https://patchwork.kernel.org/patch/10665915/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

end of thread, other threads:[~2018-11-06 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02 17:17 [PATCH 1/3] ath10k: assign 'n_cipher_suites' for WCN3990 Brian Norris
2018-11-02 17:17 ` [PATCH 2/3] ath10k: don't assume this is a PCI dev in generic code Brian Norris
2018-11-02 17:17 ` [PATCH 3/3] ath10k: fix struct init whitespace in SNOC driver Brian Norris
2018-11-06 16:23 ` [PATCH 1/3] ath10k: assign 'n_cipher_suites' for WCN3990 Kalle Valo

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).