mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 02:31:27 +02:00
staging: rtl8723bs: Replace network magic numbers with EtherType macros
Replace hardcoded magic numbers for network protocols (e.g., 0x0806 for ARP, 0x888e for EAPOL) with their standard EtherType macro equivalents (ETH_P_ARP, ETH_P_PAE) defined in <linux/if_ether.h>. This change improves code readability and aligns the driver with standard Linux networking definitions. Signed-off-by: Marcos Andrade <marcosandrade95963@gmail.com> Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260316221924.4904-2-marcosandrade95963@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
97eef87a54
commit
9b17baf171
|
|
@ -5,6 +5,7 @@
|
|||
*
|
||||
******************************************************************************/
|
||||
#include <drv_types.h>
|
||||
#include <linux/if_ether.h>
|
||||
|
||||
static u8 P802_1H_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 };
|
||||
static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 };
|
||||
|
|
@ -2026,8 +2027,8 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
|
|||
if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_SPECIAL) {
|
||||
struct pkt_attrib *attrib = &xmitframe->attrib;
|
||||
|
||||
if (attrib->ether_type == 0x0806 ||
|
||||
attrib->ether_type == 0x888e ||
|
||||
if (attrib->ether_type == ETH_P_ARP ||
|
||||
attrib->ether_type == ETH_P_PAE ||
|
||||
attrib->dhcp_pkt
|
||||
)
|
||||
allow = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user