Michael Straube 2021-08-23 14:01:00 +02:00 committed by Carlos Garces
parent 3cfc5c26b4
commit 60aa279428
18 changed files with 73 additions and 81 deletions

View File

@ -3326,7 +3326,7 @@ int rtw_mesh_addr_resolve(_adapter *adapter, struct xmit_frame *xframe, _pkt *pk
struct ethhdr etherhdr; struct ethhdr etherhdr;
struct pkt_attrib *attrib; struct pkt_attrib *attrib;
struct rtw_mesh_path *mpath = NULL, *mppath = NULL; struct rtw_mesh_path *mpath = NULL, *mppath = NULL;
u8 is_da_mcast; bool is_da_mcast;
u8 ae_need; u8 ae_need;
#if CONFIG_RTW_MESH_DATA_BMC_TO_UC #if CONFIG_RTW_MESH_DATA_BMC_TO_UC
bool bmc_need = _TRUE; bool bmc_need = _TRUE;
@ -3346,7 +3346,7 @@ int rtw_mesh_addr_resolve(_adapter *adapter, struct xmit_frame *xframe, _pkt *pk
_rtw_init_listhead(b2u_list); _rtw_init_listhead(b2u_list);
#endif #endif
is_da_mcast = IS_MCAST(etherhdr.h_dest); is_da_mcast = is_multicast_ether_addr(etherhdr.h_dest);
if (!is_da_mcast) { if (!is_da_mcast) {
struct sta_info *next_hop; struct sta_info *next_hop;
bool mpp_lookup = 1; bool mpp_lookup = 1;
@ -3560,7 +3560,7 @@ int rtw_mesh_rx_data_validate_hdr(_adapter *adapter, union recv_frame *rframe, s
switch (rattrib->to_fr_ds) { switch (rattrib->to_fr_ds) {
case 1: case 1:
if (!IS_MCAST(GetAddr1Ptr(whdr))) if (!is_multicast_ether_addr(GetAddr1Ptr(whdr)))
goto exit; goto exit;
*sta = rtw_get_stainfo(stapriv, get_addr2_ptr(whdr)); *sta = rtw_get_stainfo(stapriv, get_addr2_ptr(whdr));
if (*sta == NULL) { if (*sta == NULL) {
@ -3577,7 +3577,7 @@ int rtw_mesh_rx_data_validate_hdr(_adapter *adapter, union recv_frame *rframe, s
is_ra_bmc = 1; is_ra_bmc = 1;
break; break;
case 3: case 3:
if (IS_MCAST(GetAddr1Ptr(whdr))) if (is_multicast_ether_addr(GetAddr1Ptr(whdr)))
goto exit; goto exit;
*sta = rtw_get_stainfo(stapriv, get_addr2_ptr(whdr)); *sta = rtw_get_stainfo(stapriv, get_addr2_ptr(whdr));
if (*sta == NULL) { if (*sta == NULL) {
@ -3764,7 +3764,7 @@ int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe
struct rtw_mesh_info *minfo = &adapter->mesh_info; struct rtw_mesh_info *minfo = &adapter->mesh_info;
struct rx_pkt_attrib *rattrib = &rframe->u.hdr.attrib; struct rx_pkt_attrib *rattrib = &rframe->u.hdr.attrib;
struct rtw_mesh_path *mppath; struct rtw_mesh_path *mppath;
u8 is_mda_bmc = IS_MCAST(mda); bool is_mda_bmc = is_multicast_ether_addr(mda);
u8 is_mda_self = !is_mda_bmc && _rtw_memcmp(mda, adapter_mac_addr(adapter), ETH_ALEN); u8 is_mda_self = !is_mda_bmc && _rtw_memcmp(mda, adapter_mac_addr(adapter), ETH_ALEN);
struct xmit_frame *xframe; struct xmit_frame *xframe;
struct pkt_attrib *xattrib; struct pkt_attrib *xattrib;

View File

@ -5733,7 +5733,7 @@ ssize_t proc_set_tx_sa_query(struct file *file, const char __user *buffer, size_
for (index = 0; index < macid_ctl->num && index < NUM_STA; index++) { for (index = 0; index < macid_ctl->num && index < NUM_STA; index++) {
if (rtw_macid_is_used(macid_ctl, index) && !rtw_macid_is_bmc(macid_ctl, index)) { if (rtw_macid_is_used(macid_ctl, index) && !rtw_macid_is_bmc(macid_ctl, index)) {
if (!_rtw_memcmp(get_my_bssid(&(pmlmeinfo->network)), &mac_addr[index][0], ETH_ALEN) if (!_rtw_memcmp(get_my_bssid(&(pmlmeinfo->network)), &mac_addr[index][0], ETH_ALEN)
&& !IS_MCAST(&mac_addr[index][0])) { && !is_multicast_ether_addr(&mac_addr[index][0])) {
issue_action_SA_Query(padapter, &mac_addr[index][0], 0, 0, (u8)key_type); issue_action_SA_Query(padapter, &mac_addr[index][0], 0, 0, (u8)key_type);
RTW_INFO("STA[%u]:"MAC_FMT"\n", index , MAC_ARG(&mac_addr[index][0])); RTW_INFO("STA[%u]:"MAC_FMT"\n", index , MAC_ARG(&mac_addr[index][0]));
} }

View File

@ -5048,10 +5048,9 @@ void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe)
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
struct ht_priv *phtpriv; struct ht_priv *phtpriv;
struct pkt_attrib *pattrib = &pxmitframe->attrib; struct pkt_attrib *pattrib = &pxmitframe->attrib;
s32 bmcst = IS_MCAST(pattrib->ra);
/* if(bmcst || (padapter->mlmepriv.LinkDetectInfo.bTxBusyTraffic == _FALSE)) */ /* if(bmcst || (padapter->mlmepriv.LinkDetectInfo.bTxBusyTraffic == _FALSE)) */
if (bmcst || (padapter->mlmepriv.LinkDetectInfo.NumTxOkInPeriod < 100)) if (is_multicast_ether_addr(pattrib->ra) || (padapter->mlmepriv.LinkDetectInfo.NumTxOkInPeriod < 100))
return; return;
priority = pattrib->priority; priority = pattrib->priority;

View File

@ -1474,12 +1474,13 @@ void fill_tx_desc_8188e(PADAPTER padapter)
struct tx_desc *desc = (struct tx_desc *)&(pmp_priv->tx.desc); struct tx_desc *desc = (struct tx_desc *)&(pmp_priv->tx.desc);
struct pkt_attrib *pattrib = &(pmp_priv->tx.attrib); struct pkt_attrib *pattrib = &(pmp_priv->tx.attrib);
u32 pkt_size = pattrib->last_txcmdsz; u32 pkt_size = pattrib->last_txcmdsz;
s32 bmcast = IS_MCAST(pattrib->ra); bool bmcast;
/* offset 0 */ /* offset 0 */
#if !defined(CONFIG_RTL8188E_SDIO) && !defined(CONFIG_PCI_HCI) #if !defined(CONFIG_RTL8188E_SDIO) && !defined(CONFIG_PCI_HCI)
desc->txdw0 |= cpu_to_le32(OWN | FSG | LSG); desc->txdw0 |= cpu_to_le32(OWN | FSG | LSG);
desc->txdw0 |= cpu_to_le32(pkt_size & 0x0000FFFF); /* packet size */ desc->txdw0 |= cpu_to_le32(pkt_size & 0x0000FFFF); /* packet size */
desc->txdw0 |= cpu_to_le32(((TXDESC_SIZE + OFFSET_SZ) << OFFSET_SHT) & 0x00FF0000); /* 32 bytes for TX Desc */ desc->txdw0 |= cpu_to_le32(((TXDESC_SIZE + OFFSET_SZ) << OFFSET_SHT) & 0x00FF0000); /* 32 bytes for TX Desc */
bmcast = is_multicast_ether_addr(pattrib->ra);
if (bmcast) if (bmcast)
desc->txdw0 |= cpu_to_le32(BMC); /* broadcast packet */ desc->txdw0 |= cpu_to_le32(BMC); /* broadcast packet */
@ -1529,7 +1530,7 @@ void fill_tx_desc_8814a(PADAPTER padapter)
struct pkt_attrib *pattrib = &(pmp_priv->tx.attrib); struct pkt_attrib *pattrib = &(pmp_priv->tx.attrib);
u32 pkt_size = pattrib->last_txcmdsz; u32 pkt_size = pattrib->last_txcmdsz;
s32 bmcast = IS_MCAST(pattrib->ra); bool bmcast;
u8 offset; u8 offset;
/* SET_TX_DESC_FIRST_SEG_8814A(pDesc, 1); */ /* SET_TX_DESC_FIRST_SEG_8814A(pDesc, 1); */
@ -1546,7 +1547,7 @@ void fill_tx_desc_8814a(PADAPTER padapter)
#else #else
SET_TX_DESC_PKT_OFFSET_8814A(pDesc, 1); SET_TX_DESC_PKT_OFFSET_8814A(pDesc, 1);
#endif #endif
bmcast = is_multicast_ether_addr(pattrib->ra);
if (bmcast) if (bmcast)
SET_TX_DESC_BMC_8814A(pDesc, 1); SET_TX_DESC_BMC_8814A(pDesc, 1);
@ -1587,7 +1588,7 @@ void fill_tx_desc_8812a(PADAPTER padapter)
struct pkt_attrib *pattrib = &(pmp_priv->tx.attrib); struct pkt_attrib *pattrib = &(pmp_priv->tx.attrib);
u32 pkt_size = pattrib->last_txcmdsz; u32 pkt_size = pattrib->last_txcmdsz;
s32 bmcast = IS_MCAST(pattrib->ra); bool bmcast;
u8 data_rate, pwr_status, offset; u8 data_rate, pwr_status, offset;
SET_TX_DESC_FIRST_SEG_8812(pDesc, 1); SET_TX_DESC_FIRST_SEG_8812(pDesc, 1);
@ -1605,6 +1606,7 @@ void fill_tx_desc_8812a(PADAPTER padapter)
#else #else
SET_TX_DESC_PKT_OFFSET_8812(pDesc, 1); SET_TX_DESC_PKT_OFFSET_8812(pDesc, 1);
#endif #endif
bmcast = is_multicast_ether_addr(pattrib->ra);
if (bmcast) if (bmcast)
SET_TX_DESC_BMC_8812(pDesc, 1); SET_TX_DESC_BMC_8812(pDesc, 1);
@ -1641,7 +1643,7 @@ void fill_tx_desc_8192e(PADAPTER padapter)
struct pkt_attrib *pattrib = &(pmp_priv->tx.attrib); struct pkt_attrib *pattrib = &(pmp_priv->tx.attrib);
u32 pkt_size = pattrib->last_txcmdsz; u32 pkt_size = pattrib->last_txcmdsz;
s32 bmcast = IS_MCAST(pattrib->ra); bool bmcast;
u8 data_rate, pwr_status, offset; u8 data_rate, pwr_status, offset;
@ -1656,7 +1658,7 @@ void fill_tx_desc_8192e(PADAPTER padapter)
#else /* 8192EU 8192ES */ #else /* 8192EU 8192ES */
SET_TX_DESC_PKT_OFFSET_92E(pDesc, 1); SET_TX_DESC_PKT_OFFSET_92E(pDesc, 1);
#endif #endif
bmcast = is_multicast_ether_addr(pattrib->ra);
if (bmcast) if (bmcast)
SET_TX_DESC_BMC_92E(pDesc, 1); SET_TX_DESC_BMC_92E(pDesc, 1);
@ -1932,7 +1934,7 @@ void SetPacketTx(PADAPTER padapter)
u32 pkt_size, i; u32 pkt_size, i;
struct rtw_ieee80211_hdr *hdr; struct rtw_ieee80211_hdr *hdr;
u8 payload; u8 payload;
s32 bmcast; bool bmcast;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct mp_priv *pmp_priv; struct mp_priv *pmp_priv;
@ -1949,7 +1951,7 @@ void SetPacketTx(PADAPTER padapter)
memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN); memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN);
memcpy(pattrib->ta, pattrib->src, ETH_ALEN); memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
bmcast = IS_MCAST(pattrib->ra); bmcast = is_multicast_ether_addr(pattrib->ra);
if (bmcast) if (bmcast)
pattrib->psta = rtw_get_bcmc_stainfo(padapter); pattrib->psta = rtw_get_bcmc_stainfo(padapter);
else else

View File

@ -2418,7 +2418,7 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
pattrib->nr_frags = 1; pattrib->nr_frags = 1;
pattrib->priority = 0; pattrib->priority = 0;
#ifndef CONFIG_MP_LINUX #ifndef CONFIG_MP_LINUX
if (IS_MCAST(pethhdr->h_dest)) if (is_multicast_ether_addr(pethhdr->h_dest))
pattrib->mac_id = 4; pattrib->mac_id = 4;
else else
pattrib->mac_id = 5; pattrib->mac_id = 5;

View File

@ -485,7 +485,7 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe)
/* calculate mic code */ /* calculate mic code */
if (stainfo != NULL) { if (stainfo != NULL) {
if (IS_MCAST(prxattrib->ra)) { if (is_multicast_ether_addr(prxattrib->ra)) {
/* mickey=&psecuritypriv->dot118021XGrprxmickey.skey[0]; */ /* mickey=&psecuritypriv->dot118021XGrprxmickey.skey[0]; */
/* iv = precvframe->u.hdr.rx_data+prxattrib->hdrlen; */ /* iv = precvframe->u.hdr.rx_data+prxattrib->hdrlen; */
/* rxdata_key_idx =( ((iv[3])>>6)&0x3) ; */ /* rxdata_key_idx =( ((iv[3])>>6)&0x3) ; */
@ -529,11 +529,11 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe)
/* double check key_index for some timing issue , */ /* double check key_index for some timing issue , */
/* cannot compare with psecuritypriv->dot118021XGrpKeyid also cause timing issue */ /* cannot compare with psecuritypriv->dot118021XGrpKeyid also cause timing issue */
if ((IS_MCAST(prxattrib->ra) == _TRUE) && (prxattrib->key_index != pmlmeinfo->key_index)) if ((is_multicast_ether_addr(prxattrib->ra) == _TRUE) && (prxattrib->key_index != pmlmeinfo->key_index))
brpt_micerror = _FALSE; brpt_micerror = _FALSE;
if ((prxattrib->bdecrypted == _TRUE) && (brpt_micerror == _TRUE)) { if ((prxattrib->bdecrypted == _TRUE) && (brpt_micerror == _TRUE)) {
rtw_handle_tkip_mic_err(adapter, stainfo, (u8)IS_MCAST(prxattrib->ra)); rtw_handle_tkip_mic_err(adapter, stainfo, (u8)is_multicast_ether_addr(prxattrib->ra));
RTW_INFO(" mic error :prxattrib->bdecrypted=%d\n", prxattrib->bdecrypted); RTW_INFO(" mic error :prxattrib->bdecrypted=%d\n", prxattrib->bdecrypted);
} else { } else {
RTW_INFO(" mic error :prxattrib->bdecrypted=%d\n", prxattrib->bdecrypted); RTW_INFO(" mic error :prxattrib->bdecrypted=%d\n", prxattrib->bdecrypted);
@ -543,7 +543,7 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe)
} else { } else {
/* mic checked ok */ /* mic checked ok */
if ((psecuritypriv->bcheck_grpkey == _FALSE) && (IS_MCAST(prxattrib->ra) == _TRUE)) { if ((psecuritypriv->bcheck_grpkey == _FALSE) && (is_multicast_ether_addr(prxattrib->ra) == _TRUE)) {
psecuritypriv->bcheck_grpkey = _TRUE; psecuritypriv->bcheck_grpkey = _TRUE;
} }
} }
@ -601,7 +601,7 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame)
if (prxattrib->encrypt && !prxattrib->bdecrypted) { if (prxattrib->encrypt && !prxattrib->bdecrypted) {
if (GetFrameType(get_recvframe_data(precv_frame)) == WIFI_DATA if (GetFrameType(get_recvframe_data(precv_frame)) == WIFI_DATA
#ifdef CONFIG_CONCURRENT_MODE #ifdef CONFIG_CONCURRENT_MODE
&& !IS_MCAST(prxattrib->ra) /* bc/mc packets may use sw decryption for concurrent mode */ && !is_multicast_ether_addr(prxattrib->ra) /* bc/mc packets may use sw decryption for concurrent mode */
#endif #endif
) )
psecuritypriv->hw_decrypted = _FALSE; psecuritypriv->hw_decrypted = _FALSE;
@ -859,12 +859,12 @@ sint recv_decache(union recv_frame *precv_frame)
return _FAIL; return _FAIL;
if (pattrib->qos) { if (pattrib->qos) {
if (IS_MCAST(pattrib->ra)) if (is_multicast_ether_addr(pattrib->ra))
prxseq = &psta->sta_recvpriv.bmc_tid_rxseq[tid]; prxseq = &psta->sta_recvpriv.bmc_tid_rxseq[tid];
else else
prxseq = &psta->sta_recvpriv.rxcache.tid_rxseq[tid]; prxseq = &psta->sta_recvpriv.rxcache.tid_rxseq[tid];
} else { } else {
if (IS_MCAST(pattrib->ra)) { if (is_multicast_ether_addr(pattrib->ra)) {
prxseq = &psta->sta_recvpriv.nonqos_bmc_rxseq; prxseq = &psta->sta_recvpriv.nonqos_bmc_rxseq;
#ifdef DBG_RX_SEQ #ifdef DBG_RX_SEQ
RTW_INFO("DBG_RX_SEQ "FUNC_ADPT_FMT" nonqos bmc seq_num:%d\n" RTW_INFO("DBG_RX_SEQ "FUNC_ADPT_FMT" nonqos bmc seq_num:%d\n"
@ -1113,7 +1113,7 @@ void count_rx_stats(_adapter *padapter, union recv_frame *prframe, struct sta_in
padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++; padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++;
if (!is_broadcast_ether_addr(pattrib->dst) && !IS_MCAST(pattrib->dst)) if (!is_broadcast_ether_addr(pattrib->dst) && !is_multicast_ether_addr(pattrib->dst))
padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++; padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++;
if (sta) if (sta)
@ -1122,7 +1122,7 @@ void count_rx_stats(_adapter *padapter, union recv_frame *prframe, struct sta_in
psta = prframe->u.hdr.psta; psta = prframe->u.hdr.psta;
if (psta) { if (psta) {
u8 is_ra_bmc = IS_MCAST(pattrib->ra); u8 is_ra_bmc = is_multicast_ether_addr(pattrib->ra);
pstats = &psta->sta_stats; pstats = &psta->sta_stats;
@ -1175,7 +1175,7 @@ sint sta2sta_data_frame(
u8 *mybssid = get_bssid(pmlmepriv); u8 *mybssid = get_bssid(pmlmepriv);
u8 *myhwaddr = adapter_mac_addr(adapter); u8 *myhwaddr = adapter_mac_addr(adapter);
u8 *sta_addr = pattrib->ta; u8 *sta_addr = pattrib->ta;
sint bmcast = IS_MCAST(pattrib->dst); sint bmcast = is_multicast_ether_addr(pattrib->dst);
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
struct tdls_info *ptdlsinfo = &adapter->tdlsinfo; struct tdls_info *ptdlsinfo = &adapter->tdlsinfo;
@ -1296,7 +1296,7 @@ sint sta2sta_data_frame(
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) {
if (bmcast) { if (bmcast) {
/* For AP mode, if DA == MCAST, then BSSID should be also MCAST */ /* For AP mode, if DA == MCAST, then BSSID should be also MCAST */
if (!IS_MCAST(pattrib->bssid)) { if (!is_multicast_ether_addr(pattrib->bssid)) {
ret = _FAIL; ret = _FAIL;
goto exit; goto exit;
} }
@ -1352,7 +1352,7 @@ sint ap2sta_data_frame(
struct mlme_priv *pmlmepriv = &adapter->mlmepriv; struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
u8 *mybssid = get_bssid(pmlmepriv); u8 *mybssid = get_bssid(pmlmepriv);
u8 *myhwaddr = adapter_mac_addr(adapter); u8 *myhwaddr = adapter_mac_addr(adapter);
sint bmcast = IS_MCAST(pattrib->dst); sint bmcast = is_multicast_ether_addr(pattrib->dst);
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE) if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
@ -1758,7 +1758,7 @@ static sint validate_mgmt_protect(_adapter *adapter, union recv_frame *precv_fra
ptr = precv_frame->u.hdr.rx_data; ptr = precv_frame->u.hdr.rx_data;
type = GetFrameType(ptr); type = GetFrameType(ptr);
subtype = get_frame_sub_type(ptr); /* bit(7)~bit(2) */ subtype = get_frame_sub_type(ptr); /* bit(7)~bit(2) */
is_bmc = IS_MCAST(GetAddr1Ptr(ptr)); is_bmc = is_multicast_ether_addr(GetAddr1Ptr(ptr));
#if DBG_VALIDATE_MGMT_PROTECT #if DBG_VALIDATE_MGMT_PROTECT
if (subtype == WIFI_DEAUTH) { if (subtype == WIFI_DEAUTH) {
@ -2153,7 +2153,7 @@ pre_validate_status_chk:
if (ret == _FAIL) if (ret == _FAIL)
goto exit; goto exit;
if (!IS_MCAST(pattrib->ra)) { if (!is_multicast_ether_addr(pattrib->ra)) {
if (pattrib->qos) if (pattrib->qos)
precv_frame->u.hdr.preorder_ctrl = &psta->recvreorder_ctrl[pattrib->priority]; precv_frame->u.hdr.preorder_ctrl = &psta->recvreorder_ctrl[pattrib->priority];
@ -2183,7 +2183,7 @@ pre_validate_status_chk:
pattrib->encrypt = psta->dot118021XPrivacy; pattrib->encrypt = psta->dot118021XPrivacy;
else else
#endif /* CONFIG_TDLS */ #endif /* CONFIG_TDLS */
GET_ENCRY_ALGO(psecuritypriv, psta, pattrib->encrypt, IS_MCAST(pattrib->ra)); GET_ENCRY_ALGO(psecuritypriv, psta, pattrib->encrypt, is_multicast_ether_addr(pattrib->ra));
SET_ICE_IV_LEN(pattrib->iv_len, pattrib->icv_len, pattrib->encrypt); SET_ICE_IV_LEN(pattrib->iv_len, pattrib->icv_len, pattrib->encrypt);
@ -4341,7 +4341,7 @@ int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe)
} }
#ifdef DBG_RX_BMC_FRAME #ifdef DBG_RX_BMC_FRAME
if (IS_MCAST(pattrib->ra)) if (is_multicast_ether_addr(pattrib->ra))
RTW_INFO("%s =>"ADPT_FMT" Rx BC/MC from "MAC_FMT"\n", __func__, ADPT_ARG(padapter), MAC_ARG(pattrib->ta)); RTW_INFO("%s =>"ADPT_FMT" Rx BC/MC from "MAC_FMT"\n", __func__, ADPT_ARG(padapter), MAC_ARG(pattrib->ta));
#endif #endif
@ -4478,7 +4478,7 @@ int recv_func(_adapter *padapter, union recv_frame *rframe)
/* check if need to enqueue into uc_swdec_pending_queue*/ /* check if need to enqueue into uc_swdec_pending_queue*/
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && if (check_fwstate(mlmepriv, WIFI_STATION_STATE) &&
!IS_MCAST(prxattrib->ra) && prxattrib->encrypt > 0 && !is_multicast_ether_addr(prxattrib->ra) && prxattrib->encrypt > 0 &&
(prxattrib->bdecrypted == 0 || psecuritypriv->sw_decrypt == _TRUE) && (prxattrib->bdecrypted == 0 || psecuritypriv->sw_decrypt == _TRUE) &&
psecuritypriv->ndisauthtype == Ndis802_11AuthModeWPAPSK && psecuritypriv->ndisauthtype == Ndis802_11AuthModeWPAPSK &&
!psecuritypriv->busetkipkey) { !psecuritypriv->busetkipkey) {
@ -4787,7 +4787,7 @@ void rx_query_phy_status(
ta = get_ta(wlanhdr); ta = get_ta(wlanhdr);
ra = get_ra(wlanhdr); ra = get_ra(wlanhdr);
is_ra_bmc = IS_MCAST(ra); is_ra_bmc = is_multicast_ether_addr(ra);
if (_rtw_memcmp(adapter_mac_addr(padapter), ta, ETH_ALEN) == _TRUE) { if (_rtw_memcmp(adapter_mac_addr(padapter), ta, ETH_ALEN) == _TRUE) {
static systime start_time = 0; static systime start_time = 0;
@ -4927,7 +4927,7 @@ s32 pre_recv_entry(union recv_frame *precvframe, u8 *pphy_status)
s32 ret = _SUCCESS; s32 ret = _SUCCESS;
u8 *pbuf = precvframe->u.hdr.rx_data; u8 *pbuf = precvframe->u.hdr.rx_data;
u8 *pda = get_ra(pbuf); u8 *pda = get_ra(pbuf);
u8 ra_is_bmc = IS_MCAST(pda); u8 ra_is_bmc = is_multicast_ether_addr(pda);
_adapter *primary_padapter = precvframe->u.hdr.adapter; _adapter *primary_padapter = precvframe->u.hdr.adapter;
#ifdef CONFIG_CONCURRENT_MODE #ifdef CONFIG_CONCURRENT_MODE
_adapter *iface = NULL; _adapter *iface = NULL;

View File

@ -732,7 +732,7 @@ u32 rtw_tkip_encrypt(_adapter *padapter, u8 *pxmitframe)
} }
*/ */
if (IS_MCAST(pattrib->ra)) if (is_multicast_ether_addr(pattrib->ra))
prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
else { else {
/* prwskey=&stainfo->dot118021x_UncstKey.skey[0]; */ /* prwskey=&stainfo->dot118021x_UncstKey.skey[0]; */
@ -820,7 +820,7 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe)
stainfo = rtw_get_stainfo(&padapter->stapriv , &prxattrib->ta[0]); stainfo = rtw_get_stainfo(&padapter->stapriv , &prxattrib->ta[0]);
if (stainfo != NULL) { if (stainfo != NULL) {
if (IS_MCAST(prxattrib->ra)) { if (is_multicast_ether_addr(prxattrib->ra)) {
static systime start = 0; static systime start = 0;
static u32 no_gkey_bc_cnt = 0; static u32 no_gkey_bc_cnt = 0;
static u32 no_gkey_mc_cnt = 0; static u32 no_gkey_mc_cnt = 0;
@ -1597,7 +1597,7 @@ u32 rtw_aes_encrypt(_adapter *padapter, u8 *pxmitframe)
} }
*/ */
if (IS_MCAST(pattrib->ra)) if (is_multicast_ether_addr(pattrib->ra))
prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
else { else {
/* prwskey=&stainfo->dot118021x_UncstKey.skey[0]; */ /* prwskey=&stainfo->dot118021x_UncstKey.skey[0]; */
@ -1935,7 +1935,7 @@ u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe)
stainfo = rtw_get_stainfo(&padapter->stapriv , &prxattrib->ta[0]); stainfo = rtw_get_stainfo(&padapter->stapriv , &prxattrib->ta[0]);
if (stainfo != NULL) { if (stainfo != NULL) {
if (IS_MCAST(prxattrib->ra)) { if (is_multicast_ether_addr(prxattrib->ra)) {
static systime start = 0; static systime start = 0;
static u32 no_gkey_bc_cnt = 0; static u32 no_gkey_bc_cnt = 0;
static u32 no_gkey_mc_cnt = 0; static u32 no_gkey_mc_cnt = 0;

View File

@ -859,7 +859,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr)
if (hwaddr == NULL) if (hwaddr == NULL)
return NULL; return NULL;
if (IS_MCAST(hwaddr)) if (is_multicast_ether_addr(hwaddr))
addr = bc_addr; addr = bc_addr;
else else
addr = hwaddr; addr = hwaddr;

View File

@ -1221,7 +1221,7 @@ int issue_tdls_setup_req(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, int wa
if (rtw_tdls_is_setup_allowed(padapter) == _FALSE) if (rtw_tdls_is_setup_allowed(padapter) == _FALSE)
goto exit; goto exit;
if (IS_MCAST(ptxmgmt->peer)) if (is_multicast_ether_addr(ptxmgmt->peer))
goto exit; goto exit;
ptdls_sta = rtw_get_stainfo(pstapriv, ptxmgmt->peer); ptdls_sta = rtw_get_stainfo(pstapriv, ptxmgmt->peer);

View File

@ -512,7 +512,7 @@ u8 rtw_wapi_check_for_drop(
WAPI_TRACE(WAPI_RX, "%s: bFind=%d prxb->WapiSrcAddr="MAC_FMT"\n", __FUNCTION__, bFind, MAC_ARG(precv_hdr->WapiSrcAddr)); WAPI_TRACE(WAPI_RX, "%s: bFind=%d prxb->WapiSrcAddr="MAC_FMT"\n", __FUNCTION__, bFind, MAC_ARG(precv_hdr->WapiSrcAddr));
if (bFind) { if (bFind) {
if (IS_MCAST(precv_hdr->attrib.ra)) { if (is_multicast_ether_addr(precv_hdr->attrib.ra)) {
WAPI_TRACE(WAPI_RX, "rtw_wapi_check_for_drop: multicast case\n"); WAPI_TRACE(WAPI_RX, "rtw_wapi_check_for_drop: multicast case\n");
pLastRecvPN = pWapiSta->lastRxMulticastPN; pLastRecvPN = pWapiSta->lastRxMulticastPN;
} else { } else {
@ -542,7 +542,7 @@ u8 rtw_wapi_check_for_drop(
if (!WapiComparePN(precv_hdr->WapiTempPN, pLastRecvPN)) { if (!WapiComparePN(precv_hdr->WapiTempPN, pLastRecvPN)) {
WAPI_TRACE(WAPI_RX, "%s: Equal PN!!\n", __FUNCTION__); WAPI_TRACE(WAPI_RX, "%s: Equal PN!!\n", __FUNCTION__);
if (IS_MCAST(precv_hdr->attrib.ra)) if (is_multicast_ether_addr(precv_hdr->attrib.ra))
memcpy(pLastRecvPN, WapiAEMultiCastPNInitialValueSrc, 16); memcpy(pLastRecvPN, WapiAEMultiCastPNInitialValueSrc, 16);
else else
memcpy(pLastRecvPN, WapiAEPNInitialValueSrc, 16); memcpy(pLastRecvPN, WapiAEPNInitialValueSrc, 16);
@ -1148,7 +1148,7 @@ void rtw_wapi_get_iv(_adapter *padapter, u8 *pRA, u8 *IV)
WAPI_DATA(WAPI_RX, "wapi_get_iv: pra", pRA, 6); WAPI_DATA(WAPI_RX, "wapi_get_iv: pra", pRA, 6);
if (IS_MCAST(pRA)) { if (is_multicast_ether_addr(pRA)) {
if (!pWapiInfo->wapiTxMsk.bTxEnable) { if (!pWapiInfo->wapiTxMsk.bTxEnable) {
WAPI_TRACE(WAPI_ERR, "%s: bTxEnable = 0!!\n", __FUNCTION__); WAPI_TRACE(WAPI_ERR, "%s: bTxEnable = 0!!\n", __FUNCTION__);
return; return;
@ -1213,7 +1213,7 @@ bool rtw_wapi_drop_for_key_absent(_adapter *padapter, u8 *pRA)
if ((!padapter->WapiSupport) || (!pWapiInfo->bWapiEnable)) if ((!padapter->WapiSupport) || (!pWapiInfo->bWapiEnable))
return true; return true;
if (IS_MCAST(pRA)) { if (is_multicast_ether_addr(pRA)) {
if (!pWapiInfo->wapiTxMsk.bTxEnable) { if (!pWapiInfo->wapiTxMsk.bTxEnable) {
bDrop = true; bDrop = true;
WAPI_TRACE(WAPI_RX, "rtw_wapi_drop_for_key_absent: multicast key is absent\n"); WAPI_TRACE(WAPI_RX, "rtw_wapi_drop_for_key_absent: multicast key is absent\n");

View File

@ -523,7 +523,7 @@ int SecSMS4HeaderFillIV(_adapter *padapter, u8 *pxmitframe)
WAPI_DATA(WAPI_TX, "FillIV - Before Fill IV", pskb->data, pskb->len); WAPI_DATA(WAPI_TX, "FillIV - Before Fill IV", pskb->data, pskb->len);
/* Address 1 is always receiver's address */ /* Address 1 is always receiver's address */
if (IS_MCAST(pRA)) { if (is_multicast_ether_addr(pRA)) {
if (!pWapiInfo->wapiTxMsk.bTxEnable) { if (!pWapiInfo->wapiTxMsk.bTxEnable) {
WAPI_TRACE(WAPI_ERR, "%s: bTxEnable = 0!!\n", __FUNCTION__); WAPI_TRACE(WAPI_ERR, "%s: bTxEnable = 0!!\n", __FUNCTION__);
return -2; return -2;
@ -610,7 +610,7 @@ void SecSWSMS4Encryption(
pRA = pframe + 4; pRA = pframe + 4;
if (IS_MCAST(pRA)) { if (is_multicast_ether_addr(pRA)) {
KeyIdx = pWapiInfo->wapiTxMsk.keyId; KeyIdx = pWapiInfo->wapiTxMsk.keyId;
pIV = pWapiInfo->lastTxMulticastPN; pIV = pWapiInfo->lastTxMulticastPN;
pMicKey = pWapiInfo->wapiTxMsk.micKey; pMicKey = pWapiInfo->wapiTxMsk.micKey;
@ -728,7 +728,7 @@ u8 SecSWSMS4Decryption(
return false; return false;
} }
if (IS_MCAST(pRA)) { if (is_multicast_ether_addr(pRA)) {
WAPI_TRACE(WAPI_RX, "%s: Multicast decryption !!!\n", __FUNCTION__); WAPI_TRACE(WAPI_RX, "%s: Multicast decryption !!!\n", __FUNCTION__);
if (pWapiSta->wapiMsk.keyId == KeyIdx && pWapiSta->wapiMsk.bSet) { if (pWapiSta->wapiMsk.keyId == KeyIdx && pWapiSta->wapiMsk.bSet) {
pLastRxPN = pWapiSta->lastRxMulticastPN; pLastRxPN = pWapiSta->lastRxMulticastPN;
@ -821,7 +821,7 @@ u8 SecSWSMS4Decryption(
WAPI_TRACE(WAPI_RX, "%s: Check MIC OK!!\n", __FUNCTION__); WAPI_TRACE(WAPI_RX, "%s: Check MIC OK!!\n", __FUNCTION__);
if (bUseUpdatedKey) { if (bUseUpdatedKey) {
/* delete the old key */ /* delete the old key */
if (IS_MCAST(pRA)) { if (is_multicast_ether_addr(pRA)) {
WAPI_TRACE(WAPI_API, "%s(): AE use new update MSK!!\n", __FUNCTION__); WAPI_TRACE(WAPI_API, "%s(): AE use new update MSK!!\n", __FUNCTION__);
pWapiSta->wapiMsk.keyId = pWapiSta->wapiMskUpdate.keyId; pWapiSta->wapiMsk.keyId = pWapiSta->wapiMskUpdate.keyId;
memcpy(pWapiSta->wapiMsk.dataKey, pWapiSta->wapiMskUpdate.dataKey, 16); memcpy(pWapiSta->wapiMsk.dataKey, pWapiSta->wapiMskUpdate.dataKey, 16);

View File

@ -967,7 +967,7 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib
sint res = _SUCCESS; sint res = _SUCCESS;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct security_priv *psecuritypriv = &padapter->securitypriv; struct security_priv *psecuritypriv = &padapter->securitypriv;
sint bmcast = IS_MCAST(pattrib->ra); bool bmcast = is_multicast_ether_addr(pattrib->ra);
memset(pattrib->dot118021x_UncstKey.skey, 0, 16); memset(pattrib->dot118021x_UncstKey.skey, 0, 16);
memset(pattrib->dot11tkiptxmickey.skey, 0, 16); memset(pattrib->dot11tkiptxmickey.skey, 0, 16);
@ -1309,7 +1309,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
struct ethhdr etherhdr; struct ethhdr etherhdr;
sint bmcast; bool bmcast;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct qos_priv *pqospriv = &pmlmepriv->qospriv; struct qos_priv *pqospriv = &pmlmepriv->qospriv;
@ -1354,7 +1354,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown); DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown);
get_sta_info: get_sta_info:
bmcast = IS_MCAST(pattrib->ra); bmcast = is_multicast_ether_addr(pattrib->ra);
if (bmcast) { if (bmcast) {
psta = rtw_get_bcmc_stainfo(padapter); psta = rtw_get_bcmc_stainfo(padapter);
if (psta == NULL) { /* if we cannot get psta => drop the pkt */ if (psta == NULL) { /* if we cannot get psta => drop the pkt */
@ -1473,7 +1473,7 @@ get_sta_info:
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) && if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) &&
pattrib->ether_type == ETH_P_ARP && pattrib->ether_type == ETH_P_ARP &&
!IS_MCAST(pattrib->dst)) { !is_multicast_ether_addr(pattrib->dst)) {
rtw_mi_set_scan_deny(padapter, 1000); rtw_mi_set_scan_deny(padapter, 1000);
rtw_mi_scan_abort(padapter, _FALSE); /*rtw_scan_abort_no_wait*/ rtw_mi_scan_abort(padapter, _FALSE); /*rtw_scan_abort_no_wait*/
} }
@ -1574,7 +1574,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe)
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
u8 priority[4] = {0x0, 0x0, 0x0, 0x0}; u8 priority[4] = {0x0, 0x0, 0x0, 0x0};
u8 hw_hdr_offset = 0; u8 hw_hdr_offset = 0;
sint bmcst = IS_MCAST(pattrib->ra); bool bmcst = is_multicast_ether_addr(pattrib->ra);
/* /*
if(pattrib->psta) if(pattrib->psta)
@ -1742,7 +1742,7 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
/* struct sta_info *psta; */ /* struct sta_info *psta; */
/* sint bmcst = IS_MCAST(pattrib->ra); */ /* sint bmcst = is_multicast_ether_addr(pattrib->ra); */
/* /*
@ -2184,7 +2184,7 @@ s32 rtw_xmit_tdls_coalesce(_adapter *padapter, struct xmit_frame *pxmitframe, st
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct pkt_attrib *pattrib = &pxmitframe->attrib; struct pkt_attrib *pattrib = &pxmitframe->attrib;
u8 *pbuf_start; u8 *pbuf_start;
s32 bmcst = IS_MCAST(pattrib->ra); bool bmcst = is_multicast_ether_addr(pattrib->ra);
s32 res = _SUCCESS; s32 res = _SUCCESS;
@ -2311,7 +2311,7 @@ s32 check_amsdu(struct xmit_frame *pxmitframe)
pattrib = &pxmitframe->attrib; pattrib = &pxmitframe->attrib;
if (IS_MCAST(pattrib->ra)) if (is_multicast_ether_addr(pattrib->ra))
ret = _FALSE; ret = _FALSE;
if ((pattrib->ether_type == 0x888e) || if ((pattrib->ether_type == 0x888e) ||
@ -2578,7 +2578,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm
u8 *pbuf_start; u8 *pbuf_start;
s32 bmcst = IS_MCAST(pattrib->ra); bool bmcst = is_multicast_ether_addr(pattrib->ra);
s32 res = _SUCCESS; s32 res = _SUCCESS;
@ -2783,7 +2783,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct pkt_attrib *pattrib = &pxmitframe->attrib; struct pkt_attrib *pattrib = &pxmitframe->attrib;
u8 *pbuf_start; u8 *pbuf_start;
s32 bmcst = IS_MCAST(pattrib->ra); bool bmcst = is_multicast_ether_addr(pattrib->ra);
s32 res = _FAIL; s32 res = _FAIL;
u8 *BIP_AAD = NULL; u8 *BIP_AAD = NULL;
u8 *MGMT_body = NULL; u8 *MGMT_body = NULL;
@ -3926,7 +3926,7 @@ __inline static struct tx_servq *rtw_get_sta_pending
#ifdef CONFIG_RTL8711 #ifdef CONFIG_RTL8711
if (IS_MCAST(psta->cmn.mac_addr)) { if (is_multicast_ether_addr(psta->cmn.mac_addr)) {
ptxservq = &(psta->sta_xmitpriv.be_q); /* we will use be_q to queue bc/mc frames in BCMC_stainfo */ ptxservq = &(psta->sta_xmitpriv.be_q); /* we will use be_q to queue bc/mc frames in BCMC_stainfo */
*ppstapending = &padapter->xmitpriv.bm_pending; *ppstapending = &padapter->xmitpriv.bm_pending;
} else } else
@ -4751,7 +4751,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
struct pkt_attrib *pattrib = &pxmitframe->attrib; struct pkt_attrib *pattrib = &pxmitframe->attrib;
sint bmcst = IS_MCAST(pattrib->ra); bool bmcst = is_multicast_ether_addr(pattrib->ra);
bool update_tim = _FALSE; bool update_tim = _FALSE;
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS

View File

@ -12527,7 +12527,7 @@ void rtw_store_phy_info(_adapter *padapter, union recv_frame *prframe)
/*RTW_INFO("=>%s WIFI_DATA_TYPE or WIFI_QOS_DATA_TYPE\n", __FUNCTION__);*/ /*RTW_INFO("=>%s WIFI_DATA_TYPE or WIFI_QOS_DATA_TYPE\n", __FUNCTION__);*/
if (psta) { if (psta) {
if (IS_MCAST(get_ra(get_recvframe_data(prframe)))) if (is_multicast_ether_addr(get_ra(get_recvframe_data(prframe))))
psta_dframe_info = &psta->sta_dframe_info_bmc; psta_dframe_info = &psta->sta_dframe_info_bmc;
else else
psta_dframe_info = &psta->sta_dframe_info; psta_dframe_info = &psta->sta_dframe_info;

View File

@ -184,7 +184,7 @@ void rtw_led_control(_adapter *adapter, LED_CTL_MODE ctl)
void rtw_led_tx_control(_adapter *adapter, const u8 *da) void rtw_led_tx_control(_adapter *adapter, const u8 *da)
{ {
#if CONFIG_RTW_SW_LED_TRX_DA_CLASSIFY #if CONFIG_RTW_SW_LED_TRX_DA_CLASSIFY
if (IS_MCAST(da)) if (is_multicast_ether_addr(da))
rtw_led_control(adapter, LED_CTL_BMC_TX); rtw_led_control(adapter, LED_CTL_BMC_TX);
else else
rtw_led_control(adapter, LED_CTL_UC_TX); rtw_led_control(adapter, LED_CTL_UC_TX);
@ -196,7 +196,7 @@ void rtw_led_tx_control(_adapter *adapter, const u8 *da)
void rtw_led_rx_control(_adapter *adapter, const u8 *da) void rtw_led_rx_control(_adapter *adapter, const u8 *da)
{ {
#if CONFIG_RTW_SW_LED_TRX_DA_CLASSIFY #if CONFIG_RTW_SW_LED_TRX_DA_CLASSIFY
if (IS_MCAST(da)) if (is_multicast_ether_addr(da))
rtw_led_control(adapter, LED_CTL_BMC_RX); rtw_led_control(adapter, LED_CTL_BMC_RX);
else else
rtw_led_control(adapter, LED_CTL_UC_RX); rtw_led_control(adapter, LED_CTL_UC_RX);

View File

@ -58,7 +58,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba
u8 *ptxdesc = pmem; u8 *ptxdesc = pmem;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
sint bmcst = IS_MCAST(pattrib->ra); bool bmcst = is_multicast_ether_addr(pattrib->ra);
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX #ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
if (padapter->registrypriv.mp_mode == 0) { if (padapter->registrypriv.mp_mode == 0) {
@ -918,7 +918,7 @@ s32 rtl8192eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
/* #ifdef PLATFORM_LINUX */ /* #ifdef PLATFORM_LINUX */
u16 fc; u16 fc;
int rc, len, pipe; int rc, len, pipe;
unsigned int bmcst, tid, qsel; bool bmcst, tid, qsel;
struct sk_buff *skb, *pxmit_skb; struct sk_buff *skb, *pxmit_skb;
struct urb *urb; struct urb *urb;
unsigned char *pxmitbuf; unsigned char *pxmitbuf;
@ -937,7 +937,7 @@ s32 rtl8192eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
len = skb->len; len = skb->len;
tx_hdr = (struct rtw_ieee80211_hdr *)(skb->data); tx_hdr = (struct rtw_ieee80211_hdr *)(skb->data);
fc = le16_to_cpu(tx_hdr->frame_ctl); fc = le16_to_cpu(tx_hdr->frame_ctl);
bmcst = IS_MCAST(tx_hdr->addr1); bmcst = is_multicast_ether_addr(tx_hdr->addr1);
if ((fc & RTW_IEEE80211_FCTL_FTYPE) != RTW_IEEE80211_FTYPE_MGMT) if ((fc & RTW_IEEE80211_FCTL_FTYPE) != RTW_IEEE80211_FTYPE_MGMT)
goto _exit; goto _exit;
@ -994,7 +994,7 @@ s32 rtl8192eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
/* */ /* */
skb_put(pxmit_skb, len + TXDESC_SIZE); skb_put(pxmit_skb, len + TXDESC_SIZE);
pxmitbuf = pxmitbuf + TXDESC_SIZE; pxmitbuf = pxmitbuf + TXDESC_SIZE;
memcpy(pxmitbuf, skb->data, len); _rtw_memcpy(pxmitbuf, skb->data, len);
/* RTW_INFO("mgnt_xmit, len=%x\n", pxmit_skb->len); */ /* RTW_INFO("mgnt_xmit, len=%x\n", pxmit_skb->len); */

View File

@ -364,15 +364,6 @@ enum WIFI_REG_DOMAIN {
#define GetAddr4Ptr(pbuf) ((unsigned char *)((SIZE_PTR)(pbuf) + 24)) #define GetAddr4Ptr(pbuf) ((unsigned char *)((SIZE_PTR)(pbuf) + 24))
__inline static int IS_MCAST(const u8 *da)
{
if ((*da) & 0x01)
return _TRUE;
else
return _FALSE;
}
__inline static unsigned char *get_ra(unsigned char *pframe) __inline static unsigned char *get_ra(unsigned char *pframe)
{ {
unsigned char *ra; unsigned char *ra;

View File

@ -11447,7 +11447,7 @@ static struct xmit_frame *createloopbackpkt(PADAPTER padapter, u32 size)
struct tx_desc *desc; struct tx_desc *desc;
u8 *pkt_start, *pkt_end, *ptr; u8 *pkt_start, *pkt_end, *ptr;
struct rtw_ieee80211_hdr *hdr; struct rtw_ieee80211_hdr *hdr;
s32 bmcast; bool bmcast;
_irqL irqL; _irqL irqL;
@ -11502,7 +11502,7 @@ static struct xmit_frame *createloopbackpkt(PADAPTER padapter, u32 size)
pattrib->bswenc = _FALSE; pattrib->bswenc = _FALSE;
pattrib->qos_en = _FALSE; pattrib->qos_en = _FALSE;
bmcast = IS_MCAST(pattrib->ra); bmcast = is_multicast_ether_addr(pattrib->ra);
if (bmcast) if (bmcast)
pattrib->psta = rtw_get_bcmc_stainfo(padapter); pattrib->psta = rtw_get_bcmc_stainfo(padapter);
else else

View File

@ -442,7 +442,7 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, union recv_frame *r
_pkt *pskb2 = NULL; _pkt *pskb2 = NULL;
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
int bmcast = IS_MCAST(ehdr->h_dest); bool bmcast = is_multicast_ether_addr(ehdr->h_dest);
/* RTW_INFO("bmcast=%d\n", bmcast); */ /* RTW_INFO("bmcast=%d\n", bmcast); */