Skip to content

Commit 1ee6776

Browse files
nikolayof12gregkh
authored andcommitted
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>
1 parent 93854e4 commit 1ee6776

4 files changed

Lines changed: 4 additions & 10 deletions

File tree

drivers/staging/rtl8723bs/core/rtw_ioctl_set.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ u8 rtw_validate_bssid(u8 *bssid)
1212
u8 ret = true;
1313

1414
if (is_zero_ether_addr(bssid) ||
15-
is_broadcast_mac_addr(bssid) ||
15+
is_broadcast_ether_addr(bssid) ||
1616
is_multicast_mac_addr(bssid))
1717
ret = false;
1818

drivers/staging/rtl8723bs/core/rtw_recv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ static signed int validate_recv_mgnt_frame(struct adapter *padapter, union recv_
12741274
GetAddr1Ptr(precv_frame->u.hdr.rx_data),
12751275
ETH_ALEN))
12761276
psta->sta_stats.rx_probersp_pkts++;
1277-
else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)) ||
1277+
else if (is_broadcast_ether_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)) ||
12781278
is_multicast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)))
12791279
psta->sta_stats.rx_probersp_bm_pkts++;
12801280
else

drivers/staging/rtl8723bs/core/rtw_security.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
531531
if (start == 0)
532532
start = jiffies;
533533

534-
if (is_broadcast_mac_addr(prxattrib->ra))
534+
if (is_broadcast_ether_addr(prxattrib->ra))
535535
no_gkey_bc_cnt++;
536536
else
537537
no_gkey_mc_cnt++;
@@ -1225,7 +1225,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
12251225
if (start == 0)
12261226
start = jiffies;
12271227

1228-
if (is_broadcast_mac_addr(prxattrib->ra))
1228+
if (is_broadcast_ether_addr(prxattrib->ra))
12291229
no_gkey_bc_cnt++;
12301230
else
12311231
no_gkey_mc_cnt++;

drivers/staging/rtl8723bs/include/ieee80211.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -512,12 +512,6 @@ static inline int is_multicast_mac_addr(const u8 *addr)
512512
return ((addr[0] != 0xff) && (0x01 & addr[0]));
513513
}
514514

515-
static inline int is_broadcast_mac_addr(const u8 *addr)
516-
{
517-
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
518-
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
519-
}
520-
521515
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
522516
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
523517

0 commit comments

Comments
 (0)