staging: rtl8723bs: remove custom is_broadcast_mac_addr() function

Replace the custom broadcast address checking function with standard
kernel is_broadcast_ether_addr() func for this.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
Link: https://patch.msgid.link/20260323150650.7168-6-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nikolay Kulikov 2026-03-23 18:06:07 +03:00 committed by Greg Kroah-Hartman
parent 93854e4dd5
commit 1ee6776345
4 changed files with 4 additions and 10 deletions

View File

@ -12,7 +12,7 @@ u8 rtw_validate_bssid(u8 *bssid)
u8 ret = true;
if (is_zero_ether_addr(bssid) ||
is_broadcast_mac_addr(bssid) ||
is_broadcast_ether_addr(bssid) ||
is_multicast_mac_addr(bssid))
ret = false;

View File

@ -1274,7 +1274,7 @@ static signed int validate_recv_mgnt_frame(struct adapter *padapter, union recv_
GetAddr1Ptr(precv_frame->u.hdr.rx_data),
ETH_ALEN))
psta->sta_stats.rx_probersp_pkts++;
else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)) ||
else if (is_broadcast_ether_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)) ||
is_multicast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)))
psta->sta_stats.rx_probersp_bm_pkts++;
else

View File

@ -531,7 +531,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
if (start == 0)
start = jiffies;
if (is_broadcast_mac_addr(prxattrib->ra))
if (is_broadcast_ether_addr(prxattrib->ra))
no_gkey_bc_cnt++;
else
no_gkey_mc_cnt++;
@ -1225,7 +1225,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
if (start == 0)
start = jiffies;
if (is_broadcast_mac_addr(prxattrib->ra))
if (is_broadcast_ether_addr(prxattrib->ra))
no_gkey_bc_cnt++;
else
no_gkey_mc_cnt++;

View File

@ -512,12 +512,6 @@ static inline int is_multicast_mac_addr(const u8 *addr)
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}
static inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)