Skip to content

Commit 93854e4

Browse files
nikolayof12gregkh
authored andcommitted
staging: rtl8723bs: remove custom is_zero_mac_addr() function
Remove the custom function is_zero_mac_addr() and replace all calls to it with the default kernel function is_zero_ether_addr() to avoid duplicating existing code. Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com> Link: https://patch.msgid.link/20260323150650.7168-5-nikolayof23@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4fa02e8 commit 93854e4

3 files changed

Lines changed: 2 additions & 8 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
@@ -11,7 +11,7 @@ u8 rtw_validate_bssid(u8 *bssid)
1111
{
1212
u8 ret = true;
1313

14-
if (is_zero_mac_addr(bssid) ||
14+
if (is_zero_ether_addr(bssid) ||
1515
is_broadcast_mac_addr(bssid) ||
1616
is_multicast_mac_addr(bssid))
1717
ret = false;

drivers/staging/rtl8723bs/core/rtw_mlme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1675,7 +1675,7 @@ static int rtw_check_roaming_candidate(struct mlme_priv *mlme
16751675
goto exit;
16761676

16771677
/* got specific addr to roam */
1678-
if (!is_zero_mac_addr(mlme->roam_tgt_addr)) {
1678+
if (!is_zero_ether_addr(mlme->roam_tgt_addr)) {
16791679
if (!memcmp(mlme->roam_tgt_addr, competitor->network.mac_address, ETH_ALEN))
16801680
goto update;
16811681
else

drivers/staging/rtl8723bs/include/ieee80211.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -518,12 +518,6 @@ static inline int is_broadcast_mac_addr(const u8 *addr)
518518
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
519519
}
520520

521-
static inline int is_zero_mac_addr(const u8 *addr)
522-
{
523-
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
524-
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
525-
}
526-
527521
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
528522
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
529523

0 commit comments

Comments
 (0)