Skip to contentSkip to conversation

ath11k: cleanup in HTC and tx data path

PATCH In review Karthikeyan Periyasamy 2 participants 2 messages Jun 18, 2019 – Jun 20, 2019 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath11k: cleanup in HTC and tx data path

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

---
 drivers/net/wireless/ath/ath11k/dp_tx.c | 5 ++---
 drivers/net/wireless/ath/ath11k/htc.c   | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)
drivers/net/wireless/ath/ath11k/dp_tx.c +2 -3
index 12668a6..84a50eb 100644
@@ -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;
drivers/net/wireless/ath/ath11k/htc.c +2 -2
index b42d950..27e79bb 100644
@@ -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));
Signature · 7 lines
1.9.1


_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#1 lore raw
Quoted 7 lines · 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().

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

4d57f3c14410 ath11k: cleanup in HTC and tx data path

Signature · 9 lines
https://patchwork.kernel.org/patch/11000875/

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


_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k