diff mbox series

ath11k: cleanup in HTC and tx data path

Message ID 1560832368-17047-1-git-send-email-periyasa@codeaurora.org (mailing list archive)
State Accepted
Commit 4d57f3c14410b14300d1b381601cb27a8a9a595c
Delegated to: Kalle Valo
Headers show
Series ath11k: cleanup in HTC and tx data path | expand

Commit Message

Karthikeyan periyasamy June 18, 2019, 4:32 a.m. UTC
Removed the unnecessary parenthesis in ath11k_dp_tx().
Replaced the Hard code value to the HTC header structure
size while reserve the skb. Modify the WARN_ONCE to WARN_ON
in ath11k_htc_build_tx_ctrl_skb().

Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/dp_tx.c | 5 ++---
 drivers/net/wireless/ath/ath11k/htc.c   | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

Comments

Kalle Valo June 20, 2019, 1:39 p.m. UTC | #1
Karthikeyan Periyasamy <periyasa@codeaurora.org> wrote:

> Removed the unnecessary parenthesis in ath11k_dp_tx().
> Replaced the Hard code value to the HTC header structure
> size while reserve the skb. Modify the WARN_ONCE to WARN_ON
> in ath11k_htc_build_tx_ctrl_skb().
> 
> Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath11k-bringup branch of ath.git, thanks.

4d57f3c14410 ath11k: cleanup in HTC and tx data path
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index 12668a6..84a50eb 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -110,12 +110,11 @@  int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
 	ti.encap_type = ath11k_dp_tx_get_encap_type(arvif, skb);
 	ti.meta_data_flags = arvif->tcl_metadata;
 
-	if (info->control.hw_key) {
+	if (info->control.hw_key)
 		ti.encrypt_type =
 		ath11k_dp_tx_get_encrypt_type(info->control.hw_key->cipher);
-	} else {
+	else
 		ti.encrypt_type = HAL_ENCRYPT_TYPE_OPEN;
-	}
 
 	ti.addr_search_flags = arvif->hal_addr_search_flags;
 	ti.search_type = arvif->search_type;
diff --git a/drivers/net/wireless/ath/ath11k/htc.c b/drivers/net/wireless/ath/ath11k/htc.c
index b42d950..27e79bb 100644
--- a/drivers/net/wireless/ath/ath11k/htc.c
+++ b/drivers/net/wireless/ath/ath11k/htc.c
@@ -44,8 +44,8 @@  static struct sk_buff *ath11k_htc_build_tx_ctrl_skb(void *ab)
 	if (!skb)
 		return NULL;
 
-	skb_reserve(skb, 20);
-	WARN_ONCE((unsigned long)skb->data & 3, "unaligned skb");
+	skb_reserve(skb, sizeof(struct ath11k_htc_hdr));
+	WARN_ON_ONCE(!IS_ALIGNED((unsigned long)skb->data, 4));
 
 	skb_cb = ATH11K_SKB_CB(skb);
 	memset(skb_cb, 0, sizeof(*skb_cb));