Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure
@ 2019-09-23 19:49 Tomislav Požega
  2019-09-23 19:49 ` [PATCH 2/5] ath10k: print service ready returned channel range Tomislav Požega
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Tomislav Požega @ 2019-09-23 19:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, ath10k

Add lowest/highest 2ghz channel arguments for use within WMI service
ready structure.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
---
 drivers/net/wireless/ath/ath10k/core.h    |    2 ++
 drivers/net/wireless/ath/ath10k/wmi-tlv.c |    2 ++
 drivers/net/wireless/ath/ath10k/wmi.c     |    6 ++++++
 drivers/net/wireless/ath/ath10k/wmi.h     |    2 ++
 4 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index c96d1a1..2a0a008 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -967,6 +967,8 @@ struct ath10k {
 	u32 num_rf_chains;
 	u32 max_spatial_stream;
 	/* protected by conf_mutex */
+	u32 low_2ghz_chan;
+	u32 high_2ghz_chan;
 	u32 low_5ghz_chan;
 	u32 high_5ghz_chan;
 	bool ani_enabled;
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index 363fd0b..bda52ca 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -1207,6 +1207,8 @@ static int ath10k_wmi_tlv_op_pull_svc_rdy_ev(struct ath10k *ar,
 	arg->phy_capab = ev->phy_capability;
 	arg->num_rf_chains = ev->num_rf_chains;
 	arg->eeprom_rd = reg->eeprom_rd;
+	arg->low_2ghz_chan = reg->low_2ghz_chan;
+	arg->high_2ghz_chan = reg->high_2ghz_chan;
 	arg->low_5ghz_chan = reg->low_5ghz_chan;
 	arg->high_5ghz_chan = reg->high_5ghz_chan;
 	arg->num_mem_reqs = ev->num_mem_reqs;
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 1ec609d..3ef6ee3 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -5362,6 +5362,8 @@ static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
 	arg->phy_capab = ev->phy_capability;
 	arg->num_rf_chains = ev->num_rf_chains;
 	arg->eeprom_rd = ev->hal_reg_capabilities.eeprom_rd;
+	arg->low_2ghz_chan = ev->hal_reg_capabilities.low_2ghz_chan;
+	arg->high_2ghz_chan = ev->hal_reg_capabilities.high_2ghz_chan;
 	arg->low_5ghz_chan = ev->hal_reg_capabilities.low_5ghz_chan;
 	arg->high_5ghz_chan = ev->hal_reg_capabilities.high_5ghz_chan;
 	arg->num_mem_reqs = ev->num_mem_reqs;
@@ -5400,6 +5402,8 @@ static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
 	arg->phy_capab = ev->phy_capability;
 	arg->num_rf_chains = ev->num_rf_chains;
 	arg->eeprom_rd = ev->hal_reg_capabilities.eeprom_rd;
+	arg->low_2ghz_chan = ev->hal_reg_capabilities.low_2ghz_chan;
+	arg->high_2ghz_chan = ev->hal_reg_capabilities.high_2ghz_chan;
 	arg->low_5ghz_chan = ev->hal_reg_capabilities.low_5ghz_chan;
 	arg->high_5ghz_chan = ev->hal_reg_capabilities.high_5ghz_chan;
 	arg->num_mem_reqs = ev->num_mem_reqs;
@@ -5454,6 +5458,8 @@ static void ath10k_wmi_event_service_ready_work(struct work_struct *work)
 	ar->phy_capability = __le32_to_cpu(arg.phy_capab);
 	ar->num_rf_chains = __le32_to_cpu(arg.num_rf_chains);
 	ar->hw_eeprom_rd = __le32_to_cpu(arg.eeprom_rd);
+	ar->low_2ghz_chan = __le32_to_cpu(arg.low_2ghz_chan);
+	ar->high_2ghz_chan = __le32_to_cpu(arg.high_2ghz_chan);
 	ar->low_5ghz_chan = __le32_to_cpu(arg.low_5ghz_chan);
 	ar->high_5ghz_chan = __le32_to_cpu(arg.high_5ghz_chan);
 
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index bdeebc5..9ccaeb7 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -6870,6 +6870,8 @@ struct wmi_svc_rdy_ev_arg {
 	__le32 num_rf_chains;
 	__le32 eeprom_rd;
 	__le32 num_mem_reqs;
+	__le32 low_2ghz_chan;
+	__le32 high_2ghz_chan;
 	__le32 low_5ghz_chan;
 	__le32 high_5ghz_chan;
 	const __le32 *service_map;
-- 
1.7.0.4


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

* [PATCH 2/5] ath10k: print service ready returned channel range
  2019-09-23 19:49 [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure Tomislav Požega
@ 2019-09-23 19:49 ` Tomislav Požega
  2019-09-23 19:49 ` [PATCH 3/5] ath10k: print supported MCS rates within service ready event Tomislav Požega
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Tomislav Požega @ 2019-09-23 19:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, ath10k

Displays lowest/highest supported channels for both 2ghz and 5ghz
bands as they're fetched within WMI service ready event.
These are shown in a frequency format.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
---
 drivers/net/wireless/ath/ath10k/wmi.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 3ef6ee3..b7b8072 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -5563,7 +5563,7 @@ static void ath10k_wmi_event_service_ready_work(struct work_struct *work)
 
 skip_mem_alloc:
 	ath10k_dbg(ar, ATH10K_DBG_WMI,
-		   "wmi event service ready min_tx_power 0x%08x max_tx_power 0x%08x ht_cap 0x%08x vht_cap 0x%08x sw_ver0 0x%08x sw_ver1 0x%08x fw_build 0x%08x phy_capab 0x%08x num_rf_chains 0x%08x eeprom_rd 0x%08x num_mem_reqs 0x%08x\n",
+		   "wmi event service ready min_tx_power 0x%08x max_tx_power 0x%08x ht_cap 0x%08x vht_cap 0x%08x sw_ver0 0x%08x sw_ver1 0x%08x fw_build 0x%08x phy_capab 0x%08x num_rf_chains 0x%08x eeprom_rd 0x%08x low_2ghz_chan %d high_2ghz_chan %d low_5ghz_chan %d high_5ghz_chan %d num_mem_reqs 0x%08x\n",
 		   __le32_to_cpu(arg.min_tx_power),
 		   __le32_to_cpu(arg.max_tx_power),
 		   __le32_to_cpu(arg.ht_cap),
@@ -5574,6 +5574,10 @@ static void ath10k_wmi_event_service_ready_work(struct work_struct *work)
 		   __le32_to_cpu(arg.phy_capab),
 		   __le32_to_cpu(arg.num_rf_chains),
 		   __le32_to_cpu(arg.eeprom_rd),
+		   __le32_to_cpu(arg.low_2ghz_chan),
+		   __le32_to_cpu(arg.high_2ghz_chan),
+		   __le32_to_cpu(arg.low_5ghz_chan),
+		   __le32_to_cpu(arg.high_5ghz_chan),
 		   __le32_to_cpu(arg.num_mem_reqs));
 
 	dev_kfree_skb(skb);
-- 
1.7.0.4


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

* [PATCH 3/5] ath10k: print supported MCS rates within service ready event
  2019-09-23 19:49 [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure Tomislav Požega
  2019-09-23 19:49 ` [PATCH 2/5] ath10k: print service ready returned channel range Tomislav Požega
@ 2019-09-23 19:49 ` Tomislav Požega
  2019-09-23 19:49 ` [PATCH 4/5] ath10k: change sw version print format to hex Tomislav Požega
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Tomislav Požega @ 2019-09-23 19:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, ath10k

Add vht_supp_mcs argument to service ready structure and print
supported MCS rates in WMI service ready debug message.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
---
 drivers/net/wireless/ath/ath10k/core.h    |    1 +
 drivers/net/wireless/ath/ath10k/wmi-tlv.c |    1 +
 drivers/net/wireless/ath/ath10k/wmi.c     |    6 +++++-
 drivers/net/wireless/ath/ath10k/wmi.h     |    1 +
 4 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 2a0a008..153c4a2 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -964,6 +964,7 @@ struct ath10k {
 	u32 hw_eeprom_rd;
 	u32 ht_cap_info;
 	u32 vht_cap_info;
+	u32 vht_supp_mcs;
 	u32 num_rf_chains;
 	u32 max_spatial_stream;
 	/* protected by conf_mutex */
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index bda52ca..2432a74 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -1201,6 +1201,7 @@ static int ath10k_wmi_tlv_op_pull_svc_rdy_ev(struct ath10k *ar,
 	arg->max_tx_power = ev->hw_max_tx_power;
 	arg->ht_cap = ev->ht_cap_info;
 	arg->vht_cap = ev->vht_cap_info;
+	arg->vht_supp_mcs = ev->vht_supp_mcs;
 	arg->sw_ver0 = ev->abi.abi_ver0;
 	arg->sw_ver1 = ev->abi.abi_ver1;
 	arg->fw_build = ev->fw_build_vers;
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index b7b8072..2d43adf 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -5357,6 +5357,7 @@ static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
 	arg->max_tx_power = ev->hw_max_tx_power;
 	arg->ht_cap = ev->ht_cap_info;
 	arg->vht_cap = ev->vht_cap_info;
+	arg->vht_supp_mcs = ev->vht_supp_mcs;
 	arg->sw_ver0 = ev->sw_version;
 	arg->sw_ver1 = ev->sw_version_1;
 	arg->phy_capab = ev->phy_capability;
@@ -5398,6 +5399,7 @@ static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
 	arg->max_tx_power = ev->hw_max_tx_power;
 	arg->ht_cap = ev->ht_cap_info;
 	arg->vht_cap = ev->vht_cap_info;
+	arg->vht_supp_mcs = ev->vht_supp_mcs;
 	arg->sw_ver0 = ev->sw_version;
 	arg->phy_capab = ev->phy_capability;
 	arg->num_rf_chains = ev->num_rf_chains;
@@ -5449,6 +5451,7 @@ static void ath10k_wmi_event_service_ready_work(struct work_struct *work)
 	ar->hw_max_tx_power = __le32_to_cpu(arg.max_tx_power);
 	ar->ht_cap_info = __le32_to_cpu(arg.ht_cap);
 	ar->vht_cap_info = __le32_to_cpu(arg.vht_cap);
+	ar->vht_supp_mcs = __le32_to_cpu(arg.vht_supp_mcs);
 	ar->fw_version_major =
 		(__le32_to_cpu(arg.sw_ver0) & 0xff000000) >> 24;
 	ar->fw_version_minor = (__le32_to_cpu(arg.sw_ver0) & 0x00ffffff);
@@ -5563,11 +5566,12 @@ static void ath10k_wmi_event_service_ready_work(struct work_struct *work)
 
 skip_mem_alloc:
 	ath10k_dbg(ar, ATH10K_DBG_WMI,
-		   "wmi event service ready min_tx_power 0x%08x max_tx_power 0x%08x ht_cap 0x%08x vht_cap 0x%08x sw_ver0 0x%08x sw_ver1 0x%08x fw_build 0x%08x phy_capab 0x%08x num_rf_chains 0x%08x eeprom_rd 0x%08x low_2ghz_chan %d high_2ghz_chan %d low_5ghz_chan %d high_5ghz_chan %d num_mem_reqs 0x%08x\n",
+		   "wmi event service ready min_tx_power 0x%08x max_tx_power 0x%08x ht_cap 0x%08x vht_cap 0x%08x vht_supp_mcs 0x%08x sw_ver0 0x%08x sw_ver1 0x%08x fw_build 0x%08x phy_capab 0x%08x num_rf_chains 0x%08x eeprom_rd 0x%08x low_2ghz_chan %d high_2ghz_chan %d low_5ghz_chan %d high_5ghz_chan %d num_mem_reqs 0x%08x\n",
 		   __le32_to_cpu(arg.min_tx_power),
 		   __le32_to_cpu(arg.max_tx_power),
 		   __le32_to_cpu(arg.ht_cap),
 		   __le32_to_cpu(arg.vht_cap),
+		   __le32_to_cpu(arg.vht_supp_mcs),
 		   __le32_to_cpu(arg.sw_ver0),
 		   __le32_to_cpu(arg.sw_ver1),
 		   __le32_to_cpu(arg.fw_build),
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 9ccaeb7..d9d53e5 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -6863,6 +6863,7 @@ struct wmi_svc_rdy_ev_arg {
 	__le32 max_tx_power;
 	__le32 ht_cap;
 	__le32 vht_cap;
+	__le32 vht_supp_mcs;
 	__le32 sw_ver0;
 	__le32 sw_ver1;
 	__le32 fw_build;
-- 
1.7.0.4


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

* [PATCH 4/5] ath10k: change sw version print format to hex
  2019-09-23 19:49 [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure Tomislav Požega
  2019-09-23 19:49 ` [PATCH 2/5] ath10k: print service ready returned channel range Tomislav Požega
  2019-09-23 19:49 ` [PATCH 3/5] ath10k: print supported MCS rates within service ready event Tomislav Požega
@ 2019-09-23 19:49 ` Tomislav Požega
  2019-09-23 19:49 ` [PATCH 5/5] ath10k: pull_svc_rdy code-style fix Tomislav Požega
  2019-10-01 11:15 ` [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure Kalle Valo
  4 siblings, 0 replies; 9+ messages in thread
From: Tomislav Požega @ 2019-09-23 19:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, ath10k

Software version within WMI event ready message was displayed
in a not very useful decimal format. Change this info to be shown
in a hexadecimal format instead.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
---
 drivers/net/wireless/ath/ath10k/wmi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 2d43adf..59d2d2a 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -5650,7 +5650,7 @@ int ath10k_wmi_event_ready(struct ath10k *ar, struct sk_buff *skb)
 	}
 
 	ath10k_dbg(ar, ATH10K_DBG_WMI,
-		   "wmi event ready sw_version %u abi_version %u mac_addr %pM status %d\n",
+		   "wmi event ready sw_version 0x%08x abi_version %u mac_addr %pM status %d\n",
 		   __le32_to_cpu(arg.sw_version),
 		   __le32_to_cpu(arg.abi_version),
 		   arg.mac_addr,
-- 
1.7.0.4


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

* [PATCH 5/5] ath10k: pull_svc_rdy code-style fix
  2019-09-23 19:49 [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure Tomislav Požega
                   ` (2 preceding siblings ...)
  2019-09-23 19:49 ` [PATCH 4/5] ath10k: change sw version print format to hex Tomislav Požega
@ 2019-09-23 19:49 ` Tomislav Požega
  2019-09-24  5:30   ` Kalle Valo
  2019-10-01 11:15 ` [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure Kalle Valo
  4 siblings, 1 reply; 9+ messages in thread
From: Tomislav Požega @ 2019-09-23 19:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, ath10k

Drop unneeded lines by moving skb data in both main and 10x WMI
pull service ready event operations.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
---
 drivers/net/wireless/ath/ath10k/wmi.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 59d2d2a..8ab178c 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -5345,13 +5345,12 @@ static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
 ath10k_wmi_main_op_pull_svc_rdy_ev(struct ath10k *ar, struct sk_buff *skb,
 				   struct wmi_svc_rdy_ev_arg *arg)
 {
-	struct wmi_service_ready_event *ev;
+	struct wmi_service_ready_event *ev = (void *)skb->data;
 	size_t i, n;
 
 	if (skb->len < sizeof(*ev))
 		return -EPROTO;
 
-	ev = (void *)skb->data;
 	skb_pull(skb, sizeof(*ev));
 	arg->min_tx_power = ev->hw_min_tx_power;
 	arg->max_tx_power = ev->hw_max_tx_power;
@@ -5387,13 +5386,12 @@ static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
 ath10k_wmi_10x_op_pull_svc_rdy_ev(struct ath10k *ar, struct sk_buff *skb,
 				  struct wmi_svc_rdy_ev_arg *arg)
 {
-	struct wmi_10x_service_ready_event *ev;
+	struct wmi_10x_service_ready_event *ev = (void *)skb->data;
 	int i, n;
 
 	if (skb->len < sizeof(*ev))
 		return -EPROTO;
 
-	ev = (void *)skb->data;
 	skb_pull(skb, sizeof(*ev));
 	arg->min_tx_power = ev->hw_min_tx_power;
 	arg->max_tx_power = ev->hw_max_tx_power;
-- 
1.7.0.4


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

* Re: [PATCH 5/5] ath10k: pull_svc_rdy code-style fix
  2019-09-23 19:49 ` [PATCH 5/5] ath10k: pull_svc_rdy code-style fix Tomislav Požega
@ 2019-09-24  5:30   ` Kalle Valo
  2019-09-24  7:49     ` Tom Psyborg
  0 siblings, 1 reply; 9+ messages in thread
From: Kalle Valo @ 2019-09-24  5:30 UTC (permalink / raw)
  To: Tomislav Požega; +Cc: linux-wireless, ath10k

Tomislav Požega <pozega.tomislav@gmail.com> writes:

> Drop unneeded lines by moving skb data in both main and 10x WMI
> pull service ready event operations.
>
> Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
> ---
>  drivers/net/wireless/ath/ath10k/wmi.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
> index 59d2d2a..8ab178c 100644
> --- a/drivers/net/wireless/ath/ath10k/wmi.c
> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
> @@ -5345,13 +5345,12 @@ static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
>  ath10k_wmi_main_op_pull_svc_rdy_ev(struct ath10k *ar, struct sk_buff *skb,
>  				   struct wmi_svc_rdy_ev_arg *arg)
>  {
> -	struct wmi_service_ready_event *ev;
> +	struct wmi_service_ready_event *ev = (void *)skb->data;
>  	size_t i, n;
>  
>  	if (skb->len < sizeof(*ev))
>  		return -EPROTO;
>  
> -	ev = (void *)skb->data;

Actually I prefer the original style, so that we first check the data in
skb is valid and only then assign the data to ev.

-- 
Kalle Valo

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

* Re: [PATCH 5/5] ath10k: pull_svc_rdy code-style fix
  2019-09-24  5:30   ` Kalle Valo
@ 2019-09-24  7:49     ` Tom Psyborg
  2019-10-04 18:56       ` Jeff Johnson
  0 siblings, 1 reply; 9+ messages in thread
From: Tom Psyborg @ 2019-09-24  7:49 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath10k

On 24/09/2019, Kalle Valo <kvalo@codeaurora.org> wrote:
> Tomislav Požega <pozega.tomislav@gmail.com> writes:
>
>> Drop unneeded lines by moving skb data in both main and 10x WMI
>> pull service ready event operations.
>>
>> Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
>> ---
>>  drivers/net/wireless/ath/ath10k/wmi.c |    6 ++----
>>  1 files changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/wmi.c
>> b/drivers/net/wireless/ath/ath10k/wmi.c
>> index 59d2d2a..8ab178c 100644
>> --- a/drivers/net/wireless/ath/ath10k/wmi.c
>> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
>> @@ -5345,13 +5345,12 @@ static int ath10k_wmi_alloc_host_mem(struct ath10k
>> *ar, u32 req_id,
>>  ath10k_wmi_main_op_pull_svc_rdy_ev(struct ath10k *ar, struct sk_buff
>> *skb,
>>  				   struct wmi_svc_rdy_ev_arg *arg)
>>  {
>> -	struct wmi_service_ready_event *ev;
>> +	struct wmi_service_ready_event *ev = (void *)skb->data;
>>  	size_t i, n;
>>
>>  	if (skb->len < sizeof(*ev))
>>  		return -EPROTO;
>>
>> -	ev = (void *)skb->data;
>
> Actually I prefer the original style, so that we first check the data in
> skb is valid and only then assign the data to ev.
>
> --
> Kalle Valo
>

It came to my mind that this might be the reason why the current
driver did not give me warning about too short service ready event,
but there was no warning about event length in either case.
I even tested this with compat wireless from 2013. and there the
situation was the opposite: in both cases there was warning about
service ready length.

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

* Re: [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure
  2019-09-23 19:49 [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure Tomislav Požega
                   ` (3 preceding siblings ...)
  2019-09-23 19:49 ` [PATCH 5/5] ath10k: pull_svc_rdy code-style fix Tomislav Požega
@ 2019-10-01 11:15 ` Kalle Valo
  4 siblings, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2019-10-01 11:15 UTC (permalink / raw)
  To: Tomislav Požega; +Cc: linux-wireless, ath10k

Tomislav Požega wrote:

> Add lowest/highest 2ghz channel arguments for use within WMI service
> ready structure.
> 
> Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

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

fa879490e412 ath10k: add 2ghz channel arguments to service ready structure
275ea1b26f38 ath10k: print service ready returned channel range
73690c4843fb ath10k: print supported MCS rates within service ready event
7b3087323faa ath10k: change sw version print format to hex

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

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


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

* Re: [PATCH 5/5] ath10k: pull_svc_rdy code-style fix
  2019-09-24  7:49     ` Tom Psyborg
@ 2019-10-04 18:56       ` Jeff Johnson
  0 siblings, 0 replies; 9+ messages in thread
From: Jeff Johnson @ 2019-10-04 18:56 UTC (permalink / raw)
  To: Tom Psyborg; +Cc: Kalle Valo, linux-wireless, ath10k, linux-wireless-owner

On 2019-09-24 00:49, Tom Psyborg wrote:
> On 24/09/2019, Kalle Valo <kvalo@codeaurora.org> wrote:
>> Tomislav Požega <pozega.tomislav@gmail.com> writes:
>> Actually I prefer the original style, so that we first check the data 
>> in
>> skb is valid and only then assign the data to ev.
>> 
>> --
>> Kalle Valo
>> 
> 
> It came to my mind that this might be the reason why the current
> driver did not give me warning about too short service ready event,
> but there was no warning about event length in either case.
> I even tested this with compat wireless from 2013. and there the
> situation was the opposite: in both cases there was warning about
> service ready length.

Hmmm, my understanding of the way the TLV WMI is supposed to work is 
that the individual data structures are extensible, and in the case 
where a data structure is received with a "short" length the recipient 
is supposed to zero-extend to the expected length, and then handle the 
"zeroed" field(s) appropriately. This is supposed to hold for both 
host=>firmware and firmware=>host. Since the wmi_service_ready_event has 
been extended over time this behavior is necessary in the case of a host 
built with the current format interfacing to a firmware built with an 
earlier version of the format. I'm not sure why ath10k isn't supporting 
this since the QTI "out of tree" driver (my area of focus) has that 
support.

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

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-23 19:49 [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure Tomislav Požega
2019-09-23 19:49 ` [PATCH 2/5] ath10k: print service ready returned channel range Tomislav Požega
2019-09-23 19:49 ` [PATCH 3/5] ath10k: print supported MCS rates within service ready event Tomislav Požega
2019-09-23 19:49 ` [PATCH 4/5] ath10k: change sw version print format to hex Tomislav Požega
2019-09-23 19:49 ` [PATCH 5/5] ath10k: pull_svc_rdy code-style fix Tomislav Požega
2019-09-24  5:30   ` Kalle Valo
2019-09-24  7:49     ` Tom Psyborg
2019-10-04 18:56       ` Jeff Johnson
2019-10-01 11:15 ` [PATCH 1/5] ath10k: add 2ghz channel arguments to service ready structure Kalle Valo

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org linux-wireless@archiver.kernel.org
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/ public-inbox