Skip to contentSkip to conversation

staging: rtl8188eu: remove redundant definition of ETH_ALEN

PATCH In review Michael Straube 2 participants 4 messages Jun 2, 2019 – Jun 3, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging: rtl8188eu: remove redundant definition of ETH_ALEN

ETH_ALEN is defined in linux/if_ether.h which is included by osdep_service.h, so remove the redundant definition from ieee80211.h.

osdep_service.h:33:#include <linux/etherdevice.h>
etherdevice.h:25:#include <linux/if_ether.h>

---
 drivers/staging/rtl8188eu/include/ieee80211.h | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/rtl8188eu/include/ieee80211.h +0 -1
index c60b833ca110..d43aa4304ca5 100644
@@ -14,7 +14,6 @@
 
 #define MGMT_QUEUE_NUM 5
 
-#define ETH_ALEN	6
 #define ETH_TYPE_LEN		2
 #define PAYLOAD_TYPE_LEN	1
 
Signature · 1 line
2.21.0
#1 lore raw

PATCH 2/2 staging: rtl8188eu: remove unused definitions from ieee80211.h

MGMT_QUEUE_NUM, ETH_TYPE_LEN and PAYLOAD_TYPE_LEN are defined but not used in the driver code, so remove them.

---
 drivers/staging/rtl8188eu/include/ieee80211.h | 5 -----
 1 file changed, 5 deletions(-)
drivers/staging/rtl8188eu/include/ieee80211.h +0 -5
index d43aa4304ca5..42ee4ebe90eb 100644
@@ -12,11 +12,6 @@
 #include "wifi.h"
 #include <linux/wireless.h>
 
-#define MGMT_QUEUE_NUM 5
-
-#define ETH_TYPE_LEN		2
-#define PAYLOAD_TYPE_LEN	1
-
 #ifdef CONFIG_88EU_AP_MODE
 
 #define RTL_IOCTL_HOSTAPD (SIOCIWFIRSTPRIV + 28)
Signature · 1 line
2.21.0
#2 lore raw
In reply to Michael Straube
Quoted 2 lines · Michael Straube

ETH_ALEN is defined in linux/if_ether.h which is included by osdep_service.h, so remove the redundant definition from ieee80211.h.

[]

drivers/staging/rtl8188eu/include/ieee80211.h

Quoted 1 line
drivers/staging/rtl8188eu/include/ieee80211.h +0 -0

[]

drivers/staging/rtl8188eu/include/ieee80211.h line 18

Quoted 7 lines
drivers/staging/rtl8188eu/include/ieee80211.h +0 -1
@@ -14,7 +14,6 @@
 
 #define MGMT_QUEUE_NUM 5
 
-#define ETH_ALEN	6
 #define ETH_TYPE_LEN		2
 #define PAYLOAD_TYPE_LEN	1

While you're at it:

neither ETH_TYPE_LEN nor PAYLOAD_TYPE_LEN appear to be used.

#3 lore raw
Quoted 10 lines · Joe Perches
Quoted 2 lines · Michael Straube

ETH_ALEN is defined in linux/if_ether.h which is included by osdep_service.h, so remove the redundant definition from ieee80211.h.

[]

drivers/staging/rtl8188eu/include/ieee80211.h

Quoted 1 line
drivers/staging/rtl8188eu/include/ieee80211.h +0 -0

[]

Quoted 4 lines
drivers/staging/rtl8188eu/include/ieee80211.h +0 -0
@@ -14,7 +14,6 @@
 
  #define MGMT_QUEUE_NUM 5
 
Quoted 9 lines

drivers/staging/rtl8188eu/include/ieee80211.h line 18

Quoted 3 lines
drivers/staging/rtl8188eu/include/ieee80211.h +0 -1
-#define ETH_ALEN	6
  #define ETH_TYPE_LEN		2
  #define PAYLOAD_TYPE_LEN	1

While you're at it:

neither ETH_TYPE_LEN nor PAYLOAD_TYPE_LEN appear to be used.

They are removed in the second patch of the series.