use eth_broadcast_addr() to assign broadcast address

Using eth_broadcast_addr() to assign broadcast address instead
of copying from an array that contains the all-ones broadcast
address

Port 78adf574c969c14a470b686af8d6bd7e1dcf142b
Port 3b0a4a1bdb0f6348dba797a0fa1cf161f5639ded
Port 44c26bec861476f89ac5aee0bb19df128a42543b

Link: https://lore.kernel.org/r/20210616081243.2511663-4-yangyingliang@huawei.com
This commit is contained in:
Carlos Garces
2021-10-20 19:02:50 +02:00
parent 77e7d6747c
commit 27246f4eb5
6 changed files with 15 additions and 27 deletions

View File

@@ -984,8 +984,6 @@ exit:
static void rtw_hal_construct_CTS(PADAPTER padapter, u8 *pframe, u32 *pLength)
{
u8 broadcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
/* frame type, length = 1*/
set_frame_sub_type(pframe, WIFI_RTS);
@@ -997,7 +995,7 @@ static void rtw_hal_construct_CTS(PADAPTER padapter, u8 *pframe, u32 *pLength)
*(pframe + 3) = 0x78;
/* frame recvaddr, length = 6 */
memcpy((pframe + 4), broadcast_addr, ETH_ALEN);
eth_broadcast_addr((pframe + 4));
memcpy((pframe + 4 + ETH_ALEN), adapter_mac_addr(padapter), ETH_ALEN);
memcpy((pframe + 4 + ETH_ALEN*2), adapter_mac_addr(padapter), ETH_ALEN);
*pLength = 22;