Commit 93854e4d authored by Nikolay Kulikov's avatar Nikolay Kulikov Committed by Greg Kroah-Hartman
Browse files

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: default avatarNikolay Kulikov <nikolayof23@gmail.com>
Link: https://patch.msgid.link/20260323150650.7168-5-nikolayof23@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4fa02e83
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ u8 rtw_validate_bssid(u8 *bssid)
{
	u8 ret = true;

	if (is_zero_mac_addr(bssid) ||
	if (is_zero_ether_addr(bssid) ||
	    is_broadcast_mac_addr(bssid) ||
	    is_multicast_mac_addr(bssid))
		ret = false;
+1 −1
Original line number Diff line number Diff line
@@ -1675,7 +1675,7 @@ static int rtw_check_roaming_candidate(struct mlme_priv *mlme
		goto exit;

	/* got specific addr to roam */
	if (!is_zero_mac_addr(mlme->roam_tgt_addr)) {
	if (!is_zero_ether_addr(mlme->roam_tgt_addr)) {
		if (!memcmp(mlme->roam_tgt_addr, competitor->network.mac_address, ETH_ALEN))
			goto update;
		else
+0 −6
Original line number Diff line number Diff line
@@ -518,12 +518,6 @@ static inline int is_broadcast_mac_addr(const u8 *addr)
		(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}

static inline int is_zero_mac_addr(const u8 *addr)
{
	return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) &&   \
		(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
}

#define CFG_IEEE80211_RESERVE_FCS (1<<0)
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)