Skip to contentSkip to conversation

ath6kl: improve endianness handling

PATCH In review Kenneth Lu 2 participants 2 messages Dec 2, 2017 – Dec 7, 2017 Atheros ATH6KL wireless driver

lore
Share & tools
lore

Kenneth Lu

author
#0 lore raw

PATCH 1/1 ath6kl: improve endianness handling

Replace ntohs with be16_to_cpu to do endian conversions for ethhdr h_proto assignment.

---
 drivers/net/wireless/ath/ath6kl/txrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath6kl/txrx.c +1 -1
index 1379906..8da9506 100644
@@ -1001,7 +1001,7 @@ static void aggr_slice_amsdu(struct aggr_info *p_aggr,
 
 	while (amsdu_len > mac_hdr_len) {
 		hdr = (struct ethhdr *) framep;
-		payload_8023_len = ntohs(hdr->h_proto);
+		payload_8023_len = be16_to_cpu(hdr->h_proto);
 
 		if (payload_8023_len < MIN_MSDU_SUBFRAME_PAYLOAD_LEN ||
 		    payload_8023_len > MAX_MSDU_SUBFRAME_PAYLOAD_LEN) {
Signature · 1 line
2.7.4
#1 lore raw
Quoted 5 lines · Kenneth Lu

Replace ntohs with be16_to_cpu to do endian conversions for ethhdr h_proto assignment.

Patch applied to ath-next branch of ath.git, thanks.

5d24bcd56dc7 ath6kl: improve endianness handling

Signature · 3 lines
https://patchwork.kernel.org/patch/10088565/

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