Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: ks7010: replace some custom defines with the ones in uapi/linux/if_ether.h

This commit reviews some custom defines changing them for the
globals defined in if_ether header file.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Sergio Paracuellos and committed by
Greg Kroah-Hartman
38fc31e7 c0704069

+5 -11
+1 -7
drivers/staging/ks7010/eap_packet.h
··· 3 3 #define EAP_PACKET_H 4 4 5 5 #include <linux/compiler.h> 6 + #include <uapi/linux/if_ether.h> 6 7 7 8 #define WBIT(n) (1 << (n)) 8 - 9 - #ifndef ETH_ALEN 10 - #define ETH_ALEN 6 11 - #endif 12 9 13 10 #define ETHER_HDR_SIZE 20 14 11 ··· 17 20 unsigned char h_command; 18 21 unsigned char h_vendor_id[3]; 19 22 __be16 h_proto; /* packet type ID field */ 20 - #define ETHER_PROTOCOL_TYPE_EAP 0x888e 21 - #define ETHER_PROTOCOL_TYPE_IP 0x0800 22 - #define ETHER_PROTOCOL_TYPE_ARP 0x0806 23 23 /* followed by length octets of data */ 24 24 } __packed; 25 25
+4 -4
drivers/staging/ks7010/ks_hostif.c
··· 1152 1152 eth_proto = ntohs(eth_hdr->h_proto); 1153 1153 1154 1154 /* for MIC FAILURE REPORT check */ 1155 - if (eth_proto == ETHER_PROTOCOL_TYPE_EAP && 1155 + if (eth_proto == ETH_P_PAE && 1156 1156 priv->wpa.mic_failure.failure > 0) { 1157 1157 aa1x_hdr = (struct ieee802_1x_hdr *)(eth_hdr + 1); 1158 1158 if (aa1x_hdr->type == IEEE802_1X_TYPE_EAPOL_KEY) { ··· 1162 1162 } 1163 1163 1164 1164 if (priv->wpa.rsn_enabled && priv->wpa.key[0].key_len) { 1165 - if (eth_proto == ETHER_PROTOCOL_TYPE_EAP && 1165 + if (eth_proto == ETH_P_PAE && 1166 1166 priv->wpa.key[1].key_len == 0 && 1167 1167 priv->wpa.key[2].key_len == 0 && 1168 1168 priv->wpa.key[3].key_len == 0) { ··· 1189 1189 } 1190 1190 } 1191 1191 } else { 1192 - if (eth_proto == ETHER_PROTOCOL_TYPE_EAP) 1192 + if (eth_proto == ETH_P_PAE) 1193 1193 pp->auth_type = cpu_to_le16((uint16_t)TYPE_AUTH); 1194 1194 else 1195 1195 pp->auth_type = cpu_to_le16((uint16_t)TYPE_DATA); ··· 1206 1206 send_packet_complete, skb); 1207 1207 1208 1208 /* MIC FAILURE REPORT check */ 1209 - if (eth_proto == ETHER_PROTOCOL_TYPE_EAP && 1209 + if (eth_proto == ETH_P_PAE && 1210 1210 priv->wpa.mic_failure.failure > 0) { 1211 1211 if (keyinfo & WPA_KEY_INFO_ERROR && 1212 1212 keyinfo & WPA_KEY_INFO_REQUEST) {