summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu
diff options
context:
space:
mode:
authorGeorgiana Rodica Chelu <georgiana.chelu93@gmail.com>2016-09-29 00:07:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-02 17:26:57 +0200
commit7b170bacbb13089ccb1d14ca18ad4fb5dcb8b72e (patch)
treed9bf4816c597de5b730d17c8d8282188051b5f6a /drivers/staging/rtl8188eu
parent7d7be350073e5a27ff5ed73b3dc31e1d2cb7d573 (diff)
staging: rtl8188eu: core: rtw_xmit: Use macros instead of constants
Replace the 0x888e with ETH_P_PAE and 0x0806 with ETH_P_ARP. These macros can be found in drivers/staging/rtl8192e/rtllib.h Hexadecimal numbers are not case sensitive, therefore 0x888e is equal with 0x888E. The modifications improve the readability of the code. Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_xmit.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index 139289975365..0f8b8e0bffdf 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -402,7 +402,7 @@ static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
_rtw_pktfile_read(ppktfile, (u8 *)&ip_hdr, sizeof(ip_hdr));
/* user_prio = (ntohs(ip_hdr.tos) >> 5) & 0x3; */
user_prio = ip_hdr.tos >> 5;
- } else if (pattrib->ether_type == 0x888e) {
+ } else if (pattrib->ether_type == ETH_P_PAE) {
/* "When priority processing of data frames is supported, */
/* a STA's SME should send EAPOL-Key frames at the highest priority." */
user_prio = 7;
@@ -469,15 +469,15 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
}
}
}
- } else if (pattrib->ether_type == 0x888e) {
+ } else if (pattrib->ether_type == ETH_P_PAE) {
DBG_88E_LEVEL(_drv_info_, "send eapol packet\n");
}
- if ((pattrib->ether_type == 0x888e) || (pattrib->dhcp_pkt == 1))
+ if ((pattrib->ether_type == ETH_P_PAE) || (pattrib->dhcp_pkt == 1))
rtw_set_scan_deny(padapter, 3000);
/* If EAPOL , ARP , OR DHCP packet, driver must be in active mode. */
- if ((pattrib->ether_type == 0x0806) || (pattrib->ether_type == 0x888e) || (pattrib->dhcp_pkt == 1))
+ if ((pattrib->ether_type == ETH_P_ARP) || (pattrib->ether_type == ETH_P_PAE) || (pattrib->dhcp_pkt == 1))
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SPECIAL_PACKET, 1);
bmcast = IS_MCAST(pattrib->ra);
@@ -531,8 +531,8 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
pattrib->encrypt = 0;
- if ((pattrib->ether_type != 0x888e) && !check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
- RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("\npsta->ieee8021x_blocked == true, pattrib->ether_type(%.4x) != 0x888e\n", pattrib->ether_type));
+ if ((pattrib->ether_type != ETH_P_PAE) && !check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
+ RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("\npsta->ieee8021x_blocked == true, pattrib->ether_type(%.4x) != ETH_P_PAE\n", pattrib->ether_type));
res = _FAIL;
goto exit;
}