Skip to content

Commit 2541d18

Browse files
nikolayof12gregkh
authored andcommitted
staging: rtl8723bs: remove custom is_multicast_mac_addr() function
is_multicast_mac_addr() is redundant reimplementation of standard is_multicast_ether_addr() func. Remove it and switch to use is_multicast_ether_addr(). Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com> Link: https://patch.msgid.link/20260323150650.7168-7-nikolayof23@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1ee6776 commit 2541d18

3 files changed

Lines changed: 2 additions & 7 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
@@ -13,7 +13,7 @@ u8 rtw_validate_bssid(u8 *bssid)
1313

1414
if (is_zero_ether_addr(bssid) ||
1515
is_broadcast_ether_addr(bssid) ||
16-
is_multicast_mac_addr(bssid))
16+
is_multicast_ether_addr(bssid))
1717
ret = false;
1818

1919
return ret;

drivers/staging/rtl8723bs/core/rtw_recv.c

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

drivers/staging/rtl8723bs/include/ieee80211.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -507,11 +507,6 @@ Total: 28-2340 bytes
507507
#define DEFAULT_FTS 2346
508508
#define IP_ARG(x) (x)
509509

510-
static inline int is_multicast_mac_addr(const u8 *addr)
511-
{
512-
return ((addr[0] != 0xff) && (0x01 & addr[0]));
513-
}
514-
515510
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
516511
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
517512

0 commit comments

Comments
 (0)