From 04e7f80e3561b6b585d1f1c364b0a64ff0c90e7e Mon Sep 17 00:00:00 2001 From: Sergio Paracuellos Date: Tue, 24 Apr 2018 15:49:52 +0200 Subject: [PATCH] staging: ks7010: use definitions from kernel headers in hostif_data_indication function Function hostif_data_indication checks some hardcoded values in a switch-case block. This values are defined in uapi/linux/llc.h header. Just use them and avoid a comment in the code improving readability a bit. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ks7010/ks_hostif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index dd6e0198695a0..19c8887200f59 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -11,6 +11,7 @@ #include #include +#include #include "eap_packet.h" #include "ks_wlan.h" #include "michael_mic.h" @@ -399,7 +400,7 @@ void hostif_data_indication(struct ks_wlan_private *priv) /* check 13th byte at rx data */ switch (*(priv->rxp + 12)) { - case 0xAA: /* SNAP */ + case LLC_SAP_SNAP: rx_ind_size = priv->rx_size - 6; skb = dev_alloc_skb(rx_ind_size); if (!skb) { @@ -419,7 +420,7 @@ void hostif_data_indication(struct ks_wlan_private *priv) aa1x_hdr = (struct ieee802_1x_hdr *)(priv->rxp + ETHER_HDR_SIZE); break; - case 0xF0: /* NETBEUI/NetBIOS */ + case LLC_SAP_NETBEUI: rx_ind_size = (priv->rx_size + 2); skb = dev_alloc_skb(rx_ind_size); if (!skb) { -- 2.30.2