All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath6kl: initialize the 'nominal_phy' field in the 'wmi_create_pstream_cmd' struct for create_qos command
@ 2012-02-01  9:03 Chilam Ng
  2012-02-02  8:23 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Chilam Ng @ 2012-02-01  9:03 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath6kl-devel

The nominal_phy field is uninitialized. Initialize it to min_phy_rate for create_qos

Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/debug.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 6b546dc..c066c29 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -1441,6 +1441,8 @@ static ssize_t ath6kl_create_qos_write(struct file *file,
 		return -EINVAL;
 	pstream.medium_time = cpu_to_le32(val32);
 
+	pstream.nominal_phy = ((le32_to_cpu(pstream.min_phy_rate) / 1000) / 1000);
+
 	ath6kl_wmi_create_pstream_cmd(ar->wmi, vif->fw_vif_idx, &pstream);
 
 	return count;
-- 
1.7.7.2


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

* Re: [PATCH] ath6kl: initialize the 'nominal_phy' field in the 'wmi_create_pstream_cmd' struct for create_qos command
  2012-02-01  9:03 [PATCH] ath6kl: initialize the 'nominal_phy' field in the 'wmi_create_pstream_cmd' struct for create_qos command Chilam Ng
@ 2012-02-02  8:23 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2012-02-02  8:23 UTC (permalink / raw)
  To: Chilam Ng; +Cc: linux-wireless, ath6kl-devel

On 02/01/2012 11:03 AM, Chilam Ng wrote:
> The nominal_phy field is uninitialized. Initialize it to min_phy_rate for create_qos
> 
> Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com>

Thanks, applied with a small change:

> +	pstream.nominal_phy = ((le32_to_cpu(pstream.min_phy_rate) / 1000) / 1000);

Checkpatch complained that this line was too long so I simplified the
equation:

pstream.nominal_phy = le32_to_cpu(pstream.min_phy_rate) / 1000000;

Please holler if I did the math wrong :)

Kalle

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

end of thread, other threads:[~2012-02-02  8:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-01  9:03 [PATCH] ath6kl: initialize the 'nominal_phy' field in the 'wmi_create_pstream_cmd' struct for create_qos command Chilam Ng
2012-02-02  8:23 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.