* [PATCH] ath11k: cleanup in HTC and tx data path
@ 2019-06-18 4:32 Karthikeyan Periyasamy
2019-06-20 13:39 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Karthikeyan Periyasamy @ 2019-06-18 4:32 UTC (permalink / raw)
To: ath11k; +Cc: Karthikeyan Periyasamy
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(-)
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));
--
1.9.1
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-20 13:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-18 4:32 [PATCH] ath11k: cleanup in HTC and tx data path Karthikeyan Periyasamy
2019-06-20 13:39 ` 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.