[PATCH] staging: ks7010: define ether_hdr.h_proto to be big-endian
dick at acm.org
dick at acm.org
Sun May 21 09:15:11 UTC 2017
From: Richard Porter <dick at acm.org>
Fixes sparse warnings:
drivers/staging/ks7010/ks_hostif.c:339:21: warning: cast to restricted __be16
drivers/staging/ks7010/ks_hostif.c:430:21: warning: cast to restricted __be16
drivers/staging/ks7010/ks_hostif.c:1226:21: warning: cast to restricted __be16
Signed-off-by: Richard Porter <dick at acm.org>
---
drivers/staging/ks7010/eap_packet.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ks7010/eap_packet.h b/drivers/staging/ks7010/eap_packet.h
index b2d25ef..eec4aa4 100644
--- a/drivers/staging/ks7010/eap_packet.h
+++ b/drivers/staging/ks7010/eap_packet.h
@@ -18,7 +18,7 @@ struct ether_hdr {
unsigned char h_source_snap;
unsigned char h_command;
unsigned char h_vendor_id[3];
- unsigned short h_proto; /* packet type ID field */
+ __be16 h_proto; /* packet type ID field */
#define ETHER_PROTOCOL_TYPE_EAP 0x888e
#define ETHER_PROTOCOL_TYPE_IP 0x0800
#define ETHER_PROTOCOL_TYPE_ARP 0x0806
--
2.7.4
More information about the devel
mailing list