mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-12-25 13:31:44 +00:00
Merge pull request #249 from CGarces/staging_cherrypick3
Adapted commits from staging area (third part)
This commit is contained in:
commit
696a422b31
@ -984,7 +984,7 @@ u8 rtw_efuse_access(PADAPTER adapter, u8 write, u16 addr, u16 cnts, u8 *data)
|
|||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(data, efuse + addr, cnts);
|
memcpy(data, efuse + addr, cnts);
|
||||||
rtw_mfree(efuse, size);
|
rtw_mfree(efuse, size);
|
||||||
} else {
|
} else {
|
||||||
err = rtw_halmac_read_physical_efuse(d, addr, cnts, data);
|
err = rtw_halmac_read_physical_efuse(d, addr, cnts, data);
|
||||||
@ -1044,7 +1044,7 @@ u8 rtw_efuse_bt_access(PADAPTER adapter, u8 write, u16 addr, u16 cnts, u8 *data)
|
|||||||
}
|
}
|
||||||
dump_buf(efuse + addr, cnts);
|
dump_buf(efuse + addr, cnts);
|
||||||
|
|
||||||
_rtw_memcpy(data, efuse + addr, cnts);
|
memcpy(data, efuse + addr, cnts);
|
||||||
|
|
||||||
RTW_INFO("%s: rtw_halmac_read_bt_physical_efuse_map ok! data 0x%x\n", __FUNCTION__, *data);
|
RTW_INFO("%s: rtw_halmac_read_bt_physical_efuse_map ok! data 0x%x\n", __FUNCTION__, *data);
|
||||||
rtw_mfree(efuse, size);
|
rtw_mfree(efuse, size);
|
||||||
@ -1092,7 +1092,7 @@ u8 rtw_efuse_map_read(PADAPTER adapter, u16 addr, u16 cnts, u8 *data)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(data, efuse + addr, cnts);
|
memcpy(data, efuse + addr, cnts);
|
||||||
rtw_mfree(efuse, size);
|
rtw_mfree(efuse, size);
|
||||||
} else {
|
} else {
|
||||||
err = rtw_halmac_read_logical_efuse(d, addr, cnts, data);
|
err = rtw_halmac_read_logical_efuse(d, addr, cnts, data);
|
||||||
@ -1146,14 +1146,14 @@ u8 rtw_efuse_map_write(PADAPTER adapter, u16 addr, u16 cnts, u8 *data)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(efuse + addr, data, cnts);
|
memcpy(efuse + addr, data, cnts);
|
||||||
|
|
||||||
if (adapter->registrypriv.boffefusemask == 0) {
|
if (adapter->registrypriv.boffefusemask == 0) {
|
||||||
RTW_INFO("Use mask Array Len: %d\n", mask_len);
|
RTW_INFO("Use mask Array Len: %d\n", mask_len);
|
||||||
|
|
||||||
if (mask_len != 0) {
|
if (mask_len != 0) {
|
||||||
if (adapter->registrypriv.bFileMaskEfuse == _TRUE)
|
if (adapter->registrypriv.bFileMaskEfuse == _TRUE)
|
||||||
_rtw_memcpy(mask_buf, maskfileBuffer, mask_len);
|
memcpy(mask_buf, maskfileBuffer, mask_len);
|
||||||
else
|
else
|
||||||
rtw_efuse_mask_array(adapter, mask_buf);
|
rtw_efuse_mask_array(adapter, mask_buf);
|
||||||
|
|
||||||
@ -1243,7 +1243,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER adapter, u16 addr, u16 cnts, u8 *data)
|
|||||||
while (idx < cnts) {
|
while (idx < cnts) {
|
||||||
word_en = 0xF;
|
word_en = 0xF;
|
||||||
j = (addr + idx) & 0x7;
|
j = (addr + idx) & 0x7;
|
||||||
_rtw_memcpy(newdata, &map[offset << 3], PGPKT_DATA_SIZE);
|
memcpy(newdata, &map[offset << 3], PGPKT_DATA_SIZE);
|
||||||
for (i = j; i < PGPKT_DATA_SIZE && idx < cnts; i++, idx++) {
|
for (i = j; i < PGPKT_DATA_SIZE && idx < cnts; i++, idx++) {
|
||||||
if (data[idx] != map[addr + idx]) {
|
if (data[idx] != map[addr + idx]) {
|
||||||
word_en &= ~BIT(i >> 1);
|
word_en &= ~BIT(i >> 1);
|
||||||
@ -2420,8 +2420,8 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||||||
if (ret == _FAIL)
|
if (ret == _FAIL)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
_rtw_memcpy(efuse , map, mapLen);
|
memcpy(efuse , map, mapLen);
|
||||||
_rtw_memcpy(efuse + addr, data, cnts);
|
memcpy(efuse + addr, data, cnts);
|
||||||
|
|
||||||
if (padapter->registrypriv.boffefusemask == 0) {
|
if (padapter->registrypriv.boffefusemask == 0) {
|
||||||
for (i = 0; i < cnts; i++) {
|
for (i = 0; i < cnts; i++) {
|
||||||
@ -2484,7 +2484,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||||||
while (idx < cnts) {
|
while (idx < cnts) {
|
||||||
word_en = 0xF;
|
word_en = 0xF;
|
||||||
j = (addr + idx) & 0x7;
|
j = (addr + idx) & 0x7;
|
||||||
_rtw_memcpy(newdata, &map[offset << 3], PGPKT_DATA_SIZE);
|
memcpy(newdata, &map[offset << 3], PGPKT_DATA_SIZE);
|
||||||
for (i = j; i < PGPKT_DATA_SIZE && idx < cnts; i++, idx++) {
|
for (i = j; i < PGPKT_DATA_SIZE && idx < cnts; i++, idx++) {
|
||||||
if (efuse[addr + idx] != map[addr + idx]) {
|
if (efuse[addr + idx] != map[addr + idx]) {
|
||||||
word_en &= ~BIT(i >> 1);
|
word_en &= ~BIT(i >> 1);
|
||||||
@ -2578,7 +2578,7 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
|||||||
while (idx < cnts) {
|
while (idx < cnts) {
|
||||||
word_en = 0xF;
|
word_en = 0xF;
|
||||||
j = (addr + idx) & 0x7;
|
j = (addr + idx) & 0x7;
|
||||||
_rtw_memcpy(newdata, &map[offset << 3], PGPKT_DATA_SIZE);
|
memcpy(newdata, &map[offset << 3], PGPKT_DATA_SIZE);
|
||||||
for (i = j; i < PGPKT_DATA_SIZE && idx < cnts; i++, idx++) {
|
for (i = j; i < PGPKT_DATA_SIZE && idx < cnts; i++, idx++) {
|
||||||
if (data[idx] != map[addr + idx]) {
|
if (data[idx] != map[addr + idx]) {
|
||||||
word_en &= ~BIT(i >> 1);
|
word_en &= ~BIT(i >> 1);
|
||||||
@ -3207,7 +3207,7 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size)
|
|||||||
|
|
||||||
RTW_PRINT("efuse file:%s, 0x%03x byte content read\n", path, i);
|
RTW_PRINT("efuse file:%s, 0x%03x byte content read\n", path, i);
|
||||||
|
|
||||||
_rtw_memcpy(buf, map, map_size);
|
memcpy(buf, map, map_size);
|
||||||
|
|
||||||
ret = _SUCCESS;
|
ret = _SUCCESS;
|
||||||
|
|
||||||
@ -3262,7 +3262,7 @@ u32 rtw_read_macaddr_from_file(const char *path, u8 *buf)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(buf, addr, ETH_ALEN);
|
memcpy(buf, addr, ETH_ALEN);
|
||||||
|
|
||||||
RTW_PRINT("wifi_mac file: %s\n", path);
|
RTW_PRINT("wifi_mac file: %s\n", path);
|
||||||
#ifdef CONFIG_RTW_DEBUG
|
#ifdef CONFIG_RTW_DEBUG
|
||||||
|
@ -102,7 +102,7 @@ inline u8 *rtw_set_ie_mpm(u8 *buf, u32 *buf_len
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (chosen_pmk) {
|
if (chosen_pmk) {
|
||||||
_rtw_memcpy(pos, chosen_pmk, 16);
|
memcpy(pos, chosen_pmk, 16);
|
||||||
pos += 16;
|
pos += 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -854,7 +854,7 @@ flush_add:
|
|||||||
|
|
||||||
for (i = 0; i < flush_num; i++) {
|
for (i = 0; i < flush_num; i++) {
|
||||||
sta = rtw_get_stainfo_by_offset(stapriv, flush_list[i]);
|
sta = rtw_get_stainfo_by_offset(stapriv, flush_list[i]);
|
||||||
_rtw_memcpy(sta_addr, sta->cmn.mac_addr, ETH_ALEN);
|
memcpy(sta_addr, sta->cmn.mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
updated |= ap_free_sta(adapter, sta, _TRUE, WLAN_REASON_DEAUTH_LEAVING, _FALSE);
|
updated |= ap_free_sta(adapter, sta, _TRUE, WLAN_REASON_DEAUTH_LEAVING, _FALSE);
|
||||||
rtw_mesh_expire_peer(adapter, sta_addr);
|
rtw_mesh_expire_peer(adapter, sta_addr);
|
||||||
@ -1202,7 +1202,7 @@ static int rtw_mpm_ampe_dec(_adapter *adapter, struct mesh_plink_ent *plink
|
|||||||
if (!iv_crypt)
|
if (!iv_crypt)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
_rtw_memcpy(iv_crypt, mic_ie + 2, iv_crypt_len);
|
memcpy(iv_crypt, mic_ie + 2, iv_crypt_len);
|
||||||
|
|
||||||
verify_ret = aes_siv_decrypt(plink->aek, iv_crypt, iv_crypt_len
|
verify_ret = aes_siv_decrypt(plink->aek, iv_crypt, iv_crypt_len
|
||||||
, 3, aad, aad_len, ampe_buf);
|
, 3, aad, aad_len, ampe_buf);
|
||||||
@ -1248,7 +1248,7 @@ static int rtw_mpm_ampe_enc(_adapter *adapter, struct mesh_plink_ent *plink
|
|||||||
if (!ampe_ie)
|
if (!ampe_ie)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
_rtw_memcpy(ampe_ie, ampe_buf, ampe_ie_len);
|
memcpy(ampe_ie, ampe_buf, ampe_ie_len);
|
||||||
|
|
||||||
protect_ret = aes_siv_encrypt(plink->aek, ampe_ie, ampe_ie_len
|
protect_ret = aes_siv_encrypt(plink->aek, ampe_ie, ampe_ie_len
|
||||||
, 3, aad, aad_len, mic_ie + 2);
|
, 3, aad, aad_len, mic_ie + 2);
|
||||||
@ -1304,9 +1304,9 @@ static int rtw_mpm_tx_ies_sync_bss(_adapter *adapter, struct mesh_plink_ent *pli
|
|||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
if (*(ampe_buf + 1) >= 68) {
|
if (*(ampe_buf + 1) >= 68) {
|
||||||
_rtw_memcpy(plink->sel_pcs, ampe_buf + 2, 4);
|
memcpy(plink->sel_pcs, ampe_buf + 2, 4);
|
||||||
_rtw_memcpy(plink->l_nonce, ampe_buf + 6, 32);
|
memcpy(plink->l_nonce, ampe_buf + 6, 32);
|
||||||
_rtw_memcpy(plink->p_nonce, ampe_buf + 38, 32);
|
memcpy(plink->p_nonce, ampe_buf + 38, 32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1349,7 +1349,7 @@ static int rtw_mpm_tx_ies_sync_bss(_adapter *adapter, struct mesh_plink_ent *pli
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* build new frame */
|
/* build new frame */
|
||||||
_rtw_memcpy(new_buf, fhead, sizeof(struct rtw_ieee80211_hdr_3addr) + tlv_ies_offset);
|
memcpy(new_buf, fhead, sizeof(struct rtw_ieee80211_hdr_3addr) + tlv_ies_offset);
|
||||||
new_fhead = new_buf;
|
new_fhead = new_buf;
|
||||||
new_flen = new_len;
|
new_flen = new_len;
|
||||||
new_fbody = new_fhead + sizeof(struct rtw_ieee80211_hdr_3addr);
|
new_fbody = new_fhead + sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||||
@ -1666,7 +1666,7 @@ bypass_sync_bss:
|
|||||||
RTW_INFO(FUNC_ADPT_FMT" sacrifice "MAC_FMT" for acnode\n"
|
RTW_INFO(FUNC_ADPT_FMT" sacrifice "MAC_FMT" for acnode\n"
|
||||||
, FUNC_ADPT_ARG(adapter), MAC_ARG(sac->cmn.mac_addr));
|
, FUNC_ADPT_ARG(adapter), MAC_ARG(sac->cmn.mac_addr));
|
||||||
|
|
||||||
_rtw_memcpy(sta_addr, sac->cmn.mac_addr, ETH_ALEN);
|
memcpy(sta_addr, sac->cmn.mac_addr, ETH_ALEN);
|
||||||
updated = ap_free_sta(adapter, sac, 0, 0, 1);
|
updated = ap_free_sta(adapter, sac, 0, 0, 1);
|
||||||
rtw_mesh_expire_peer(stapriv->padapter, sta_addr);
|
rtw_mesh_expire_peer(stapriv->padapter, sta_addr);
|
||||||
|
|
||||||
@ -1697,7 +1697,7 @@ bypass_sync_bss:
|
|||||||
plink->plid = mpm_info.llid_v;
|
plink->plid = mpm_info.llid_v;
|
||||||
plink->peer_aid = mpm_info.aid_v;
|
plink->peer_aid = mpm_info.aid_v;
|
||||||
if (mpm_info.pid_v == 1)
|
if (mpm_info.pid_v == 1)
|
||||||
_rtw_memcpy(plink->chosen_pmk, mpm_info.chosen_pmk, 16);
|
memcpy(plink->chosen_pmk, mpm_info.chosen_pmk, 16);
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_RTW_MESH_DRIVER_AID
|
#ifdef CONFIG_RTW_MESH_DRIVER_AID
|
||||||
else {
|
else {
|
||||||
@ -1724,7 +1724,7 @@ bypass_sync_bss:
|
|||||||
|
|
||||||
ies = rtw_zmalloc(ies_len);
|
ies = rtw_zmalloc(ies_len);
|
||||||
if (ies) {
|
if (ies) {
|
||||||
_rtw_memcpy(ies, fhead + sizeof(struct rtw_ieee80211_hdr_3addr) + 2, ies_len);
|
memcpy(ies, fhead + sizeof(struct rtw_ieee80211_hdr_3addr) + 2, ies_len);
|
||||||
if (tx == _FALSE) {
|
if (tx == _FALSE) {
|
||||||
plink->rx_conf_ies = ies;
|
plink->rx_conf_ies = ies;
|
||||||
plink->rx_conf_ies_len = ies_len;
|
plink->rx_conf_ies_len = ies_len;
|
||||||
@ -2094,7 +2094,7 @@ int _rtw_mesh_plink_add(_adapter *adapter, const u8 *hwaddr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (exist == _FALSE && ent) {
|
if (exist == _FALSE && ent) {
|
||||||
_rtw_memcpy(ent->addr, hwaddr, ETH_ALEN);
|
memcpy(ent->addr, hwaddr, ETH_ALEN);
|
||||||
ent->valid = _TRUE;
|
ent->valid = _TRUE;
|
||||||
#ifdef CONFIG_RTW_MESH_AEK
|
#ifdef CONFIG_RTW_MESH_AEK
|
||||||
ent->aek_valid = 0;
|
ent->aek_valid = 0;
|
||||||
@ -2163,7 +2163,7 @@ int rtw_mesh_plink_set_aek(_adapter *adapter, const u8 *hwaddr, const u8 *aek)
|
|||||||
_enter_critical_bh(&(plink_ctl->lock), &irqL);
|
_enter_critical_bh(&(plink_ctl->lock), &irqL);
|
||||||
ent = _rtw_mesh_plink_get(adapter, hwaddr);
|
ent = _rtw_mesh_plink_get(adapter, hwaddr);
|
||||||
if (ent) {
|
if (ent) {
|
||||||
_rtw_memcpy(ent->aek, aek, 32);
|
memcpy(ent->aek, aek, 32);
|
||||||
ent->aek_valid = 1;
|
ent->aek_valid = 1;
|
||||||
}
|
}
|
||||||
_exit_critical_bh(&(plink_ctl->lock), &irqL);
|
_exit_critical_bh(&(plink_ctl->lock), &irqL);
|
||||||
@ -2524,9 +2524,9 @@ static u8 *rtw_mesh_construct_peer_mesh_close(_adapter *adapter, struct mesh_pli
|
|||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
whdr = (struct rtw_ieee80211_hdr *)frame;
|
whdr = (struct rtw_ieee80211_hdr *)frame;
|
||||||
_rtw_memcpy(whdr->addr1, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(whdr->addr1, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
_rtw_memcpy(whdr->addr2, plink->addr, ETH_ALEN);
|
memcpy(whdr->addr2, plink->addr, ETH_ALEN);
|
||||||
_rtw_memcpy(whdr->addr3, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(whdr->addr3, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
|
|
||||||
set_frame_sub_type(frame, WIFI_ACTION);
|
set_frame_sub_type(frame, WIFI_ACTION);
|
||||||
|
|
||||||
@ -2553,9 +2553,9 @@ static u8 *rtw_mesh_construct_peer_mesh_close(_adapter *adapter, struct mesh_pli
|
|||||||
|
|
||||||
ampe_buf[0] = WLAN_EID_AMPE;
|
ampe_buf[0] = WLAN_EID_AMPE;
|
||||||
ampe_buf[1] = 68;
|
ampe_buf[1] = 68;
|
||||||
_rtw_memcpy(ampe_buf + 2, plink->sel_pcs, 4);
|
memcpy(ampe_buf + 2, plink->sel_pcs, 4);
|
||||||
_rtw_memcpy(ampe_buf + 6, plink->p_nonce, 32);
|
memcpy(ampe_buf + 6, plink->p_nonce, 32);
|
||||||
_rtw_memcpy(ampe_buf + 38, plink->l_nonce, 32);
|
memcpy(ampe_buf + 38, plink->l_nonce, 32);
|
||||||
|
|
||||||
enc_ret = rtw_mpm_ampe_enc(adapter, plink
|
enc_ret = rtw_mpm_ampe_enc(adapter, plink
|
||||||
, frame + sizeof(struct rtw_ieee80211_hdr_3addr)
|
, frame + sizeof(struct rtw_ieee80211_hdr_3addr)
|
||||||
@ -2942,7 +2942,7 @@ static int rtw_mrc_check(_adapter *adapter, const u8 *msa, u32 seq)
|
|||||||
|
|
||||||
p->seqnum = seq;
|
p->seqnum = seq;
|
||||||
p->exp_time = rtw_get_current_time() + rtw_ms_to_systime(RTW_MRC_TIMEOUT_MS);
|
p->exp_time = rtw_get_current_time() + rtw_ms_to_systime(RTW_MRC_TIMEOUT_MS);
|
||||||
_rtw_memcpy(p->msa, msa, ETH_ALEN);
|
memcpy(p->msa, msa, ETH_ALEN);
|
||||||
rtw_hlist_add_head(&p->list, &mrc->bucket[idx]);
|
rtw_hlist_add_head(&p->list, &mrc->bucket[idx]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -3224,7 +3224,7 @@ int rtw_mesh_nexthop_lookup(_adapter *adapter,
|
|||||||
|
|
||||||
next_hop = rtw_rcu_dereference(mpath->next_hop);
|
next_hop = rtw_rcu_dereference(mpath->next_hop);
|
||||||
if (next_hop) {
|
if (next_hop) {
|
||||||
_rtw_memcpy(ra, next_hop->cmn.mac_addr, ETH_ALEN);
|
memcpy(ra, next_hop->cmn.mac_addr, ETH_ALEN);
|
||||||
err = 0;
|
err = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3296,12 +3296,12 @@ static bool rtw_mesh_data_bmc_to_uc(_adapter *adapter
|
|||||||
attrib->mb2u = 1;
|
attrib->mb2u = 1;
|
||||||
attrib->mseq = *b2u_mseq;
|
attrib->mseq = *b2u_mseq;
|
||||||
attrib->mfwd_ttl = ori_ta ? mfwd_ttl : 0;
|
attrib->mfwd_ttl = ori_ta ? mfwd_ttl : 0;
|
||||||
_rtw_memcpy(attrib->ra, sta->cmn.mac_addr, ETH_ALEN);
|
memcpy(attrib->ra, sta->cmn.mac_addr, ETH_ALEN);
|
||||||
_rtw_memcpy(attrib->ta, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(attrib->ta, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
_rtw_memcpy(attrib->mda, mda, ETH_ALEN);
|
memcpy(attrib->mda, mda, ETH_ALEN);
|
||||||
_rtw_memcpy(attrib->msa, msa, ETH_ALEN);
|
memcpy(attrib->msa, msa, ETH_ALEN);
|
||||||
_rtw_memcpy(attrib->dst, da, ETH_ALEN);
|
memcpy(attrib->dst, da, ETH_ALEN);
|
||||||
_rtw_memcpy(attrib->src, sa, ETH_ALEN);
|
memcpy(attrib->src, sa, ETH_ALEN);
|
||||||
attrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA;
|
attrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA;
|
||||||
|
|
||||||
rtw_list_insert_tail(&b2uframe->list, b2u_list);
|
rtw_list_insert_tail(&b2uframe->list, b2u_list);
|
||||||
@ -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;
|
||||||
@ -3402,18 +3402,18 @@ int rtw_mesh_addr_resolve(_adapter *adapter, struct xmit_frame *xframe, _pkt *pk
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
attrib->mfwd_ttl = 0;
|
attrib->mfwd_ttl = 0;
|
||||||
_rtw_memcpy(attrib->dst, etherhdr.h_dest, ETH_ALEN);
|
memcpy(attrib->dst, etherhdr.h_dest, ETH_ALEN);
|
||||||
_rtw_memcpy(attrib->src, etherhdr.h_source, ETH_ALEN);
|
memcpy(attrib->src, etherhdr.h_source, ETH_ALEN);
|
||||||
_rtw_memcpy(attrib->ta, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(attrib->ta, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
|
|
||||||
if (is_da_mcast) {
|
if (is_da_mcast) {
|
||||||
attrib->mesh_frame_mode = ae_need ? MESH_BMCAST_PX_DATA : MESH_BMCAST_DATA;
|
attrib->mesh_frame_mode = ae_need ? MESH_BMCAST_PX_DATA : MESH_BMCAST_DATA;
|
||||||
_rtw_memcpy(attrib->ra, attrib->dst, ETH_ALEN);
|
memcpy(attrib->ra, attrib->dst, ETH_ALEN);
|
||||||
_rtw_memcpy(attrib->msa, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(attrib->msa, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
} else {
|
} else {
|
||||||
attrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA;
|
attrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA;
|
||||||
_rtw_memcpy(attrib->mda, (mppath && ae_need) ? mppath->mpp : attrib->dst, ETH_ALEN);
|
memcpy(attrib->mda, (mppath && ae_need) ? mppath->mpp : attrib->dst, ETH_ALEN);
|
||||||
_rtw_memcpy(attrib->msa, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(attrib->msa, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
/* RA needs to be resolved */
|
/* RA needs to be resolved */
|
||||||
res = rtw_mesh_nexthop_resolve(adapter, xframe);
|
res = rtw_mesh_nexthop_resolve(adapter, xframe);
|
||||||
}
|
}
|
||||||
@ -3486,12 +3486,12 @@ void rtw_mesh_tx_build_mctrl(_adapter *adapter, struct pkt_attrib *attrib, u8 *b
|
|||||||
break;
|
break;
|
||||||
case MESH_UCAST_PX_DATA:
|
case MESH_UCAST_PX_DATA:
|
||||||
mctrl->flags |= MESH_FLAGS_AE_A5_A6;
|
mctrl->flags |= MESH_FLAGS_AE_A5_A6;
|
||||||
_rtw_memcpy(mctrl->eaddr1, attrib->dst, ETH_ALEN);
|
memcpy(mctrl->eaddr1, attrib->dst, ETH_ALEN);
|
||||||
_rtw_memcpy(mctrl->eaddr2, attrib->src, ETH_ALEN);
|
memcpy(mctrl->eaddr2, attrib->src, ETH_ALEN);
|
||||||
break;
|
break;
|
||||||
case MESH_BMCAST_PX_DATA:
|
case MESH_BMCAST_PX_DATA:
|
||||||
mctrl->flags |= MESH_FLAGS_AE_A4;
|
mctrl->flags |= MESH_FLAGS_AE_A4;
|
||||||
_rtw_memcpy(mctrl->eaddr1, attrib->src, ETH_ALEN);
|
memcpy(mctrl->eaddr1, attrib->src, ETH_ALEN);
|
||||||
break;
|
break;
|
||||||
case MESH_MHOP_UCAST_ACT:
|
case MESH_MHOP_UCAST_ACT:
|
||||||
/* TBD */
|
/* TBD */
|
||||||
@ -3512,17 +3512,17 @@ u8 rtw_mesh_tx_build_whdr(_adapter *adapter, struct pkt_attrib *attrib
|
|||||||
case MESH_UCAST_PX_DATA: /* 1, 1, RA, TA, mDA, mSA, [DA, SA] */
|
case MESH_UCAST_PX_DATA: /* 1, 1, RA, TA, mDA, mSA, [DA, SA] */
|
||||||
SetToDs(fctrl);
|
SetToDs(fctrl);
|
||||||
SetFrDs(fctrl);
|
SetFrDs(fctrl);
|
||||||
_rtw_memcpy(whdr->addr1, attrib->ra, ETH_ALEN);
|
memcpy(whdr->addr1, attrib->ra, ETH_ALEN);
|
||||||
_rtw_memcpy(whdr->addr2, attrib->ta, ETH_ALEN);
|
memcpy(whdr->addr2, attrib->ta, ETH_ALEN);
|
||||||
_rtw_memcpy(whdr->addr3, attrib->mda, ETH_ALEN);
|
memcpy(whdr->addr3, attrib->mda, ETH_ALEN);
|
||||||
_rtw_memcpy(whdr->addr4, attrib->msa, ETH_ALEN);
|
memcpy(whdr->addr4, attrib->msa, ETH_ALEN);
|
||||||
break;
|
break;
|
||||||
case MESH_BMCAST_DATA: /* 0, 1, RA(DA), TA, mSA(SA) */
|
case MESH_BMCAST_DATA: /* 0, 1, RA(DA), TA, mSA(SA) */
|
||||||
case MESH_BMCAST_PX_DATA: /* 0, 1, RA(DA), TA, mSA, [SA] */
|
case MESH_BMCAST_PX_DATA: /* 0, 1, RA(DA), TA, mSA, [SA] */
|
||||||
SetFrDs(fctrl);
|
SetFrDs(fctrl);
|
||||||
_rtw_memcpy(whdr->addr1, attrib->ra, ETH_ALEN);
|
memcpy(whdr->addr1, attrib->ra, ETH_ALEN);
|
||||||
_rtw_memcpy(whdr->addr2, attrib->ta, ETH_ALEN);
|
memcpy(whdr->addr2, attrib->ta, ETH_ALEN);
|
||||||
_rtw_memcpy(whdr->addr3, attrib->msa, ETH_ALEN);
|
memcpy(whdr->addr3, attrib->msa, ETH_ALEN);
|
||||||
break;
|
break;
|
||||||
case MESH_MHOP_UCAST_ACT:
|
case MESH_MHOP_UCAST_ACT:
|
||||||
/* TBD */
|
/* TBD */
|
||||||
@ -3560,37 +3560,37 @@ 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) {
|
||||||
ret = _SUCCESS; /* return _SUCCESS to drop at sta checking */
|
ret = _SUCCESS; /* return _SUCCESS to drop at sta checking */
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
_rtw_memcpy(rattrib->ra, GetAddr1Ptr(whdr), ETH_ALEN);
|
memcpy(rattrib->ra, GetAddr1Ptr(whdr), ETH_ALEN);
|
||||||
_rtw_memcpy(rattrib->ta, get_addr2_ptr(whdr), ETH_ALEN);
|
memcpy(rattrib->ta, get_addr2_ptr(whdr), ETH_ALEN);
|
||||||
_rtw_memcpy(rattrib->mda, GetAddr1Ptr(whdr), ETH_ALEN);
|
memcpy(rattrib->mda, GetAddr1Ptr(whdr), ETH_ALEN);
|
||||||
_rtw_memcpy(rattrib->msa, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */
|
memcpy(rattrib->msa, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */
|
||||||
_rtw_memcpy(rattrib->dst, GetAddr1Ptr(whdr), ETH_ALEN);
|
memcpy(rattrib->dst, GetAddr1Ptr(whdr), ETH_ALEN);
|
||||||
_rtw_memcpy(rattrib->src, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */
|
memcpy(rattrib->src, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */
|
||||||
_rtw_memcpy(rattrib->bssid, get_addr2_ptr(whdr), ETH_ALEN);
|
memcpy(rattrib->bssid, get_addr2_ptr(whdr), ETH_ALEN);
|
||||||
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) {
|
||||||
ret = _SUCCESS; /* return _SUCCESS to drop at sta checking */
|
ret = _SUCCESS; /* return _SUCCESS to drop at sta checking */
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
_rtw_memcpy(rattrib->ra, GetAddr1Ptr(whdr), ETH_ALEN);
|
memcpy(rattrib->ra, GetAddr1Ptr(whdr), ETH_ALEN);
|
||||||
_rtw_memcpy(rattrib->ta, get_addr2_ptr(whdr), ETH_ALEN);
|
memcpy(rattrib->ta, get_addr2_ptr(whdr), ETH_ALEN);
|
||||||
_rtw_memcpy(rattrib->mda, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */
|
memcpy(rattrib->mda, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */
|
||||||
_rtw_memcpy(rattrib->msa, GetAddr4Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */
|
memcpy(rattrib->msa, GetAddr4Ptr(whdr), ETH_ALEN); /* may change after checking AMSDU subframe header */
|
||||||
_rtw_memcpy(rattrib->dst, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */
|
memcpy(rattrib->dst, GetAddr3Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */
|
||||||
_rtw_memcpy(rattrib->src, GetAddr4Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */
|
memcpy(rattrib->src, GetAddr4Ptr(whdr), ETH_ALEN); /* may change after checking mesh ctrl field */
|
||||||
_rtw_memcpy(rattrib->bssid, get_addr2_ptr(whdr), ETH_ALEN);
|
memcpy(rattrib->bssid, get_addr2_ptr(whdr), ETH_ALEN);
|
||||||
a4_shift = ETH_ALEN;
|
a4_shift = ETH_ALEN;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -3695,8 +3695,8 @@ inline int rtw_mesh_rx_validate_mctrl_non_amsdu(_adapter *adapter, union recv_fr
|
|||||||
, &da, &sa);
|
, &da, &sa);
|
||||||
|
|
||||||
if (ret == _SUCCESS) {
|
if (ret == _SUCCESS) {
|
||||||
_rtw_memcpy(rattrib->dst, da, ETH_ALEN);
|
memcpy(rattrib->dst, da, ETH_ALEN);
|
||||||
_rtw_memcpy(rattrib->src, sa, ETH_ALEN);
|
memcpy(rattrib->src, sa, ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -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;
|
||||||
@ -3800,7 +3800,7 @@ int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe
|
|||||||
else {
|
else {
|
||||||
enter_critical_bh(&mppath->state_lock);
|
enter_critical_bh(&mppath->state_lock);
|
||||||
if (_rtw_memcmp(mppath->mpp, mpp_addr, ETH_ALEN) == _FALSE)
|
if (_rtw_memcmp(mppath->mpp, mpp_addr, ETH_ALEN) == _FALSE)
|
||||||
_rtw_memcpy(mppath->mpp, mpp_addr, ETH_ALEN);
|
memcpy(mppath->mpp, mpp_addr, ETH_ALEN);
|
||||||
mppath->exp_time = rtw_get_current_time();
|
mppath->exp_time = rtw_get_current_time();
|
||||||
exit_critical_bh(&mppath->state_lock);
|
exit_critical_bh(&mppath->state_lock);
|
||||||
}
|
}
|
||||||
@ -3923,7 +3923,7 @@ int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe
|
|||||||
rtw_rcu_read_unlock();
|
rtw_rcu_read_unlock();
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
_rtw_memcpy(fwd_mpp, mppath->mpp, ETH_ALEN);
|
memcpy(fwd_mpp, mppath->mpp, ETH_ALEN);
|
||||||
mda = fwd_mpp;
|
mda = fwd_mpp;
|
||||||
msa = adapter_mac_addr(adapter);
|
msa = adapter_mac_addr(adapter);
|
||||||
rtw_rcu_read_unlock();
|
rtw_rcu_read_unlock();
|
||||||
@ -4031,18 +4031,18 @@ fwd_chk:
|
|||||||
#endif
|
#endif
|
||||||
xattrib->mfwd_ttl = mctrl->ttl - 1;
|
xattrib->mfwd_ttl = mctrl->ttl - 1;
|
||||||
xattrib->mseq = fwd_mseq;
|
xattrib->mseq = fwd_mseq;
|
||||||
_rtw_memcpy(xattrib->dst, da, ETH_ALEN);
|
memcpy(xattrib->dst, da, ETH_ALEN);
|
||||||
_rtw_memcpy(xattrib->src, sa, ETH_ALEN);
|
memcpy(xattrib->src, sa, ETH_ALEN);
|
||||||
_rtw_memcpy(xattrib->mda, mda, ETH_ALEN);
|
memcpy(xattrib->mda, mda, ETH_ALEN);
|
||||||
_rtw_memcpy(xattrib->msa, msa, ETH_ALEN);
|
memcpy(xattrib->msa, msa, ETH_ALEN);
|
||||||
_rtw_memcpy(xattrib->ta, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(xattrib->ta, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
|
|
||||||
if (is_mda_bmc) {
|
if (is_mda_bmc) {
|
||||||
xattrib->mesh_frame_mode = ae_need ? MESH_BMCAST_PX_DATA : MESH_BMCAST_DATA;
|
xattrib->mesh_frame_mode = ae_need ? MESH_BMCAST_PX_DATA : MESH_BMCAST_DATA;
|
||||||
_rtw_memcpy(xattrib->ra, mda, ETH_ALEN);
|
memcpy(xattrib->ra, mda, ETH_ALEN);
|
||||||
} else {
|
} else {
|
||||||
xattrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA;
|
xattrib->mesh_frame_mode = ae_need ? MESH_UCAST_PX_DATA : MESH_UCAST_DATA;
|
||||||
_rtw_memcpy(xattrib->ra, fwd_ra, ETH_ALEN);
|
memcpy(xattrib->ra, fwd_ra, ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
*fwd_frame = xframe;
|
*fwd_frame = xframe;
|
||||||
|
@ -239,9 +239,9 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
|
|||||||
fctrl = &(pwlanhdr->frame_ctl);
|
fctrl = &(pwlanhdr->frame_ctl);
|
||||||
*(fctrl) = 0;
|
*(fctrl) = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, da, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
|
|
||||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||||
pmlmeext->mgnt_seq++;
|
pmlmeext->mgnt_seq++;
|
||||||
@ -282,7 +282,7 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
|
|||||||
*pos++ = hopcount;
|
*pos++ = hopcount;
|
||||||
*pos++ = ttl;
|
*pos++ = ttl;
|
||||||
if (mpath_action == RTW_MPATH_PREP) {
|
if (mpath_action == RTW_MPATH_PREP) {
|
||||||
_rtw_memcpy(pos, target, ETH_ALEN);
|
memcpy(pos, target, ETH_ALEN);
|
||||||
pos += ETH_ALEN;
|
pos += ETH_ALEN;
|
||||||
*(u32 *)pos = cpu_to_le32(target_sn);
|
*(u32 *)pos = cpu_to_le32(target_sn);
|
||||||
pos += 4;
|
pos += 4;
|
||||||
@ -291,7 +291,7 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
|
|||||||
*(u32 *)pos = cpu_to_le32(preq_id);
|
*(u32 *)pos = cpu_to_le32(preq_id);
|
||||||
pos += 4;
|
pos += 4;
|
||||||
}
|
}
|
||||||
_rtw_memcpy(pos, originator_addr, ETH_ALEN);
|
memcpy(pos, originator_addr, ETH_ALEN);
|
||||||
pos += ETH_ALEN;
|
pos += ETH_ALEN;
|
||||||
*(u32 *)pos = cpu_to_le32(originator_sn);
|
*(u32 *)pos = cpu_to_le32(originator_sn);
|
||||||
pos += 4;
|
pos += 4;
|
||||||
@ -303,12 +303,12 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
|
|||||||
if (mpath_action == RTW_MPATH_PREQ) {
|
if (mpath_action == RTW_MPATH_PREQ) {
|
||||||
*pos++ = 1; /* support only 1 destination now */
|
*pos++ = 1; /* support only 1 destination now */
|
||||||
*pos++ = target_flags;
|
*pos++ = target_flags;
|
||||||
_rtw_memcpy(pos, target, ETH_ALEN);
|
memcpy(pos, target, ETH_ALEN);
|
||||||
pos += ETH_ALEN;
|
pos += ETH_ALEN;
|
||||||
*(u32 *)pos = cpu_to_le32(target_sn);
|
*(u32 *)pos = cpu_to_le32(target_sn);
|
||||||
pos += 4;
|
pos += 4;
|
||||||
} else if (mpath_action == RTW_MPATH_PREP) {
|
} else if (mpath_action == RTW_MPATH_PREP) {
|
||||||
_rtw_memcpy(pos, originator_addr, ETH_ALEN);
|
memcpy(pos, originator_addr, ETH_ALEN);
|
||||||
pos += ETH_ALEN;
|
pos += ETH_ALEN;
|
||||||
*(u32 *)pos = cpu_to_le32(originator_sn);
|
*(u32 *)pos = cpu_to_le32(originator_sn);
|
||||||
pos += 4;
|
pos += 4;
|
||||||
@ -352,9 +352,9 @@ int rtw_mesh_path_error_tx(_adapter *adapter,
|
|||||||
fctrl = &(pwlanhdr->frame_ctl);
|
fctrl = &(pwlanhdr->frame_ctl);
|
||||||
*(fctrl) = 0;
|
*(fctrl) = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
|
|
||||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||||
pmlmeext->mgnt_seq++;
|
pmlmeext->mgnt_seq++;
|
||||||
@ -377,7 +377,7 @@ int rtw_mesh_path_error_tx(_adapter *adapter,
|
|||||||
/* Flags format | B7 | B6 | B5:B0 | = | rsvd | AE | rsvd | */
|
/* Flags format | B7 | B6 | B5:B0 | = | rsvd | AE | rsvd | */
|
||||||
*pos = 0;
|
*pos = 0;
|
||||||
pos++;
|
pos++;
|
||||||
_rtw_memcpy(pos, target, ETH_ALEN);
|
memcpy(pos, target, ETH_ALEN);
|
||||||
pos += ETH_ALEN;
|
pos += ETH_ALEN;
|
||||||
*(u32 *)pos = cpu_to_le32(target_sn);
|
*(u32 *)pos = cpu_to_le32(target_sn);
|
||||||
pos += 4;
|
pos += 4;
|
||||||
@ -862,7 +862,7 @@ static void rtw_hwmp_prep_frame_process(_adapter *adapter,
|
|||||||
exit_critical_bh(&path->state_lock);
|
exit_critical_bh(&path->state_lock);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
_rtw_memcpy(next_hop, rtw_next_hop_deref_protected(path)->cmn.mac_addr, ETH_ALEN);
|
memcpy(next_hop, rtw_next_hop_deref_protected(path)->cmn.mac_addr, ETH_ALEN);
|
||||||
exit_critical_bh(&path->state_lock);
|
exit_critical_bh(&path->state_lock);
|
||||||
--ttl;
|
--ttl;
|
||||||
flags = RTW_PREP_IE_FLAGS(prep_elem);
|
flags = RTW_PREP_IE_FLAGS(prep_elem);
|
||||||
@ -1015,7 +1015,7 @@ static void rtw_hwmp_rann_frame_process(_adapter *adapter,
|
|||||||
"add_chk_rann_snd_addr= "MAC_FMT"\n",
|
"add_chk_rann_snd_addr= "MAC_FMT"\n",
|
||||||
MAC_ARG(mgmt->addr2),
|
MAC_ARG(mgmt->addr2),
|
||||||
MAC_ARG(path->rann_snd_addr));
|
MAC_ARG(path->rann_snd_addr));
|
||||||
_rtw_memcpy(path->add_chk_rann_snd_addr,
|
memcpy(path->add_chk_rann_snd_addr,
|
||||||
path->rann_snd_addr, ETH_ALEN);
|
path->rann_snd_addr, ETH_ALEN);
|
||||||
preq_node_flag |= RTW_PREQ_Q_F_CHK;
|
preq_node_flag |= RTW_PREQ_Q_F_CHK;
|
||||||
|
|
||||||
@ -1030,7 +1030,7 @@ static void rtw_hwmp_rann_frame_process(_adapter *adapter,
|
|||||||
path->is_root = _TRUE;
|
path->is_root = _TRUE;
|
||||||
/* Recording RANNs sender address to send individually
|
/* Recording RANNs sender address to send individually
|
||||||
* addressed PREQs destined for root mesh STA */
|
* addressed PREQs destined for root mesh STA */
|
||||||
_rtw_memcpy(path->rann_snd_addr, mgmt->addr2, ETH_ALEN);
|
memcpy(path->rann_snd_addr, mgmt->addr2, ETH_ALEN);
|
||||||
|
|
||||||
if (root_is_gate) {
|
if (root_is_gate) {
|
||||||
path->gate_ann_int = interval;
|
path->gate_ann_int = interval;
|
||||||
@ -1159,7 +1159,7 @@ static u32 rtw_hwmp_route_info_get(_adapter *adapter,
|
|||||||
rtw_mesh_path_activate(path);
|
rtw_mesh_path_activate(path);
|
||||||
#ifdef CONFIG_RTW_MESH_ADD_ROOT_CHK
|
#ifdef CONFIG_RTW_MESH_ADD_ROOT_CHK
|
||||||
if (path->is_root && (action == RTW_MPATH_PREP)) {
|
if (path->is_root && (action == RTW_MPATH_PREP)) {
|
||||||
_rtw_memcpy(path->rann_snd_addr,
|
memcpy(path->rann_snd_addr,
|
||||||
mgmt->addr2, ETH_ALEN);
|
mgmt->addr2, ETH_ALEN);
|
||||||
path->rann_metric = new_metric;
|
path->rann_metric = new_metric;
|
||||||
}
|
}
|
||||||
@ -1309,7 +1309,7 @@ void rtw_mesh_queue_preq(struct rtw_mesh_path *path, u8 flags)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(preq_node->dst, path->dst, ETH_ALEN);
|
memcpy(preq_node->dst, path->dst, ETH_ALEN);
|
||||||
preq_node->flags = flags;
|
preq_node->flags = flags;
|
||||||
|
|
||||||
path->flags |= RTW_MESH_PATH_REQ_QUEUED;
|
path->flags |= RTW_MESH_PATH_REQ_QUEUED;
|
||||||
|
@ -117,7 +117,7 @@ void rtw_mesh_path_assign_nexthop(struct rtw_mesh_path *mpath, struct sta_info *
|
|||||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||||
xframe = LIST_CONTAINOR(list, struct xmit_frame, list);
|
xframe = LIST_CONTAINOR(list, struct xmit_frame, list);
|
||||||
list = get_next(list);
|
list = get_next(list);
|
||||||
_rtw_memcpy(xframe->attrib.ra, sta->cmn.mac_addr, ETH_ALEN);
|
memcpy(xframe->attrib.ra, sta->cmn.mac_addr, ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit_critical_bh(&mpath->frame_queue.lock);
|
exit_critical_bh(&mpath->frame_queue.lock);
|
||||||
@ -135,9 +135,9 @@ static void rtw_prepare_for_gate(struct xmit_frame *xframe, char *dst_addr,
|
|||||||
/* update next hop */
|
/* update next hop */
|
||||||
rtw_rcu_read_lock();
|
rtw_rcu_read_lock();
|
||||||
next_hop = rtw_rcu_dereference(gate_mpath->next_hop)->cmn.mac_addr;
|
next_hop = rtw_rcu_dereference(gate_mpath->next_hop)->cmn.mac_addr;
|
||||||
_rtw_memcpy(attrib->ra, next_hop, ETH_ALEN);
|
memcpy(attrib->ra, next_hop, ETH_ALEN);
|
||||||
rtw_rcu_read_unlock();
|
rtw_rcu_read_unlock();
|
||||||
_rtw_memcpy(attrib->mda, dst_addr, ETH_ALEN);
|
memcpy(attrib->mda, dst_addr, ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -543,7 +543,7 @@ struct rtw_mesh_path *rtw_mesh_path_new(_adapter *adapter,
|
|||||||
if (!new_mpath)
|
if (!new_mpath)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
_rtw_memcpy(new_mpath->dst, dst, ETH_ALEN);
|
memcpy(new_mpath->dst, dst, ETH_ALEN);
|
||||||
memset(new_mpath->rann_snd_addr, 0xFF, ETH_ALEN);
|
memset(new_mpath->rann_snd_addr, 0xFF, ETH_ALEN);
|
||||||
new_mpath->is_root = false;
|
new_mpath->is_root = false;
|
||||||
new_mpath->adapter = adapter;
|
new_mpath->adapter = adapter;
|
||||||
@ -640,7 +640,7 @@ int rtw_mpp_path_add(_adapter *adapter,
|
|||||||
if (!new_mpath)
|
if (!new_mpath)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
_rtw_memcpy(new_mpath->mpp, mpp, ETH_ALEN);
|
memcpy(new_mpath->mpp, mpp, ETH_ALEN);
|
||||||
ret = rtw_rhashtable_lookup_insert_fast(&tbl->rhead,
|
ret = rtw_rhashtable_lookup_insert_fast(&tbl->rhead,
|
||||||
&new_mpath->rhash,
|
&new_mpath->rhash,
|
||||||
rtw_mesh_rht_params);
|
rtw_mesh_rht_params);
|
||||||
@ -663,8 +663,8 @@ void dump_mpp(void *sel, _adapter *adapter)
|
|||||||
|
|
||||||
mpath = rtw_mpp_path_lookup_by_idx(adapter, idx);
|
mpath = rtw_mpp_path_lookup_by_idx(adapter, idx);
|
||||||
if (mpath) {
|
if (mpath) {
|
||||||
_rtw_memcpy(dst, mpath->dst, ETH_ALEN);
|
memcpy(dst, mpath->dst, ETH_ALEN);
|
||||||
_rtw_memcpy(mpp, mpath->mpp, ETH_ALEN);
|
memcpy(mpp, mpath->mpp, ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
rtw_rcu_read_unlock();
|
rtw_rcu_read_unlock();
|
||||||
|
@ -75,7 +75,7 @@ u8 rtw_set_tim_ie(u8 dtim_cnt, u8 dtim_period
|
|||||||
*p++ = dtim_cnt;
|
*p++ = dtim_cnt;
|
||||||
*p++ = dtim_period;
|
*p++ = dtim_period;
|
||||||
*p++ = (rtw_bmp_is_set(tim_bmp, tim_bmp_len, 0) ? BIT0 : 0) | n1;
|
*p++ = (rtw_bmp_is_set(tim_bmp, tim_bmp_len, 0) ? BIT0 : 0) | n1;
|
||||||
_rtw_memcpy(p, tim_bmp + n1, bmp_len);
|
memcpy(p, tim_bmp + n1, bmp_len);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
RTW_INFO("n1:%u, n2:%u, bmp_offset:%u, bmp_len:%u\n", n1, n2, n1 / 2, bmp_len);
|
RTW_INFO("n1:%u, n2:%u, bmp_offset:%u, bmp_len:%u\n", n1, n2, n1 / 2, bmp_len);
|
||||||
@ -145,7 +145,7 @@ static void update_BCNTIM(_adapter *padapter)
|
|||||||
if (remainder_ielen > 0) {
|
if (remainder_ielen > 0) {
|
||||||
pbackup_remainder_ie = rtw_malloc(remainder_ielen);
|
pbackup_remainder_ie = rtw_malloc(remainder_ielen);
|
||||||
if (pbackup_remainder_ie && premainder_ie)
|
if (pbackup_remainder_ie && premainder_ie)
|
||||||
_rtw_memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
|
memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* append TIM IE */
|
/* append TIM IE */
|
||||||
@ -153,7 +153,7 @@ static void update_BCNTIM(_adapter *padapter)
|
|||||||
|
|
||||||
/*copy remainder IE*/
|
/*copy remainder IE*/
|
||||||
if (pbackup_remainder_ie) {
|
if (pbackup_remainder_ie) {
|
||||||
_rtw_memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen);
|
memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen);
|
||||||
|
|
||||||
rtw_mfree(pbackup_remainder_ie, remainder_ielen);
|
rtw_mfree(pbackup_remainder_ie, remainder_ielen);
|
||||||
}
|
}
|
||||||
@ -210,18 +210,18 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d
|
|||||||
if (remainder_ielen > 0) {
|
if (remainder_ielen > 0) {
|
||||||
pbackup_remainder_ie = rtw_malloc(remainder_ielen);
|
pbackup_remainder_ie = rtw_malloc(remainder_ielen);
|
||||||
if (pbackup_remainder_ie && premainder_ie)
|
if (pbackup_remainder_ie && premainder_ie)
|
||||||
_rtw_memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
|
memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
|
||||||
}
|
}
|
||||||
|
|
||||||
*dst_ie++ = index;
|
*dst_ie++ = index;
|
||||||
*dst_ie++ = len;
|
*dst_ie++ = len;
|
||||||
|
|
||||||
_rtw_memcpy(dst_ie, data, len);
|
memcpy(dst_ie, data, len);
|
||||||
dst_ie += len;
|
dst_ie += len;
|
||||||
|
|
||||||
/* copy remainder IE */
|
/* copy remainder IE */
|
||||||
if (pbackup_remainder_ie) {
|
if (pbackup_remainder_ie) {
|
||||||
_rtw_memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen);
|
memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen);
|
||||||
|
|
||||||
rtw_mfree(pbackup_remainder_ie, remainder_ielen);
|
rtw_mfree(pbackup_remainder_ie, remainder_ielen);
|
||||||
}
|
}
|
||||||
@ -253,12 +253,12 @@ void rtw_remove_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index)
|
|||||||
if (remainder_ielen > 0) {
|
if (remainder_ielen > 0) {
|
||||||
pbackup_remainder_ie = rtw_malloc(remainder_ielen);
|
pbackup_remainder_ie = rtw_malloc(remainder_ielen);
|
||||||
if (pbackup_remainder_ie && premainder_ie)
|
if (pbackup_remainder_ie && premainder_ie)
|
||||||
_rtw_memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
|
memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* copy remainder IE */
|
/* copy remainder IE */
|
||||||
if (pbackup_remainder_ie) {
|
if (pbackup_remainder_ie) {
|
||||||
_rtw_memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen);
|
memcpy(dst_ie, pbackup_remainder_ie, remainder_ielen);
|
||||||
|
|
||||||
rtw_mfree(pbackup_remainder_ie, remainder_ielen);
|
rtw_mfree(pbackup_remainder_ie, remainder_ielen);
|
||||||
}
|
}
|
||||||
@ -723,7 +723,7 @@ void expire_timeout_chk(_adapter *padapter)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
psta = rtw_get_stainfo_by_offset(pstapriv, del_asoc_list[i]);
|
psta = rtw_get_stainfo_by_offset(pstapriv, del_asoc_list[i]);
|
||||||
_rtw_memcpy(sta_addr, psta->cmn.mac_addr, ETH_ALEN);
|
memcpy(sta_addr, psta->cmn.mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
RTW_INFO(FUNC_ADPT_FMT" asoc expire "MAC_FMT", state=0x%x\n"
|
RTW_INFO(FUNC_ADPT_FMT" asoc expire "MAC_FMT", state=0x%x\n"
|
||||||
, FUNC_ADPT_ARG(padapter), MAC_ARG(psta->cmn.mac_addr), psta->state);
|
, FUNC_ADPT_ARG(padapter), MAC_ARG(psta->cmn.mac_addr), psta->state);
|
||||||
@ -1202,7 +1202,7 @@ static void update_ap_info(_adapter *padapter, struct sta_info *psta)
|
|||||||
psta->wireless_mode = pmlmeext->cur_wireless_mode;
|
psta->wireless_mode = pmlmeext->cur_wireless_mode;
|
||||||
|
|
||||||
psta->bssratelen = rtw_get_rateset_len(pnetwork->SupportedRates);
|
psta->bssratelen = rtw_get_rateset_len(pnetwork->SupportedRates);
|
||||||
_rtw_memcpy(psta->bssrateset, pnetwork->SupportedRates, psta->bssratelen);
|
memcpy(psta->bssrateset, pnetwork->SupportedRates, psta->bssratelen);
|
||||||
|
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
/* HT related cap */
|
/* HT related cap */
|
||||||
@ -1231,10 +1231,10 @@ static void update_ap_info(_adapter *padapter, struct sta_info *psta)
|
|||||||
phtpriv_ap->agg_enable_bitmap = 0x0;/* reset */
|
phtpriv_ap->agg_enable_bitmap = 0x0;/* reset */
|
||||||
phtpriv_ap->candidate_tid_bitmap = 0x0;/* reset */
|
phtpriv_ap->candidate_tid_bitmap = 0x0;/* reset */
|
||||||
|
|
||||||
_rtw_memcpy(&psta->htpriv, &pmlmepriv->htpriv, sizeof(struct ht_priv));
|
memcpy(&psta->htpriv, &pmlmepriv->htpriv, sizeof(struct ht_priv));
|
||||||
|
|
||||||
#ifdef CONFIG_80211AC_VHT
|
#ifdef CONFIG_80211AC_VHT
|
||||||
_rtw_memcpy(&psta->vhtpriv, &pmlmepriv->vhtpriv, sizeof(struct vht_priv));
|
memcpy(&psta->vhtpriv, &pmlmepriv->vhtpriv, sizeof(struct vht_priv));
|
||||||
#endif /* CONFIG_80211AC_VHT */
|
#endif /* CONFIG_80211AC_VHT */
|
||||||
|
|
||||||
#endif /* CONFIG_80211N_HT */
|
#endif /* CONFIG_80211N_HT */
|
||||||
@ -1647,7 +1647,7 @@ void start_bss_network(_adapter *padapter, struct createbss_parm *parm)
|
|||||||
else
|
else
|
||||||
rtw_warn_on(1);
|
rtw_warn_on(1);
|
||||||
req_ch = 0;
|
req_ch = 0;
|
||||||
_rtw_memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length);
|
memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
bcn_interval = (u16)pnetwork->Configuration.BeaconPeriod;
|
bcn_interval = (u16)pnetwork->Configuration.BeaconPeriod;
|
||||||
@ -1714,7 +1714,7 @@ chbw_decision:
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* let pnetwork_mlme == pnetwork_mlmeext */
|
/* let pnetwork_mlme == pnetwork_mlmeext */
|
||||||
_rtw_memcpy(&(pdvobj->padapters[i]->mlmepriv.cur_network.network)
|
memcpy(&(pdvobj->padapters[i]->mlmepriv.cur_network.network)
|
||||||
, &(pdvobj->padapters[i]->mlmeextpriv.mlmext_info.network)
|
, &(pdvobj->padapters[i]->mlmeextpriv.mlmext_info.network)
|
||||||
, pdvobj->padapters[i]->mlmeextpriv.mlmext_info.network.Length);
|
, pdvobj->padapters[i]->mlmeextpriv.mlmext_info.network.Length);
|
||||||
|
|
||||||
@ -1935,7 +1935,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||||||
|
|
||||||
memset(ie, 0, MAX_IE_SZ);
|
memset(ie, 0, MAX_IE_SZ);
|
||||||
|
|
||||||
_rtw_memcpy(ie, pbuf, pbss_network->IELength);
|
memcpy(ie, pbuf, pbss_network->IELength);
|
||||||
|
|
||||||
|
|
||||||
if (pbss_network->InfrastructureMode != Ndis802_11APMode
|
if (pbss_network->InfrastructureMode != Ndis802_11APMode
|
||||||
@ -1951,7 +1951,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||||||
|
|
||||||
pbss_network->Rssi = 0;
|
pbss_network->Rssi = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pbss_network->MacAddress, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(pbss_network->MacAddress, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
|
|
||||||
/* beacon interval */
|
/* beacon interval */
|
||||||
p = rtw_get_beacon_interval_from_ie(ie);/* ie + 8; */ /* 8: TimeStamp, 2: Beacon Interval 2:Capability */
|
p = rtw_get_beacon_interval_from_ie(ie);/* ie + 8; */ /* 8: TimeStamp, 2: Beacon Interval 2:Capability */
|
||||||
@ -1967,10 +1967,10 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||||
if (p && ie_len > 0) {
|
if (p && ie_len > 0) {
|
||||||
memset(&pbss_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
memset(&pbss_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||||
_rtw_memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len);
|
memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len);
|
||||||
pbss_network->Ssid.SsidLength = ie_len;
|
pbss_network->Ssid.SsidLength = ie_len;
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
_rtw_memcpy(padapter->wdinfo.p2p_group_ssid, pbss_network->Ssid.Ssid, pbss_network->Ssid.SsidLength);
|
memcpy(padapter->wdinfo.p2p_group_ssid, pbss_network->Ssid.Ssid, pbss_network->Ssid.SsidLength);
|
||||||
padapter->wdinfo.p2p_group_ssid_len = pbss_network->Ssid.SsidLength;
|
padapter->wdinfo.p2p_group_ssid_len = pbss_network->Ssid.SsidLength;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1981,7 +1981,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_MESH_ID, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, WLAN_EID_MESH_ID, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||||
if (p && ie_len > 0) {
|
if (p && ie_len > 0) {
|
||||||
memset(&pbss_network->mesh_id, 0, sizeof(NDIS_802_11_SSID));
|
memset(&pbss_network->mesh_id, 0, sizeof(NDIS_802_11_SSID));
|
||||||
_rtw_memcpy(pbss_network->mesh_id.Ssid, (p + 2), ie_len);
|
memcpy(pbss_network->mesh_id.Ssid, (p + 2), ie_len);
|
||||||
pbss_network->mesh_id.SsidLength = ie_len;
|
pbss_network->mesh_id.SsidLength = ie_len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2008,7 +2008,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||||||
pbss_network->IELength=pbss_network->IELength - ret_rm;
|
pbss_network->IELength=pbss_network->IELength - ret_rm;
|
||||||
}
|
}
|
||||||
RTW_DBG("%s, ie_len=%u\n", __FUNCTION__, ie_len);
|
RTW_DBG("%s, ie_len=%u\n", __FUNCTION__, ie_len);
|
||||||
_rtw_memcpy(supportRate, p + 2, ie_len);
|
memcpy(supportRate, p + 2, ie_len);
|
||||||
supportRateNum = ie_len;
|
supportRateNum = ie_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2021,7 +2021,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||||||
_EXT_SUPPORTEDRATES_IE_,NULL,0);
|
_EXT_SUPPORTEDRATES_IE_,NULL,0);
|
||||||
RTW_DBG("%s, remove_ie of ext_supported rates =%d\n", __FUNCTION__, ret_rm);
|
RTW_DBG("%s, remove_ie of ext_supported rates =%d\n", __FUNCTION__, ret_rm);
|
||||||
} else {
|
} else {
|
||||||
_rtw_memcpy(supportRate + supportRateNum, p + 2, ie_len);
|
memcpy(supportRate + supportRateNum, p + 2, ie_len);
|
||||||
supportRateNum += ie_len;
|
supportRateNum += ie_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2286,7 +2286,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||||||
rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor);
|
rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor);
|
||||||
pht_cap->ampdu_params_info |= (IEEE80211_HT_AMPDU_PARM_FACTOR & max_rx_ampdu_factor); /* set Max Rx AMPDU size to 64K */
|
pht_cap->ampdu_params_info |= (IEEE80211_HT_AMPDU_PARM_FACTOR & max_rx_ampdu_factor); /* set Max Rx AMPDU size to 64K */
|
||||||
|
|
||||||
_rtw_memcpy(&(pmlmeinfo->HT_caps), pht_cap, sizeof(struct HT_caps_element));
|
memcpy(&(pmlmeinfo->HT_caps), pht_cap, sizeof(struct HT_caps_element));
|
||||||
|
|
||||||
/* Update Supported MCS Set field */
|
/* Update Supported MCS Set field */
|
||||||
{
|
{
|
||||||
@ -2346,7 +2346,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_BEAMFORMING */
|
#endif /* CONFIG_BEAMFORMING */
|
||||||
|
|
||||||
_rtw_memcpy(&pmlmepriv->htpriv.ht_cap, p + 2, ie_len);
|
memcpy(&pmlmepriv->htpriv.ht_cap, p + 2, ie_len);
|
||||||
|
|
||||||
if (0) {
|
if (0) {
|
||||||
RTW_INFO(FUNC_ADPT_FMT" HT_CAP_IE driver masked:\n", FUNC_ADPT_ARG(padapter));
|
RTW_INFO(FUNC_ADPT_FMT" HT_CAP_IE driver masked:\n", FUNC_ADPT_ARG(padapter));
|
||||||
@ -2641,7 +2641,7 @@ int rtw_acl_add_sta(_adapter *adapter, u8 period, const u8 *addr)
|
|||||||
if (acl_node->valid == _FALSE) {
|
if (acl_node->valid == _FALSE) {
|
||||||
|
|
||||||
_rtw_init_listhead(&acl_node->list);
|
_rtw_init_listhead(&acl_node->list);
|
||||||
_rtw_memcpy(acl_node->addr, addr, ETH_ALEN);
|
memcpy(acl_node->addr, addr, ETH_ALEN);
|
||||||
acl_node->valid = _TRUE;
|
acl_node->valid = _TRUE;
|
||||||
|
|
||||||
rtw_list_insert_tail(&acl_node->list, get_list_head(acl_node_q));
|
rtw_list_insert_tail(&acl_node->list, get_list_head(acl_node_q));
|
||||||
@ -2737,10 +2737,10 @@ u8 rtw_ap_set_sta_key(_adapter *adapter, const u8 *addr, u8 alg, const u8 *key,
|
|||||||
|
|
||||||
init_h2fwcmd_w_parm_no_rsp(cmd, param, _SetStaKey_CMD_);
|
init_h2fwcmd_w_parm_no_rsp(cmd, param, _SetStaKey_CMD_);
|
||||||
|
|
||||||
_rtw_memcpy(param->addr, addr, ETH_ALEN);
|
memcpy(param->addr, addr, ETH_ALEN);
|
||||||
param->algorithm = alg;
|
param->algorithm = alg;
|
||||||
param->keyid = keyid;
|
param->keyid = keyid;
|
||||||
_rtw_memcpy(param->key, key, 16);
|
memcpy(param->key, key, 16);
|
||||||
param->gk = gk;
|
param->gk = gk;
|
||||||
|
|
||||||
res = rtw_enqueue_cmd(cmdpriv, cmd);
|
res = rtw_enqueue_cmd(cmdpriv, cmd);
|
||||||
@ -2806,7 +2806,7 @@ static int rtw_ap_set_key(_adapter *padapter, u8 *key, u8 alg, int keyid, u8 set
|
|||||||
keylen = 16;
|
keylen = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(&(psetkeyparm->key[0]), key, keylen);
|
memcpy(&(psetkeyparm->key[0]), key, keylen);
|
||||||
|
|
||||||
pcmd->cmdcode = _SetKey_CMD_;
|
pcmd->cmdcode = _SetKey_CMD_;
|
||||||
pcmd->parmbuf = (u8 *)psetkeyparm;
|
pcmd->parmbuf = (u8 *)psetkeyparm;
|
||||||
@ -3191,16 +3191,16 @@ static void update_bcn_wps_ie(_adapter *padapter)
|
|||||||
if (remainder_ielen > 0) {
|
if (remainder_ielen > 0) {
|
||||||
pbackup_remainder_ie = rtw_malloc(remainder_ielen);
|
pbackup_remainder_ie = rtw_malloc(remainder_ielen);
|
||||||
if (pbackup_remainder_ie)
|
if (pbackup_remainder_ie)
|
||||||
_rtw_memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
|
memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen);
|
||||||
}
|
}
|
||||||
|
|
||||||
wps_ielen = (uint)pwps_ie_src[1];/* to get ie data len */
|
wps_ielen = (uint)pwps_ie_src[1];/* to get ie data len */
|
||||||
if ((wps_offset + wps_ielen + 2 + remainder_ielen) <= MAX_IE_SZ) {
|
if ((wps_offset + wps_ielen + 2 + remainder_ielen) <= MAX_IE_SZ) {
|
||||||
_rtw_memcpy(pwps_ie, pwps_ie_src, wps_ielen + 2);
|
memcpy(pwps_ie, pwps_ie_src, wps_ielen + 2);
|
||||||
pwps_ie += (wps_ielen + 2);
|
pwps_ie += (wps_ielen + 2);
|
||||||
|
|
||||||
if (pbackup_remainder_ie)
|
if (pbackup_remainder_ie)
|
||||||
_rtw_memcpy(pwps_ie, pbackup_remainder_ie, remainder_ielen);
|
memcpy(pwps_ie, pbackup_remainder_ie, remainder_ielen);
|
||||||
|
|
||||||
/* update IELength */
|
/* update IELength */
|
||||||
pnetwork->IELength = wps_offset + (wps_ielen + 2) + remainder_ielen;
|
pnetwork->IELength = wps_offset + (wps_ielen + 2) + remainder_ielen;
|
||||||
@ -3226,11 +3226,6 @@ static void update_bcn_wps_ie(_adapter *padapter)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void update_bcn_p2p_ie(_adapter *padapter)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void update_bcn_vendor_spec_ie(_adapter *padapter, u8 *oui)
|
static void update_bcn_vendor_spec_ie(_adapter *padapter, u8 *oui)
|
||||||
{
|
{
|
||||||
RTW_INFO("%s\n", __FUNCTION__);
|
RTW_INFO("%s\n", __FUNCTION__);
|
||||||
@ -3241,9 +3236,9 @@ static void update_bcn_vendor_spec_ie(_adapter *padapter, u8 *oui)
|
|||||||
update_bcn_wmm_ie(padapter);
|
update_bcn_wmm_ie(padapter);
|
||||||
else if (_rtw_memcmp(WPS_OUI, oui, 4))
|
else if (_rtw_memcmp(WPS_OUI, oui, 4))
|
||||||
update_bcn_wps_ie(padapter);
|
update_bcn_wps_ie(padapter);
|
||||||
else if (_rtw_memcmp(P2P_OUI, oui, 4))
|
else if (_rtw_memcmp(P2P_OUI, oui, 4)) {
|
||||||
update_bcn_p2p_ie(padapter);
|
// update_bcn_p2p_ie(padapter);
|
||||||
else
|
} else
|
||||||
RTW_INFO("unknown OUI type!\n");
|
RTW_INFO("unknown OUI type!\n");
|
||||||
|
|
||||||
|
|
||||||
@ -3614,7 +3609,7 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
|||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT) &&
|
if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME) &&
|
||||||
!psta->no_short_slot_time_set) {
|
!psta->no_short_slot_time_set) {
|
||||||
psta->no_short_slot_time_set = 1;
|
psta->no_short_slot_time_set = 1;
|
||||||
pmlmepriv->num_sta_no_short_slot_time++;
|
pmlmepriv->num_sta_no_short_slot_time++;
|
||||||
@ -3624,7 +3619,7 @@ void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT)) {
|
if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)) {
|
||||||
if (!psta->no_short_slot_time_set) {
|
if (!psta->no_short_slot_time_set) {
|
||||||
psta->no_short_slot_time_set = 1;
|
psta->no_short_slot_time_set = 1;
|
||||||
|
|
||||||
@ -3978,7 +3973,7 @@ int rtw_sta_flush(_adapter *padapter, bool enqueue)
|
|||||||
u8 sta_addr[ETH_ALEN];
|
u8 sta_addr[ETH_ALEN];
|
||||||
|
|
||||||
psta = rtw_get_stainfo_by_offset(pstapriv, flush_list[i]);
|
psta = rtw_get_stainfo_by_offset(pstapriv, flush_list[i]);
|
||||||
_rtw_memcpy(sta_addr, psta->cmn.mac_addr, ETH_ALEN);
|
memcpy(sta_addr, psta->cmn.mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING, enqueue);
|
ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING, enqueue);
|
||||||
#ifdef CONFIG_RTW_MESH
|
#ifdef CONFIG_RTW_MESH
|
||||||
@ -5160,7 +5155,7 @@ u16 rtw_ap_parse_sta_supported_rates(_adapter *adapter, struct sta_info *sta, u8
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(sta->bssrateset, rate_set, rate_num);
|
memcpy(sta->bssrateset, rate_set, rate_num);
|
||||||
sta->bssratelen = rate_num;
|
sta->bssratelen = rate_num;
|
||||||
|
|
||||||
if (MLME_IS_AP(adapter)) {
|
if (MLME_IS_AP(adapter)) {
|
||||||
@ -5215,10 +5210,10 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
|
|||||||
status = WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION;
|
status = WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION;
|
||||||
|
|
||||||
if (!sta->wpa2_group_cipher)
|
if (!sta->wpa2_group_cipher)
|
||||||
status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID;
|
status = WLAN_STATUS_INVALID_GROUP_CIPHER;
|
||||||
|
|
||||||
if (!sta->wpa2_pairwise_cipher)
|
if (!sta->wpa2_pairwise_cipher)
|
||||||
status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID;
|
status = WLAN_STATUS_INVALID_PAIRWISE_CIPHER;
|
||||||
} else
|
} else
|
||||||
status = WLAN_STATUS_INVALID_IE;
|
status = WLAN_STATUS_INVALID_IE;
|
||||||
|
|
||||||
@ -5235,10 +5230,10 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
|
|||||||
sta->wpa_pairwise_cipher = pairwise_cipher & sec->wpa_pairwise_cipher;
|
sta->wpa_pairwise_cipher = pairwise_cipher & sec->wpa_pairwise_cipher;
|
||||||
|
|
||||||
if (!sta->wpa_group_cipher)
|
if (!sta->wpa_group_cipher)
|
||||||
status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID;
|
status = WLAN_STATUS_INVALID_GROUP_CIPHER;
|
||||||
|
|
||||||
if (!sta->wpa_pairwise_cipher)
|
if (!sta->wpa_pairwise_cipher)
|
||||||
status = WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID;
|
status = WLAN_STATUS_INVALID_PAIRWISE_CIPHER;
|
||||||
} else
|
} else
|
||||||
status = WLAN_STATUS_INVALID_IE;
|
status = WLAN_STATUS_INVALID_IE;
|
||||||
|
|
||||||
@ -5339,7 +5334,7 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
|
|||||||
copy_len = ((wpa_ie_len + 2) > sizeof(sta->wpa_ie)) ? (sizeof(sta->wpa_ie)) : (wpa_ie_len + 2);
|
copy_len = ((wpa_ie_len + 2) > sizeof(sta->wpa_ie)) ? (sizeof(sta->wpa_ie)) : (wpa_ie_len + 2);
|
||||||
|
|
||||||
if (copy_len > 0)
|
if (copy_len > 0)
|
||||||
_rtw_memcpy(sta->wpa_ie, wpa_ie - 2, copy_len);
|
memcpy(sta->wpa_ie, wpa_ie - 2, copy_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
@ -5426,10 +5421,10 @@ void rtw_ap_parse_sta_ht_ie(_adapter *adapter, struct sta_info *sta, struct rtw_
|
|||||||
if (elems->ht_capabilities && elems->ht_capabilities_len >= sizeof(struct rtw_ieee80211_ht_cap)) {
|
if (elems->ht_capabilities && elems->ht_capabilities_len >= sizeof(struct rtw_ieee80211_ht_cap)) {
|
||||||
sta->flags |= WLAN_STA_HT;
|
sta->flags |= WLAN_STA_HT;
|
||||||
sta->flags |= WLAN_STA_WME;
|
sta->flags |= WLAN_STA_WME;
|
||||||
_rtw_memcpy(&sta->htpriv.ht_cap, elems->ht_capabilities, sizeof(struct rtw_ieee80211_ht_cap));
|
memcpy(&sta->htpriv.ht_cap, elems->ht_capabilities, sizeof(struct rtw_ieee80211_ht_cap));
|
||||||
|
|
||||||
if (elems->ht_operation && elems->ht_operation_len == HT_OP_IE_LEN) {
|
if (elems->ht_operation && elems->ht_operation_len == HT_OP_IE_LEN) {
|
||||||
_rtw_memcpy(sta->htpriv.ht_op, elems->ht_operation, HT_OP_IE_LEN);
|
memcpy(sta->htpriv.ht_op, elems->ht_operation, HT_OP_IE_LEN);
|
||||||
sta->htpriv.op_present = 1;
|
sta->htpriv.op_present = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5452,15 +5447,15 @@ void rtw_ap_parse_sta_vht_ie(_adapter *adapter, struct sta_info *sta, struct rtw
|
|||||||
memset(&sta->vhtpriv, 0, sizeof(struct vht_priv));
|
memset(&sta->vhtpriv, 0, sizeof(struct vht_priv));
|
||||||
if (elems->vht_capabilities && elems->vht_capabilities_len == VHT_CAP_IE_LEN) {
|
if (elems->vht_capabilities && elems->vht_capabilities_len == VHT_CAP_IE_LEN) {
|
||||||
sta->flags |= WLAN_STA_VHT;
|
sta->flags |= WLAN_STA_VHT;
|
||||||
_rtw_memcpy(sta->vhtpriv.vht_cap, elems->vht_capabilities, VHT_CAP_IE_LEN);
|
memcpy(sta->vhtpriv.vht_cap, elems->vht_capabilities, VHT_CAP_IE_LEN);
|
||||||
|
|
||||||
if (elems->vht_operation && elems->vht_operation_len== VHT_OP_IE_LEN) {
|
if (elems->vht_operation && elems->vht_operation_len== VHT_OP_IE_LEN) {
|
||||||
_rtw_memcpy(sta->vhtpriv.vht_op, elems->vht_operation, VHT_OP_IE_LEN);
|
memcpy(sta->vhtpriv.vht_op, elems->vht_operation, VHT_OP_IE_LEN);
|
||||||
sta->vhtpriv.op_present = 1;
|
sta->vhtpriv.op_present = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elems->vht_op_mode_notify && elems->vht_op_mode_notify_len == 1) {
|
if (elems->vht_op_mode_notify && elems->vht_op_mode_notify_len == 1) {
|
||||||
_rtw_memcpy(&sta->vhtpriv.vht_op_mode_notify, elems->vht_op_mode_notify, 1);
|
memcpy(&sta->vhtpriv.vht_op_mode_notify, elems->vht_op_mode_notify, 1);
|
||||||
sta->vhtpriv.notify_present = 1;
|
sta->vhtpriv.notify_present = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -235,11 +235,11 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, enum channel_width bw)
|
|||||||
set_duration(pframe, duration);
|
set_duration(pframe, duration);
|
||||||
|
|
||||||
/* DA */
|
/* DA */
|
||||||
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
||||||
/* SA */
|
/* SA */
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
/* BSSID */
|
/* BSSID */
|
||||||
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
|
||||||
|
|
||||||
/* HT control field */
|
/* HT control field */
|
||||||
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
|
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
|
||||||
@ -250,7 +250,7 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, enum channel_width bw)
|
|||||||
* Category field: vender-specific value, 0x7F
|
* Category field: vender-specific value, 0x7F
|
||||||
* OUI: 0x00E04C
|
* OUI: 0x00E04C
|
||||||
*/
|
*/
|
||||||
_rtw_memcpy(pframe + 28, ActionHdr, 4);
|
memcpy(pframe + 28, ActionHdr, 4);
|
||||||
|
|
||||||
attrib->pktlen = 32;
|
attrib->pktlen = 32;
|
||||||
attrib->last_txcmdsz = attrib->pktlen;
|
attrib->last_txcmdsz = attrib->pktlen;
|
||||||
@ -331,10 +331,10 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, enum channel_
|
|||||||
set_duration(pframe, duration);
|
set_duration(pframe, duration);
|
||||||
|
|
||||||
/* RA */
|
/* RA */
|
||||||
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
||||||
|
|
||||||
/* TA */
|
/* TA */
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
|
|
||||||
/* Sounding Sequence, bit0~1 is reserved */
|
/* Sounding Sequence, bit0~1 is reserved */
|
||||||
sequence = info->sounding_sequence << 2;
|
sequence = info->sounding_sequence << 2;
|
||||||
@ -342,7 +342,7 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, enum channel_
|
|||||||
info->sounding_sequence = 0;
|
info->sounding_sequence = 0;
|
||||||
else
|
else
|
||||||
info->sounding_sequence++;
|
info->sounding_sequence++;
|
||||||
_rtw_memcpy(pframe + 16, &sequence, 1);
|
memcpy(pframe + 16, &sequence, 1);
|
||||||
|
|
||||||
/* STA Info */
|
/* STA Info */
|
||||||
/*
|
/*
|
||||||
@ -356,7 +356,7 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, enum channel_
|
|||||||
sta_info.feedback_type = 0;
|
sta_info.feedback_type = 0;
|
||||||
/* "Nc Index" reserved if the Feedback Type field indicates SU */
|
/* "Nc Index" reserved if the Feedback Type field indicates SU */
|
||||||
sta_info.nc_index = 0;
|
sta_info.nc_index = 0;
|
||||||
_rtw_memcpy(pframe + 17, (u8 *)&sta_info, 2);
|
memcpy(pframe + 17, (u8 *)&sta_info, 2);
|
||||||
|
|
||||||
attrib->pktlen = 19;
|
attrib->pktlen = 19;
|
||||||
attrib->last_txcmdsz = attrib->pktlen;
|
attrib->last_txcmdsz = attrib->pktlen;
|
||||||
@ -448,10 +448,10 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, enum channel_width bw)
|
|||||||
set_duration(pframe, duration);
|
set_duration(pframe, duration);
|
||||||
|
|
||||||
/* RA */
|
/* RA */
|
||||||
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
||||||
|
|
||||||
/* TA */
|
/* TA */
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
|
|
||||||
/* Sounding Sequence, bit0~1 is reserved */
|
/* Sounding Sequence, bit0~1 is reserved */
|
||||||
sequence = info->sounding_sequence << 2;
|
sequence = info->sounding_sequence << 2;
|
||||||
@ -459,7 +459,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, enum channel_width bw)
|
|||||||
info->sounding_sequence = 0;
|
info->sounding_sequence = 0;
|
||||||
else
|
else
|
||||||
info->sounding_sequence++;
|
info->sounding_sequence++;
|
||||||
_rtw_memcpy(pframe + 16, &sequence, 1);
|
memcpy(pframe + 16, &sequence, 1);
|
||||||
|
|
||||||
attrib->pktlen = 17;
|
attrib->pktlen = 17;
|
||||||
|
|
||||||
@ -472,7 +472,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, enum channel_width bw)
|
|||||||
sta_info.aid = bfee->aid;
|
sta_info.aid = bfee->aid;
|
||||||
sta_info.feedback_type = 1; /* 1'b1: MU */
|
sta_info.feedback_type = 1; /* 1'b1: MU */
|
||||||
sta_info.nc_index = 0;
|
sta_info.nc_index = 0;
|
||||||
_rtw_memcpy(pframe + attrib->pktlen, (u8 *)&sta_info, 2);
|
memcpy(pframe + attrib->pktlen, (u8 *)&sta_info, 2);
|
||||||
attrib->pktlen += 2;
|
attrib->pktlen += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -529,10 +529,10 @@ static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll)
|
|||||||
set_duration(pframe, 100);
|
set_duration(pframe, 100);
|
||||||
|
|
||||||
/* RA */
|
/* RA */
|
||||||
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
||||||
|
|
||||||
/* TA */
|
/* TA */
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
|
|
||||||
/* Feedback Segment Retransmission Bitmap */
|
/* Feedback Segment Retransmission Bitmap */
|
||||||
pframe[16] = 0xFF;
|
pframe[16] = 0xFF;
|
||||||
@ -1017,7 +1017,7 @@ static struct beamformer_entry *_bfer_add_entry(PADAPTER adapter,
|
|||||||
|
|
||||||
bfer->used = _TRUE;
|
bfer->used = _TRUE;
|
||||||
_get_txvector_parameter(adapter, sta, &bfer->g_id, &bfer->p_aid);
|
_get_txvector_parameter(adapter, sta, &bfer->g_id, &bfer->p_aid);
|
||||||
_rtw_memcpy(bfer->mac_addr, sta->cmn.mac_addr, ETH_ALEN);
|
memcpy(bfer->mac_addr, sta->cmn.mac_addr, ETH_ALEN);
|
||||||
bfer->cap = bf_cap;
|
bfer->cap = bf_cap;
|
||||||
bfer->state = BEAMFORM_ENTRY_HW_STATE_ADD_INIT;
|
bfer->state = BEAMFORM_ENTRY_HW_STATE_ADD_INIT;
|
||||||
bfer->NumofSoundingDim = sounding_dim;
|
bfer->NumofSoundingDim = sounding_dim;
|
||||||
@ -1209,7 +1209,7 @@ static struct beamformee_entry *_bfee_add_entry(PADAPTER adapter,
|
|||||||
sta->cmn.bf_info.g_id = bfee->g_id;
|
sta->cmn.bf_info.g_id = bfee->g_id;
|
||||||
sta->cmn.bf_info.p_aid = bfee->p_aid;
|
sta->cmn.bf_info.p_aid = bfee->p_aid;
|
||||||
|
|
||||||
_rtw_memcpy(bfee->mac_addr, sta->cmn.mac_addr, ETH_ALEN);
|
memcpy(bfee->mac_addr, sta->cmn.mac_addr, ETH_ALEN);
|
||||||
bfee->txbf = _FALSE;
|
bfee->txbf = _FALSE;
|
||||||
bfee->sounding = _FALSE;
|
bfee->sounding = _FALSE;
|
||||||
bfee->sound_period = 40;
|
bfee->sound_period = 40;
|
||||||
@ -1722,18 +1722,18 @@ u8 rtw_bf_send_vht_gid_mgnt_packet(PADAPTER adapter, u8 *ra, u8 *gid, u8 *positi
|
|||||||
SetFragNum(pframe, 0);
|
SetFragNum(pframe, 0);
|
||||||
SetSeqNum(pframe, 0);
|
SetSeqNum(pframe, 0);
|
||||||
|
|
||||||
_rtw_memcpy(wlanhdr->addr1, ra, ETH_ALEN);
|
memcpy(wlanhdr->addr1, ra, ETH_ALEN);
|
||||||
_rtw_memcpy(wlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(wlanhdr->addr2, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
_rtw_memcpy(wlanhdr->addr3, get_bssid(mlmepriv), ETH_ALEN);
|
memcpy(wlanhdr->addr3, get_bssid(mlmepriv), ETH_ALEN);
|
||||||
|
|
||||||
pframe[24] = RTW_WLAN_CATEGORY_VHT;
|
pframe[24] = RTW_WLAN_CATEGORY_VHT;
|
||||||
pframe[25] = RTW_WLAN_ACTION_VHT_GROUPID_MANAGEMENT;
|
pframe[25] = RTW_WLAN_ACTION_VHT_GROUPID_MANAGEMENT;
|
||||||
/* Set Membership Status Array */
|
/* Set Membership Status Array */
|
||||||
ptr = pframe + 26;
|
ptr = pframe + 26;
|
||||||
_rtw_memcpy(ptr, gid, 8);
|
memcpy(ptr, gid, 8);
|
||||||
/* Set User Position Array */
|
/* Set User Position Array */
|
||||||
ptr = pframe + 34;
|
ptr = pframe + 34;
|
||||||
_rtw_memcpy(ptr, position, 16);
|
memcpy(ptr, position, 16);
|
||||||
|
|
||||||
attrib->pktlen = 54;
|
attrib->pktlen = 54;
|
||||||
attrib->last_txcmdsz = attrib->pktlen;
|
attrib->last_txcmdsz = attrib->pktlen;
|
||||||
@ -1879,7 +1879,7 @@ u8 rtw_bf_cmd(PADAPTER adapter, s32 type, u8 *pbuf, s32 size, u8 enqueue)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(wk_buf, pbuf, size);
|
memcpy(wk_buf, pbuf, size);
|
||||||
} else {
|
} else {
|
||||||
wk_buf = NULL;
|
wk_buf = NULL;
|
||||||
size = 0;
|
size = 0;
|
||||||
@ -2077,7 +2077,7 @@ struct beamforming_entry *beamforming_add_entry(PADAPTER adapter, u8 *ra, u16 ai
|
|||||||
pEntry->p_aid = (pEntry->p_aid << 1) | (ra[4] >> 7);
|
pEntry->p_aid = (pEntry->p_aid << 1) | (ra[4] >> 7);
|
||||||
pEntry->g_id = 0;
|
pEntry->g_id = 0;
|
||||||
}
|
}
|
||||||
_rtw_memcpy(pEntry->mac_addr, ra, ETH_ALEN);
|
memcpy(pEntry->mac_addr, ra, ETH_ALEN);
|
||||||
pEntry->bSound = _FALSE;
|
pEntry->bSound = _FALSE;
|
||||||
|
|
||||||
/* 3 TODO SW/FW sound period */
|
/* 3 TODO SW/FW sound period */
|
||||||
@ -2217,9 +2217,9 @@ BOOLEAN issue_ht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, enum channel_width bw,
|
|||||||
set_order_bit(pframe);
|
set_order_bit(pframe);
|
||||||
set_frame_sub_type(pframe, WIFI_ACTION_NOACK);
|
set_frame_sub_type(pframe, WIFI_ACTION_NOACK);
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
||||||
|
|
||||||
if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
|
if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
|
||||||
aSifsTime = 10;
|
aSifsTime = 10;
|
||||||
@ -2239,7 +2239,7 @@ BOOLEAN issue_ht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, enum channel_width bw,
|
|||||||
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
|
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
|
||||||
SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1);
|
SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1);
|
||||||
|
|
||||||
_rtw_memcpy(pframe + 28, ActionHdr, 4);
|
memcpy(pframe + 28, ActionHdr, 4);
|
||||||
|
|
||||||
pattrib->pktlen = 32;
|
pattrib->pktlen = 32;
|
||||||
|
|
||||||
@ -2293,9 +2293,9 @@ BOOLEAN issue_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, enum channel_width bw, u8
|
|||||||
set_order_bit(pframe);
|
set_order_bit(pframe);
|
||||||
set_frame_sub_type(pframe, WIFI_ACTION_NOACK);
|
set_frame_sub_type(pframe, WIFI_ACTION_NOACK);
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
||||||
|
|
||||||
if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
|
if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
|
||||||
aSifsTime = 10;
|
aSifsTime = 10;
|
||||||
@ -2315,7 +2315,7 @@ BOOLEAN issue_ht_ndpa_packet(PADAPTER Adapter, u8 *ra, enum channel_width bw, u8
|
|||||||
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
|
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
|
||||||
SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1);
|
SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1);
|
||||||
|
|
||||||
_rtw_memcpy(pframe + 28, ActionHdr, 4);
|
memcpy(pframe + 28, ActionHdr, 4);
|
||||||
|
|
||||||
pattrib->pktlen = 32;
|
pattrib->pktlen = 32;
|
||||||
|
|
||||||
@ -2379,8 +2379,8 @@ BOOLEAN issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel
|
|||||||
|
|
||||||
set_frame_sub_type(pframe, WIFI_NDPA);
|
set_frame_sub_type(pframe, WIFI_NDPA);
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN);
|
||||||
|
|
||||||
if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode))
|
if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode))
|
||||||
aSifsTime = 16;
|
aSifsTime = 16;
|
||||||
@ -2404,7 +2404,7 @@ BOOLEAN issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel
|
|||||||
else
|
else
|
||||||
pBeamInfo->sounding_sequence++;
|
pBeamInfo->sounding_sequence++;
|
||||||
|
|
||||||
_rtw_memcpy(pframe + 16, &sequence, 1);
|
memcpy(pframe + 16, &sequence, 1);
|
||||||
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE))
|
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE))
|
||||||
aid = 0;
|
aid = 0;
|
||||||
|
|
||||||
@ -2412,7 +2412,7 @@ BOOLEAN issue_vht_sw_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel
|
|||||||
sta_info.feedback_type = 0;
|
sta_info.feedback_type = 0;
|
||||||
sta_info.nc_index = 0;
|
sta_info.nc_index = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pframe + 17, (u8 *)&sta_info, 2);
|
memcpy(pframe + 17, (u8 *)&sta_info, 2);
|
||||||
|
|
||||||
pattrib->pktlen = 19;
|
pattrib->pktlen = 19;
|
||||||
|
|
||||||
@ -2465,8 +2465,8 @@ BOOLEAN issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel_wi
|
|||||||
|
|
||||||
set_frame_sub_type(pframe, WIFI_NDPA);
|
set_frame_sub_type(pframe, WIFI_NDPA);
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, ra, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(Adapter), ETH_ALEN);
|
||||||
|
|
||||||
if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode))
|
if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode))
|
||||||
aSifsTime = 16;
|
aSifsTime = 16;
|
||||||
@ -2490,7 +2490,7 @@ BOOLEAN issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel_wi
|
|||||||
else
|
else
|
||||||
pBeamInfo->sounding_sequence++;
|
pBeamInfo->sounding_sequence++;
|
||||||
|
|
||||||
_rtw_memcpy(pframe + 16, &sequence, 1);
|
memcpy(pframe + 16, &sequence, 1);
|
||||||
|
|
||||||
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE))
|
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE))
|
||||||
aid = 0;
|
aid = 0;
|
||||||
@ -2499,7 +2499,7 @@ BOOLEAN issue_vht_ndpa_packet(PADAPTER Adapter, u8 *ra, u16 aid, enum channel_wi
|
|||||||
sta_info.feedback_type = 0;
|
sta_info.feedback_type = 0;
|
||||||
sta_info.nc_index = 0;
|
sta_info.nc_index = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pframe + 17, (u8 *)&sta_info, 2);
|
memcpy(pframe + 17, (u8 *)&sta_info, 2);
|
||||||
|
|
||||||
pattrib->pktlen = 19;
|
pattrib->pktlen = 19;
|
||||||
|
|
||||||
@ -2947,7 +2947,7 @@ u32 rtw_beamforming_get_report_frame(PADAPTER Adapter, union recv_frame *precv_
|
|||||||
else
|
else
|
||||||
pBeamformEntry->DefaultCsiCnt++;
|
pBeamformEntry->DefaultCsiCnt++;
|
||||||
|
|
||||||
_rtw_memcpy(&pBeamformEntry->PreCsiReport, pframe, frame_len);
|
memcpy(&pBeamformEntry->PreCsiReport, pframe, frame_len);
|
||||||
|
|
||||||
pBeamformEntry->bDefaultCSI = _FALSE;
|
pBeamformEntry->bDefaultCSI = _FALSE;
|
||||||
|
|
||||||
@ -3120,7 +3120,7 @@ u8 beamforming_wk_cmd(_adapter *padapter, s32 type, u8 *pbuf, s32 size, u8 enque
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(wk_buf, pbuf, size);
|
memcpy(wk_buf, pbuf, size);
|
||||||
} else {
|
} else {
|
||||||
wk_buf = NULL;
|
wk_buf = NULL;
|
||||||
size = 0;
|
size = 0;
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#include <linux/if_arp.h>
|
#include <linux/if_arp.h>
|
||||||
#include <net/ip.h>
|
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
|
||||||
#include <net/ipx.h>
|
#include <net/ipx.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -215,8 +215,8 @@ mptbt_BtFwOpCodeProcess(
|
|||||||
pH2c->opCodeVer = opCodeVer;
|
pH2c->opCodeVer = opCodeVer;
|
||||||
pH2c->reqNum = pMptCtx->h2cReqNum;
|
pH2c->reqNum = pMptCtx->h2cReqNum;
|
||||||
/* PlatformMoveMemory(&pH2c->buf[0], pH2cPar, h2cParaLen); */
|
/* PlatformMoveMemory(&pH2c->buf[0], pH2cPar, h2cParaLen); */
|
||||||
/* _rtw_memcpy(&pH2c->buf[0], pH2cPar, h2cParaLen); */
|
/* memcpy(&pH2c->buf[0], pH2cPar, h2cParaLen); */
|
||||||
_rtw_memcpy(pH2c->buf, pH2cPar, h2cParaLen);
|
memcpy(pH2c->buf, pH2cPar, h2cParaLen);
|
||||||
|
|
||||||
RTW_INFO("[MPT], pH2c->opCode=%d\n", pH2c->opCode);
|
RTW_INFO("[MPT], pH2c->opCode=%d\n", pH2c->opCode);
|
||||||
RTW_INFO("[MPT], pH2c->opCodeVer=%d\n", pH2c->opCodeVer);
|
RTW_INFO("[MPT], pH2c->opCodeVer=%d\n", pH2c->opCodeVer);
|
||||||
@ -499,7 +499,7 @@ MPTBT_FwC2hBtMpCtrl(
|
|||||||
|
|
||||||
case EXT_C2H_TRIG_BY_BT_FW:
|
case EXT_C2H_TRIG_BY_BT_FW:
|
||||||
RTW_INFO("[MPT], EXT_C2H_TRIG_BY_BT_FW\n");
|
RTW_INFO("[MPT], EXT_C2H_TRIG_BY_BT_FW\n");
|
||||||
_rtw_memcpy(&pMptCtx->c2hBuf[0], tmpBuf, length);
|
memcpy(&pMptCtx->c2hBuf[0], tmpBuf, length);
|
||||||
RTW_INFO("[MPT], pExtC2h->statusCode=0x%x\n", pExtC2h->statusCode);
|
RTW_INFO("[MPT], pExtC2h->statusCode=0x%x\n", pExtC2h->statusCode);
|
||||||
RTW_INFO("[MPT], pExtC2h->retLen=0x%x\n", pExtC2h->retLen);
|
RTW_INFO("[MPT], pExtC2h->retLen=0x%x\n", pExtC2h->retLen);
|
||||||
RTW_INFO("[MPT], pExtC2h->opCodeVer=0x%x\n", pExtC2h->opCodeVer);
|
RTW_INFO("[MPT], pExtC2h->opCodeVer=0x%x\n", pExtC2h->opCodeVer);
|
||||||
|
@ -550,7 +550,7 @@ u8 rtw_btcoex_btinfo_cmd(_adapter *adapter, u8 *buf, u16 len)
|
|||||||
pdrvextra_cmd_parm->size = len;
|
pdrvextra_cmd_parm->size = len;
|
||||||
pdrvextra_cmd_parm->pbuf = btinfo;
|
pdrvextra_cmd_parm->pbuf = btinfo;
|
||||||
|
|
||||||
_rtw_memcpy(btinfo, buf, len);
|
memcpy(btinfo, buf, len);
|
||||||
|
|
||||||
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
||||||
|
|
||||||
@ -635,7 +635,7 @@ u8 rtw_btcoex_parse_BT_info_notify_cmd(_adapter *padapter, u8 *pcmd, u16 cmdlen)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (0x1 == btInfoReason || 0x2 == btInfoReason) {
|
if (0x1 == btInfoReason || 0x2 == btInfoReason) {
|
||||||
_rtw_memcpy(btinfo, &pcmd[4], btInfoLen);
|
memcpy(btinfo, &pcmd[4], btInfoLen);
|
||||||
btinfo[0] = btInfoReason;
|
btinfo[0] = btInfoReason;
|
||||||
rtw_btcoex_btinfo_cmd(padapter, btinfo, btInfoLen);
|
rtw_btcoex_btinfo_cmd(padapter, btinfo, btInfoLen);
|
||||||
} else
|
} else
|
||||||
@ -1323,7 +1323,7 @@ void rtw_btcoex_recvmsgbysocket(void *data)
|
|||||||
/*important: cut the udp header from skb->data! header length is 8 byte*/
|
/*important: cut the udp header from skb->data! header length is 8 byte*/
|
||||||
recv_length = skb->len - 8;
|
recv_length = skb->len - 8;
|
||||||
memset(recv_data, 0, sizeof(recv_data));
|
memset(recv_data, 0, sizeof(recv_data));
|
||||||
_rtw_memcpy(recv_data, skb->data + 8, recv_length);
|
memcpy(recv_data, skb->data + 8, recv_length);
|
||||||
|
|
||||||
parse_res = rtw_btcoex_parse_recv_data(recv_data, recv_length);
|
parse_res = rtw_btcoex_parse_recv_data(recv_data, recv_length);
|
||||||
#if 0
|
#if 0
|
||||||
@ -1650,7 +1650,7 @@ void rtw_btcoex_SendEventExtBtCoexControl(PADAPTER padapter, u8 bNeedDbgRsp, u8
|
|||||||
|
|
||||||
/* Return parameters starts from here */
|
/* Return parameters starts from here */
|
||||||
pRetPar = &pEvent->Data[len];
|
pRetPar = &pEvent->Data[len];
|
||||||
_rtw_memcpy(&pRetPar[0], pData, dataLen);
|
memcpy(&pRetPar[0], pData, dataLen);
|
||||||
|
|
||||||
len += dataLen;
|
len += dataLen;
|
||||||
|
|
||||||
@ -1692,7 +1692,7 @@ void rtw_btcoex_SendEventExtBtInfoControl(PADAPTER padapter, u8 dataLen, void *p
|
|||||||
|
|
||||||
/* Return parameters starts from here */
|
/* Return parameters starts from here */
|
||||||
pRetPar = &pEvent->Data[len];
|
pRetPar = &pEvent->Data[len];
|
||||||
_rtw_memcpy(&pRetPar[0], pData, dataLen);
|
memcpy(&pRetPar[0], pData, dataLen);
|
||||||
|
|
||||||
len += dataLen;
|
len += dataLen;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
|
|||||||
No irqsave is necessary.
|
No irqsave is necessary.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sint _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
|
static sint _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
|
||||||
{
|
{
|
||||||
sint res = _SUCCESS;
|
sint res = _SUCCESS;
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ static void c2h_wk_callback(_workitem *work)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_C2H_WK */
|
#endif /* CONFIG_C2H_WK */
|
||||||
|
|
||||||
sint _rtw_init_evt_priv(struct evt_priv *pevtpriv)
|
static sint _rtw_init_evt_priv(struct evt_priv *pevtpriv)
|
||||||
{
|
{
|
||||||
sint res = _SUCCESS;
|
sint res = _SUCCESS;
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ exit:
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtw_free_evt_priv(struct evt_priv *pevtpriv)
|
static void _rtw_free_evt_priv(struct evt_priv *pevtpriv)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ void _rtw_free_evt_priv(struct evt_priv *pevtpriv)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
|
static void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (pcmdpriv) {
|
if (pcmdpriv) {
|
||||||
@ -251,7 +251,7 @@ ISR/Call-Back functions can't call this sub-function.
|
|||||||
extern u8 dump_cmd_id;
|
extern u8 dump_cmd_id;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head)
|
static sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ exit:
|
|||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
|
static struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
struct cmd_obj *obj;
|
struct cmd_obj *obj;
|
||||||
@ -651,7 +651,7 @@ _next:
|
|||||||
RTW_INFO(ADPT_FMT" "CMD_FMT" %sexecute\n", ADPT_ARG(pcmd->padapter), CMD_ARG(pcmd)
|
RTW_INFO(ADPT_FMT" "CMD_FMT" %sexecute\n", ADPT_ARG(pcmd->padapter), CMD_ARG(pcmd)
|
||||||
, pcmd->res == H2C_ENQ_HEAD ? "ENQ_HEAD " : (pcmd->res == H2C_ENQ_HEAD_FAIL ? "ENQ_HEAD_FAIL " : ""));
|
, pcmd->res == H2C_ENQ_HEAD ? "ENQ_HEAD " : (pcmd->res == H2C_ENQ_HEAD_FAIL ? "ENQ_HEAD_FAIL " : ""));
|
||||||
|
|
||||||
_rtw_memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);
|
memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);
|
||||||
ret = cmd_hdl(pcmd->padapter, pcmdbuf);
|
ret = cmd_hdl(pcmd->padapter, pcmdbuf);
|
||||||
pcmd->res = ret;
|
pcmd->res = ret;
|
||||||
|
|
||||||
@ -889,7 +889,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, struct sitesurvey_parm *pparm)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pparm)
|
if (pparm)
|
||||||
_rtw_memcpy(psurveyPara, pparm, sizeof(struct sitesurvey_parm));
|
memcpy(psurveyPara, pparm, sizeof(struct sitesurvey_parm));
|
||||||
else
|
else
|
||||||
psurveyPara->scan_mode = pmlmepriv->scan_mode;
|
psurveyPara->scan_mode = pmlmepriv->scan_mode;
|
||||||
|
|
||||||
@ -940,10 +940,10 @@ u8 rtw_setdatarate_cmd(_adapter *padapter, u8 *rateset)
|
|||||||
init_h2fwcmd_w_parm_no_rsp(ph2c, pbsetdataratepara, GEN_CMD_CODE(_SetDataRate));
|
init_h2fwcmd_w_parm_no_rsp(ph2c, pbsetdataratepara, GEN_CMD_CODE(_SetDataRate));
|
||||||
#ifdef MP_FIRMWARE_OFFLOAD
|
#ifdef MP_FIRMWARE_OFFLOAD
|
||||||
pbsetdataratepara->curr_rateidx = *(u32 *)rateset;
|
pbsetdataratepara->curr_rateidx = *(u32 *)rateset;
|
||||||
/* _rtw_memcpy(pbsetdataratepara, rateset, sizeof(u32)); */
|
/* memcpy(pbsetdataratepara, rateset, sizeof(u32)); */
|
||||||
#else
|
#else
|
||||||
pbsetdataratepara->mac_id = 5;
|
pbsetdataratepara->mac_id = 5;
|
||||||
_rtw_memcpy(pbsetdataratepara->datarates, rateset, NumRates);
|
memcpy(pbsetdataratepara->datarates, rateset, NumRates);
|
||||||
#endif
|
#endif
|
||||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||||
exit:
|
exit:
|
||||||
@ -975,7 +975,7 @@ u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset)
|
|||||||
|
|
||||||
init_h2fwcmd_w_parm_no_rsp(ph2c, pssetbasicratepara, _SetBasicRate_CMD_);
|
init_h2fwcmd_w_parm_no_rsp(ph2c, pssetbasicratepara, _SetBasicRate_CMD_);
|
||||||
|
|
||||||
_rtw_memcpy(pssetbasicratepara->basicrates, rateset, NumRates);
|
memcpy(pssetbasicratepara->basicrates, rateset, NumRates);
|
||||||
|
|
||||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||||
exit:
|
exit:
|
||||||
@ -1440,15 +1440,15 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
|||||||
|
|
||||||
memset(psecnetwork, 0, t_len);
|
memset(psecnetwork, 0, t_len);
|
||||||
|
|
||||||
_rtw_memcpy(psecnetwork, &pnetwork->network, get_WLAN_BSSID_EX_sz(&pnetwork->network));
|
memcpy(psecnetwork, &pnetwork->network, get_WLAN_BSSID_EX_sz(&pnetwork->network));
|
||||||
|
|
||||||
auth = &psecuritypriv->authenticator_ie[0];
|
auth = &psecuritypriv->authenticator_ie[0];
|
||||||
psecuritypriv->authenticator_ie[0] = (unsigned char)psecnetwork->IELength;
|
psecuritypriv->authenticator_ie[0] = (unsigned char)psecnetwork->IELength;
|
||||||
|
|
||||||
if ((psecnetwork->IELength - 12) < (256 - 1))
|
if ((psecnetwork->IELength - 12) < (256 - 1))
|
||||||
_rtw_memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], psecnetwork->IELength - 12);
|
memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], psecnetwork->IELength - 12);
|
||||||
else
|
else
|
||||||
_rtw_memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], (256 - 1));
|
memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], (256 - 1));
|
||||||
|
|
||||||
psecnetwork->IELength = 0;
|
psecnetwork->IELength = 0;
|
||||||
/* Added by Albert 2009/02/18 */
|
/* Added by Albert 2009/02/18 */
|
||||||
@ -1457,10 +1457,10 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
|||||||
/* the driver just has the bssid information for PMKIDList searching. */
|
/* the driver just has the bssid information for PMKIDList searching. */
|
||||||
|
|
||||||
if (pmlmepriv->assoc_by_bssid == _FALSE)
|
if (pmlmepriv->assoc_by_bssid == _FALSE)
|
||||||
_rtw_memcpy(&pmlmepriv->assoc_bssid[0], &pnetwork->network.MacAddress[0], ETH_ALEN);
|
memcpy(&pmlmepriv->assoc_bssid[0], &pnetwork->network.MacAddress[0], ETH_ALEN);
|
||||||
|
|
||||||
/* copy fixed ie */
|
/* copy fixed ie */
|
||||||
_rtw_memcpy(psecnetwork->IEs, pnetwork->network.IEs, 12);
|
memcpy(psecnetwork->IEs, pnetwork->network.IEs, 12);
|
||||||
psecnetwork->IELength = 12;
|
psecnetwork->IELength = 12;
|
||||||
|
|
||||||
psecnetwork->IELength += rtw_restruct_sec_ie(padapter, psecnetwork->IEs + psecnetwork->IELength);
|
psecnetwork->IELength += rtw_restruct_sec_ie(padapter, psecnetwork->IEs + psecnetwork->IELength);
|
||||||
@ -1526,9 +1526,9 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
|||||||
psecuritypriv->supplicant_ie[0] = (u8)psecnetwork->IELength;
|
psecuritypriv->supplicant_ie[0] = (u8)psecnetwork->IELength;
|
||||||
|
|
||||||
if (psecnetwork->IELength < (256 - 1))
|
if (psecnetwork->IELength < (256 - 1))
|
||||||
_rtw_memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], psecnetwork->IELength);
|
memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], psecnetwork->IELength);
|
||||||
else
|
else
|
||||||
_rtw_memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], (256 - 1));
|
memcpy(&psecuritypriv->supplicant_ie[1], &psecnetwork->IEs[0], (256 - 1));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pcmd->cmdsz = sizeof(WLAN_BSSID_EX);
|
pcmd->cmdsz = sizeof(WLAN_BSSID_EX);
|
||||||
@ -1743,7 +1743,7 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(psetstakey_para->addr, sta->cmn.mac_addr, ETH_ALEN);
|
memcpy(psetstakey_para->addr, sta->cmn.mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
|
||||||
psetstakey_para->algorithm = (unsigned char) psecuritypriv->dot11PrivacyAlgrthm;
|
psetstakey_para->algorithm = (unsigned char) psecuritypriv->dot11PrivacyAlgrthm;
|
||||||
@ -1751,13 +1751,13 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool
|
|||||||
GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, _FALSE);
|
GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, _FALSE);
|
||||||
|
|
||||||
if (key_type == GROUP_KEY) {
|
if (key_type == GROUP_KEY) {
|
||||||
_rtw_memcpy(&psetstakey_para->key, &psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey, 16);
|
memcpy(&psetstakey_para->key, &psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey, 16);
|
||||||
psetstakey_para->gk = 1;
|
psetstakey_para->gk = 1;
|
||||||
} else if (key_type == UNICAST_KEY)
|
} else if (key_type == UNICAST_KEY)
|
||||||
_rtw_memcpy(&psetstakey_para->key, &sta->dot118021x_UncstKey, 16);
|
memcpy(&psetstakey_para->key, &sta->dot118021x_UncstKey, 16);
|
||||||
#ifdef CONFIG_TDLS
|
#ifdef CONFIG_TDLS
|
||||||
else if (key_type == TDLS_KEY) {
|
else if (key_type == TDLS_KEY) {
|
||||||
_rtw_memcpy(&psetstakey_para->key, sta->tpk.tk, 16);
|
memcpy(&psetstakey_para->key, sta->tpk.tk, 16);
|
||||||
psetstakey_para->algorithm = (u8)sta->dot118021XPrivacy;
|
psetstakey_para->algorithm = (u8)sta->dot118021XPrivacy;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_TDLS */
|
#endif /* CONFIG_TDLS */
|
||||||
@ -1841,7 +1841,7 @@ u8 rtw_clearstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 enqueue)
|
|||||||
ph2c->rsp = (u8 *) psetstakey_rsp;
|
ph2c->rsp = (u8 *) psetstakey_rsp;
|
||||||
ph2c->rspsz = sizeof(struct set_stakey_rsp);
|
ph2c->rspsz = sizeof(struct set_stakey_rsp);
|
||||||
|
|
||||||
_rtw_memcpy(psetstakey_para->addr, sta->cmn.mac_addr, ETH_ALEN);
|
memcpy(psetstakey_para->addr, sta->cmn.mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
psetstakey_para->algorithm = _NO_PRIVACY_;
|
psetstakey_para->algorithm = _NO_PRIVACY_;
|
||||||
|
|
||||||
@ -1877,7 +1877,7 @@ u8 rtw_setrttbl_cmd(_adapter *padapter, struct setratable_parm *prate_table)
|
|||||||
|
|
||||||
init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm, GEN_CMD_CODE(_SetRaTable));
|
init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm, GEN_CMD_CODE(_SetRaTable));
|
||||||
|
|
||||||
_rtw_memcpy(psetrttblparm, prate_table, sizeof(struct setratable_parm));
|
memcpy(psetrttblparm, prate_table, sizeof(struct setratable_parm));
|
||||||
|
|
||||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||||
exit:
|
exit:
|
||||||
@ -1956,7 +1956,7 @@ u8 rtw_setassocsta_cmd(_adapter *padapter, u8 *mac_addr)
|
|||||||
ph2c->rsp = (u8 *) psetassocsta_rsp;
|
ph2c->rsp = (u8 *) psetassocsta_rsp;
|
||||||
ph2c->rspsz = sizeof(struct set_assocsta_rsp);
|
ph2c->rspsz = sizeof(struct set_assocsta_rsp);
|
||||||
|
|
||||||
_rtw_memcpy(psetassocsta_para->addr, mac_addr, ETH_ALEN);
|
memcpy(psetassocsta_para->addr, mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||||
|
|
||||||
@ -1989,7 +1989,7 @@ u8 rtw_addbareq_cmd(_adapter *padapter, u8 tid, u8 *addr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
paddbareq_parm->tid = tid;
|
paddbareq_parm->tid = tid;
|
||||||
_rtw_memcpy(paddbareq_parm->addr, addr, ETH_ALEN);
|
memcpy(paddbareq_parm->addr, addr, ETH_ALEN);
|
||||||
|
|
||||||
init_h2fwcmd_w_parm_no_rsp(ph2c, paddbareq_parm, GEN_CMD_CODE(_AddBAReq));
|
init_h2fwcmd_w_parm_no_rsp(ph2c, paddbareq_parm, GEN_CMD_CODE(_AddBAReq));
|
||||||
|
|
||||||
@ -2026,7 +2026,7 @@ u8 rtw_addbarsp_cmd(_adapter *padapter, u8 *addr, u16 tid, u8 status, u8 size, u
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(paddBaRsp_parm->addr, addr, ETH_ALEN);
|
memcpy(paddBaRsp_parm->addr, addr, ETH_ALEN);
|
||||||
paddBaRsp_parm->tid = tid;
|
paddBaRsp_parm->tid = tid;
|
||||||
paddBaRsp_parm->status = status;
|
paddBaRsp_parm->status = status;
|
||||||
paddBaRsp_parm->size = size;
|
paddBaRsp_parm->size = size;
|
||||||
@ -2438,7 +2438,7 @@ u8 rtw_tdls_cmd(_adapter *padapter, u8 *addr, u8 option)
|
|||||||
|
|
||||||
_rtw_spinlock(&(padapter->tdlsinfo.cmd_lock));
|
_rtw_spinlock(&(padapter->tdlsinfo.cmd_lock));
|
||||||
if (addr != NULL)
|
if (addr != NULL)
|
||||||
_rtw_memcpy(TDLSoption->addr, addr, 6);
|
memcpy(TDLSoption->addr, addr, 6);
|
||||||
TDLSoption->option = option;
|
TDLSoption->option = option;
|
||||||
_rtw_spinunlock(&(padapter->tdlsinfo.cmd_lock));
|
_rtw_spinunlock(&(padapter->tdlsinfo.cmd_lock));
|
||||||
init_h2fwcmd_w_parm_no_rsp(pcmdobj, TDLSoption, GEN_CMD_CODE(_TDLS));
|
init_h2fwcmd_w_parm_no_rsp(pcmdobj, TDLSoption, GEN_CMD_CODE(_TDLS));
|
||||||
@ -3164,7 +3164,7 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
|
|||||||
/* TDLS_WATCHDOG_PERIOD * 2sec, periodically send */
|
/* TDLS_WATCHDOG_PERIOD * 2sec, periodically send */
|
||||||
if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == _TRUE) {
|
if (hal_chk_wl_func(padapter, WL_FUNC_TDLS) == _TRUE) {
|
||||||
if ((ptdlsinfo->watchdog_count % TDLS_WATCHDOG_PERIOD) == 0) {
|
if ((ptdlsinfo->watchdog_count % TDLS_WATCHDOG_PERIOD) == 0) {
|
||||||
_rtw_memcpy(txmgmt.peer, baddr, ETH_ALEN);
|
memcpy(txmgmt.peer, baddr, ETH_ALEN);
|
||||||
issue_tdls_dis_req(padapter, &txmgmt);
|
issue_tdls_dis_req(padapter, &txmgmt);
|
||||||
}
|
}
|
||||||
ptdlsinfo->watchdog_count++;
|
ptdlsinfo->watchdog_count++;
|
||||||
@ -3852,7 +3852,7 @@ static u8 _p2p_roch_cmd(_adapter *adapter
|
|||||||
roch_parm->cookie = cookie;
|
roch_parm->cookie = cookie;
|
||||||
roch_parm->wdev = wdev;
|
roch_parm->wdev = wdev;
|
||||||
if (!cancel) {
|
if (!cancel) {
|
||||||
_rtw_memcpy(&roch_parm->ch, ch, sizeof(struct ieee80211_channel));
|
memcpy(&roch_parm->ch, ch, sizeof(struct ieee80211_channel));
|
||||||
roch_parm->ch_type = ch_type;
|
roch_parm->ch_type = ch_type;
|
||||||
roch_parm->duration = duration;
|
roch_parm->duration = duration;
|
||||||
}
|
}
|
||||||
@ -4704,7 +4704,7 @@ u8 rtw_btinfo_cmd(_adapter *adapter, u8 *buf, u16 len)
|
|||||||
pdrvextra_cmd_parm->size = len;
|
pdrvextra_cmd_parm->size = len;
|
||||||
pdrvextra_cmd_parm->pbuf = btinfo;
|
pdrvextra_cmd_parm->pbuf = btinfo;
|
||||||
|
|
||||||
_rtw_memcpy(btinfo, buf, len);
|
memcpy(btinfo, buf, len);
|
||||||
|
|
||||||
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
||||||
|
|
||||||
@ -4749,7 +4749,7 @@ u8 rtw_test_h2c_cmd(_adapter *adapter, u8 *buf, u8 len)
|
|||||||
pdrvextra_cmd_parm->size = len;
|
pdrvextra_cmd_parm->size = len;
|
||||||
pdrvextra_cmd_parm->pbuf = ph2c_content;
|
pdrvextra_cmd_parm->pbuf = ph2c_content;
|
||||||
|
|
||||||
_rtw_memcpy(ph2c_content, buf, len);
|
memcpy(ph2c_content, buf, len);
|
||||||
|
|
||||||
init_h2fwcmd_w_parm_no_rsp(pcmdobj, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
init_h2fwcmd_w_parm_no_rsp(pcmdobj, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
||||||
|
|
||||||
@ -4984,7 +4984,7 @@ static u8 rtw_customer_str_cmd(_adapter *adapter, u8 write, const u8 *cstr)
|
|||||||
parm->pbuf = write ? str : NULL;
|
parm->pbuf = write ? str : NULL;
|
||||||
|
|
||||||
if (write)
|
if (write)
|
||||||
_rtw_memcpy(str, cstr, RTW_CUSTOMER_STR_LEN);
|
memcpy(str, cstr, RTW_CUSTOMER_STR_LEN);
|
||||||
|
|
||||||
/* need enqueue, prepare cmd_obj and enqueue */
|
/* need enqueue, prepare cmd_obj and enqueue */
|
||||||
cmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(*cmdobj));
|
cmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(*cmdobj));
|
||||||
@ -5057,7 +5057,7 @@ u8 rtw_c2h_wk_cmd(PADAPTER padapter, u8 *pbuf, u16 length, u8 type)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(extra_cmd_buf, pbuf, length);
|
memcpy(extra_cmd_buf, pbuf, length);
|
||||||
pdrvextra_cmd_parm->ec_id = C2H_WK_CID;
|
pdrvextra_cmd_parm->ec_id = C2H_WK_CID;
|
||||||
pdrvextra_cmd_parm->type = type;
|
pdrvextra_cmd_parm->type = type;
|
||||||
pdrvextra_cmd_parm->size = length;
|
pdrvextra_cmd_parm->size = length;
|
||||||
@ -5178,10 +5178,10 @@ u8 session_tracker_cmd(_adapter *adapter, u8 cmd, struct sta_info *sta, u8 *loca
|
|||||||
st_parm->cmd = cmd;
|
st_parm->cmd = cmd;
|
||||||
st_parm->sta = sta;
|
st_parm->sta = sta;
|
||||||
if (cmd != ST_CMD_CHK) {
|
if (cmd != ST_CMD_CHK) {
|
||||||
_rtw_memcpy(&st_parm->local_naddr, local_naddr, 4);
|
memcpy(&st_parm->local_naddr, local_naddr, 4);
|
||||||
_rtw_memcpy(&st_parm->local_port, local_port, 2);
|
memcpy(&st_parm->local_port, local_port, 2);
|
||||||
_rtw_memcpy(&st_parm->remote_naddr, remote_naddr, 4);
|
memcpy(&st_parm->remote_naddr, remote_naddr, 4);
|
||||||
_rtw_memcpy(&st_parm->remote_port, remote_port, 2);
|
memcpy(&st_parm->remote_port, remote_port, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_parm->ec_id = SESSION_TRACKER_WK_CID;
|
cmd_parm->ec_id = SESSION_TRACKER_WK_CID;
|
||||||
@ -5433,7 +5433,7 @@ static s32 rtw_req_per_cmd_hdl(_adapter *adapter)
|
|||||||
u8 i, ret = _FAIL;
|
u8 i, ret = _FAIL;
|
||||||
|
|
||||||
macid_bmp = &macid_ctl->if_g[adapter->iface_id];
|
macid_bmp = &macid_ctl->if_g[adapter->iface_id];
|
||||||
_rtw_memcpy(&req_macid_bmp, macid_bmp, sizeof(struct macid_bmp));
|
memcpy(&req_macid_bmp, macid_bmp, sizeof(struct macid_bmp));
|
||||||
|
|
||||||
/* Clear none mesh's macid */
|
/* Clear none mesh's macid */
|
||||||
for (i = 0; i < macid_ctl->num; i++) {
|
for (i = 0; i < macid_ctl->num; i++) {
|
||||||
@ -5765,11 +5765,11 @@ void rtw_create_ibss_post_hdl(_adapter *padapter, int status)
|
|||||||
rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
|
rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
|
||||||
|
|
||||||
pdev_network->Length = get_WLAN_BSSID_EX_sz(pdev_network);
|
pdev_network->Length = get_WLAN_BSSID_EX_sz(pdev_network);
|
||||||
_rtw_memcpy(&(pwlan->network), pdev_network, pdev_network->Length);
|
memcpy(&(pwlan->network), pdev_network, pdev_network->Length);
|
||||||
/* pwlan->fixed = _TRUE; */
|
/* pwlan->fixed = _TRUE; */
|
||||||
|
|
||||||
/* copy pdev_network information to pmlmepriv->cur_network */
|
/* copy pdev_network information to pmlmepriv->cur_network */
|
||||||
_rtw_memcpy(&mlme_cur_network->network, pdev_network, (get_WLAN_BSSID_EX_sz(pdev_network)));
|
memcpy(&mlme_cur_network->network, pdev_network, (get_WLAN_BSSID_EX_sz(pdev_network)));
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* reset DSConfig */
|
/* reset DSConfig */
|
||||||
|
@ -900,7 +900,7 @@ int proc_get_tx_stat(struct seq_file *m, void *v)
|
|||||||
if ((_rtw_memcmp(psta->cmn.mac_addr, bc_addr, ETH_ALEN) != _TRUE)
|
if ((_rtw_memcmp(psta->cmn.mac_addr, bc_addr, ETH_ALEN) != _TRUE)
|
||||||
&& (_rtw_memcmp(psta->cmn.mac_addr, null_addr, ETH_ALEN) != _TRUE)
|
&& (_rtw_memcmp(psta->cmn.mac_addr, null_addr, ETH_ALEN) != _TRUE)
|
||||||
&& (_rtw_memcmp(psta->cmn.mac_addr, adapter_mac_addr(adapter), ETH_ALEN) != _TRUE)) {
|
&& (_rtw_memcmp(psta->cmn.mac_addr, adapter_mac_addr(adapter), ETH_ALEN) != _TRUE)) {
|
||||||
_rtw_memcpy(&sta_mac[macid_rec_idx][0], psta->cmn.mac_addr, ETH_ALEN);
|
memcpy(&sta_mac[macid_rec_idx][0], psta->cmn.mac_addr, ETH_ALEN);
|
||||||
mac_id[macid_rec_idx] = psta->cmn.mac_id;
|
mac_id[macid_rec_idx] = psta->cmn.mac_id;
|
||||||
macid_rec_idx++;
|
macid_rec_idx++;
|
||||||
}
|
}
|
||||||
@ -908,7 +908,7 @@ int proc_get_tx_stat(struct seq_file *m, void *v)
|
|||||||
}
|
}
|
||||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||||
for (i = 0; i < macid_rec_idx; i++) {
|
for (i = 0; i < macid_rec_idx; i++) {
|
||||||
_rtw_memcpy(pstapriv_primary->c2h_sta_mac, &sta_mac[i][0], ETH_ALEN);
|
memcpy(pstapriv_primary->c2h_sta_mac, &sta_mac[i][0], ETH_ALEN);
|
||||||
pstapriv_primary->c2h_adapter_id = adapter->iface_id;
|
pstapriv_primary->c2h_adapter_id = adapter->iface_id;
|
||||||
rtw_sctx_init(&gotc2h, 60);
|
rtw_sctx_init(&gotc2h, 60);
|
||||||
pstapriv_primary->gotc2h = &gotc2h;
|
pstapriv_primary->gotc2h = &gotc2h;
|
||||||
@ -1113,7 +1113,7 @@ ssize_t proc_set_roam_tgt_addr(struct file *file, const char __user *buffer, siz
|
|||||||
|
|
||||||
int num = sscanf(tmp, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", addr, addr + 1, addr + 2, addr + 3, addr + 4, addr + 5);
|
int num = sscanf(tmp, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", addr, addr + 1, addr + 2, addr + 3, addr + 4, addr + 5);
|
||||||
if (num == 6)
|
if (num == 6)
|
||||||
_rtw_memcpy(adapter->mlmepriv.roam_tgt_addr, addr, ETH_ALEN);
|
memcpy(adapter->mlmepriv.roam_tgt_addr, addr, ETH_ALEN);
|
||||||
|
|
||||||
RTW_INFO("set roam_tgt_addr to "MAC_FMT"\n", MAC_ARG(adapter->mlmepriv.roam_tgt_addr));
|
RTW_INFO("set roam_tgt_addr to "MAC_FMT"\n", MAC_ARG(adapter->mlmepriv.roam_tgt_addr));
|
||||||
}
|
}
|
||||||
@ -5725,7 +5725,7 @@ ssize_t proc_set_tx_sa_query(struct file *file, const char __user *buffer, size_
|
|||||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||||
plist = get_next(plist);
|
plist = get_next(plist);
|
||||||
_rtw_memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN);
|
memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||||
@ -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]));
|
||||||
}
|
}
|
||||||
@ -5814,7 +5814,7 @@ ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t
|
|||||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||||
plist = get_next(plist);
|
plist = get_next(plist);
|
||||||
_rtw_memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN);
|
memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||||
|
@ -207,7 +207,7 @@ int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
|
|||||||
u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *source,
|
u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *source,
|
||||||
unsigned int *frlen)
|
unsigned int *frlen)
|
||||||
{
|
{
|
||||||
_rtw_memcpy((void *)pbuf, (void *)source, len);
|
memcpy((void *)pbuf, (void *)source, len);
|
||||||
*frlen = *frlen + len;
|
*frlen = *frlen + len;
|
||||||
return pbuf + len;
|
return pbuf + len;
|
||||||
}
|
}
|
||||||
@ -227,7 +227,7 @@ u8 *rtw_set_ie
|
|||||||
*(pbuf + 1) = (u8)len;
|
*(pbuf + 1) = (u8)len;
|
||||||
|
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
_rtw_memcpy((void *)(pbuf + 2), (void *)source, len);
|
memcpy((void *)(pbuf + 2), (void *)source, len);
|
||||||
|
|
||||||
if (frlen)
|
if (frlen)
|
||||||
*frlen = *frlen + (len + 2);
|
*frlen = *frlen + (len + 2);
|
||||||
@ -349,7 +349,7 @@ u8 *rtw_get_ie_ex(const u8 *in_ie, uint in_len, u8 eid, const u8 *oui, u8 oui_le
|
|||||||
target_ie = &in_ie[cnt];
|
target_ie = &in_ie[cnt];
|
||||||
|
|
||||||
if (ie)
|
if (ie)
|
||||||
_rtw_memcpy(ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
memcpy(ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
||||||
|
|
||||||
if (ielen)
|
if (ielen)
|
||||||
*ielen = in_ie[cnt + 1] + 2;
|
*ielen = in_ie[cnt + 1] + 2;
|
||||||
@ -395,7 +395,7 @@ int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u8 o
|
|||||||
u8 *remain_ies = target_ie + target_ielen;
|
u8 *remain_ies = target_ie + target_ielen;
|
||||||
uint remain_len = search_len - (remain_ies - start);
|
uint remain_len = search_len - (remain_ies - start);
|
||||||
|
|
||||||
_rtw_memmove(target_ie, remain_ies, remain_len);
|
memmove(target_ie, remain_ies, remain_len);
|
||||||
*ies_len = *ies_len - target_ielen;
|
*ies_len = *ies_len - target_ielen;
|
||||||
ret = _SUCCESS;
|
ret = _SUCCESS;
|
||||||
|
|
||||||
@ -442,7 +442,7 @@ int rtw_remove_ie_g_rate(u8 *ie, uint *ie_len, uint offset, u8 eid)
|
|||||||
*(tem_target_ie+1)=target_ielen;/*set new length to Supposrted Rates*/
|
*(tem_target_ie+1)=target_ielen;/*set new length to Supposrted Rates*/
|
||||||
target_ie=tem_target_ie+target_ielen + 2;/*set target ie to address of rate 6Mbps */
|
target_ie=tem_target_ie+target_ielen + 2;/*set target ie to address of rate 6Mbps */
|
||||||
|
|
||||||
_rtw_memmove(target_ie, remain_ies, remain_len);
|
memmove(target_ie, remain_ies, remain_len);
|
||||||
*ie_len = *ie_len - rm_size;
|
*ie_len = *ie_len - rm_size;
|
||||||
ret = rm_size;
|
ret = rm_size;
|
||||||
|
|
||||||
@ -461,7 +461,7 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode)
|
|||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case WIRELESS_11B:
|
case WIRELESS_11B:
|
||||||
_rtw_memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN);
|
memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WIRELESS_11G:
|
case WIRELESS_11G:
|
||||||
@ -469,15 +469,15 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode)
|
|||||||
case WIRELESS_11_5N:
|
case WIRELESS_11_5N:
|
||||||
case WIRELESS_11A_5N: /* Todo: no basic rate for ofdm ? */
|
case WIRELESS_11A_5N: /* Todo: no basic rate for ofdm ? */
|
||||||
case WIRELESS_11_5AC:
|
case WIRELESS_11_5AC:
|
||||||
_rtw_memcpy(SupportedRates, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN);
|
memcpy(SupportedRates, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WIRELESS_11BG:
|
case WIRELESS_11BG:
|
||||||
case WIRELESS_11G_24N:
|
case WIRELESS_11G_24N:
|
||||||
case WIRELESS_11_24N:
|
case WIRELESS_11_24N:
|
||||||
case WIRELESS_11BG_24N:
|
case WIRELESS_11BG_24N:
|
||||||
_rtw_memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN);
|
memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN);
|
||||||
_rtw_memcpy(SupportedRates + IEEE80211_CCK_RATE_LEN, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN);
|
memcpy(SupportedRates + IEEE80211_CCK_RATE_LEN, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -603,7 +603,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
|
|||||||
goto check_next_ie;
|
goto check_next_ie;
|
||||||
|
|
||||||
/* check version... */
|
/* check version... */
|
||||||
_rtw_memcpy((u8 *)&val16, (pbuf + 6), sizeof(val16));
|
memcpy((u8 *)&val16, (pbuf + 6), sizeof(val16));
|
||||||
|
|
||||||
val16 = le16_to_cpu(val16);
|
val16 = le16_to_cpu(val16);
|
||||||
if (val16 != 0x0001)
|
if (val16 != 0x0001)
|
||||||
@ -947,7 +947,7 @@ int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len)
|
|||||||
if (authmode == _WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt + 6], wapi_oui1, 4) == _TRUE ||
|
if (authmode == _WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt + 6], wapi_oui1, 4) == _TRUE ||
|
||||||
_rtw_memcmp(&in_ie[cnt + 6], wapi_oui2, 4) == _TRUE)) {
|
_rtw_memcmp(&in_ie[cnt + 6], wapi_oui2, 4) == _TRUE)) {
|
||||||
if (wapi_ie)
|
if (wapi_ie)
|
||||||
_rtw_memcpy(wapi_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
memcpy(wapi_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
||||||
|
|
||||||
if (wapi_len)
|
if (wapi_len)
|
||||||
*wapi_len = in_ie[cnt + 1] + 2;
|
*wapi_len = in_ie[cnt + 1] + 2;
|
||||||
@ -986,7 +986,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie,
|
|||||||
if ((authmode == _WPA_IE_ID_) && (_rtw_memcmp(&in_ie[cnt + 2], &wpa_oui[0], 4) == _TRUE)) {
|
if ((authmode == _WPA_IE_ID_) && (_rtw_memcmp(&in_ie[cnt + 2], &wpa_oui[0], 4) == _TRUE)) {
|
||||||
|
|
||||||
if (wpa_ie)
|
if (wpa_ie)
|
||||||
_rtw_memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
||||||
|
|
||||||
*wpa_len = in_ie[cnt + 1] + 2;
|
*wpa_len = in_ie[cnt + 1] + 2;
|
||||||
cnt += in_ie[cnt + 1] + 2; /* get next */
|
cnt += in_ie[cnt + 1] + 2; /* get next */
|
||||||
@ -994,7 +994,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie,
|
|||||||
if (authmode == _WPA2_IE_ID_) {
|
if (authmode == _WPA2_IE_ID_) {
|
||||||
|
|
||||||
if (rsn_ie)
|
if (rsn_ie)
|
||||||
_rtw_memcpy(rsn_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
memcpy(rsn_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
||||||
|
|
||||||
*rsn_len = in_ie[cnt + 1] + 2;
|
*rsn_len = in_ie[cnt + 1] + 2;
|
||||||
cnt += in_ie[cnt + 1] + 2; /* get next */
|
cnt += in_ie[cnt + 1] + 2; /* get next */
|
||||||
@ -1092,7 +1092,7 @@ u8 *rtw_get_wps_ie(const u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
|
|||||||
wpsie_ptr = in_ie + cnt;
|
wpsie_ptr = in_ie + cnt;
|
||||||
|
|
||||||
if (wps_ie)
|
if (wps_ie)
|
||||||
_rtw_memcpy(wps_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
memcpy(wps_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
||||||
|
|
||||||
if (wps_ielen)
|
if (wps_ielen)
|
||||||
*wps_ielen = in_ie[cnt + 1] + 2;
|
*wps_ielen = in_ie[cnt + 1] + 2;
|
||||||
@ -1143,7 +1143,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_at
|
|||||||
target_attr_ptr = attr_ptr;
|
target_attr_ptr = attr_ptr;
|
||||||
|
|
||||||
if (buf_attr)
|
if (buf_attr)
|
||||||
_rtw_memcpy(buf_attr, attr_ptr, attr_len);
|
memcpy(buf_attr, attr_ptr, attr_len);
|
||||||
|
|
||||||
if (len_attr)
|
if (len_attr)
|
||||||
*len_attr = attr_len;
|
*len_attr = attr_len;
|
||||||
@ -1180,7 +1180,7 @@ u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8
|
|||||||
|
|
||||||
if (attr_ptr && attr_len) {
|
if (attr_ptr && attr_len) {
|
||||||
if (buf_content)
|
if (buf_content)
|
||||||
_rtw_memcpy(buf_content, attr_ptr + 4, attr_len - 4);
|
memcpy(buf_content, attr_ptr + 4, attr_len - 4);
|
||||||
|
|
||||||
if (len_content)
|
if (len_content)
|
||||||
*len_content = attr_len - 4;
|
*len_content = attr_len - 4;
|
||||||
@ -1394,7 +1394,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
|||||||
elems->timeout_int = pos;
|
elems->timeout_int = pos;
|
||||||
elems->timeout_int_len = elen;
|
elems->timeout_int_len = elen;
|
||||||
break;
|
break;
|
||||||
case WLAN_EID_HT_CAP:
|
case WLAN_EID_HT_CAPABILITY:
|
||||||
elems->ht_capabilities = pos;
|
elems->ht_capabilities = pos;
|
||||||
elems->ht_capabilities_len = elen;
|
elems->ht_capabilities_len = elen;
|
||||||
break;
|
break;
|
||||||
@ -1410,7 +1410,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
|||||||
elems->vht_operation = pos;
|
elems->vht_operation = pos;
|
||||||
elems->vht_operation_len = elen;
|
elems->vht_operation_len = elen;
|
||||||
break;
|
break;
|
||||||
case WLAN_EID_VHT_OP_MODE_NOTIFY:
|
case WLAN_EID_OPMODE_NOTIF:
|
||||||
elems->vht_op_mode_notify = pos;
|
elems->vht_op_mode_notify = pos;
|
||||||
elems->vht_op_mode_notify_len = elen;
|
elems->vht_op_mode_notify_len = elen;
|
||||||
break;
|
break;
|
||||||
@ -1605,7 +1605,7 @@ void rtw_macaddr_cfg(u8 *out, const u8 *hw_mac_addr)
|
|||||||
|
|
||||||
/* Use the mac address stored in the Efuse */
|
/* Use the mac address stored in the Efuse */
|
||||||
if (hw_mac_addr) {
|
if (hw_mac_addr) {
|
||||||
_rtw_memcpy(mac, hw_mac_addr, ETH_ALEN);
|
memcpy(mac, hw_mac_addr, ETH_ALEN);
|
||||||
goto err_chk;
|
goto err_chk;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1628,7 +1628,7 @@ err_chk:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(out, mac, ETH_ALEN);
|
memcpy(out, mac, ETH_ALEN);
|
||||||
RTW_INFO("%s mac addr:"MAC_FMT"\n", __func__, MAC_ARG(out));
|
RTW_INFO("%s mac addr:"MAC_FMT"\n", __func__, MAC_ARG(out));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1653,7 +1653,7 @@ void dump_ht_cap_ie(void *sel, const u8 *ie, u32 ie_len)
|
|||||||
const u8 *ht_cap_ie;
|
const u8 *ht_cap_ie;
|
||||||
sint ht_cap_ielen;
|
sint ht_cap_ielen;
|
||||||
|
|
||||||
ht_cap_ie = rtw_get_ie(ie, WLAN_EID_HT_CAP, &ht_cap_ielen, ie_len);
|
ht_cap_ie = rtw_get_ie(ie, WLAN_EID_HT_CAPABILITY, &ht_cap_ielen, ie_len);
|
||||||
if (!ie || ht_cap_ie != ie)
|
if (!ie || ht_cap_ie != ie)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1972,7 +1972,7 @@ int rtw_p2p_merge_ies(u8 *in_ie, u32 in_len, u8 *merge_ie)
|
|||||||
|
|
||||||
if (merge_ie != NULL) {
|
if (merge_ie != NULL) {
|
||||||
/* Set first P2P OUI */
|
/* Set first P2P OUI */
|
||||||
_rtw_memcpy(merge_ie, ELOUI, 6);
|
memcpy(merge_ie, ELOUI, 6);
|
||||||
merge_ie += 6;
|
merge_ie += 6;
|
||||||
|
|
||||||
while (i < in_len) {
|
while (i < in_len) {
|
||||||
@ -1980,7 +1980,7 @@ int rtw_p2p_merge_ies(u8 *in_ie, u32 in_len, u8 *merge_ie)
|
|||||||
|
|
||||||
/* Take out the rest of P2P OUIs */
|
/* Take out the rest of P2P OUIs */
|
||||||
if (pIE->ElementID == _VENDOR_SPECIFIC_IE_ && _rtw_memcmp(pIE->data, OUI, 4)) {
|
if (pIE->ElementID == _VENDOR_SPECIFIC_IE_ && _rtw_memcmp(pIE->data, OUI, 4)) {
|
||||||
_rtw_memcpy(merge_ie, pIE->data + 4, pIE->Length - 4);
|
memcpy(merge_ie, pIE->data + 4, pIE->Length - 4);
|
||||||
len += pIE->Length - 4;
|
len += pIE->Length - 4;
|
||||||
merge_ie += pIE->Length - 4;
|
merge_ie += pIE->Length - 4;
|
||||||
}
|
}
|
||||||
@ -2060,7 +2060,7 @@ u8 *rtw_get_p2p_ie(const u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen)
|
|||||||
p2p_ie_ptr = in_ie + cnt;
|
p2p_ie_ptr = in_ie + cnt;
|
||||||
|
|
||||||
if (p2p_ie)
|
if (p2p_ie)
|
||||||
_rtw_memcpy(p2p_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
memcpy(p2p_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
||||||
|
|
||||||
if (p2p_ielen)
|
if (p2p_ielen)
|
||||||
*p2p_ielen = in_ie[cnt + 1] + 2;
|
*p2p_ielen = in_ie[cnt + 1] + 2;
|
||||||
@ -2118,7 +2118,7 @@ u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id , u8 *buf_att
|
|||||||
target_attr_ptr = attr_ptr;
|
target_attr_ptr = attr_ptr;
|
||||||
|
|
||||||
if (buf_attr)
|
if (buf_attr)
|
||||||
_rtw_memcpy(buf_attr, attr_ptr, attr_len);
|
memcpy(buf_attr, attr_ptr, attr_len);
|
||||||
|
|
||||||
if (len_attr)
|
if (len_attr)
|
||||||
*len_attr = attr_len;
|
*len_attr = attr_len;
|
||||||
@ -2153,7 +2153,7 @@ u8 *rtw_get_p2p_attr_content(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id , u8
|
|||||||
|
|
||||||
if (attr_ptr && attr_len) {
|
if (attr_ptr && attr_len) {
|
||||||
if (buf_content)
|
if (buf_content)
|
||||||
_rtw_memcpy(buf_content, attr_ptr + 3, attr_len - 3);
|
memcpy(buf_content, attr_ptr + 3, attr_len - 3);
|
||||||
|
|
||||||
if (len_content)
|
if (len_content)
|
||||||
*len_content = attr_len - 3;
|
*len_content = attr_len - 3;
|
||||||
@ -2174,7 +2174,7 @@ u32 rtw_set_p2p_attr_content(u8 *pbuf, u8 attr_id, u16 attr_len, u8 *pdata_attr)
|
|||||||
RTW_PUT_LE16(pbuf + 1, attr_len);
|
RTW_PUT_LE16(pbuf + 1, attr_len);
|
||||||
|
|
||||||
if (pdata_attr)
|
if (pdata_attr)
|
||||||
_rtw_memcpy(pbuf + 3, pdata_attr, attr_len);
|
memcpy(pbuf + 3, pdata_attr, attr_len);
|
||||||
|
|
||||||
a_len = attr_len + 3;
|
a_len = attr_len + 3;
|
||||||
|
|
||||||
@ -2205,7 +2205,7 @@ uint rtw_del_p2p_ie(u8 *ies, uint ies_len_ori, const char *msg)
|
|||||||
RTW_INFO("next_ie:%p, remain_len:%u\n", next_ie, remain_len);
|
RTW_INFO("next_ie:%p, remain_len:%u\n", next_ie, remain_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memmove(target_ie, next_ie, remain_len);
|
memmove(target_ie, next_ie, remain_len);
|
||||||
memset(target_ie + remain_len, 0, target_ie_len);
|
memset(target_ie + remain_len, 0, target_ie_len);
|
||||||
ies_len -= target_ie_len;
|
ies_len -= target_ie_len;
|
||||||
|
|
||||||
@ -2246,7 +2246,7 @@ uint rtw_del_p2p_attr(u8 *ie, uint ielen_ori, u8 attr_id)
|
|||||||
RTW_INFO("next_attr:%p, remain_len:%u\n", next_attr, remain_len);
|
RTW_INFO("next_attr:%p, remain_len:%u\n", next_attr, remain_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memmove(target_attr, next_attr, remain_len);
|
memmove(target_attr, next_attr, remain_len);
|
||||||
memset(target_attr + remain_len, 0, target_attr_len);
|
memset(target_attr + remain_len, 0, target_attr_len);
|
||||||
*(ie + 1) -= target_attr_len;
|
*(ie + 1) -= target_attr_len;
|
||||||
ielen -= target_attr_len;
|
ielen -= target_attr_len;
|
||||||
@ -2316,7 +2316,7 @@ void rtw_bss_ex_del_p2p_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id)
|
|||||||
if (ie_len != ie_len_ori) {
|
if (ie_len != ie_len_ori) {
|
||||||
u8 *next_ie = ie + ie_len;
|
u8 *next_ie = ie + ie_len;
|
||||||
|
|
||||||
_rtw_memmove(next_ie, next_ie_ori, remain_len);
|
memmove(next_ie, next_ie_ori, remain_len);
|
||||||
memset(next_ie + remain_len, 0, ie_len_ori - ie_len);
|
memset(next_ie + remain_len, 0, ie_len_ori - ie_len);
|
||||||
bss_ex->IELength -= ie_len_ori - ie_len;
|
bss_ex->IELength -= ie_len_ori - ie_len;
|
||||||
|
|
||||||
@ -2404,7 +2404,7 @@ u8 *rtw_get_wfd_ie(const u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||||||
wfd_ie_ptr = in_ie + cnt;
|
wfd_ie_ptr = in_ie + cnt;
|
||||||
|
|
||||||
if (wfd_ie)
|
if (wfd_ie)
|
||||||
_rtw_memcpy(wfd_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
memcpy(wfd_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
||||||
|
|
||||||
if (wfd_ielen)
|
if (wfd_ielen)
|
||||||
*wfd_ielen = in_ie[cnt + 1] + 2;
|
*wfd_ielen = in_ie[cnt + 1] + 2;
|
||||||
@ -2462,7 +2462,7 @@ u8 *rtw_get_wfd_attr(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id, u8 *buf_attr
|
|||||||
target_attr_ptr = attr_ptr;
|
target_attr_ptr = attr_ptr;
|
||||||
|
|
||||||
if (buf_attr)
|
if (buf_attr)
|
||||||
_rtw_memcpy(buf_attr, attr_ptr, attr_len);
|
memcpy(buf_attr, attr_ptr, attr_len);
|
||||||
|
|
||||||
if (len_attr)
|
if (len_attr)
|
||||||
*len_attr = attr_len;
|
*len_attr = attr_len;
|
||||||
@ -2497,7 +2497,7 @@ u8 *rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id, u8 *
|
|||||||
|
|
||||||
if (attr_ptr && attr_len) {
|
if (attr_ptr && attr_len) {
|
||||||
if (buf_content)
|
if (buf_content)
|
||||||
_rtw_memcpy(buf_content, attr_ptr + 3, attr_len - 3);
|
memcpy(buf_content, attr_ptr + 3, attr_len - 3);
|
||||||
|
|
||||||
if (len_content)
|
if (len_content)
|
||||||
*len_content = attr_len - 3;
|
*len_content = attr_len - 3;
|
||||||
@ -2532,7 +2532,7 @@ uint rtw_del_wfd_ie(u8 *ies, uint ies_len_ori, const char *msg)
|
|||||||
RTW_INFO("next_ie:%p, remain_len:%u\n", next_ie, remain_len);
|
RTW_INFO("next_ie:%p, remain_len:%u\n", next_ie, remain_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memmove(target_ie, next_ie, remain_len);
|
memmove(target_ie, next_ie, remain_len);
|
||||||
memset(target_ie + remain_len, 0, target_ie_len);
|
memset(target_ie + remain_len, 0, target_ie_len);
|
||||||
ies_len -= target_ie_len;
|
ies_len -= target_ie_len;
|
||||||
|
|
||||||
@ -2573,7 +2573,7 @@ uint rtw_del_wfd_attr(u8 *ie, uint ielen_ori, u8 attr_id)
|
|||||||
RTW_INFO("next_attr:%p, remain_len:%u\n", next_attr, remain_len);
|
RTW_INFO("next_attr:%p, remain_len:%u\n", next_attr, remain_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memmove(target_attr, next_attr, remain_len);
|
memmove(target_attr, next_attr, remain_len);
|
||||||
memset(target_attr + remain_len, 0, target_attr_len);
|
memset(target_attr + remain_len, 0, target_attr_len);
|
||||||
*(ie + 1) -= target_attr_len;
|
*(ie + 1) -= target_attr_len;
|
||||||
ielen -= target_attr_len;
|
ielen -= target_attr_len;
|
||||||
@ -2642,7 +2642,7 @@ void rtw_bss_ex_del_wfd_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id)
|
|||||||
if (ie_len != ie_len_ori) {
|
if (ie_len != ie_len_ori) {
|
||||||
u8 *next_ie = ie + ie_len;
|
u8 *next_ie = ie + ie_len;
|
||||||
|
|
||||||
_rtw_memmove(next_ie, next_ie_ori, remain_len);
|
memmove(next_ie, next_ie_ori, remain_len);
|
||||||
memset(next_ie + remain_len, 0, ie_len_ori - ie_len);
|
memset(next_ie + remain_len, 0, ie_len_ori - ie_len);
|
||||||
bss_ex->IELength -= ie_len_ori - ie_len;
|
bss_ex->IELength -= ie_len_ori - ie_len;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ query_802_11_capability(
|
|||||||
pCap->NoOfAuthEncryptPairsSupported = ulNumOfPairSupported;
|
pCap->NoOfAuthEncryptPairsSupported = ulNumOfPairSupported;
|
||||||
|
|
||||||
if (sizeof(szAuthEnc) <= 240) /* 240 = 256 - 4*4 */ { /* SecurityInfo.szCapability: only 256 bytes in size. */
|
if (sizeof(szAuthEnc) <= 240) /* 240 = 256 - 4*4 */ { /* SecurityInfo.szCapability: only 256 bytes in size. */
|
||||||
_rtw_memcpy(pucAuthEncryptionSupported, (u8 *)szAuthEnc, sizeof(szAuthEnc));
|
memcpy(pucAuthEncryptionSupported, (u8 *)szAuthEnc, sizeof(szAuthEnc));
|
||||||
*pulOutLen = pCap->Length;
|
*pulOutLen = pCap->Length;
|
||||||
return _TRUE;
|
return _TRUE;
|
||||||
} else {
|
} else {
|
||||||
@ -88,7 +88,7 @@ u8 query_802_11_association_information(_adapter *padapter, PNDIS_802_11_ASSOCIA
|
|||||||
|
|
||||||
pAssocInfo->AvailableRequestFixedIEs |= NDIS_802_11_AI_REQFI_CAPABILITIES | NDIS_802_11_AI_REQFI_CURRENTAPADDRESS;
|
pAssocInfo->AvailableRequestFixedIEs |= NDIS_802_11_AI_REQFI_CAPABILITIES | NDIS_802_11_AI_REQFI_CURRENTAPADDRESS;
|
||||||
pAssocInfo->RequestFixedIEs.Capabilities = (unsigned short) *&psecnetwork->IEs[10];
|
pAssocInfo->RequestFixedIEs.Capabilities = (unsigned short) *&psecnetwork->IEs[10];
|
||||||
_rtw_memcpy(pAssocInfo->RequestFixedIEs.CurrentAPAddress,
|
memcpy(pAssocInfo->RequestFixedIEs.CurrentAPAddress,
|
||||||
&psecnetwork->MacAddress, 6);
|
&psecnetwork->MacAddress, 6);
|
||||||
|
|
||||||
pAssocInfo->OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
|
pAssocInfo->OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
|
||||||
@ -105,7 +105,7 @@ u8 query_802_11_association_information(_adapter *padapter, PNDIS_802_11_ASSOCIA
|
|||||||
i = 13; /* 0~11 is fixed information element */
|
i = 13; /* 0~11 is fixed information element */
|
||||||
while ((i < supp_ie[0]) && (i < 256)) {
|
while ((i < supp_ie[0]) && (i < 256)) {
|
||||||
if ((unsigned char)supp_ie[i] == pDest[0]) {
|
if ((unsigned char)supp_ie[i] == pDest[0]) {
|
||||||
_rtw_memcpy((u8 *)(pDest),
|
memcpy((u8 *)(pDest),
|
||||||
&supp_ie[i],
|
&supp_ie[i],
|
||||||
supp_ie[1 + i] + 2);
|
supp_ie[1 + i] + 2);
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ u8 query_802_11_association_information(_adapter *padapter, PNDIS_802_11_ASSOCIA
|
|||||||
|
|
||||||
i = auth_ie[0] - 12;
|
i = auth_ie[0] - 12;
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
_rtw_memcpy((u8 *)&pDest[0], &auth_ie[1], i);
|
memcpy((u8 *)&pDest[0], &auth_ie[1], i);
|
||||||
pAssocInfo->ResponseIELength = i;
|
pAssocInfo->ResponseIELength = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,7 +361,7 @@ NDIS_STATUS oid_rt_get_rx_icv_err_hdl(struct oid_par_priv *poid_par_priv)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
if (poid_par_priv->information_buf_len >= sizeof(u32)) {
|
if (poid_par_priv->information_buf_len >= sizeof(u32)) {
|
||||||
/* _rtw_memcpy(*(uint *)poid_par_priv->information_buf,padapter->recvpriv.rx_icv_err,sizeof(u32)); */
|
/* memcpy(*(uint *)poid_par_priv->information_buf,padapter->recvpriv.rx_icv_err,sizeof(u32)); */
|
||||||
*(uint *)poid_par_priv->information_buf = padapter->recvpriv.rx_icv_err;
|
*(uint *)poid_par_priv->information_buf = padapter->recvpriv.rx_icv_err;
|
||||||
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
||||||
} else
|
} else
|
||||||
@ -530,7 +530,7 @@ NDIS_STATUS oid_rt_get_total_rx_bytes_hdl(struct oid_par_priv *poid_par_priv)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
if (poid_par_priv->information_buf_len >= sizeof(ULONG)) {
|
if (poid_par_priv->information_buf_len >= sizeof(ULONG)) {
|
||||||
/* _rtw_memcpy(*(uint *)poid_par_priv->information_buf,padapter->recvpriv.rx_icv_err,sizeof(u32)); */
|
/* memcpy(*(uint *)poid_par_priv->information_buf,padapter->recvpriv.rx_icv_err,sizeof(u32)); */
|
||||||
*(u64 *)poid_par_priv->information_buf = padapter->recvpriv.rx_bytes;
|
*(u64 *)poid_par_priv->information_buf = padapter->recvpriv.rx_bytes;
|
||||||
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
||||||
} else
|
} else
|
||||||
|
@ -88,7 +88,7 @@ u8 rtw_do_join(_adapter *padapter)
|
|||||||
pmlmepriv->to_join = _TRUE;
|
pmlmepriv->to_join = _TRUE;
|
||||||
|
|
||||||
rtw_init_sitesurvey_parm(padapter, &parm);
|
rtw_init_sitesurvey_parm(padapter, &parm);
|
||||||
_rtw_memcpy(&parm.ssid[0], &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
memcpy(&parm.ssid[0], &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
||||||
parm.ssid_num = 1;
|
parm.ssid_num = 1;
|
||||||
|
|
||||||
if (_rtw_queue_empty(queue) == _TRUE) {
|
if (_rtw_queue_empty(queue) == _TRUE) {
|
||||||
@ -139,7 +139,7 @@ u8 rtw_do_join(_adapter *padapter)
|
|||||||
pibss = padapter->registrypriv.dev_network.MacAddress;
|
pibss = padapter->registrypriv.dev_network.MacAddress;
|
||||||
|
|
||||||
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||||
_rtw_memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(padapter);
|
rtw_update_registrypriv_dev_network(padapter);
|
||||||
|
|
||||||
@ -321,7 +321,7 @@ handle_tkip_countermeasure:
|
|||||||
}
|
}
|
||||||
|
|
||||||
memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID));
|
memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||||
_rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
|
memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
|
||||||
pmlmepriv->assoc_by_bssid = _TRUE;
|
pmlmepriv->assoc_by_bssid = _TRUE;
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE)
|
||||||
@ -417,7 +417,7 @@ handle_tkip_countermeasure:
|
|||||||
goto release_mlme_lock;
|
goto release_mlme_lock;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID));
|
memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID));
|
||||||
pmlmepriv->assoc_by_bssid = _FALSE;
|
pmlmepriv->assoc_by_bssid = _FALSE;
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE)
|
||||||
@ -479,12 +479,12 @@ handle_tkip_countermeasure:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ssid && ssid_valid)
|
if (ssid && ssid_valid)
|
||||||
_rtw_memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID));
|
memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(NDIS_802_11_SSID));
|
||||||
else
|
else
|
||||||
memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID));
|
memset(&pmlmepriv->assoc_ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||||
|
|
||||||
if (bssid && bssid_valid) {
|
if (bssid && bssid_valid) {
|
||||||
_rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
|
memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
|
||||||
pmlmepriv->assoc_by_bssid = _TRUE;
|
pmlmepriv->assoc_by_bssid = _TRUE;
|
||||||
} else
|
} else
|
||||||
pmlmepriv->assoc_by_bssid = _FALSE;
|
pmlmepriv->assoc_by_bssid = _FALSE;
|
||||||
@ -749,7 +749,7 @@ u8 rtw_set_802_11_add_wep(_adapter *padapter, NDIS_802_11_WEP *wep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_rtw_memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]), &(wep->KeyMaterial), wep->KeyLength);
|
memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]), &(wep->KeyMaterial), wep->KeyLength);
|
||||||
|
|
||||||
psecuritypriv->dot11DefKeylen[keyid] = wep->KeyLength;
|
psecuritypriv->dot11DefKeylen[keyid] = wep->KeyLength;
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len
|
|||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(xmit_frame->buf_addr + buf_offset + pattrib->pktlen, IOL_cmds, cmd_len);
|
memcpy(xmit_frame->buf_addr + buf_offset + pattrib->pktlen, IOL_cmds, cmd_len);
|
||||||
pattrib->pktlen += cmd_len;
|
pattrib->pktlen += cmd_len;
|
||||||
pattrib->last_txcmdsz += cmd_len;
|
pattrib->last_txcmdsz += cmd_len;
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ inline void rtw_mi_update_iface_status(struct mlme_priv *pmlmepriv, sint state)
|
|||||||
RTW_INFO("%s => will change or clean state to 0x%08x\n", __func__, state);
|
RTW_INFO("%s => will change or clean state to 0x%08x\n", __func__, state);
|
||||||
|
|
||||||
rtw_mi_status(adapter, &tmp_mstate);
|
rtw_mi_status(adapter, &tmp_mstate);
|
||||||
_rtw_memcpy(iface_state, &tmp_mstate, sizeof(struct mi_state));
|
memcpy(iface_state, &tmp_mstate, sizeof(struct mi_state));
|
||||||
|
|
||||||
if (rtw_mi_get_ch_setting_union(adapter, &u_ch, &u_bw, &u_offset))
|
if (rtw_mi_get_ch_setting_union(adapter, &u_ch, &u_bw, &u_offset))
|
||||||
rtw_mi_update_union_chan_inf(adapter , u_ch, u_offset , u_bw);
|
rtw_mi_update_union_chan_inf(adapter , u_ch, u_offset , u_bw);
|
||||||
@ -1403,7 +1403,7 @@ static s32 _rtw_mi_buddy_clone_bcmc_packet(_adapter *adapter, union recv_frame *
|
|||||||
pcloneframe->u.hdr.precvbuf = NULL; /*can't access the precvbuf for new arch.*/
|
pcloneframe->u.hdr.precvbuf = NULL; /*can't access the precvbuf for new arch.*/
|
||||||
pcloneframe->u.hdr.len = 0;
|
pcloneframe->u.hdr.len = 0;
|
||||||
|
|
||||||
_rtw_memcpy(&pcloneframe->u.hdr.attrib, &precvframe->u.hdr.attrib, sizeof(struct rx_pkt_attrib));
|
memcpy(&pcloneframe->u.hdr.attrib, &precvframe->u.hdr.attrib, sizeof(struct rx_pkt_attrib));
|
||||||
|
|
||||||
pattrib = &pcloneframe->u.hdr.attrib;
|
pattrib = &pcloneframe->u.hdr.attrib;
|
||||||
#ifdef CONFIG_SKB_ALLOCATED
|
#ifdef CONFIG_SKB_ALLOCATED
|
||||||
|
@ -266,7 +266,7 @@ int rtw_mlme_update_wfd_ie_data(struct mlme_priv *mlme, u8 type, u8 *ie, u32 ie_
|
|||||||
, FUNC_ADPT_ARG(adapter), type);
|
, FUNC_ADPT_ARG(adapter), type);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
_rtw_memcpy(*t_ie, ie, ie_len);
|
memcpy(*t_ie, ie, ie_len);
|
||||||
*t_ie_len = ie_len;
|
*t_ie_len = ie_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -531,7 +531,7 @@ u16 rtw_get_capability(WLAN_BSSID_EX *bss)
|
|||||||
{
|
{
|
||||||
u16 val;
|
u16 val;
|
||||||
|
|
||||||
_rtw_memcpy((u8 *)&val, rtw_get_capability_from_ie(bss->IEs), 2);
|
memcpy((u8 *)&val, rtw_get_capability_from_ie(bss->IEs), 2);
|
||||||
|
|
||||||
return le16_to_cpu(val);
|
return le16_to_cpu(val);
|
||||||
}
|
}
|
||||||
@ -679,8 +679,8 @@ int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, u8 feature)
|
|||||||
if (rtw_bug_check(dst, src, &s_cap, &d_cap) == _FALSE)
|
if (rtw_bug_check(dst, src, &s_cap, &d_cap) == _FALSE)
|
||||||
return _FALSE;
|
return _FALSE;
|
||||||
|
|
||||||
_rtw_memcpy((u8 *)&s_cap, rtw_get_capability_from_ie(src->IEs), 2);
|
memcpy((u8 *)&s_cap, rtw_get_capability_from_ie(src->IEs), 2);
|
||||||
_rtw_memcpy((u8 *)&d_cap, rtw_get_capability_from_ie(dst->IEs), 2);
|
memcpy((u8 *)&d_cap, rtw_get_capability_from_ie(dst->IEs), 2);
|
||||||
|
|
||||||
|
|
||||||
s_cap = le16_to_cpu(s_cap);
|
s_cap = le16_to_cpu(s_cap);
|
||||||
@ -711,7 +711,7 @@ int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, u8 feature)
|
|||||||
|
|
||||||
if (((_rtw_memcmp(src->MacAddress, dst->MacAddress, ETH_ALEN)) == _TRUE) &&
|
if (((_rtw_memcmp(src->MacAddress, dst->MacAddress, ETH_ALEN)) == _TRUE) &&
|
||||||
((s_cap & WLAN_CAPABILITY_IBSS) == (d_cap & WLAN_CAPABILITY_IBSS)) &&
|
((s_cap & WLAN_CAPABILITY_IBSS) == (d_cap & WLAN_CAPABILITY_IBSS)) &&
|
||||||
((s_cap & WLAN_CAPABILITY_BSS) == (d_cap & WLAN_CAPABILITY_BSS))) {
|
((s_cap & WLAN_CAPABILITY_ESS) == (d_cap & WLAN_CAPABILITY_ESS))) {
|
||||||
if ((src->Ssid.SsidLength == dst->Ssid.SsidLength) &&
|
if ((src->Ssid.SsidLength == dst->Ssid.SsidLength) &&
|
||||||
(((_rtw_memcmp(src->Ssid.Ssid, dst->Ssid.Ssid, src->Ssid.SsidLength)) == _TRUE) || //Case of normal AP
|
(((_rtw_memcmp(src->Ssid.Ssid, dst->Ssid.Ssid, src->Ssid.SsidLength)) == _TRUE) || //Case of normal AP
|
||||||
(is_all_null(src->Ssid.Ssid, src->Ssid.SsidLength) == _TRUE || is_all_null(dst->Ssid.Ssid, dst->Ssid.SsidLength) == _TRUE))) //Case of hidden AP
|
(is_all_null(src->Ssid.Ssid, src->Ssid.SsidLength) == _TRUE || is_all_null(dst->Ssid.Ssid, dst->Ssid.SsidLength) == _TRUE))) //Case of hidden AP
|
||||||
@ -852,7 +852,7 @@ void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src,
|
|||||||
if (update_ie) {
|
if (update_ie) {
|
||||||
dst->Reserved[0] = src->Reserved[0];
|
dst->Reserved[0] = src->Reserved[0];
|
||||||
dst->Reserved[1] = src->Reserved[1];
|
dst->Reserved[1] = src->Reserved[1];
|
||||||
_rtw_memcpy((u8 *)dst, (u8 *)src, get_WLAN_BSSID_EX_sz(src));
|
memcpy((u8 *)dst, (u8 *)src, get_WLAN_BSSID_EX_sz(src));
|
||||||
}
|
}
|
||||||
|
|
||||||
dst->PhyInfo.SignalStrength = ss_final;
|
dst->PhyInfo.SignalStrength = ss_final;
|
||||||
@ -1032,7 +1032,7 @@ bool rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
|
|||||||
#ifdef CONFIG_ANTENNA_DIVERSITY
|
#ifdef CONFIG_ANTENNA_DIVERSITY
|
||||||
rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL);
|
rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL);
|
||||||
#endif
|
#endif
|
||||||
_rtw_memcpy(&(pnetwork->network), target, get_WLAN_BSSID_EX_sz(target));
|
memcpy(&(pnetwork->network), target, get_WLAN_BSSID_EX_sz(target));
|
||||||
/* pnetwork->last_scanned = rtw_get_current_time(); */
|
/* pnetwork->last_scanned = rtw_get_current_time(); */
|
||||||
/* variable initialize */
|
/* variable initialize */
|
||||||
pnetwork->fixed = _FALSE;
|
pnetwork->fixed = _FALSE;
|
||||||
@ -1061,7 +1061,7 @@ bool rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
|
|||||||
#ifdef CONFIG_ANTENNA_DIVERSITY
|
#ifdef CONFIG_ANTENNA_DIVERSITY
|
||||||
rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL);
|
rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL);
|
||||||
#endif
|
#endif
|
||||||
_rtw_memcpy(&(pnetwork->network), target, bssid_ex_sz);
|
memcpy(&(pnetwork->network), target, bssid_ex_sz);
|
||||||
|
|
||||||
pnetwork->last_scanned = rtw_get_current_time();
|
pnetwork->last_scanned = rtw_get_current_time();
|
||||||
|
|
||||||
@ -1265,11 +1265,11 @@ void rtw_survey_event_callback(_adapter *adapter, u8 *pbuf)
|
|||||||
struct wlan_network *ibss_wlan = NULL;
|
struct wlan_network *ibss_wlan = NULL;
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
|
|
||||||
_rtw_memcpy(pmlmepriv->cur_network.network.IEs, pnetwork->IEs, 8);
|
memcpy(pmlmepriv->cur_network.network.IEs, pnetwork->IEs, 8);
|
||||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
ibss_wlan = _rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->MacAddress);
|
ibss_wlan = _rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->MacAddress);
|
||||||
if (ibss_wlan) {
|
if (ibss_wlan) {
|
||||||
_rtw_memcpy(ibss_wlan->network.IEs , pnetwork->IEs, 8);
|
memcpy(ibss_wlan->network.IEs , pnetwork->IEs, 8);
|
||||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
@ -1347,7 +1347,7 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf)
|
|||||||
|
|
||||||
|
|
||||||
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||||
_rtw_memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(adapter);
|
rtw_update_registrypriv_dev_network(adapter);
|
||||||
rtw_generate_random_ibss(pibss);
|
rtw_generate_random_ibss(pibss);
|
||||||
@ -1378,7 +1378,7 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf)
|
|||||||
u8 ssc_chk = rtw_sitesurvey_condition_check(adapter, _FALSE);
|
u8 ssc_chk = rtw_sitesurvey_condition_check(adapter, _FALSE);
|
||||||
|
|
||||||
rtw_init_sitesurvey_parm(adapter, &parm);
|
rtw_init_sitesurvey_parm(adapter, &parm);
|
||||||
_rtw_memcpy(&parm.ssid[0], &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
memcpy(&parm.ssid[0], &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
||||||
parm.ssid_num = 1;
|
parm.ssid_num = 1;
|
||||||
|
|
||||||
if (rtw_dec_to_roam(adapter) == 0
|
if (rtw_dec_to_roam(adapter) == 0
|
||||||
@ -2012,7 +2012,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
|
|||||||
|
|
||||||
/* update station supportRate */
|
/* update station supportRate */
|
||||||
psta->bssratelen = rtw_get_rateset_len(pnetwork->network.SupportedRates);
|
psta->bssratelen = rtw_get_rateset_len(pnetwork->network.SupportedRates);
|
||||||
_rtw_memcpy(psta->bssrateset, pnetwork->network.SupportedRates, psta->bssratelen);
|
memcpy(psta->bssrateset, pnetwork->network.SupportedRates, psta->bssratelen);
|
||||||
rtw_hal_update_sta_ra_info(padapter, psta);
|
rtw_hal_update_sta_ra_info(padapter, psta);
|
||||||
|
|
||||||
psta->wireless_mode = pmlmeext->cur_wireless_mode;
|
psta->wireless_mode = pmlmeext->cur_wireless_mode;
|
||||||
@ -2081,7 +2081,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_RTW_80211K
|
#ifdef CONFIG_RTW_80211K
|
||||||
_rtw_memcpy(&psta->rm_en_cap, pnetwork->network.PhyInfo.rm_en_cap, 5);
|
memcpy(&psta->rm_en_cap, pnetwork->network.PhyInfo.rm_en_cap, 5);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_RTS_FULL_BW
|
#ifdef CONFIG_RTS_FULL_BW
|
||||||
rtw_parse_sta_vendor_ie_8812(padapter, psta, BSS_EX_TLV_IES(&cur_network->network), BSS_EX_TLV_IES_LEN(&cur_network->network));
|
rtw_parse_sta_vendor_ie_8812(padapter, psta, BSS_EX_TLV_IES(&cur_network->network), BSS_EX_TLV_IES_LEN(&cur_network->network));
|
||||||
@ -2102,10 +2102,10 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network *
|
|||||||
RTW_INFO("%s\n", __FUNCTION__);
|
RTW_INFO("%s\n", __FUNCTION__);
|
||||||
|
|
||||||
/* why not use ptarget_wlan?? */
|
/* why not use ptarget_wlan?? */
|
||||||
_rtw_memcpy(&cur_network->network, &pnetwork->network, pnetwork->network.Length);
|
memcpy(&cur_network->network, &pnetwork->network, pnetwork->network.Length);
|
||||||
/* some IEs in pnetwork is wrong, so we should use ptarget_wlan IEs */
|
/* some IEs in pnetwork is wrong, so we should use ptarget_wlan IEs */
|
||||||
cur_network->network.IELength = ptarget_wlan->network.IELength;
|
cur_network->network.IELength = ptarget_wlan->network.IELength;
|
||||||
_rtw_memcpy(&cur_network->network.IEs[0], &ptarget_wlan->network.IEs[0], MAX_IE_SZ);
|
memcpy(&cur_network->network.IEs[0], &ptarget_wlan->network.IEs[0], MAX_IE_SZ);
|
||||||
|
|
||||||
cur_network->aid = pnetwork->join_res;
|
cur_network->aid = pnetwork->join_res;
|
||||||
|
|
||||||
@ -2513,7 +2513,7 @@ void rtw_stassoc_event_callback(_adapter *adapter, u8 *pbuf)
|
|||||||
passoc_req = rtw_zmalloc(psta->assoc_req_len);
|
passoc_req = rtw_zmalloc(psta->assoc_req_len);
|
||||||
if (passoc_req) {
|
if (passoc_req) {
|
||||||
assoc_req_len = psta->assoc_req_len;
|
assoc_req_len = psta->assoc_req_len;
|
||||||
_rtw_memcpy(passoc_req, psta->passoc_req, assoc_req_len);
|
memcpy(passoc_req, psta->passoc_req, assoc_req_len);
|
||||||
|
|
||||||
rtw_mfree(psta->passoc_req , psta->assoc_req_len);
|
rtw_mfree(psta->passoc_req , psta->assoc_req_len);
|
||||||
psta->passoc_req = NULL;
|
psta->passoc_req = NULL;
|
||||||
@ -2703,13 +2703,13 @@ void rtw_ft_reassoc_event_callback(_adapter *padapter, u8 *pbuf)
|
|||||||
ft_evt_parms.ies_len = pft_roam->ft_event.ies_len;
|
ft_evt_parms.ies_len = pft_roam->ft_event.ies_len;
|
||||||
ft_evt_parms.ies = rtw_zmalloc(ft_evt_parms.ies_len);
|
ft_evt_parms.ies = rtw_zmalloc(ft_evt_parms.ies_len);
|
||||||
if (ft_evt_parms.ies)
|
if (ft_evt_parms.ies)
|
||||||
_rtw_memcpy((void *)ft_evt_parms.ies, pft_roam->ft_event.ies, ft_evt_parms.ies_len);
|
memcpy((void *)ft_evt_parms.ies, pft_roam->ft_event.ies, ft_evt_parms.ies_len);
|
||||||
else
|
else
|
||||||
goto err_2;
|
goto err_2;
|
||||||
|
|
||||||
ft_evt_parms.target_ap = rtw_zmalloc(ETH_ALEN);
|
ft_evt_parms.target_ap = rtw_zmalloc(ETH_ALEN);
|
||||||
if (ft_evt_parms.target_ap)
|
if (ft_evt_parms.target_ap)
|
||||||
_rtw_memcpy((void *)ft_evt_parms.target_ap, pstassoc->macaddr, ETH_ALEN);
|
memcpy((void *)ft_evt_parms.target_ap, pstassoc->macaddr, ETH_ALEN);
|
||||||
else
|
else
|
||||||
goto err_1;
|
goto err_1;
|
||||||
|
|
||||||
@ -2966,10 +2966,10 @@ void rtw_stadel_event_callback(_adapter *adapter, u8 *pbuf)
|
|||||||
pdev_network = &(adapter->registrypriv.dev_network);
|
pdev_network = &(adapter->registrypriv.dev_network);
|
||||||
pibss = adapter->registrypriv.dev_network.MacAddress;
|
pibss = adapter->registrypriv.dev_network.MacAddress;
|
||||||
|
|
||||||
_rtw_memcpy(pdev_network, &tgt_network->network, get_WLAN_BSSID_EX_sz(&tgt_network->network));
|
memcpy(pdev_network, &tgt_network->network, get_WLAN_BSSID_EX_sz(&tgt_network->network));
|
||||||
|
|
||||||
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
memset(&pdev_network->Ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||||
_rtw_memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(NDIS_802_11_SSID));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(adapter);
|
rtw_update_registrypriv_dev_network(adapter);
|
||||||
|
|
||||||
@ -4011,19 +4011,19 @@ sint rtw_set_key(_adapter *adapter, struct security_priv *psecuritypriv, sint ke
|
|||||||
|
|
||||||
case _WEP40_:
|
case _WEP40_:
|
||||||
keylen = 5;
|
keylen = 5;
|
||||||
_rtw_memcpy(&(psetkeyparm->key[0]), &(psecuritypriv->dot11DefKey[keyid].skey[0]), keylen);
|
memcpy(&(psetkeyparm->key[0]), &(psecuritypriv->dot11DefKey[keyid].skey[0]), keylen);
|
||||||
break;
|
break;
|
||||||
case _WEP104_:
|
case _WEP104_:
|
||||||
keylen = 13;
|
keylen = 13;
|
||||||
_rtw_memcpy(&(psetkeyparm->key[0]), &(psecuritypriv->dot11DefKey[keyid].skey[0]), keylen);
|
memcpy(&(psetkeyparm->key[0]), &(psecuritypriv->dot11DefKey[keyid].skey[0]), keylen);
|
||||||
break;
|
break;
|
||||||
case _TKIP_:
|
case _TKIP_:
|
||||||
keylen = 16;
|
keylen = 16;
|
||||||
_rtw_memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen);
|
memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen);
|
||||||
break;
|
break;
|
||||||
case _AES_:
|
case _AES_:
|
||||||
keylen = 16;
|
keylen = 16;
|
||||||
_rtw_memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen);
|
memcpy(&psetkeyparm->key, &psecuritypriv->dot118021XGrpKey[keyid], keylen);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
res = _FAIL;
|
res = _FAIL;
|
||||||
@ -4303,7 +4303,7 @@ int rtw_rsn_sync_pmkid(_adapter *adapter, u8 *ie, uint ie_len, int i_ent)
|
|||||||
|
|
||||||
/* bakcup group mgmt cs */
|
/* bakcup group mgmt cs */
|
||||||
if (info.gmcs)
|
if (info.gmcs)
|
||||||
_rtw_memcpy(gm_cs, info.gmcs, 4);
|
memcpy(gm_cs, info.gmcs, 4);
|
||||||
|
|
||||||
if (info.pmkid_cnt) {
|
if (info.pmkid_cnt) {
|
||||||
RTW_INFO(FUNC_ADPT_FMT" remove original PMKID, count:%u\n"
|
RTW_INFO(FUNC_ADPT_FMT" remove original PMKID, count:%u\n"
|
||||||
@ -4317,13 +4317,13 @@ int rtw_rsn_sync_pmkid(_adapter *adapter, u8 *ie, uint ie_len, int i_ent)
|
|||||||
, FUNC_ADPT_ARG(adapter), KEY_ARG(sec->PMKIDList[i_ent].PMKID));
|
, FUNC_ADPT_ARG(adapter), KEY_ARG(sec->PMKIDList[i_ent].PMKID));
|
||||||
|
|
||||||
info.pmkid_cnt = 1; /* update new pmkid_cnt */
|
info.pmkid_cnt = 1; /* update new pmkid_cnt */
|
||||||
_rtw_memcpy(info.pmkid_list, sec->PMKIDList[i_ent].PMKID, 16);
|
memcpy(info.pmkid_list, sec->PMKIDList[i_ent].PMKID, 16);
|
||||||
} else
|
} else
|
||||||
info.pmkid_cnt = 0; /* update new pmkid_cnt */
|
info.pmkid_cnt = 0; /* update new pmkid_cnt */
|
||||||
|
|
||||||
RTW_PUT_LE16(info.pmkid_list - 2, info.pmkid_cnt);
|
RTW_PUT_LE16(info.pmkid_list - 2, info.pmkid_cnt);
|
||||||
if (info.gmcs)
|
if (info.gmcs)
|
||||||
_rtw_memcpy(info.pmkid_list + 16 * info.pmkid_cnt, gm_cs, 4);
|
memcpy(info.pmkid_list + 16 * info.pmkid_cnt, gm_cs, 4);
|
||||||
|
|
||||||
ie_len = 1 + 1 + 2 + 4
|
ie_len = 1 + 1 + 2 + 4
|
||||||
+ 2 + 4 * info.pcs_cnt
|
+ 2 + 4 * info.pcs_cnt
|
||||||
@ -4355,12 +4355,12 @@ sint rtw_restruct_sec_ie(_adapter *adapter, u8 *out_ie)
|
|||||||
authmode = _WPA2_IE_ID_;
|
authmode = _WPA2_IE_ID_;
|
||||||
|
|
||||||
if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) {
|
if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) {
|
||||||
_rtw_memcpy(out_ie, psecuritypriv->wps_ie, psecuritypriv->wps_ie_len);
|
memcpy(out_ie, psecuritypriv->wps_ie, psecuritypriv->wps_ie_len);
|
||||||
ielength = psecuritypriv->wps_ie_len;
|
ielength = psecuritypriv->wps_ie_len;
|
||||||
|
|
||||||
} else if ((authmode == _WPA_IE_ID_) || (authmode == _WPA2_IE_ID_)) {
|
} else if ((authmode == _WPA_IE_ID_) || (authmode == _WPA2_IE_ID_)) {
|
||||||
/* copy RSN or SSN */
|
/* copy RSN or SSN */
|
||||||
_rtw_memcpy(out_ie, psecuritypriv->supplicant_ie, psecuritypriv->supplicant_ie[1] + 2);
|
memcpy(out_ie, psecuritypriv->supplicant_ie, psecuritypriv->supplicant_ie[1] + 2);
|
||||||
/* debug for CONFIG_IEEE80211W
|
/* debug for CONFIG_IEEE80211W
|
||||||
{
|
{
|
||||||
int jj;
|
int jj;
|
||||||
@ -4388,9 +4388,9 @@ void rtw_init_registrypriv_dev_network(_adapter *adapter)
|
|||||||
u8 *myhwaddr = adapter_mac_addr(adapter);
|
u8 *myhwaddr = adapter_mac_addr(adapter);
|
||||||
|
|
||||||
|
|
||||||
_rtw_memcpy(pdev_network->MacAddress, myhwaddr, ETH_ALEN);
|
memcpy(pdev_network->MacAddress, myhwaddr, ETH_ALEN);
|
||||||
|
|
||||||
_rtw_memcpy(&pdev_network->Ssid, &pregistrypriv->ssid, sizeof(NDIS_802_11_SSID));
|
memcpy(&pdev_network->Ssid, &pregistrypriv->ssid, sizeof(NDIS_802_11_SSID));
|
||||||
|
|
||||||
pdev_network->Configuration.Length = sizeof(NDIS_802_11_CONFIGURATION);
|
pdev_network->Configuration.Length = sizeof(NDIS_802_11_CONFIGURATION);
|
||||||
pdev_network->Configuration.BeaconPeriod = 100;
|
pdev_network->Configuration.BeaconPeriod = 100;
|
||||||
@ -4741,7 +4741,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* fill default supported_mcs_set */
|
/* fill default supported_mcs_set */
|
||||||
_rtw_memcpy(ht_capie.supp_mcs_set, pmlmeext->default_supported_mcs_set, 16);
|
memcpy(ht_capie.supp_mcs_set, pmlmeext->default_supported_mcs_set, 16);
|
||||||
|
|
||||||
/* update default supported_mcs_set */
|
/* update default supported_mcs_set */
|
||||||
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
||||||
@ -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;
|
||||||
@ -5161,7 +5160,7 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network)
|
|||||||
RTW_INFO("roaming from %s("MAC_FMT"), length:%d\n",
|
RTW_INFO("roaming from %s("MAC_FMT"), length:%d\n",
|
||||||
cur_network->network.Ssid.Ssid, MAC_ARG(cur_network->network.MacAddress),
|
cur_network->network.Ssid.Ssid, MAC_ARG(cur_network->network.MacAddress),
|
||||||
cur_network->network.Ssid.SsidLength);
|
cur_network->network.Ssid.SsidLength);
|
||||||
_rtw_memcpy(&pmlmepriv->assoc_ssid, &cur_network->network.Ssid, sizeof(NDIS_802_11_SSID));
|
memcpy(&pmlmepriv->assoc_ssid, &cur_network->network.Ssid, sizeof(NDIS_802_11_SSID));
|
||||||
|
|
||||||
pmlmepriv->assoc_by_bssid = _FALSE;
|
pmlmepriv->assoc_by_bssid = _FALSE;
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
104
core/rtw_mp.c
104
core/rtw_mp.c
@ -39,46 +39,6 @@ int rtfloor(float x)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_MP_INCLUDED
|
#ifdef CONFIG_MP_INCLUDED
|
||||||
u32 read_macreg(_adapter *padapter, u32 addr, u32 sz)
|
|
||||||
{
|
|
||||||
u32 val = 0;
|
|
||||||
|
|
||||||
switch (sz) {
|
|
||||||
case 1:
|
|
||||||
val = rtw_read8(padapter, addr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
val = rtw_read16(padapter, addr);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
val = rtw_read32(padapter, addr);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
val = 0xffffffff;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return val;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void write_macreg(_adapter *padapter, u32 addr, u32 val, u32 sz)
|
|
||||||
{
|
|
||||||
switch (sz) {
|
|
||||||
case 1:
|
|
||||||
rtw_write8(padapter, addr, (u8)val);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
rtw_write16(padapter, addr, (u16)val);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
rtw_write32(padapter, addr, val);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
u32 read_bbreg(_adapter *padapter, u32 addr, u32 bitmask)
|
u32 read_bbreg(_adapter *padapter, u32 addr, u32 bitmask)
|
||||||
{
|
{
|
||||||
@ -150,10 +110,10 @@ static void _init_mp_priv_(struct mp_priv *pmp_priv)
|
|||||||
pmp_priv->brx_filter_beacon = _FALSE;
|
pmp_priv->brx_filter_beacon = _FALSE;
|
||||||
|
|
||||||
pnetwork = &pmp_priv->mp_network.network;
|
pnetwork = &pmp_priv->mp_network.network;
|
||||||
_rtw_memcpy(pnetwork->MacAddress, pmp_priv->network_macaddr, ETH_ALEN);
|
memcpy(pnetwork->MacAddress, pmp_priv->network_macaddr, ETH_ALEN);
|
||||||
|
|
||||||
pnetwork->Ssid.SsidLength = 8;
|
pnetwork->Ssid.SsidLength = 8;
|
||||||
_rtw_memcpy(pnetwork->Ssid.Ssid, "mp_871x", pnetwork->Ssid.SsidLength);
|
memcpy(pnetwork->Ssid.Ssid, "mp_871x", pnetwork->Ssid.SsidLength);
|
||||||
|
|
||||||
pmp_priv->tx.payload = 2;
|
pmp_priv->tx.payload = 2;
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
@ -280,8 +240,8 @@ static void mp_init_xmit_attrib(struct mp_tx *pmptx, PADAPTER padapter)
|
|||||||
|
|
||||||
pattrib->ether_type = 0x8712;
|
pattrib->ether_type = 0x8712;
|
||||||
#if 0
|
#if 0
|
||||||
_rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
_rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
|
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
|
||||||
#endif
|
#endif
|
||||||
memset(pattrib->dst, 0xFF, ETH_ALEN);
|
memset(pattrib->dst, 0xFF, ETH_ALEN);
|
||||||
|
|
||||||
@ -874,11 +834,11 @@ u32 mp_join(PADAPTER padapter, u8 mode)
|
|||||||
RTW_INFO("%s ,pmppriv->network_macaddr=%x %x %x %x %x %x\n", __func__,
|
RTW_INFO("%s ,pmppriv->network_macaddr=%x %x %x %x %x %x\n", __func__,
|
||||||
pmppriv->network_macaddr[0], pmppriv->network_macaddr[1], pmppriv->network_macaddr[2], pmppriv->network_macaddr[3], pmppriv->network_macaddr[4],
|
pmppriv->network_macaddr[0], pmppriv->network_macaddr[1], pmppriv->network_macaddr[2], pmppriv->network_macaddr[3], pmppriv->network_macaddr[4],
|
||||||
pmppriv->network_macaddr[5]);
|
pmppriv->network_macaddr[5]);
|
||||||
_rtw_memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN);
|
memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN);
|
||||||
|
|
||||||
if (mode == WIFI_FW_ADHOC_STATE) {
|
if (mode == WIFI_FW_ADHOC_STATE) {
|
||||||
bssid.Ssid.SsidLength = strlen("mp_pseudo_adhoc");
|
bssid.Ssid.SsidLength = strlen("mp_pseudo_adhoc");
|
||||||
_rtw_memcpy(bssid.Ssid.Ssid, (u8 *)"mp_pseudo_adhoc", bssid.Ssid.SsidLength);
|
memcpy(bssid.Ssid.Ssid, (u8 *)"mp_pseudo_adhoc", bssid.Ssid.SsidLength);
|
||||||
bssid.InfrastructureMode = Ndis802_11IBSS;
|
bssid.InfrastructureMode = Ndis802_11IBSS;
|
||||||
bssid.NetworkTypeInUse = Ndis802_11DS;
|
bssid.NetworkTypeInUse = Ndis802_11DS;
|
||||||
bssid.IELength = 0;
|
bssid.IELength = 0;
|
||||||
@ -886,7 +846,7 @@ u32 mp_join(PADAPTER padapter, u8 mode)
|
|||||||
|
|
||||||
} else if (mode == WIFI_FW_STATION_STATE) {
|
} else if (mode == WIFI_FW_STATION_STATE) {
|
||||||
bssid.Ssid.SsidLength = strlen("mp_pseudo_STATION");
|
bssid.Ssid.SsidLength = strlen("mp_pseudo_STATION");
|
||||||
_rtw_memcpy(bssid.Ssid.Ssid, (u8 *)"mp_pseudo_STATION", bssid.Ssid.SsidLength);
|
memcpy(bssid.Ssid.Ssid, (u8 *)"mp_pseudo_STATION", bssid.Ssid.SsidLength);
|
||||||
bssid.InfrastructureMode = Ndis802_11Infrastructure;
|
bssid.InfrastructureMode = Ndis802_11Infrastructure;
|
||||||
bssid.NetworkTypeInUse = Ndis802_11DS;
|
bssid.NetworkTypeInUse = Ndis802_11DS;
|
||||||
bssid.IELength = 0;
|
bssid.IELength = 0;
|
||||||
@ -936,10 +896,10 @@ u32 mp_join(PADAPTER padapter, u8 mode)
|
|||||||
tgt_network->join_res = 1;
|
tgt_network->join_res = 1;
|
||||||
tgt_network->aid = psta->cmn.aid = 1;
|
tgt_network->aid = psta->cmn.aid = 1;
|
||||||
|
|
||||||
_rtw_memcpy(&padapter->registrypriv.dev_network, &bssid, length);
|
memcpy(&padapter->registrypriv.dev_network, &bssid, length);
|
||||||
rtw_update_registrypriv_dev_network(padapter);
|
rtw_update_registrypriv_dev_network(padapter);
|
||||||
_rtw_memcpy(&tgt_network->network, &padapter->registrypriv.dev_network, padapter->registrypriv.dev_network.Length);
|
memcpy(&tgt_network->network, &padapter->registrypriv.dev_network, padapter->registrypriv.dev_network.Length);
|
||||||
_rtw_memcpy(pnetwork, &padapter->registrypriv.dev_network, padapter->registrypriv.dev_network.Length);
|
memcpy(pnetwork, &padapter->registrypriv.dev_network, padapter->registrypriv.dev_network.Length);
|
||||||
|
|
||||||
rtw_indicate_connect(padapter);
|
rtw_indicate_connect(padapter);
|
||||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||||
@ -1431,8 +1391,8 @@ static thread_return mp_xmit_packet_thread(thread_context context)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_rtw_memcpy((u8 *)(pxmitframe->buf_addr + TXDESC_OFFSET), pmptx->buf, pmptx->write_size);
|
memcpy((u8 *)(pxmitframe->buf_addr + TXDESC_OFFSET), pmptx->buf, pmptx->write_size);
|
||||||
_rtw_memcpy(&(pxmitframe->attrib), &(pmptx->attrib), sizeof(struct pkt_attrib));
|
memcpy(&(pxmitframe->attrib), &(pmptx->attrib), sizeof(struct pkt_attrib));
|
||||||
|
|
||||||
|
|
||||||
rtw_usleep_os(padapter->mppriv.pktInterval);
|
rtw_usleep_os(padapter->mppriv.pktInterval);
|
||||||
@ -1464,7 +1424,7 @@ exit:
|
|||||||
void fill_txdesc_for_mp(PADAPTER padapter, u8 *ptxdesc)
|
void fill_txdesc_for_mp(PADAPTER padapter, u8 *ptxdesc)
|
||||||
{
|
{
|
||||||
struct mp_priv *pmp_priv = &padapter->mppriv;
|
struct mp_priv *pmp_priv = &padapter->mppriv;
|
||||||
_rtw_memcpy(ptxdesc, pmp_priv->tx.desc, TXDESC_SIZE);
|
memcpy(ptxdesc, pmp_priv->tx.desc, TXDESC_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_RTL8188E)
|
#if defined(CONFIG_RTL8188E)
|
||||||
@ -1474,12 +1434,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 +1490,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 +1507,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 +1548,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 +1566,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 +1603,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 +1618,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 +1894,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;
|
||||||
|
|
||||||
@ -1946,10 +1908,10 @@ void SetPacketTx(PADAPTER padapter)
|
|||||||
|
|
||||||
/* 3 1. update_attrib() */
|
/* 3 1. update_attrib() */
|
||||||
pattrib = &pmp_priv->tx.attrib;
|
pattrib = &pmp_priv->tx.attrib;
|
||||||
_rtw_memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(pattrib->src, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
_rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
|
memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
|
||||||
_rtw_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
|
||||||
@ -2046,9 +2008,9 @@ void SetPacketTx(PADAPTER padapter)
|
|||||||
hdr = (struct rtw_ieee80211_hdr *)pkt_start;
|
hdr = (struct rtw_ieee80211_hdr *)pkt_start;
|
||||||
set_frame_sub_type(&hdr->frame_ctl, pattrib->subtype);
|
set_frame_sub_type(&hdr->frame_ctl, pattrib->subtype);
|
||||||
|
|
||||||
_rtw_memcpy(hdr->addr1, pattrib->dst, ETH_ALEN); /* DA */
|
memcpy(hdr->addr1, pattrib->dst, ETH_ALEN); /* DA */
|
||||||
_rtw_memcpy(hdr->addr2, pattrib->src, ETH_ALEN); /* SA */
|
memcpy(hdr->addr2, pattrib->src, ETH_ALEN); /* SA */
|
||||||
_rtw_memcpy(hdr->addr3, get_bssid(&padapter->mlmepriv), ETH_ALEN); /* RA, BSSID */
|
memcpy(hdr->addr3, get_bssid(&padapter->mlmepriv), ETH_ALEN); /* RA, BSSID */
|
||||||
|
|
||||||
/* 3 5. make payload */
|
/* 3 5. make payload */
|
||||||
ptr = pkt_start + pattrib->hdrlen;
|
ptr = pkt_start + pattrib->hdrlen;
|
||||||
@ -2081,7 +2043,7 @@ void SetPacketTx(PADAPTER padapter)
|
|||||||
pmp_priv->TXradomBuffer[i] = rtw_random32() % 0xFF;
|
pmp_priv->TXradomBuffer[i] = rtw_random32() % 0xFF;
|
||||||
|
|
||||||
/* startPlace = (u32)(rtw_random32() % 3450); */
|
/* startPlace = (u32)(rtw_random32() % 3450); */
|
||||||
_rtw_memcpy(ptr, pmp_priv->TXradomBuffer, pkt_end - ptr);
|
memcpy(ptr, pmp_priv->TXradomBuffer, pkt_end - ptr);
|
||||||
/* memset(ptr, payload, pkt_end - ptr); */
|
/* memset(ptr, payload, pkt_end - ptr); */
|
||||||
rtw_mfree(pmp_priv->TXradomBuffer, 4096);
|
rtw_mfree(pmp_priv->TXradomBuffer, 4096);
|
||||||
|
|
||||||
@ -3822,15 +3784,15 @@ void VHT_SIG_B_generator(
|
|||||||
if (pPMacTxInfo->BandWidth == 0) {
|
if (pPMacTxInfo->BandWidth == 0) {
|
||||||
bool sigb_temp[26] = {0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0};
|
bool sigb_temp[26] = {0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0};
|
||||||
|
|
||||||
_rtw_memcpy(sig_bi, sigb_temp, 26);
|
memcpy(sig_bi, sigb_temp, 26);
|
||||||
} else if (pPMacTxInfo->BandWidth == 1) {
|
} else if (pPMacTxInfo->BandWidth == 1) {
|
||||||
bool sigb_temp[27] = {1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0};
|
bool sigb_temp[27] = {1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0};
|
||||||
|
|
||||||
_rtw_memcpy(sig_bi, sigb_temp, 27);
|
memcpy(sig_bi, sigb_temp, 27);
|
||||||
} else if (pPMacTxInfo->BandWidth == 2) {
|
} else if (pPMacTxInfo->BandWidth == 2) {
|
||||||
bool sigb_temp[29] = {0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0};
|
bool sigb_temp[29] = {0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0};
|
||||||
|
|
||||||
_rtw_memcpy(sig_bi, sigb_temp, 29);
|
memcpy(sig_bi, sigb_temp, 29);
|
||||||
}
|
}
|
||||||
} else { /* Not NDP Sounding*/
|
} else { /* Not NDP Sounding*/
|
||||||
bool *sigb_temp[29] = {0};
|
bool *sigb_temp[29] = {0};
|
||||||
|
@ -1079,7 +1079,7 @@ NDIS_STATUS oid_rt_pro8711_wi_poll_hdl(struct oid_par_priv *poid_par_priv)
|
|||||||
|
|
||||||
pwi_param = (struct mp_wiparam *)poid_par_priv->information_buf;
|
pwi_param = (struct mp_wiparam *)poid_par_priv->information_buf;
|
||||||
|
|
||||||
_rtw_memcpy(pwi_param, &Adapter->mppriv.workparam, sizeof(struct mp_wiparam));
|
memcpy(pwi_param, &Adapter->mppriv.workparam, sizeof(struct mp_wiparam));
|
||||||
Adapter->mppriv.act_in_progress = _FALSE;
|
Adapter->mppriv.act_in_progress = _FALSE;
|
||||||
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
||||||
|
|
||||||
@ -1237,7 +1237,7 @@ NDIS_STATUS oid_rt_poll_rx_status_hdl(struct oid_par_priv *poid_par_priv)
|
|||||||
if (poid_par_priv->type_of_oid != QUERY_OID)
|
if (poid_par_priv->type_of_oid != QUERY_OID)
|
||||||
return NDIS_STATUS_NOT_ACCEPTED;
|
return NDIS_STATUS_NOT_ACCEPTED;
|
||||||
|
|
||||||
_rtw_memcpy(poid_par_priv->information_buf, (unsigned char *)&Adapter->mppriv.rxstat, sizeof(struct recv_stat));
|
memcpy(poid_par_priv->information_buf, (unsigned char *)&Adapter->mppriv.rxstat, sizeof(struct recv_stat));
|
||||||
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
||||||
|
|
||||||
|
|
||||||
@ -1465,7 +1465,7 @@ NDIS_STATUS oid_rt_pro_qry_pwrstate_hdl(struct oid_par_priv *poid_par_priv)
|
|||||||
return NDIS_STATUS_INVALID_LENGTH;
|
return NDIS_STATUS_INVALID_LENGTH;
|
||||||
|
|
||||||
*poid_par_priv->bytes_rw = 8;
|
*poid_par_priv->bytes_rw = 8;
|
||||||
_rtw_memcpy(poid_par_priv->information_buf, &(adapter_to_pwrctl(Adapter)->pwr_mode), 8);
|
memcpy(poid_par_priv->information_buf, &(adapter_to_pwrctl(Adapter)->pwr_mode), 8);
|
||||||
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
|
||||||
|
|
||||||
|
|
||||||
@ -2369,7 +2369,7 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
|
|||||||
pmp_priv->tx.payload = pparm->payload_type;
|
pmp_priv->tx.payload = pparm->payload_type;
|
||||||
pattrib = &pmp_priv->tx.attrib;
|
pattrib = &pmp_priv->tx.attrib;
|
||||||
pattrib->pktlen = pparm->length;
|
pattrib->pktlen = pparm->length;
|
||||||
_rtw_memcpy(pattrib->dst, pparm->da, ETH_ALEN);
|
memcpy(pattrib->dst, pparm->da, ETH_ALEN);
|
||||||
SetPacketTx(padapter);
|
SetPacketTx(padapter);
|
||||||
} else
|
} else
|
||||||
return NDIS_STATUS_FAILURE;
|
return NDIS_STATUS_FAILURE;
|
||||||
@ -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;
|
||||||
@ -2436,10 +2436,10 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
|
|||||||
*(fctrl) = 0;
|
*(fctrl) = 0;
|
||||||
set_frame_sub_type(pframe, WIFI_DATA);
|
set_frame_sub_type(pframe, WIFI_DATA);
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, pethhdr->h_dest, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, pethhdr->h_dest, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, pethhdr->h_source, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, pethhdr->h_source, ETH_ALEN);
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr3, addr3, ETH_ALEN);
|
memcpy(pwlanhdr->addr3, addr3, ETH_ALEN);
|
||||||
|
|
||||||
pwlanhdr->seq_ctl = 0;
|
pwlanhdr->seq_ctl = 0;
|
||||||
pframe += pattrib->hdrlen;
|
pframe += pattrib->hdrlen;
|
||||||
@ -2447,7 +2447,7 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
|
|||||||
llc_sz = rtw_put_snap(pframe, pattrib->ether_type);
|
llc_sz = rtw_put_snap(pframe, pattrib->ether_type);
|
||||||
pframe += llc_sz;
|
pframe += llc_sz;
|
||||||
|
|
||||||
_rtw_memcpy(pframe, (void *)(pmp_pkt + 14), payload_len);
|
memcpy(pframe, (void *)(pmp_pkt + 14), payload_len);
|
||||||
|
|
||||||
pattrib->last_txcmdsz = pattrib->hdrlen + llc_sz + payload_len;
|
pattrib->last_txcmdsz = pattrib->hdrlen + llc_sz + payload_len;
|
||||||
|
|
||||||
|
148
core/rtw_p2p.c
148
core/rtw_p2p.c
@ -76,11 +76,11 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
pcur++;
|
pcur++;
|
||||||
|
|
||||||
/* P2P device address */
|
/* P2P device address */
|
||||||
_rtw_memcpy(pcur, psta->dev_addr, ETH_ALEN);
|
memcpy(pcur, psta->dev_addr, ETH_ALEN);
|
||||||
pcur += ETH_ALEN;
|
pcur += ETH_ALEN;
|
||||||
|
|
||||||
/* P2P interface address */
|
/* P2P interface address */
|
||||||
_rtw_memcpy(pcur, psta->cmn.mac_addr, ETH_ALEN);
|
memcpy(pcur, psta->cmn.mac_addr, ETH_ALEN);
|
||||||
pcur += ETH_ALEN;
|
pcur += ETH_ALEN;
|
||||||
|
|
||||||
*pcur = psta->dev_cap;
|
*pcur = psta->dev_cap;
|
||||||
@ -90,13 +90,13 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
RTW_PUT_BE16(pcur, psta->config_methods);
|
RTW_PUT_BE16(pcur, psta->config_methods);
|
||||||
pcur += 2;
|
pcur += 2;
|
||||||
|
|
||||||
_rtw_memcpy(pcur, psta->primary_dev_type, 8);
|
memcpy(pcur, psta->primary_dev_type, 8);
|
||||||
pcur += 8;
|
pcur += 8;
|
||||||
|
|
||||||
*pcur = psta->num_of_secdev_type;
|
*pcur = psta->num_of_secdev_type;
|
||||||
pcur++;
|
pcur++;
|
||||||
|
|
||||||
_rtw_memcpy(pcur, psta->secdev_types_list, psta->num_of_secdev_type * 8);
|
memcpy(pcur, psta->secdev_types_list, psta->num_of_secdev_type * 8);
|
||||||
pcur += psta->num_of_secdev_type * 8;
|
pcur += psta->num_of_secdev_type * 8;
|
||||||
|
|
||||||
if (psta->dev_name_len > 0) {
|
if (psta->dev_name_len > 0) {
|
||||||
@ -108,7 +108,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
RTW_PUT_BE16(pcur, psta->dev_name_len);
|
RTW_PUT_BE16(pcur, psta->dev_name_len);
|
||||||
pcur += 2;
|
pcur += 2;
|
||||||
|
|
||||||
_rtw_memcpy(pcur, psta->dev_name, psta->dev_name_len);
|
memcpy(pcur, psta->dev_name, psta->dev_name_len);
|
||||||
pcur += psta->dev_name_len;
|
pcur += psta->dev_name_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,9 +171,9 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
|
|||||||
fctrl = &(pwlanhdr->frame_ctl);
|
fctrl = &(pwlanhdr->frame_ctl);
|
||||||
*(fctrl) = 0;
|
*(fctrl) = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, da, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN);
|
memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN);
|
||||||
|
|
||||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||||
pmlmeext->mgnt_seq++;
|
pmlmeext->mgnt_seq++;
|
||||||
@ -231,9 +231,9 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
|
|||||||
fctrl = &(pwlanhdr->frame_ctl);
|
fctrl = &(pwlanhdr->frame_ctl);
|
||||||
*(fctrl) = 0;
|
*(fctrl) = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, da, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, pwdinfo->device_addr, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, pwdinfo->device_addr, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, pwdinfo->device_addr, ETH_ALEN);
|
memcpy(pwlanhdr->addr3, pwdinfo->device_addr, ETH_ALEN);
|
||||||
|
|
||||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||||
pmlmeext->mgnt_seq++;
|
pmlmeext->mgnt_seq++;
|
||||||
@ -308,9 +308,9 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
|
|||||||
fctrl = &(pwlanhdr->frame_ctl);
|
fctrl = &(pwlanhdr->frame_ctl);
|
||||||
*(fctrl) = 0;
|
*(fctrl) = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, raddr, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
|
|
||||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||||
pmlmeext->mgnt_seq++;
|
pmlmeext->mgnt_seq++;
|
||||||
@ -412,9 +412,9 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
|
|||||||
fctrl = &(pwlanhdr->frame_ctl);
|
fctrl = &(pwlanhdr->frame_ctl);
|
||||||
*(fctrl) = 0;
|
*(fctrl) = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, da, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, pwdinfo->interface_addr, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN);
|
memcpy(pwlanhdr->addr3, pwdinfo->interface_addr, ETH_ALEN);
|
||||||
|
|
||||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||||
pmlmeext->mgnt_seq++;
|
pmlmeext->mgnt_seq++;
|
||||||
@ -599,7 +599,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
/* Value: */
|
/* Value: */
|
||||||
/* Associated BSSID */
|
/* Associated BSSID */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||||
else
|
else
|
||||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||||
|
|
||||||
@ -711,7 +711,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
/* Value: */
|
/* Value: */
|
||||||
/* Associated BSSID */
|
/* Associated BSSID */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||||
else
|
else
|
||||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||||
|
|
||||||
@ -854,7 +854,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
|||||||
/* Value: */
|
/* Value: */
|
||||||
/* Associated BSSID */
|
/* Associated BSSID */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||||
else
|
else
|
||||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||||
|
|
||||||
@ -919,7 +919,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
|||||||
|
|
||||||
/* Value:
|
/* Value:
|
||||||
Alternative MAC Address*/
|
Alternative MAC Address*/
|
||||||
_rtw_memcpy(wfdie + wfdielen, adapter_mac_addr(iface), ETH_ALEN);
|
memcpy(wfdie + wfdielen, adapter_mac_addr(iface), ETH_ALEN);
|
||||||
wfdielen += ETH_ALEN;
|
wfdielen += ETH_ALEN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1008,7 +1008,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
/* Value: */
|
/* Value: */
|
||||||
/* Associated BSSID */
|
/* Associated BSSID */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||||
else
|
else
|
||||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||||
|
|
||||||
@ -1107,7 +1107,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
/* Value: */
|
/* Value: */
|
||||||
/* Associated BSSID */
|
/* Associated BSSID */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||||
else
|
else
|
||||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||||
|
|
||||||
@ -1206,7 +1206,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
/* Value: */
|
/* Value: */
|
||||||
/* Associated BSSID */
|
/* Associated BSSID */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||||
else
|
else
|
||||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||||
|
|
||||||
@ -1305,7 +1305,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
/* Value: */
|
/* Value: */
|
||||||
/* Associated BSSID */
|
/* Associated BSSID */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||||
else
|
else
|
||||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||||
|
|
||||||
@ -1405,7 +1405,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
/* Value: */
|
/* Value: */
|
||||||
/* Associated BSSID */
|
/* Associated BSSID */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||||
else
|
else
|
||||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||||
|
|
||||||
@ -1505,7 +1505,7 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
/* Value: */
|
/* Value: */
|
||||||
/* Associated BSSID */
|
/* Associated BSSID */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||||
else
|
else
|
||||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||||
|
|
||||||
@ -1618,7 +1618,7 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
/* Value: */
|
/* Value: */
|
||||||
/* Associated BSSID */
|
/* Associated BSSID */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||||
else
|
else
|
||||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||||
|
|
||||||
@ -1731,7 +1731,7 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
/* Value: */
|
/* Value: */
|
||||||
/* Associated BSSID */
|
/* Associated BSSID */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||||
else
|
else
|
||||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||||
|
|
||||||
@ -1831,7 +1831,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
/* Value: */
|
/* Value: */
|
||||||
/* Associated BSSID */
|
/* Associated BSSID */
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||||
_rtw_memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
memcpy(wfdie + wfdielen, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
|
||||||
else
|
else
|
||||||
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
memset(wfdie + wfdielen, 0x00, ETH_ALEN);
|
||||||
|
|
||||||
@ -1973,7 +1973,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
|
|
||||||
/* Value: */
|
/* Value: */
|
||||||
/* P2P Device Address */
|
/* P2P Device Address */
|
||||||
_rtw_memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN);
|
memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN);
|
||||||
p2pielen += ETH_ALEN;
|
p2pielen += ETH_ALEN;
|
||||||
|
|
||||||
/* Config Method */
|
/* Config Method */
|
||||||
@ -2060,7 +2060,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||||||
p2pielen += 2;
|
p2pielen += 2;
|
||||||
|
|
||||||
/* Value: */
|
/* Value: */
|
||||||
_rtw_memcpy(p2pie + p2pielen, pwdinfo->device_name, pwdinfo->device_name_len);
|
memcpy(p2pie + p2pielen, pwdinfo->device_name, pwdinfo->device_name_len);
|
||||||
p2pielen += pwdinfo->device_name_len;
|
p2pielen += pwdinfo->device_name_len;
|
||||||
|
|
||||||
/* Group Info ATTR */
|
/* Group Info ATTR */
|
||||||
@ -2129,7 +2129,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
|
|||||||
|
|
||||||
/* Value: */
|
/* Value: */
|
||||||
/* P2P Device Address */
|
/* P2P Device Address */
|
||||||
_rtw_memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN);
|
memcpy(p2pie + p2pielen, pwdinfo->device_addr, ETH_ALEN);
|
||||||
p2pielen += ETH_ALEN;
|
p2pielen += ETH_ALEN;
|
||||||
|
|
||||||
/* Config Method */
|
/* Config Method */
|
||||||
@ -2175,7 +2175,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
|
|||||||
p2pielen += 2;
|
p2pielen += 2;
|
||||||
|
|
||||||
/* Value: */
|
/* Value: */
|
||||||
_rtw_memcpy(p2pie + p2pielen, pwdinfo->device_name, pwdinfo->device_name_len);
|
memcpy(p2pie + p2pielen, pwdinfo->device_name, pwdinfo->device_name_len);
|
||||||
p2pielen += pwdinfo->device_name_len;
|
p2pielen += pwdinfo->device_name_len;
|
||||||
|
|
||||||
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT)) {
|
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT)) {
|
||||||
@ -2192,10 +2192,10 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
|
|||||||
p2pielen += 2;
|
p2pielen += 2;
|
||||||
|
|
||||||
/* Value: */
|
/* Value: */
|
||||||
_rtw_memcpy(p2pie + p2pielen, pdev_raddr, ETH_ALEN);
|
memcpy(p2pie + p2pielen, pdev_raddr, ETH_ALEN);
|
||||||
p2pielen += ETH_ALEN;
|
p2pielen += ETH_ALEN;
|
||||||
|
|
||||||
_rtw_memcpy(p2pie + p2pielen, pssid, ussidlen);
|
memcpy(p2pie + p2pielen, pssid, ussidlen);
|
||||||
p2pielen += ussidlen;
|
p2pielen += ussidlen;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2369,16 +2369,16 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||||||
|
|
||||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO , pattr_content, (uint *)&attr_contentlen);
|
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO , pattr_content, (uint *)&attr_contentlen);
|
||||||
|
|
||||||
_rtw_memcpy(psta->dev_addr, pattr_content, ETH_ALEN);/* P2P Device Address */
|
memcpy(psta->dev_addr, pattr_content, ETH_ALEN);/* P2P Device Address */
|
||||||
|
|
||||||
pattr_content += ETH_ALEN;
|
pattr_content += ETH_ALEN;
|
||||||
|
|
||||||
_rtw_memcpy(&psta->config_methods, pattr_content, 2);/* Config Methods */
|
memcpy(&psta->config_methods, pattr_content, 2);/* Config Methods */
|
||||||
psta->config_methods = be16_to_cpu(psta->config_methods);
|
psta->config_methods = be16_to_cpu(psta->config_methods);
|
||||||
|
|
||||||
pattr_content += 2;
|
pattr_content += 2;
|
||||||
|
|
||||||
_rtw_memcpy(psta->primary_dev_type, pattr_content, 8);
|
memcpy(psta->primary_dev_type, pattr_content, 8);
|
||||||
|
|
||||||
pattr_content += 8;
|
pattr_content += 8;
|
||||||
|
|
||||||
@ -2394,7 +2394,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||||||
|
|
||||||
len = (sizeof(psta->secdev_types_list) < (num_of_secdev_type * 8)) ? (sizeof(psta->secdev_types_list)) : (num_of_secdev_type * 8);
|
len = (sizeof(psta->secdev_types_list) < (num_of_secdev_type * 8)) ? (sizeof(psta->secdev_types_list)) : (num_of_secdev_type * 8);
|
||||||
|
|
||||||
_rtw_memcpy(psta->secdev_types_list, pattr_content, len);
|
memcpy(psta->secdev_types_list, pattr_content, len);
|
||||||
|
|
||||||
pattr_content += (num_of_secdev_type * 8);
|
pattr_content += (num_of_secdev_type * 8);
|
||||||
}
|
}
|
||||||
@ -2407,7 +2407,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||||||
|
|
||||||
psta->dev_name_len = (sizeof(psta->dev_name) < dev_name_len) ? sizeof(psta->dev_name) : dev_name_len;
|
psta->dev_name_len = (sizeof(psta->dev_name) < dev_name_len) ? sizeof(psta->dev_name) : dev_name_len;
|
||||||
|
|
||||||
_rtw_memcpy(psta->dev_name, pattr_content + 4, psta->dev_name_len);
|
memcpy(psta->dev_name, pattr_content + 4, psta->dev_name_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
rtw_mfree(pbuf, attr_contentlen);
|
rtw_mfree(pbuf, attr_contentlen);
|
||||||
@ -2521,19 +2521,19 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||||||
uconfig_method = be16_to_cpu(uconfig_method);
|
uconfig_method = be16_to_cpu(uconfig_method);
|
||||||
switch (uconfig_method) {
|
switch (uconfig_method) {
|
||||||
case WPS_CM_DISPLYA: {
|
case WPS_CM_DISPLYA: {
|
||||||
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "dis", 3);
|
memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "dis", 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WPS_CM_LABEL: {
|
case WPS_CM_LABEL: {
|
||||||
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "lab", 3);
|
memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "lab", 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WPS_CM_PUSH_BUTTON: {
|
case WPS_CM_PUSH_BUTTON: {
|
||||||
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pbc", 3);
|
memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pbc", 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WPS_CM_KEYPAD: {
|
case WPS_CM_KEYPAD: {
|
||||||
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pad", 3);
|
memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pad", 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2618,11 +2618,11 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
|
|||||||
wps_devicepassword_id = be16_to_cpu(wps_devicepassword_id);
|
wps_devicepassword_id = be16_to_cpu(wps_devicepassword_id);
|
||||||
|
|
||||||
if (wps_devicepassword_id == WPS_DPID_USER_SPEC)
|
if (wps_devicepassword_id == WPS_DPID_USER_SPEC)
|
||||||
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "dis", 3);
|
memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "dis", 3);
|
||||||
else if (wps_devicepassword_id == WPS_DPID_REGISTRAR_SPEC)
|
else if (wps_devicepassword_id == WPS_DPID_REGISTRAR_SPEC)
|
||||||
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pad", 3);
|
memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pad", 3);
|
||||||
else
|
else
|
||||||
_rtw_memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pbc", 3);
|
memcpy(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pbc", 3);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
RTW_INFO("[%s] WPS IE not Found!!\n", __FUNCTION__);
|
RTW_INFO("[%s] WPS IE not Found!!\n", __FUNCTION__);
|
||||||
@ -2688,8 +2688,8 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
|
|||||||
|
|
||||||
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) {
|
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) {
|
||||||
/* Store the group id information. */
|
/* Store the group id information. */
|
||||||
_rtw_memcpy(pwdinfo->groupid_info.go_device_addr, pwdinfo->device_addr, ETH_ALEN);
|
memcpy(pwdinfo->groupid_info.go_device_addr, pwdinfo->device_addr, ETH_ALEN);
|
||||||
_rtw_memcpy(pwdinfo->groupid_info.ssid, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen);
|
memcpy(pwdinfo->groupid_info.ssid, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2880,8 +2880,8 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
|
|||||||
|
|
||||||
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) {
|
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) {
|
||||||
/* Store the group id information. */
|
/* Store the group id information. */
|
||||||
_rtw_memcpy(pwdinfo->groupid_info.go_device_addr, pwdinfo->device_addr, ETH_ALEN);
|
memcpy(pwdinfo->groupid_info.go_device_addr, pwdinfo->device_addr, ETH_ALEN);
|
||||||
_rtw_memcpy(pwdinfo->groupid_info.ssid, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen);
|
memcpy(pwdinfo->groupid_info.ssid, pwdinfo->nego_ssid, pwdinfo->nego_ssidlen);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2951,8 +2951,8 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
|
|||||||
attr_contentlen = 0;
|
attr_contentlen = 0;
|
||||||
memset(groupid, 0x00, 38);
|
memset(groupid, 0x00, 38);
|
||||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
|
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
|
||||||
_rtw_memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN);
|
memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN);
|
||||||
_rtw_memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN);
|
memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the next P2P IE */
|
/* Get the next P2P IE */
|
||||||
@ -3033,8 +3033,8 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr
|
|||||||
memset(groupid, 0x00, 38);
|
memset(groupid, 0x00, 38);
|
||||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
|
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
|
||||||
RTW_INFO("[%s] Ssid = %s, ssidlen = %zu\n", __FUNCTION__, &groupid[ETH_ALEN], strlen(&groupid[ETH_ALEN]));
|
RTW_INFO("[%s] Ssid = %s, ssidlen = %zu\n", __FUNCTION__, &groupid[ETH_ALEN], strlen(&groupid[ETH_ALEN]));
|
||||||
_rtw_memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN);
|
memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN);
|
||||||
_rtw_memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN);
|
memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
attr_contentlen = 0;
|
attr_contentlen = 0;
|
||||||
@ -3078,7 +3078,7 @@ void find_phase_handler(_adapter *padapter)
|
|||||||
|
|
||||||
|
|
||||||
rtw_init_sitesurvey_parm(padapter, &parm);
|
rtw_init_sitesurvey_parm(padapter, &parm);
|
||||||
_rtw_memcpy(&parm.ssid[0].Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN);
|
memcpy(&parm.ssid[0].Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN);
|
||||||
parm.ssid[0].SsidLength = P2P_WILDCARD_SSID_LEN;
|
parm.ssid[0].SsidLength = P2P_WILDCARD_SSID_LEN;
|
||||||
parm.ssid_num = 1;
|
parm.ssid_num = 1;
|
||||||
|
|
||||||
@ -4023,9 +4023,9 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||||||
if (nego_info->token != dialogToken)
|
if (nego_info->token != dialogToken)
|
||||||
rtw_wdev_nego_info_init(nego_info);
|
rtw_wdev_nego_info_init(nego_info);
|
||||||
|
|
||||||
_rtw_memcpy(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN);
|
memcpy(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN);
|
||||||
if (iaddr)
|
if (iaddr)
|
||||||
_rtw_memcpy(tx ? nego_info->iface_addr : nego_info->peer_iface_addr, iaddr, ETH_ALEN);
|
memcpy(tx ? nego_info->iface_addr : nego_info->peer_iface_addr, iaddr, ETH_ALEN);
|
||||||
nego_info->active = tx ? 1 : 0;
|
nego_info->active = tx ? 1 : 0;
|
||||||
nego_info->token = dialogToken;
|
nego_info->token = dialogToken;
|
||||||
nego_info->req_op_ch = op_ch;
|
nego_info->req_op_ch = op_ch;
|
||||||
@ -4080,7 +4080,7 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||||||
&& _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == _TRUE
|
&& _rtw_memcmp(nego_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN) == _TRUE
|
||||||
) {
|
) {
|
||||||
if (iaddr)
|
if (iaddr)
|
||||||
_rtw_memcpy(tx ? nego_info->iface_addr : nego_info->peer_iface_addr, iaddr, ETH_ALEN);
|
memcpy(tx ? nego_info->iface_addr : nego_info->peer_iface_addr, iaddr, ETH_ALEN);
|
||||||
nego_info->status = (status == -1) ? 0xff : status;
|
nego_info->status = (status == -1) ? 0xff : status;
|
||||||
nego_info->rsp_op_ch = op_ch;
|
nego_info->rsp_op_ch = op_ch;
|
||||||
nego_info->rsp_intent = intent;
|
nego_info->rsp_intent = intent;
|
||||||
@ -4177,9 +4177,9 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||||||
if (invit_info->token != dialogToken)
|
if (invit_info->token != dialogToken)
|
||||||
rtw_wdev_invit_info_init(invit_info);
|
rtw_wdev_invit_info_init(invit_info);
|
||||||
|
|
||||||
_rtw_memcpy(invit_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN);
|
memcpy(invit_info->peer_mac, tx ? GetAddr1Ptr(buf) : get_addr2_ptr(buf), ETH_ALEN);
|
||||||
if (gbssid)
|
if (gbssid)
|
||||||
_rtw_memcpy(invit_info->group_bssid, gbssid, ETH_ALEN);
|
memcpy(invit_info->group_bssid, gbssid, ETH_ALEN);
|
||||||
invit_info->active = tx ? 1 : 0;
|
invit_info->active = tx ? 1 : 0;
|
||||||
invit_info->token = dialogToken;
|
invit_info->token = dialogToken;
|
||||||
invit_info->flags = (flags == -1) ? 0x0 : flags;
|
invit_info->flags = (flags == -1) ? 0x0 : flags;
|
||||||
@ -4502,17 +4502,17 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
|||||||
/* NoA length should be n*(13) + 2 */
|
/* NoA length should be n*(13) + 2 */
|
||||||
if (attr_contentlen > 2 && (attr_contentlen - 2) % 13 == 0) {
|
if (attr_contentlen > 2 && (attr_contentlen - 2) % 13 == 0) {
|
||||||
while (noa_offset < attr_contentlen && noa_num < P2P_MAX_NOA_NUM) {
|
while (noa_offset < attr_contentlen && noa_num < P2P_MAX_NOA_NUM) {
|
||||||
/* _rtw_memcpy(&wifidirect_info->noa_count[noa_num], &noa_attr[noa_offset], 1); */
|
/* memcpy(&wifidirect_info->noa_count[noa_num], &noa_attr[noa_offset], 1); */
|
||||||
pwdinfo->noa_count[noa_num] = noa_attr[noa_offset];
|
pwdinfo->noa_count[noa_num] = noa_attr[noa_offset];
|
||||||
noa_offset += 1;
|
noa_offset += 1;
|
||||||
|
|
||||||
_rtw_memcpy(&pwdinfo->noa_duration[noa_num], &noa_attr[noa_offset], 4);
|
memcpy(&pwdinfo->noa_duration[noa_num], &noa_attr[noa_offset], 4);
|
||||||
noa_offset += 4;
|
noa_offset += 4;
|
||||||
|
|
||||||
_rtw_memcpy(&pwdinfo->noa_interval[noa_num], &noa_attr[noa_offset], 4);
|
memcpy(&pwdinfo->noa_interval[noa_num], &noa_attr[noa_offset], 4);
|
||||||
noa_offset += 4;
|
noa_offset += 4;
|
||||||
|
|
||||||
_rtw_memcpy(&pwdinfo->noa_start_time[noa_num], &noa_attr[noa_offset], 4);
|
memcpy(&pwdinfo->noa_start_time[noa_num], &noa_attr[noa_offset], 4);
|
||||||
noa_offset += 4;
|
noa_offset += 4;
|
||||||
|
|
||||||
noa_num++;
|
noa_num++;
|
||||||
@ -4886,7 +4886,7 @@ u32 rtw_append_beacon_wfd_ie(_adapter *adapter, u8 *pbuf)
|
|||||||
#ifdef CONFIG_IOCTL_CFG80211
|
#ifdef CONFIG_IOCTL_CFG80211
|
||||||
else if (mlme->wfd_beacon_ie && mlme->wfd_beacon_ie_len > 0) {
|
else if (mlme->wfd_beacon_ie && mlme->wfd_beacon_ie_len > 0) {
|
||||||
len = mlme->wfd_beacon_ie_len;
|
len = mlme->wfd_beacon_ie_len;
|
||||||
_rtw_memcpy(pbuf, mlme->wfd_beacon_ie, len);
|
memcpy(pbuf, mlme->wfd_beacon_ie, len);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4914,7 +4914,7 @@ u32 rtw_append_probe_req_wfd_ie(_adapter *adapter, u8 *pbuf)
|
|||||||
#ifdef CONFIG_IOCTL_CFG80211
|
#ifdef CONFIG_IOCTL_CFG80211
|
||||||
else if (mlme->wfd_probe_req_ie && mlme->wfd_probe_req_ie_len > 0) {
|
else if (mlme->wfd_probe_req_ie && mlme->wfd_probe_req_ie_len > 0) {
|
||||||
len = mlme->wfd_probe_req_ie_len;
|
len = mlme->wfd_probe_req_ie_len;
|
||||||
_rtw_memcpy(pbuf, mlme->wfd_probe_req_ie, len);
|
memcpy(pbuf, mlme->wfd_probe_req_ie, len);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4942,7 +4942,7 @@ u32 rtw_append_probe_resp_wfd_ie(_adapter *adapter, u8 *pbuf)
|
|||||||
#ifdef CONFIG_IOCTL_CFG80211
|
#ifdef CONFIG_IOCTL_CFG80211
|
||||||
else if (mlme->wfd_probe_resp_ie && mlme->wfd_probe_resp_ie_len > 0) {
|
else if (mlme->wfd_probe_resp_ie && mlme->wfd_probe_resp_ie_len > 0) {
|
||||||
len = mlme->wfd_probe_resp_ie_len;
|
len = mlme->wfd_probe_resp_ie_len;
|
||||||
_rtw_memcpy(pbuf, mlme->wfd_probe_resp_ie, len);
|
memcpy(pbuf, mlme->wfd_probe_resp_ie, len);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4970,7 +4970,7 @@ u32 rtw_append_assoc_req_wfd_ie(_adapter *adapter, u8 *pbuf)
|
|||||||
#ifdef CONFIG_IOCTL_CFG80211
|
#ifdef CONFIG_IOCTL_CFG80211
|
||||||
else if (mlme->wfd_assoc_req_ie && mlme->wfd_assoc_req_ie_len > 0) {
|
else if (mlme->wfd_assoc_req_ie && mlme->wfd_assoc_req_ie_len > 0) {
|
||||||
len = mlme->wfd_assoc_req_ie_len;
|
len = mlme->wfd_assoc_req_ie_len;
|
||||||
_rtw_memcpy(pbuf, mlme->wfd_assoc_req_ie, len);
|
memcpy(pbuf, mlme->wfd_assoc_req_ie, len);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4998,7 +4998,7 @@ u32 rtw_append_assoc_resp_wfd_ie(_adapter *adapter, u8 *pbuf)
|
|||||||
#ifdef CONFIG_IOCTL_CFG80211
|
#ifdef CONFIG_IOCTL_CFG80211
|
||||||
else if (mlme->wfd_assoc_resp_ie && mlme->wfd_assoc_resp_ie_len > 0) {
|
else if (mlme->wfd_assoc_resp_ie && mlme->wfd_assoc_resp_ie_len > 0) {
|
||||||
len = mlme->wfd_assoc_resp_ie_len;
|
len = mlme->wfd_assoc_resp_ie_len;
|
||||||
_rtw_memcpy(pbuf, mlme->wfd_assoc_resp_ie, len);
|
memcpy(pbuf, mlme->wfd_assoc_resp_ie, len);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -5029,9 +5029,9 @@ void rtw_init_wifidirect_addrs(_adapter *padapter, u8 *dev_addr, u8 *iface_addr)
|
|||||||
|
|
||||||
/*init device&interface address */
|
/*init device&interface address */
|
||||||
if (dev_addr)
|
if (dev_addr)
|
||||||
_rtw_memcpy(pwdinfo->device_addr, dev_addr, ETH_ALEN);
|
memcpy(pwdinfo->device_addr, dev_addr, ETH_ALEN);
|
||||||
if (iface_addr)
|
if (iface_addr)
|
||||||
_rtw_memcpy(pwdinfo->interface_addr, iface_addr, ETH_ALEN);
|
memcpy(pwdinfo->interface_addr, iface_addr, ETH_ALEN);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5107,7 +5107,7 @@ void init_wifidirect_info(_adapter *padapter, enum P2P_ROLE role)
|
|||||||
pwdinfo->support_rate[6] = 0x60; /* 48 */
|
pwdinfo->support_rate[6] = 0x60; /* 48 */
|
||||||
pwdinfo->support_rate[7] = 0x6c; /* 54 */
|
pwdinfo->support_rate[7] = 0x6c; /* 54 */
|
||||||
|
|
||||||
_rtw_memcpy((void *) pwdinfo->p2p_wildcard_ssid, "DIRECT-", 7);
|
memcpy((void *) pwdinfo->p2p_wildcard_ssid, "DIRECT-", 7);
|
||||||
|
|
||||||
memset(pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN);
|
memset(pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN);
|
||||||
pwdinfo->device_name_len = 0;
|
pwdinfo->device_name_len = 0;
|
||||||
|
204
core/rtw_recv.c
204
core/rtw_recv.c
File diff suppressed because it is too large
Load Diff
@ -637,9 +637,9 @@ void rtw_regd_exc_add_with_nlen(struct rf_ctl_t *rfctl, const char *country, u8
|
|||||||
|
|
||||||
_rtw_init_listhead(&ent->list);
|
_rtw_init_listhead(&ent->list);
|
||||||
if (country)
|
if (country)
|
||||||
_rtw_memcpy(ent->country, country, 2);
|
memcpy(ent->country, country, 2);
|
||||||
ent->domain = domain;
|
ent->domain = domain;
|
||||||
_rtw_memcpy(ent->regd_name, regd_name, nlen);
|
memcpy(ent->regd_name, regd_name, nlen);
|
||||||
|
|
||||||
_enter_critical_mutex(&rfctl->txpwr_lmt_mutex, &irqL);
|
_enter_critical_mutex(&rfctl->txpwr_lmt_mutex, &irqL);
|
||||||
|
|
||||||
@ -1061,7 +1061,7 @@ void rtw_txpwr_lmt_add_with_nlen(struct rf_ctl_t *rfctl, const char *regd_name,
|
|||||||
goto release_lock;
|
goto release_lock;
|
||||||
|
|
||||||
_rtw_init_listhead(&ent->list);
|
_rtw_init_listhead(&ent->list);
|
||||||
_rtw_memcpy(ent->regd_name, regd_name, nlen);
|
memcpy(ent->regd_name, regd_name, nlen);
|
||||||
{
|
{
|
||||||
u8 j, k, l, m;
|
u8 j, k, l, m;
|
||||||
|
|
||||||
|
@ -336,9 +336,9 @@ static u8 *build_wlan_hdr(_adapter *padapter, struct xmit_frame *pmgntframe,
|
|||||||
fctrl = &(pwlanhdr->frame_ctl);
|
fctrl = &(pwlanhdr->frame_ctl);
|
||||||
*(fctrl) = 0;
|
*(fctrl) = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, psta->cmn.mac_addr, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, psta->cmn.mac_addr, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3,
|
memcpy(pwlanhdr->addr3,
|
||||||
get_my_bssid(&(pmlmeinfo->network)),ETH_ALEN);
|
get_my_bssid(&(pmlmeinfo->network)),ETH_ALEN);
|
||||||
|
|
||||||
RTW_INFO("RM: dst = " MAC_FMT "\n", MAC_ARG(pwlanhdr->addr1));
|
RTW_INFO("RM: dst = " MAC_FMT "\n", MAC_ARG(pwlanhdr->addr1));
|
||||||
@ -475,10 +475,10 @@ int rm_sitesurvey(struct rm_obj *prm)
|
|||||||
prm->q.ch_set_ch_amount = meas_ch_num;
|
prm->q.ch_set_ch_amount = meas_ch_num;
|
||||||
|
|
||||||
memset(&parm, 0, sizeof(struct sitesurvey_parm));
|
memset(&parm, 0, sizeof(struct sitesurvey_parm));
|
||||||
_rtw_memcpy(parm.ch, pch_set,
|
memcpy(parm.ch, pch_set,
|
||||||
sizeof(struct rtw_ieee80211_channel) * MAX_OP_CHANNEL_SET_NUM);
|
sizeof(struct rtw_ieee80211_channel) * MAX_OP_CHANNEL_SET_NUM);
|
||||||
|
|
||||||
_rtw_memcpy(&parm.ssid[0], &prm->q.opt.bcn.ssid, IW_ESSID_MAX_SIZE);
|
memcpy(&parm.ssid[0], &prm->q.opt.bcn.ssid, IW_ESSID_MAX_SIZE);
|
||||||
|
|
||||||
parm.ssid_num = 1;
|
parm.ssid_num = 1;
|
||||||
parm.scan_mode = prm->q.m_mode;
|
parm.scan_mode = prm->q.m_mode;
|
||||||
@ -529,7 +529,7 @@ static int rm_parse_ch_load_s_elem(struct rm_obj *prm, u8 *pbody, int req_len)
|
|||||||
/* check RM_EN */
|
/* check RM_EN */
|
||||||
rm_en_cap_chk_and_set(prm, RM_CH_LOAD_CAP_EN);
|
rm_en_cap_chk_and_set(prm, RM_CH_LOAD_CAP_EN);
|
||||||
|
|
||||||
_rtw_memcpy(&(prm->q.opt.clm.rep_cond),
|
memcpy(&(prm->q.opt.clm.rep_cond),
|
||||||
&pbody[p+2], sizeof(prm->q.opt.clm.rep_cond));
|
&pbody[p+2], sizeof(prm->q.opt.clm.rep_cond));
|
||||||
|
|
||||||
RTW_INFO("RM: ch_load_rep_info=%u:%u\n",
|
RTW_INFO("RM: ch_load_rep_info=%u:%u\n",
|
||||||
@ -569,7 +569,7 @@ static int rm_parse_noise_histo_s_elem(struct rm_obj *prm,
|
|||||||
/* check RM_EN */
|
/* check RM_EN */
|
||||||
rm_en_cap_chk_and_set(prm, RM_NOISE_HISTO_CAP_EN);
|
rm_en_cap_chk_and_set(prm, RM_NOISE_HISTO_CAP_EN);
|
||||||
|
|
||||||
_rtw_memcpy(&(prm->q.opt.nhm.rep_cond),
|
memcpy(&(prm->q.opt.nhm.rep_cond),
|
||||||
&pbody[p+2], sizeof(prm->q.opt.nhm.rep_cond));
|
&pbody[p+2], sizeof(prm->q.opt.nhm.rep_cond));
|
||||||
|
|
||||||
RTW_INFO("RM: noise_histo_rep_info=%u:%u\n",
|
RTW_INFO("RM: noise_histo_rep_info=%u:%u\n",
|
||||||
@ -618,12 +618,12 @@ static int rm_parse_bcn_req_s_elem(struct rm_obj *prm, u8 *pbody, int req_len)
|
|||||||
RTW_INFO("DBG set ssid to %s\n",DBG_BCN_REQ_SSID_NAME);
|
RTW_INFO("DBG set ssid to %s\n",DBG_BCN_REQ_SSID_NAME);
|
||||||
i = strlen(DBG_BCN_REQ_SSID_NAME);
|
i = strlen(DBG_BCN_REQ_SSID_NAME);
|
||||||
prm->q.opt.bcn.ssid.SsidLength = i;
|
prm->q.opt.bcn.ssid.SsidLength = i;
|
||||||
_rtw_memcpy(&(prm->q.opt.bcn.ssid.Ssid),
|
memcpy(&(prm->q.opt.bcn.ssid.Ssid),
|
||||||
DBG_BCN_REQ_SSID_NAME, i);
|
DBG_BCN_REQ_SSID_NAME, i);
|
||||||
|
|
||||||
#else /* original */
|
#else /* original */
|
||||||
prm->q.opt.bcn.ssid.SsidLength = pbody[p+1];
|
prm->q.opt.bcn.ssid.SsidLength = pbody[p+1];
|
||||||
_rtw_memcpy(&(prm->q.opt.bcn.ssid.Ssid),
|
memcpy(&(prm->q.opt.bcn.ssid.Ssid),
|
||||||
&pbody[p+2], pbody[p+1]);
|
&pbody[p+2], pbody[p+1]);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -638,7 +638,7 @@ static int rm_parse_bcn_req_s_elem(struct rm_obj *prm, u8 *pbody, int req_len)
|
|||||||
/* check RM_EN */
|
/* check RM_EN */
|
||||||
rm_en_cap_chk_and_set(prm, RM_BCN_MEAS_REP_COND_CAP_EN);
|
rm_en_cap_chk_and_set(prm, RM_BCN_MEAS_REP_COND_CAP_EN);
|
||||||
|
|
||||||
_rtw_memcpy(&(prm->q.opt.bcn.rep_cond),
|
memcpy(&(prm->q.opt.bcn.rep_cond),
|
||||||
&pbody[p+2], sizeof(prm->q.opt.bcn.rep_cond));
|
&pbody[p+2], sizeof(prm->q.opt.bcn.rep_cond));
|
||||||
|
|
||||||
RTW_INFO("bcn_req_rep_info=%u:%u\n",
|
RTW_INFO("bcn_req_rep_info=%u:%u\n",
|
||||||
@ -726,7 +726,7 @@ static int rm_parse_meas_req(struct rm_obj *prm, u8 *pbody)
|
|||||||
prm->q.m_mode = pbody[p++];
|
prm->q.m_mode = pbody[p++];
|
||||||
|
|
||||||
/* BSSID */
|
/* BSSID */
|
||||||
_rtw_memcpy(&(prm->q.bssid), &pbody[p], 6);
|
memcpy(&(prm->q.bssid), &pbody[p], 6);
|
||||||
p+=6;
|
p+=6;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1617,7 +1617,7 @@ int issue_nb_req(struct rm_obj *prm)
|
|||||||
sub_ie[0] = 0; /*SSID*/
|
sub_ie[0] = 0; /*SSID*/
|
||||||
sub_ie[1] = val8;
|
sub_ie[1] = val8;
|
||||||
|
|
||||||
_rtw_memcpy(pie, prm->q.pssid, val8);
|
memcpy(pie, prm->q.pssid, val8);
|
||||||
|
|
||||||
pframe = rtw_set_fixed_ie(pframe, val8 + 2,
|
pframe = rtw_set_fixed_ie(pframe, val8 + 2,
|
||||||
sub_ie, &pattr->pktlen);
|
sub_ie, &pattr->pktlen);
|
||||||
@ -1637,7 +1637,7 @@ int issue_nb_req(struct rm_obj *prm)
|
|||||||
sub_ie[0] = 0; /*SSID*/
|
sub_ie[0] = 0; /*SSID*/
|
||||||
sub_ie[1] = pmlmepriv->cur_network.network.Ssid.SsidLength;
|
sub_ie[1] = pmlmepriv->cur_network.network.Ssid.SsidLength;
|
||||||
|
|
||||||
_rtw_memcpy(pie, pmlmepriv->cur_network.network.Ssid.Ssid,
|
memcpy(pie, pmlmepriv->cur_network.network.Ssid.Ssid,
|
||||||
pmlmepriv->cur_network.network.Ssid.SsidLength);
|
pmlmepriv->cur_network.network.Ssid.SsidLength);
|
||||||
|
|
||||||
pframe = rtw_set_fixed_ie(pframe,
|
pframe = rtw_set_fixed_ie(pframe,
|
||||||
@ -1978,7 +1978,7 @@ void rtw_ap_parse_sta_rm_en_cap(_adapter *padapter,
|
|||||||
if (elem->rm_en_cap) {
|
if (elem->rm_en_cap) {
|
||||||
RTW_INFO("assoc.rm_en_cap="RM_CAP_FMT"\n",
|
RTW_INFO("assoc.rm_en_cap="RM_CAP_FMT"\n",
|
||||||
RM_CAP_ARG(elem->rm_en_cap));
|
RM_CAP_ARG(elem->rm_en_cap));
|
||||||
_rtw_memcpy(psta->rm_en_cap,
|
memcpy(psta->rm_en_cap,
|
||||||
(elem->rm_en_cap), elem->rm_en_cap_len);
|
(elem->rm_en_cap), elem->rm_en_cap_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1987,7 +1987,7 @@ void RM_IE_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
_rtw_memcpy(&padapter->rmpriv.rm_en_cap_assoc, pIE->data, pIE->Length);
|
memcpy(&padapter->rmpriv.rm_en_cap_assoc, pIE->data, pIE->Length);
|
||||||
RTW_INFO("assoc.rm_en_cap="RM_CAP_FMT"\n", RM_CAP_ARG(pIE->data));
|
RTW_INFO("assoc.rm_en_cap="RM_CAP_FMT"\n", RM_CAP_ARG(pIE->data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ u32 rtw_rson_append_ie(_adapter *padapter, unsigned char *pframe, u32 *len)
|
|||||||
ptr = ori = pframe;
|
ptr = ori = pframe;
|
||||||
*ptr++ = _VENDOR_SPECIFIC_IE_;
|
*ptr++ = _VENDOR_SPECIFIC_IE_;
|
||||||
*ptr++ = ie_len = sizeof(RTW_RSON_OUI)+sizeof(pdvobj->rson_data);
|
*ptr++ = ie_len = sizeof(RTW_RSON_OUI)+sizeof(pdvobj->rson_data);
|
||||||
_rtw_memcpy(ptr, RTW_RSON_OUI, sizeof(RTW_RSON_OUI));
|
memcpy(ptr, RTW_RSON_OUI, sizeof(RTW_RSON_OUI));
|
||||||
ptr = ptr + sizeof(RTW_RSON_OUI);
|
ptr = ptr + sizeof(RTW_RSON_OUI);
|
||||||
*ptr++ = pdvobj->rson_data.ver;
|
*ptr++ = pdvobj->rson_data.ver;
|
||||||
*(s32 *)ptr = cpu_to_le32(pdvobj->rson_data.id);
|
*(s32 *)ptr = cpu_to_le32(pdvobj->rson_data.id);
|
||||||
@ -262,7 +262,7 @@ u32 rtw_rson_append_ie(_adapter *padapter, unsigned char *pframe, u32 *len)
|
|||||||
*ptr++ = pdvobj->rson_data.hopcnt;
|
*ptr++ = pdvobj->rson_data.hopcnt;
|
||||||
*ptr++ = pdvobj->rson_data.connectible;
|
*ptr++ = pdvobj->rson_data.connectible;
|
||||||
*ptr++ = pdvobj->rson_data.loading;
|
*ptr++ = pdvobj->rson_data.loading;
|
||||||
_rtw_memcpy(ptr, pdvobj->rson_data.res, sizeof(pdvobj->rson_data.res));
|
memcpy(ptr, pdvobj->rson_data.res, sizeof(pdvobj->rson_data.res));
|
||||||
pframe = ptr;
|
pframe = ptr;
|
||||||
/*
|
/*
|
||||||
iii = iii % 20;
|
iii = iii % 20;
|
||||||
|
@ -264,8 +264,8 @@ void rtw_wep_encrypt(_adapter *padapter, u8 *pxmitframe)
|
|||||||
|
|
||||||
for (curfragnum = 0; curfragnum < pattrib->nr_frags; curfragnum++) {
|
for (curfragnum = 0; curfragnum < pattrib->nr_frags; curfragnum++) {
|
||||||
iv = pframe + pattrib->hdrlen;
|
iv = pframe + pattrib->hdrlen;
|
||||||
_rtw_memcpy(&wepkey[0], iv, 3);
|
memcpy(&wepkey[0], iv, 3);
|
||||||
_rtw_memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0], keylength);
|
memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0], keylength);
|
||||||
payload = pframe + pattrib->iv_len + pattrib->hdrlen;
|
payload = pframe + pattrib->iv_len + pattrib->hdrlen;
|
||||||
|
|
||||||
if ((curfragnum + 1) == pattrib->nr_frags) {
|
if ((curfragnum + 1) == pattrib->nr_frags) {
|
||||||
@ -320,9 +320,9 @@ void rtw_wep_decrypt(_adapter *padapter, u8 *precvframe)
|
|||||||
/* keyindex=(iv[3]&0x3); */
|
/* keyindex=(iv[3]&0x3); */
|
||||||
keyindex = prxattrib->key_index;
|
keyindex = prxattrib->key_index;
|
||||||
keylength = psecuritypriv->dot11DefKeylen[keyindex];
|
keylength = psecuritypriv->dot11DefKeylen[keyindex];
|
||||||
_rtw_memcpy(&wepkey[0], iv, 3);
|
memcpy(&wepkey[0], iv, 3);
|
||||||
/* _rtw_memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0],keylength); */
|
/* memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0],keylength); */
|
||||||
_rtw_memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[keyindex].skey[0], keylength);
|
memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[keyindex].skey[0], keylength);
|
||||||
length = ((union recv_frame *)precvframe)->u.hdr.len - prxattrib->hdrlen - prxattrib->iv_len;
|
length = ((union recv_frame *)precvframe)->u.hdr.len - prxattrib->hdrlen - prxattrib->iv_len;
|
||||||
|
|
||||||
payload = pframe + prxattrib->iv_len + prxattrib->hdrlen;
|
payload = pframe + prxattrib->iv_len + prxattrib->hdrlen;
|
||||||
@ -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]; */
|
||||||
@ -1767,7 +1767,7 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
|||||||
|
|
||||||
/* start to calculate the mic */
|
/* start to calculate the mic */
|
||||||
if ((hdrlen + plen + 8) <= MAX_MSG_SIZE)
|
if ((hdrlen + plen + 8) <= MAX_MSG_SIZE)
|
||||||
_rtw_memcpy((void *)message, pframe, (hdrlen + plen + 8)); /* 8 is for ext iv len */
|
memcpy((void *)message, pframe, (hdrlen + plen + 8)); /* 8 is for ext iv len */
|
||||||
|
|
||||||
|
|
||||||
pn_vector[0] = pframe[hdrlen];
|
pn_vector[0] = pframe[hdrlen];
|
||||||
@ -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;
|
||||||
@ -2049,7 +2049,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
|
|||||||
return RTW_RX_HANDLED;
|
return RTW_RX_HANDLED;
|
||||||
|
|
||||||
/* copy key index */
|
/* copy key index */
|
||||||
_rtw_memcpy(&pkt_keyid, mme + 2, 2);
|
memcpy(&pkt_keyid, mme + 2, 2);
|
||||||
pkt_keyid = le16_to_cpu(pkt_keyid);
|
pkt_keyid = le16_to_cpu(pkt_keyid);
|
||||||
if (pkt_keyid != keyid) {
|
if (pkt_keyid != keyid) {
|
||||||
RTW_INFO("BIP key index error!\n");
|
RTW_INFO("BIP key index error!\n");
|
||||||
@ -2057,7 +2057,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* save packet number */
|
/* save packet number */
|
||||||
_rtw_memcpy(&pkt_ipn, mme + 4, 6);
|
memcpy(&pkt_ipn, mme + 4, 6);
|
||||||
pkt_ipn = le64_to_cpu(pkt_ipn);
|
pkt_ipn = le64_to_cpu(pkt_ipn);
|
||||||
/* BIP packet number should bigger than previous BIP packet */
|
/* BIP packet number should bigger than previous BIP packet */
|
||||||
if (pkt_ipn <= *ipn) { /* wrap around? */
|
if (pkt_ipn <= *ipn) { /* wrap around? */
|
||||||
@ -2076,7 +2076,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
|
|||||||
pwlanhdr = (struct rtw_ieee80211_hdr *)whdr_pos;
|
pwlanhdr = (struct rtw_ieee80211_hdr *)whdr_pos;
|
||||||
|
|
||||||
/* save the frame body + MME */
|
/* save the frame body + MME */
|
||||||
_rtw_memcpy(BIP_AAD + BIP_AAD_SIZE, whdr_pos + WLAN_HDR_A3_LEN, flen - WLAN_HDR_A3_LEN);
|
memcpy(BIP_AAD + BIP_AAD_SIZE, whdr_pos + WLAN_HDR_A3_LEN, flen - WLAN_HDR_A3_LEN);
|
||||||
|
|
||||||
/* point mme to the copy */
|
/* point mme to the copy */
|
||||||
mme = BIP_AAD + ori_len - 18;
|
mme = BIP_AAD + ori_len - 18;
|
||||||
@ -2085,12 +2085,12 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
|
|||||||
memset(mme + 10, 0, 8);
|
memset(mme + 10, 0, 8);
|
||||||
|
|
||||||
/* conscruct AAD, copy frame control field */
|
/* conscruct AAD, copy frame control field */
|
||||||
_rtw_memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2);
|
memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2);
|
||||||
ClearRetry(BIP_AAD);
|
ClearRetry(BIP_AAD);
|
||||||
ClearPwrMgt(BIP_AAD);
|
ClearPwrMgt(BIP_AAD);
|
||||||
ClearMData(BIP_AAD);
|
ClearMData(BIP_AAD);
|
||||||
/* conscruct AAD, copy address 1 to address 3 */
|
/* conscruct AAD, copy address 1 to address 3 */
|
||||||
_rtw_memcpy(BIP_AAD + 2, pwlanhdr->addr1, 18);
|
memcpy(BIP_AAD + 2, pwlanhdr->addr1, 18);
|
||||||
|
|
||||||
if (omac1_aes_128(key, BIP_AAD, ori_len, mic))
|
if (omac1_aes_128(key, BIP_AAD, ori_len, mic))
|
||||||
goto BIP_exit;
|
goto BIP_exit;
|
||||||
@ -2220,7 +2220,7 @@ static int sha256_process(struct sha256_state_rtk *md, unsigned char *in,
|
|||||||
inlen -= block_size;
|
inlen -= block_size;
|
||||||
} else {
|
} else {
|
||||||
n = MIN(inlen, (block_size - md->curlen));
|
n = MIN(inlen, (block_size - md->curlen));
|
||||||
_rtw_memcpy(md->buf + md->curlen, in, n);
|
memcpy(md->buf + md->curlen, in, n);
|
||||||
md->curlen += n;
|
md->curlen += n;
|
||||||
in += n;
|
in += n;
|
||||||
inlen -= n;
|
inlen -= n;
|
||||||
@ -2378,7 +2378,7 @@ static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem,
|
|||||||
|
|
||||||
/* start out by storing key in ipad */
|
/* start out by storing key in ipad */
|
||||||
memset(k_pad, 0, sizeof(k_pad));
|
memset(k_pad, 0, sizeof(k_pad));
|
||||||
_rtw_memcpy(k_pad, key, key_len);
|
memcpy(k_pad, key, key_len);
|
||||||
/* XOR key with ipad values */
|
/* XOR key with ipad values */
|
||||||
for (i = 0; i < 64; i++)
|
for (i = 0; i < 64; i++)
|
||||||
k_pad[i] ^= 0x36;
|
k_pad[i] ^= 0x36;
|
||||||
@ -2393,7 +2393,7 @@ static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem,
|
|||||||
sha256_vector(1 + num_elem, _addr, _len, mac);
|
sha256_vector(1 + num_elem, _addr, _len, mac);
|
||||||
|
|
||||||
memset(k_pad, 0, sizeof(k_pad));
|
memset(k_pad, 0, sizeof(k_pad));
|
||||||
_rtw_memcpy(k_pad, key, key_len);
|
memcpy(k_pad, key, key_len);
|
||||||
/* XOR key with opad values */
|
/* XOR key with opad values */
|
||||||
for (i = 0; i < 64; i++)
|
for (i = 0; i < 64; i++)
|
||||||
k_pad[i] ^= 0x5c;
|
k_pad[i] ^= 0x5c;
|
||||||
@ -2452,7 +2452,7 @@ static void sha256_prf(u8 *key, size_t key_len, char *label,
|
|||||||
pos += SHA256_MAC_LEN;
|
pos += SHA256_MAC_LEN;
|
||||||
} else {
|
} else {
|
||||||
hmac_sha256_vector(key, key_len, 4, addr, len, hash);
|
hmac_sha256_vector(key, key_len, 4, addr, len, hash);
|
||||||
_rtw_memcpy(&buf[pos], hash, plen);
|
memcpy(&buf[pos], hash, plen);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
counter++;
|
counter++;
|
||||||
@ -2860,7 +2860,7 @@ int omac1_aes_128(const u8 *key, const u8 *data, size_t data_len, u8 *mac)
|
|||||||
#ifdef CONFIG_RTW_MESH_AEK
|
#ifdef CONFIG_RTW_MESH_AEK
|
||||||
/* for AES-SIV */
|
/* for AES-SIV */
|
||||||
#define os_memset memset
|
#define os_memset memset
|
||||||
#define os_memcpy _rtw_memcpy
|
#define os_memcpy memcpy
|
||||||
#define os_malloc rtw_malloc
|
#define os_malloc rtw_malloc
|
||||||
#define bin_clear_free(bin, len) \
|
#define bin_clear_free(bin, len) \
|
||||||
do { \
|
do { \
|
||||||
@ -3119,13 +3119,13 @@ void wpa_tdls_generate_tpk(_adapter *padapter, PVOID sta)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (os_memcmp(adapter_mac_addr(padapter), psta->cmn.mac_addr, ETH_ALEN) < 0) {
|
if (os_memcmp(adapter_mac_addr(padapter), psta->cmn.mac_addr, ETH_ALEN) < 0) {
|
||||||
_rtw_memcpy(data, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(data, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
_rtw_memcpy(data + ETH_ALEN, psta->cmn.mac_addr, ETH_ALEN);
|
memcpy(data + ETH_ALEN, psta->cmn.mac_addr, ETH_ALEN);
|
||||||
} else {
|
} else {
|
||||||
_rtw_memcpy(data, psta->cmn.mac_addr, ETH_ALEN);
|
memcpy(data, psta->cmn.mac_addr, ETH_ALEN);
|
||||||
_rtw_memcpy(data + ETH_ALEN, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(data + ETH_ALEN, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
}
|
}
|
||||||
_rtw_memcpy(data + 2 * ETH_ALEN, get_bssid(pmlmepriv), ETH_ALEN);
|
memcpy(data + 2 * ETH_ALEN, get_bssid(pmlmepriv), ETH_ALEN);
|
||||||
|
|
||||||
sha256_prf(key_input, SHA256_MAC_LEN, "TDLS PMK", data, sizeof(data), (u8 *) &psta->tpk, sizeof(psta->tpk));
|
sha256_prf(key_input, SHA256_MAC_LEN, "TDLS PMK", data, sizeof(data), (u8 *) &psta->tpk, sizeof(psta->tpk));
|
||||||
|
|
||||||
@ -3162,24 +3162,24 @@ int wpa_tdls_ftie_mic(u8 *kck, u8 trans_seq,
|
|||||||
pos = buf;
|
pos = buf;
|
||||||
_lnkid = (struct wpa_tdls_lnkid *) lnkid;
|
_lnkid = (struct wpa_tdls_lnkid *) lnkid;
|
||||||
/* 1) TDLS initiator STA MAC address */
|
/* 1) TDLS initiator STA MAC address */
|
||||||
_rtw_memcpy(pos, _lnkid->init_sta, ETH_ALEN);
|
memcpy(pos, _lnkid->init_sta, ETH_ALEN);
|
||||||
pos += ETH_ALEN;
|
pos += ETH_ALEN;
|
||||||
/* 2) TDLS responder STA MAC address */
|
/* 2) TDLS responder STA MAC address */
|
||||||
_rtw_memcpy(pos, _lnkid->resp_sta, ETH_ALEN);
|
memcpy(pos, _lnkid->resp_sta, ETH_ALEN);
|
||||||
pos += ETH_ALEN;
|
pos += ETH_ALEN;
|
||||||
/* 3) Transaction Sequence number */
|
/* 3) Transaction Sequence number */
|
||||||
*pos++ = trans_seq;
|
*pos++ = trans_seq;
|
||||||
/* 4) Link Identifier IE */
|
/* 4) Link Identifier IE */
|
||||||
_rtw_memcpy(pos, lnkid, 2 + lnkid[1]);
|
memcpy(pos, lnkid, 2 + lnkid[1]);
|
||||||
pos += 2 + lnkid[1];
|
pos += 2 + lnkid[1];
|
||||||
/* 5) RSN IE */
|
/* 5) RSN IE */
|
||||||
_rtw_memcpy(pos, rsnie, 2 + rsnie[1]);
|
memcpy(pos, rsnie, 2 + rsnie[1]);
|
||||||
pos += 2 + rsnie[1];
|
pos += 2 + rsnie[1];
|
||||||
/* 6) Timeout Interval IE */
|
/* 6) Timeout Interval IE */
|
||||||
_rtw_memcpy(pos, timeoutie, 2 + timeoutie[1]);
|
memcpy(pos, timeoutie, 2 + timeoutie[1]);
|
||||||
pos += 2 + timeoutie[1];
|
pos += 2 + timeoutie[1];
|
||||||
/* 7) FTIE, with the MIC field of the FTIE set to 0 */
|
/* 7) FTIE, with the MIC field of the FTIE set to 0 */
|
||||||
_rtw_memcpy(pos, ftie, 2 + ftie[1]);
|
memcpy(pos, ftie, 2 + ftie[1]);
|
||||||
_ftie = (struct wpa_tdls_ftie *) pos;
|
_ftie = (struct wpa_tdls_ftie *) pos;
|
||||||
memset(_ftie->mic, 0, TDLS_MIC_LEN);
|
memset(_ftie->mic, 0, TDLS_MIC_LEN);
|
||||||
pos += 2 + ftie[1];
|
pos += 2 + ftie[1];
|
||||||
@ -3218,17 +3218,17 @@ int wpa_tdls_teardown_ftie_mic(u8 *kck, u8 *lnkid, u16 reason,
|
|||||||
|
|
||||||
pos = buf;
|
pos = buf;
|
||||||
/* 1) Link Identifier IE */
|
/* 1) Link Identifier IE */
|
||||||
_rtw_memcpy(pos, lnkid, 2 + lnkid[1]);
|
memcpy(pos, lnkid, 2 + lnkid[1]);
|
||||||
pos += 2 + lnkid[1];
|
pos += 2 + lnkid[1];
|
||||||
/* 2) Reason Code */
|
/* 2) Reason Code */
|
||||||
_rtw_memcpy(pos, (u8 *)&reason, 2);
|
memcpy(pos, (u8 *)&reason, 2);
|
||||||
pos += 2;
|
pos += 2;
|
||||||
/* 3) Dialog Token */
|
/* 3) Dialog Token */
|
||||||
*pos++ = dialog_token;
|
*pos++ = dialog_token;
|
||||||
/* 4) Transaction Sequence number */
|
/* 4) Transaction Sequence number */
|
||||||
*pos++ = trans_seq;
|
*pos++ = trans_seq;
|
||||||
/* 5) FTIE, with the MIC field of the FTIE set to 0 */
|
/* 5) FTIE, with the MIC field of the FTIE set to 0 */
|
||||||
_rtw_memcpy(pos, ftie, 2 + ftie[1]);
|
memcpy(pos, ftie, 2 + ftie[1]);
|
||||||
_ftie = (struct wpa_tdls_ftie *) pos;
|
_ftie = (struct wpa_tdls_ftie *) pos;
|
||||||
memset(_ftie->mic, 0, TDLS_MIC_LEN);
|
memset(_ftie->mic, 0, TDLS_MIC_LEN);
|
||||||
pos += 2 + ftie[1];
|
pos += 2 + ftie[1];
|
||||||
@ -3260,24 +3260,24 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq,
|
|||||||
|
|
||||||
pos = buf;
|
pos = buf;
|
||||||
/* 1) TDLS initiator STA MAC address */
|
/* 1) TDLS initiator STA MAC address */
|
||||||
_rtw_memcpy(pos, lnkid + ETH_ALEN + 2, ETH_ALEN);
|
memcpy(pos, lnkid + ETH_ALEN + 2, ETH_ALEN);
|
||||||
pos += ETH_ALEN;
|
pos += ETH_ALEN;
|
||||||
/* 2) TDLS responder STA MAC address */
|
/* 2) TDLS responder STA MAC address */
|
||||||
_rtw_memcpy(pos, lnkid + 2 * ETH_ALEN + 2, ETH_ALEN);
|
memcpy(pos, lnkid + 2 * ETH_ALEN + 2, ETH_ALEN);
|
||||||
pos += ETH_ALEN;
|
pos += ETH_ALEN;
|
||||||
/* 3) Transaction Sequence number */
|
/* 3) Transaction Sequence number */
|
||||||
*pos++ = trans_seq;
|
*pos++ = trans_seq;
|
||||||
/* 4) Link Identifier IE */
|
/* 4) Link Identifier IE */
|
||||||
_rtw_memcpy(pos, lnkid, 2 + 18);
|
memcpy(pos, lnkid, 2 + 18);
|
||||||
pos += 2 + 18;
|
pos += 2 + 18;
|
||||||
/* 5) RSN IE */
|
/* 5) RSN IE */
|
||||||
_rtw_memcpy(pos, rsnie, 2 + *(rsnie + 1));
|
memcpy(pos, rsnie, 2 + *(rsnie + 1));
|
||||||
pos += 2 + *(rsnie + 1);
|
pos += 2 + *(rsnie + 1);
|
||||||
/* 6) Timeout Interval IE */
|
/* 6) Timeout Interval IE */
|
||||||
_rtw_memcpy(pos, timeoutie, 2 + *(timeoutie + 1));
|
memcpy(pos, timeoutie, 2 + *(timeoutie + 1));
|
||||||
pos += 2 + *(timeoutie + 1);
|
pos += 2 + *(timeoutie + 1);
|
||||||
/* 7) FTIE, with the MIC field of the FTIE set to 0 */
|
/* 7) FTIE, with the MIC field of the FTIE set to 0 */
|
||||||
_rtw_memcpy(pos, ftie, 2 + *(ftie + 1));
|
memcpy(pos, ftie, 2 + *(ftie + 1));
|
||||||
pos += 2;
|
pos += 2;
|
||||||
tmp_ftie = (u8 *)(pos + 2);
|
tmp_ftie = (u8 *)(pos + 2);
|
||||||
memset(tmp_ftie, 0, 16);
|
memset(tmp_ftie, 0, 16);
|
||||||
|
@ -479,7 +479,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr)
|
|||||||
|
|
||||||
psta->padapter = pstapriv->padapter;
|
psta->padapter = pstapriv->padapter;
|
||||||
|
|
||||||
_rtw_memcpy(psta->cmn.mac_addr, hwaddr, ETH_ALEN);
|
memcpy(psta->cmn.mac_addr, hwaddr, ETH_ALEN);
|
||||||
|
|
||||||
index = wifi_mac_hash(hwaddr);
|
index = wifi_mac_hash(hwaddr);
|
||||||
|
|
||||||
@ -504,8 +504,8 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr)
|
|||||||
* So, we initialize the tid_rxseq variable as the 0xffff. */
|
* So, we initialize the tid_rxseq variable as the 0xffff. */
|
||||||
|
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
_rtw_memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i], &wRxSeqInitialValue, 2);
|
memcpy(&psta->sta_recvpriv.rxcache.tid_rxseq[i], &wRxSeqInitialValue, 2);
|
||||||
_rtw_memcpy(&psta->sta_recvpriv.bmc_tid_rxseq[i], &wRxSeqInitialValue, 2);
|
memcpy(&psta->sta_recvpriv.bmc_tid_rxseq[i], &wRxSeqInitialValue, 2);
|
||||||
memset(&psta->sta_recvpriv.rxcache.iv[i], 0, sizeof(psta->sta_recvpriv.rxcache.iv[i]));
|
memset(&psta->sta_recvpriv.rxcache.iv[i], 0, sizeof(psta->sta_recvpriv.rxcache.iv[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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;
|
||||||
@ -1142,7 +1142,7 @@ struct sta_info *rtw_pre_link_sta_add(struct sta_priv *stapriv, u8 *hwaddr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (exist == _FALSE && node) {
|
if (exist == _FALSE && node) {
|
||||||
_rtw_memcpy(node->addr, hwaddr, ETH_ALEN);
|
memcpy(node->addr, hwaddr, ETH_ALEN);
|
||||||
node->valid = _TRUE;
|
node->valid = _TRUE;
|
||||||
pre_link_sta_ctl->num++;
|
pre_link_sta_ctl->num++;
|
||||||
}
|
}
|
||||||
@ -1227,7 +1227,7 @@ void rtw_pre_link_sta_ctl_reset(struct sta_priv *stapriv)
|
|||||||
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) {
|
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++) {
|
||||||
if (pre_link_sta_ctl->node[i].valid == _FALSE)
|
if (pre_link_sta_ctl->node[i].valid == _FALSE)
|
||||||
continue;
|
continue;
|
||||||
_rtw_memcpy(&(addrs[j][0]), pre_link_sta_ctl->node[i].addr, ETH_ALEN);
|
memcpy(&(addrs[j][0]), pre_link_sta_ctl->node[i].addr, ETH_ALEN);
|
||||||
pre_link_sta_ctl->node[i].valid = _FALSE;
|
pre_link_sta_ctl->node[i].valid = _FALSE;
|
||||||
pre_link_sta_ctl->num--;
|
pre_link_sta_ctl->num--;
|
||||||
j++;
|
j++;
|
||||||
|
220
core/rtw_tdls.c
220
core/rtw_tdls.c
File diff suppressed because it is too large
Load Diff
@ -464,7 +464,7 @@ void update_sta_vht_info_apmode(_adapter *padapter, PVOID sta)
|
|||||||
pvhtpriv_sta->ampdu_len = GET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pvhtpriv_sta->vht_cap);
|
pvhtpriv_sta->ampdu_len = GET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pvhtpriv_sta->vht_cap);
|
||||||
|
|
||||||
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pvhtpriv_sta->vht_cap);
|
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pvhtpriv_sta->vht_cap);
|
||||||
_rtw_memcpy(pvhtpriv_sta->vht_mcs_map, pcap_mcs, 2);
|
memcpy(pvhtpriv_sta->vht_mcs_map, pcap_mcs, 2);
|
||||||
pvhtpriv_sta->vht_highest_rate = rtw_get_vht_highest_rate(pvhtpriv_sta->vht_mcs_map);
|
pvhtpriv_sta->vht_highest_rate = rtw_get_vht_highest_rate(pvhtpriv_sta->vht_mcs_map);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -545,8 +545,8 @@ void VHT_caps_handler_infra_ap(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE
|
|||||||
/*store information about vht_mcs_set*/
|
/*store information about vht_mcs_set*/
|
||||||
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pIE->data);
|
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pIE->data);
|
||||||
pcap_mcs_tx = GET_VHT_CAPABILITY_ELE_TX_MCS(pIE->data);
|
pcap_mcs_tx = GET_VHT_CAPABILITY_ELE_TX_MCS(pIE->data);
|
||||||
_rtw_memcpy(pvhtpriv->vht_mcs_map_infra_ap, pcap_mcs, 2);
|
memcpy(pvhtpriv->vht_mcs_map_infra_ap, pcap_mcs, 2);
|
||||||
_rtw_memcpy(pvhtpriv->vht_mcs_map_tx_infra_ap, pcap_mcs_tx, 2);
|
memcpy(pvhtpriv->vht_mcs_map_tx_infra_ap, pcap_mcs_tx, 2);
|
||||||
|
|
||||||
Rx_ss = VHT_get_ss_from_map(pvhtpriv->vht_mcs_map_infra_ap);
|
Rx_ss = VHT_get_ss_from_map(pvhtpriv->vht_mcs_map_infra_ap);
|
||||||
Tx_ss = VHT_get_ss_from_map(pvhtpriv->vht_mcs_map_tx_infra_ap);
|
Tx_ss = VHT_get_ss_from_map(pvhtpriv->vht_mcs_map_tx_infra_ap);
|
||||||
@ -722,7 +722,7 @@ void rtw_process_vht_op_mode_notify(_adapter *padapter, u8 *pframe, PVOID sta)
|
|||||||
update_ra = _TRUE;
|
update_ra = _TRUE;
|
||||||
|
|
||||||
rtw_vht_nss_to_mcsmap(target_rxss, vht_mcs_map, psta->vhtpriv.vht_mcs_map);
|
rtw_vht_nss_to_mcsmap(target_rxss, vht_mcs_map, psta->vhtpriv.vht_mcs_map);
|
||||||
_rtw_memcpy(psta->vhtpriv.vht_mcs_map, vht_mcs_map, 2);
|
memcpy(psta->vhtpriv.vht_mcs_map, vht_mcs_map, 2);
|
||||||
|
|
||||||
rtw_hal_update_sta_ra_info(padapter, psta);
|
rtw_hal_update_sta_ra_info(padapter, psta);
|
||||||
}
|
}
|
||||||
@ -761,7 +761,7 @@ u32 rtw_build_vht_operation_ie(_adapter *padapter, u8 *pbuf, u8 channel)
|
|||||||
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ1(operation, center_freq);/* Todo: need to set correct center channel */
|
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ1(operation, center_freq);/* Todo: need to set correct center channel */
|
||||||
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ2(operation, 0);
|
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ2(operation, 0);
|
||||||
|
|
||||||
_rtw_memcpy(operation + 3, pvhtpriv->vht_mcs_map, 2);
|
memcpy(operation + 3, pvhtpriv->vht_mcs_map, 2);
|
||||||
|
|
||||||
rtw_set_ie(pbuf, EID_VHTOperation, 5, operation, &len);
|
rtw_set_ie(pbuf, EID_VHTOperation, 5, operation, &len);
|
||||||
|
|
||||||
@ -912,10 +912,10 @@ u32 rtw_build_vht_cap_ie(_adapter *padapter, u8 *pbuf)
|
|||||||
SET_VHT_CAPABILITY_ELE_LINK_ADAPTION(pcap, 0);
|
SET_VHT_CAPABILITY_ELE_LINK_ADAPTION(pcap, 0);
|
||||||
|
|
||||||
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pcap);
|
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pcap);
|
||||||
_rtw_memcpy(pcap_mcs, pvhtpriv->vht_mcs_map, 2);
|
memcpy(pcap_mcs, pvhtpriv->vht_mcs_map, 2);
|
||||||
|
|
||||||
pcap_mcs = GET_VHT_CAPABILITY_ELE_TX_MCS(pcap);
|
pcap_mcs = GET_VHT_CAPABILITY_ELE_TX_MCS(pcap);
|
||||||
_rtw_memcpy(pcap_mcs, pvhtpriv->vht_mcs_map, 2);
|
memcpy(pcap_mcs, pvhtpriv->vht_mcs_map, 2);
|
||||||
|
|
||||||
/* find the largest bw supported by both registry and hal */
|
/* find the largest bw supported by both registry and hal */
|
||||||
bw = hal_largest_bw(padapter, REGSTY_BW_5G(pregistrypriv));
|
bw = hal_largest_bw(padapter, REGSTY_BW_5G(pregistrypriv));
|
||||||
|
@ -163,7 +163,7 @@ WapiGetEntryForCamWrite(_adapter *padapter, u8 *pMacAddr, u8 KID, BOOLEAN IsMsk)
|
|||||||
pWapiInfo->wapiCamEntry[i].IsUsed = 1;
|
pWapiInfo->wapiCamEntry[i].IsUsed = 1;
|
||||||
pWapiInfo->wapiCamEntry[i].type = IsMsk;
|
pWapiInfo->wapiCamEntry[i].type = IsMsk;
|
||||||
pWapiInfo->wapiCamEntry[i].keyidx = KID;
|
pWapiInfo->wapiCamEntry[i].keyidx = KID;
|
||||||
_rtw_memcpy(pWapiInfo->wapiCamEntry[i].PeerMacAddr, pMacAddr, ETH_ALEN);
|
memcpy(pWapiInfo->wapiCamEntry[i].PeerMacAddr, pMacAddr, ETH_ALEN);
|
||||||
ret = pWapiInfo->wapiCamEntry[i].entry_idx;
|
ret = pWapiInfo->wapiCamEntry[i].entry_idx;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -438,9 +438,9 @@ void rtw_wapi_update_info(_adapter *padapter, union recv_frame *precv_frame)
|
|||||||
precv_hdr->UserPriority = 0;
|
precv_hdr->UserPriority = 0;
|
||||||
|
|
||||||
pTA = get_addr2_ptr(ptr);
|
pTA = get_addr2_ptr(ptr);
|
||||||
_rtw_memcpy((u8 *)precv_hdr->WapiSrcAddr, pTA, 6);
|
memcpy((u8 *)precv_hdr->WapiSrcAddr, pTA, 6);
|
||||||
pRecvPN = ptr + precv_hdr->attrib.hdrlen + 2;
|
pRecvPN = ptr + precv_hdr->attrib.hdrlen + 2;
|
||||||
_rtw_memcpy((u8 *)precv_hdr->WapiTempPN, pRecvPN, 16);
|
memcpy((u8 *)precv_hdr->WapiTempPN, pRecvPN, 16);
|
||||||
|
|
||||||
WAPI_TRACE(WAPI_RX, "<========== %s\n", __FUNCTION__);
|
WAPI_TRACE(WAPI_RX, "<========== %s\n", __FUNCTION__);
|
||||||
}
|
}
|
||||||
@ -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,13 +542,13 @@ 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))
|
||||||
_rtw_memcpy(pLastRecvPN, WapiAEMultiCastPNInitialValueSrc, 16);
|
memcpy(pLastRecvPN, WapiAEMultiCastPNInitialValueSrc, 16);
|
||||||
else
|
else
|
||||||
_rtw_memcpy(pLastRecvPN, WapiAEPNInitialValueSrc, 16);
|
memcpy(pLastRecvPN, WapiAEPNInitialValueSrc, 16);
|
||||||
bDrop = true;
|
bDrop = true;
|
||||||
} else
|
} else
|
||||||
_rtw_memcpy(pLastRecvPN, precv_hdr->WapiTempPN, 16);
|
memcpy(pLastRecvPN, precv_hdr->WapiTempPN, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
WAPI_TRACE(WAPI_RX, "<========== %s\n", __FUNCTION__);
|
WAPI_TRACE(WAPI_RX, "<========== %s\n", __FUNCTION__);
|
||||||
@ -571,7 +571,7 @@ void rtw_build_probe_resp_wapi_ie(_adapter *padapter, unsigned char *pframe, str
|
|||||||
WapiIELength = pWapiInfo->wapiIELength;
|
WapiIELength = pWapiInfo->wapiIELength;
|
||||||
pframe[0] = _WAPI_IE_;
|
pframe[0] = _WAPI_IE_;
|
||||||
pframe[1] = WapiIELength;
|
pframe[1] = WapiIELength;
|
||||||
_rtw_memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
|
memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
|
||||||
pframe += WapiIELength + 2;
|
pframe += WapiIELength + 2;
|
||||||
pattrib->pktlen += WapiIELength + 2;
|
pattrib->pktlen += WapiIELength + 2;
|
||||||
|
|
||||||
@ -593,7 +593,7 @@ void rtw_build_beacon_wapi_ie(_adapter *padapter, unsigned char *pframe, struct
|
|||||||
WapiIELength = pWapiInfo->wapiIELength;
|
WapiIELength = pWapiInfo->wapiIELength;
|
||||||
pframe[0] = _WAPI_IE_;
|
pframe[0] = _WAPI_IE_;
|
||||||
pframe[1] = WapiIELength;
|
pframe[1] = WapiIELength;
|
||||||
_rtw_memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
|
memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
|
||||||
pframe += WapiIELength + 2;
|
pframe += WapiIELength + 2;
|
||||||
pattrib->pktlen += WapiIELength + 2;
|
pattrib->pktlen += WapiIELength + 2;
|
||||||
|
|
||||||
@ -620,16 +620,16 @@ void rtw_build_assoc_req_wapi_ie(_adapter *padapter, unsigned char *pframe, stru
|
|||||||
if (!list_empty(&(pWapiInfo->wapiBKIDStoreList))) {
|
if (!list_empty(&(pWapiInfo->wapiBKIDStoreList))) {
|
||||||
list_for_each_entry(pWapiBKID, &pWapiInfo->wapiBKIDStoreList, list) {
|
list_for_each_entry(pWapiBKID, &pWapiInfo->wapiBKIDStoreList, list) {
|
||||||
bkidNum++;
|
bkidNum++;
|
||||||
_rtw_memcpy(pWapiInfo->wapiIE + WapiIELength + 2, pWapiBKID->bkid, 16);
|
memcpy(pWapiInfo->wapiIE + WapiIELength + 2, pWapiBKID->bkid, 16);
|
||||||
WapiIELength += 16;
|
WapiIELength += 16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_rtw_memcpy(pWapiInfo->wapiIE + WapiIELength, &bkidNum, 2);
|
memcpy(pWapiInfo->wapiIE + WapiIELength, &bkidNum, 2);
|
||||||
WapiIELength += 2;
|
WapiIELength += 2;
|
||||||
|
|
||||||
pframe[0] = _WAPI_IE_;
|
pframe[0] = _WAPI_IE_;
|
||||||
pframe[1] = WapiIELength;
|
pframe[1] = WapiIELength;
|
||||||
_rtw_memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
|
memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
|
||||||
pframe += WapiIELength + 2;
|
pframe += WapiIELength + 2;
|
||||||
pattrib->pktlen += WapiIELength + 2;
|
pattrib->pktlen += WapiIELength + 2;
|
||||||
WAPI_TRACE(WAPI_MLME, "<========== %s\n", __FUNCTION__);
|
WAPI_TRACE(WAPI_MLME, "<========== %s\n", __FUNCTION__);
|
||||||
@ -653,15 +653,15 @@ void rtw_wapi_on_assoc_ok(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||||||
pWapiSta = (PRT_WAPI_STA_INFO)list_entry(pWapiInfo->wapiSTAIdleList.next, RT_WAPI_STA_INFO, list);
|
pWapiSta = (PRT_WAPI_STA_INFO)list_entry(pWapiInfo->wapiSTAIdleList.next, RT_WAPI_STA_INFO, list);
|
||||||
list_del_init(&pWapiSta->list);
|
list_del_init(&pWapiSta->list);
|
||||||
list_add_tail(&pWapiSta->list, &pWapiInfo->wapiSTAUsedList);
|
list_add_tail(&pWapiSta->list, &pWapiInfo->wapiSTAUsedList);
|
||||||
_rtw_memcpy(pWapiSta->PeerMacAddr, padapter->mlmeextpriv.mlmext_info.network.MacAddress, 6);
|
memcpy(pWapiSta->PeerMacAddr, padapter->mlmeextpriv.mlmext_info.network.MacAddress, 6);
|
||||||
_rtw_memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16);
|
||||||
_rtw_memcpy(pWapiSta->lastRxUnicastPN, WapiAEPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastRxUnicastPN, WapiAEPNInitialValueSrc, 16);
|
||||||
|
|
||||||
/* For chenk PN error with Qos Data after s3: add by ylb 20111114 */
|
/* For chenk PN error with Qos Data after s3: add by ylb 20111114 */
|
||||||
_rtw_memcpy(pWapiSta->lastRxUnicastPNBEQueue, WapiAEPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastRxUnicastPNBEQueue, WapiAEPNInitialValueSrc, 16);
|
||||||
_rtw_memcpy(pWapiSta->lastRxUnicastPNBKQueue, WapiAEPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastRxUnicastPNBKQueue, WapiAEPNInitialValueSrc, 16);
|
||||||
_rtw_memcpy(pWapiSta->lastRxUnicastPNVIQueue, WapiAEPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastRxUnicastPNVIQueue, WapiAEPNInitialValueSrc, 16);
|
||||||
_rtw_memcpy(pWapiSta->lastRxUnicastPNVOQueue, WapiAEPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastRxUnicastPNVOQueue, WapiAEPNInitialValueSrc, 16);
|
||||||
|
|
||||||
WAPI_TRACE(WAPI_MLME, "<========== %s\n", __FUNCTION__);
|
WAPI_TRACE(WAPI_MLME, "<========== %s\n", __FUNCTION__);
|
||||||
}
|
}
|
||||||
@ -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;
|
||||||
@ -1189,7 +1189,7 @@ void rtw_wapi_get_iv(_adapter *padapter, u8 *pRA, u8 *IV)
|
|||||||
|
|
||||||
pWapiExt->Reserved = 0;
|
pWapiExt->Reserved = 0;
|
||||||
bPNOverflow = WapiIncreasePN(pWapiSta->lastTxUnicastPN, 2);
|
bPNOverflow = WapiIncreasePN(pWapiSta->lastTxUnicastPN, 2);
|
||||||
_rtw_memcpy(pWapiExt->PN, pWapiSta->lastTxUnicastPN, 16);
|
memcpy(pWapiExt->PN, pWapiSta->lastTxUnicastPN, 16);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -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");
|
||||||
@ -1265,19 +1265,19 @@ void rtw_wapi_set_set_encryption(_adapter *padapter, struct ieee_param *param)
|
|||||||
if (param->u.crypt.set_tx == 1) {
|
if (param->u.crypt.set_tx == 1) {
|
||||||
list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) {
|
list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) {
|
||||||
if (_rtw_memcmp(pWapiSta->PeerMacAddr, param->sta_addr, 6)) {
|
if (_rtw_memcmp(pWapiSta->PeerMacAddr, param->sta_addr, 6)) {
|
||||||
_rtw_memcpy(pWapiSta->lastTxUnicastPN, WapiASUEPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastTxUnicastPN, WapiASUEPNInitialValueSrc, 16);
|
||||||
|
|
||||||
pWapiSta->wapiUsk.bSet = true;
|
pWapiSta->wapiUsk.bSet = true;
|
||||||
_rtw_memcpy(pWapiSta->wapiUsk.dataKey, param->u.crypt.key, 16);
|
memcpy(pWapiSta->wapiUsk.dataKey, param->u.crypt.key, 16);
|
||||||
_rtw_memcpy(pWapiSta->wapiUsk.micKey, param->u.crypt.key + 16, 16);
|
memcpy(pWapiSta->wapiUsk.micKey, param->u.crypt.key + 16, 16);
|
||||||
pWapiSta->wapiUsk.keyId = param->u.crypt.idx ;
|
pWapiSta->wapiUsk.keyId = param->u.crypt.idx ;
|
||||||
pWapiSta->wapiUsk.bTxEnable = true;
|
pWapiSta->wapiUsk.bTxEnable = true;
|
||||||
|
|
||||||
_rtw_memcpy(pWapiSta->lastRxUnicastPNBEQueue, WapiAEPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastRxUnicastPNBEQueue, WapiAEPNInitialValueSrc, 16);
|
||||||
_rtw_memcpy(pWapiSta->lastRxUnicastPNBKQueue, WapiAEPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastRxUnicastPNBKQueue, WapiAEPNInitialValueSrc, 16);
|
||||||
_rtw_memcpy(pWapiSta->lastRxUnicastPNVIQueue, WapiAEPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastRxUnicastPNVIQueue, WapiAEPNInitialValueSrc, 16);
|
||||||
_rtw_memcpy(pWapiSta->lastRxUnicastPNVOQueue, WapiAEPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastRxUnicastPNVOQueue, WapiAEPNInitialValueSrc, 16);
|
||||||
_rtw_memcpy(pWapiSta->lastRxUnicastPN, WapiAEPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastRxUnicastPN, WapiAEPNInitialValueSrc, 16);
|
||||||
pWapiSta->wapiUskUpdate.bTxEnable = false;
|
pWapiSta->wapiUskUpdate.bTxEnable = false;
|
||||||
pWapiSta->wapiUskUpdate.bSet = false;
|
pWapiSta->wapiUskUpdate.bSet = false;
|
||||||
|
|
||||||
@ -1291,15 +1291,15 @@ void rtw_wapi_set_set_encryption(_adapter *padapter, struct ieee_param *param)
|
|||||||
list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) {
|
list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) {
|
||||||
if (_rtw_memcmp(pWapiSta->PeerMacAddr, get_bssid(pmlmepriv), 6)) {
|
if (_rtw_memcmp(pWapiSta->PeerMacAddr, get_bssid(pmlmepriv), 6)) {
|
||||||
pWapiSta->wapiMsk.bSet = true;
|
pWapiSta->wapiMsk.bSet = true;
|
||||||
_rtw_memcpy(pWapiSta->wapiMsk.dataKey, param->u.crypt.key, 16);
|
memcpy(pWapiSta->wapiMsk.dataKey, param->u.crypt.key, 16);
|
||||||
_rtw_memcpy(pWapiSta->wapiMsk.micKey, param->u.crypt.key + 16, 16);
|
memcpy(pWapiSta->wapiMsk.micKey, param->u.crypt.key + 16, 16);
|
||||||
pWapiSta->wapiMsk.keyId = param->u.crypt.idx ;
|
pWapiSta->wapiMsk.keyId = param->u.crypt.idx ;
|
||||||
pWapiSta->wapiMsk.bTxEnable = false;
|
pWapiSta->wapiMsk.bTxEnable = false;
|
||||||
if (!pWapiSta->bSetkeyOk)
|
if (!pWapiSta->bSetkeyOk)
|
||||||
pWapiSta->bSetkeyOk = true;
|
pWapiSta->bSetkeyOk = true;
|
||||||
pWapiSta->bAuthenticateInProgress = false;
|
pWapiSta->bAuthenticateInProgress = false;
|
||||||
|
|
||||||
_rtw_memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16);
|
memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16);
|
||||||
|
|
||||||
if (psecuritypriv->sw_decrypt == false) {
|
if (psecuritypriv->sw_decrypt == false) {
|
||||||
/* set rx broadcast key for ASUE */
|
/* set rx broadcast key for ASUE */
|
||||||
|
@ -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);
|
||||||
|
@ -338,7 +338,7 @@ void get_rate_set(_adapter *padapter, unsigned char *pbssrate, int *bssrate_len)
|
|||||||
|
|
||||||
memset(supportedrates, 0, NumRates);
|
memset(supportedrates, 0, NumRates);
|
||||||
*bssrate_len = ratetbl2rateset(padapter, supportedrates);
|
*bssrate_len = ratetbl2rateset(padapter, supportedrates);
|
||||||
_rtw_memcpy(pbssrate, supportedrates, *bssrate_len);
|
memcpy(pbssrate, supportedrates, *bssrate_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_mcs_rate_by_mask(u8 *mcs_set, u32 mask)
|
void set_mcs_rate_by_mask(u8 *mcs_set, u32 mask)
|
||||||
@ -675,7 +675,7 @@ __inline u8 *get_my_bssid(WLAN_BSSID_EX *pnetwork)
|
|||||||
u16 get_beacon_interval(WLAN_BSSID_EX *bss)
|
u16 get_beacon_interval(WLAN_BSSID_EX *bss)
|
||||||
{
|
{
|
||||||
unsigned short val;
|
unsigned short val;
|
||||||
_rtw_memcpy((unsigned char *)&val, rtw_get_beacon_interval_from_ie(bss->IEs), 2);
|
memcpy((unsigned char *)&val, rtw_get_beacon_interval_from_ie(bss->IEs), 2);
|
||||||
|
|
||||||
return le16_to_cpu(val);
|
return le16_to_cpu(val);
|
||||||
|
|
||||||
@ -793,7 +793,7 @@ inline void write_cam_from_cache(_adapter *adapter, u8 id)
|
|||||||
struct sec_cam_ent cache;
|
struct sec_cam_ent cache;
|
||||||
|
|
||||||
_enter_critical_bh(&cam_ctl->lock, &irqL);
|
_enter_critical_bh(&cam_ctl->lock, &irqL);
|
||||||
_rtw_memcpy(&cache, &dvobj->cam_cache[id], sizeof(struct sec_cam_ent));
|
memcpy(&cache, &dvobj->cam_cache[id], sizeof(struct sec_cam_ent));
|
||||||
_exit_critical_bh(&cam_ctl->lock, &irqL);
|
_exit_critical_bh(&cam_ctl->lock, &irqL);
|
||||||
|
|
||||||
rtw_sec_write_cam_ent(adapter, id, cache.ctrl, cache.mac, cache.key);
|
rtw_sec_write_cam_ent(adapter, id, cache.ctrl, cache.mac, cache.key);
|
||||||
@ -807,8 +807,8 @@ void write_cam_cache(_adapter *adapter, u8 id, u16 ctrl, u8 *mac, u8 *key)
|
|||||||
_enter_critical_bh(&cam_ctl->lock, &irqL);
|
_enter_critical_bh(&cam_ctl->lock, &irqL);
|
||||||
|
|
||||||
dvobj->cam_cache[id].ctrl = ctrl;
|
dvobj->cam_cache[id].ctrl = ctrl;
|
||||||
_rtw_memcpy(dvobj->cam_cache[id].mac, mac, ETH_ALEN);
|
memcpy(dvobj->cam_cache[id].mac, mac, ETH_ALEN);
|
||||||
_rtw_memcpy(dvobj->cam_cache[id].key, key, 16);
|
memcpy(dvobj->cam_cache[id].key, key, 16);
|
||||||
|
|
||||||
_exit_critical_bh(&cam_ctl->lock, &irqL);
|
_exit_critical_bh(&cam_ctl->lock, &irqL);
|
||||||
}
|
}
|
||||||
@ -1331,10 +1331,10 @@ inline void rtw_sec_cam_swap(_adapter *adapter, u8 cam_id_a, u8 cam_id_b)
|
|||||||
cam_b_used = _rtw_sec_camid_is_used(cam_ctl, cam_id_b);
|
cam_b_used = _rtw_sec_camid_is_used(cam_ctl, cam_id_b);
|
||||||
|
|
||||||
if (cam_a_used)
|
if (cam_a_used)
|
||||||
_rtw_memcpy(&cache_a, &dvobj->cam_cache[cam_id_a], sizeof(struct sec_cam_ent));
|
memcpy(&cache_a, &dvobj->cam_cache[cam_id_a], sizeof(struct sec_cam_ent));
|
||||||
|
|
||||||
if (cam_b_used)
|
if (cam_b_used)
|
||||||
_rtw_memcpy(&cache_b, &dvobj->cam_cache[cam_id_b], sizeof(struct sec_cam_ent));
|
memcpy(&cache_b, &dvobj->cam_cache[cam_id_b], sizeof(struct sec_cam_ent));
|
||||||
|
|
||||||
_exit_critical_bh(&cam_ctl->lock, &irqL);
|
_exit_critical_bh(&cam_ctl->lock, &irqL);
|
||||||
|
|
||||||
@ -1507,7 +1507,7 @@ int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||||||
if (_rtw_memcmp(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element)))
|
if (_rtw_memcmp(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element)))
|
||||||
return _FALSE;
|
return _FALSE;
|
||||||
else
|
else
|
||||||
_rtw_memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element));
|
memcpy(&(pmlmeinfo->WMM_param), (pIE->data + 6), sizeof(struct WMM_para_element));
|
||||||
pmlmeinfo->WMM_enable = 1;
|
pmlmeinfo->WMM_enable = 1;
|
||||||
return _TRUE;
|
return _TRUE;
|
||||||
|
|
||||||
@ -2061,7 +2061,7 @@ void HT_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
pmlmeinfo->HT_info_enable = 1;
|
pmlmeinfo->HT_info_enable = 1;
|
||||||
_rtw_memcpy(&(pmlmeinfo->HT_info), pIE->data, pIE->Length);
|
memcpy(&(pmlmeinfo->HT_info), pIE->data, pIE->Length);
|
||||||
#endif /* CONFIG_80211N_HT */
|
#endif /* CONFIG_80211N_HT */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2153,7 +2153,7 @@ void ERP_IE_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
pmlmeinfo->ERP_enable = 1;
|
pmlmeinfo->ERP_enable = 1;
|
||||||
_rtw_memcpy(&(pmlmeinfo->ERP_IE), pIE->data, pIE->Length);
|
memcpy(&(pmlmeinfo->ERP_IE), pIE->data, pIE->Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VCS_update(_adapter *padapter, struct sta_info *psta)
|
void VCS_update(_adapter *padapter, struct sta_info *psta)
|
||||||
@ -2405,13 +2405,13 @@ void rtw_absorb_ssid_ifneed(_adapter *padapter, WLAN_BSSID_EX *bssid, u8 *pframe
|
|||||||
next_ie = p + 2 + ssid_len_ori;
|
next_ie = p + 2 + ssid_len_ori;
|
||||||
remain_len = snetwork->IELength - (next_ie - snetwork->IEs);
|
remain_len = snetwork->IELength - (next_ie - snetwork->IEs);
|
||||||
scanned->network.Ssid.SsidLength = bssid->Ssid.SsidLength;
|
scanned->network.Ssid.SsidLength = bssid->Ssid.SsidLength;
|
||||||
_rtw_memcpy(scanned->network.Ssid.Ssid, bssid->Ssid.Ssid, bssid->Ssid.SsidLength);
|
memcpy(scanned->network.Ssid.Ssid, bssid->Ssid.Ssid, bssid->Ssid.SsidLength);
|
||||||
|
|
||||||
//update pnetwork->ssid, pnetwork->ssidlen
|
//update pnetwork->ssid, pnetwork->ssidlen
|
||||||
_rtw_memcpy(backupIE, next_ie, remain_len);
|
memcpy(backupIE, next_ie, remain_len);
|
||||||
*(p+1) = bssid->Ssid.SsidLength;
|
*(p+1) = bssid->Ssid.SsidLength;
|
||||||
_rtw_memcpy(p+2, bssid->Ssid.Ssid, bssid->Ssid.SsidLength);
|
memcpy(p+2, bssid->Ssid.Ssid, bssid->Ssid.SsidLength);
|
||||||
_rtw_memcpy(p+2+bssid->Ssid.SsidLength, backupIE, remain_len);
|
memcpy(p+2+bssid->Ssid.SsidLength, backupIE, remain_len);
|
||||||
snetwork->IELength += bssid->Ssid.SsidLength;
|
snetwork->IELength += bssid->Ssid.SsidLength;
|
||||||
}
|
}
|
||||||
_exit_critical_bh(&padapter->mlmepriv.scanned_queue.lock, &irqL);
|
_exit_critical_bh(&padapter->mlmepriv.scanned_queue.lock, &irqL);
|
||||||
@ -2522,7 +2522,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
|||||||
if (elems.ssid_len > sizeof(recv_beacon->ssid))
|
if (elems.ssid_len > sizeof(recv_beacon->ssid))
|
||||||
return _FALSE;
|
return _FALSE;
|
||||||
|
|
||||||
_rtw_memcpy(recv_beacon->ssid, elems.ssid, elems.ssid_len);
|
memcpy(recv_beacon->ssid, elems.ssid, elems.ssid_len);
|
||||||
recv_beacon->ssid_len = elems.ssid_len;
|
recv_beacon->ssid_len = elems.ssid_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2546,7 +2546,7 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
|||||||
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
|
||||||
|
|
||||||
#ifdef DBG_RX_BCN
|
#ifdef DBG_RX_BCN
|
||||||
_rtw_memcpy(pmlmeext->tim, elems.tim, 4);
|
memcpy(pmlmeext->tim, elems.tim, 4);
|
||||||
#endif
|
#endif
|
||||||
pmlmeext->dtim = elems.tim[1];
|
pmlmeext->dtim = elems.tim[1];
|
||||||
}
|
}
|
||||||
@ -2558,7 +2558,7 @@ void rtw_dump_bcn_keys(void *sel, struct beacon_keys *recv_beacon)
|
|||||||
{
|
{
|
||||||
u8 ssid[IW_ESSID_MAX_SIZE + 1];
|
u8 ssid[IW_ESSID_MAX_SIZE + 1];
|
||||||
|
|
||||||
_rtw_memcpy(ssid, recv_beacon->ssid, recv_beacon->ssid_len);
|
memcpy(ssid, recv_beacon->ssid, recv_beacon->ssid_len);
|
||||||
ssid[recv_beacon->ssid_len] = '\0';
|
ssid[recv_beacon->ssid_len] = '\0';
|
||||||
|
|
||||||
RTW_PRINT_SEL(sel, "ssid = %s (len = %u)\n", ssid, recv_beacon->ssid_len);
|
RTW_PRINT_SEL(sel, "ssid = %s (len = %u)\n", ssid, recv_beacon->ssid_len);
|
||||||
@ -2609,7 +2609,7 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
|||||||
RTW_DBG("%s: new beacon key\n", __func__);
|
RTW_DBG("%s: new beacon key\n", __func__);
|
||||||
RTW_DBG_EXPR(rtw_dump_bcn_keys(RTW_DBGDUMP, &recv_beacon));
|
RTW_DBG_EXPR(rtw_dump_bcn_keys(RTW_DBGDUMP, &recv_beacon));
|
||||||
|
|
||||||
_rtw_memcpy(&pmlmepriv->new_beacon_keys, &recv_beacon, sizeof(recv_beacon));
|
memcpy(&pmlmepriv->new_beacon_keys, &recv_beacon, sizeof(recv_beacon));
|
||||||
pmlmepriv->new_beacon_cnts = 1;
|
pmlmepriv->new_beacon_cnts = 1;
|
||||||
} else {
|
} else {
|
||||||
RTW_DBG("%s: new beacon again (seq=%d)\n", __func__, GetSequence(pframe));
|
RTW_DBG("%s: new beacon again (seq=%d)\n", __func__, GetSequence(pframe));
|
||||||
@ -2634,7 +2634,7 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
|||||||
, recv_beacon.ch, recv_beacon.bw, recv_beacon.offset))
|
, recv_beacon.ch, recv_beacon.bw, recv_beacon.offset))
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
_rtw_memcpy(&tmp_beacon, cur_beacon, sizeof(tmp_beacon));
|
memcpy(&tmp_beacon, cur_beacon, sizeof(tmp_beacon));
|
||||||
|
|
||||||
/* check fields excluding below */
|
/* check fields excluding below */
|
||||||
tmp_beacon.ch = recv_beacon.ch;
|
tmp_beacon.ch = recv_beacon.ch;
|
||||||
@ -2644,12 +2644,12 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
|||||||
tmp_beacon.proto_cap = recv_beacon.proto_cap;
|
tmp_beacon.proto_cap = recv_beacon.proto_cap;
|
||||||
if (!BCNKEY_VERIFY_WHOLE_RATE_SET) {
|
if (!BCNKEY_VERIFY_WHOLE_RATE_SET) {
|
||||||
tmp_beacon.rate_num = recv_beacon.rate_num;
|
tmp_beacon.rate_num = recv_beacon.rate_num;
|
||||||
_rtw_memcpy(tmp_beacon.rate_set, recv_beacon.rate_set, 12);
|
memcpy(tmp_beacon.rate_set, recv_beacon.rate_set, 12);
|
||||||
}
|
}
|
||||||
if (_rtw_memcmp(&tmp_beacon, &recv_beacon, sizeof(recv_beacon)) == _FALSE)
|
if (_rtw_memcmp(&tmp_beacon, &recv_beacon, sizeof(recv_beacon)) == _FALSE)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
_rtw_memcpy(cur_beacon, &recv_beacon, sizeof(recv_beacon));
|
memcpy(cur_beacon, &recv_beacon, sizeof(recv_beacon));
|
||||||
#ifdef CONFIG_BCN_CNT_CONFIRM_HDL
|
#ifdef CONFIG_BCN_CNT_CONFIRM_HDL
|
||||||
pmlmepriv->new_beacon_cnts = 0;
|
pmlmepriv->new_beacon_cnts = 0;
|
||||||
#endif
|
#endif
|
||||||
@ -3075,11 +3075,11 @@ void update_tx_basic_rate(_adapter *padapter, u8 wirelessmode)
|
|||||||
wirelessmode &= ~(WIRELESS_11B);
|
wirelessmode &= ~(WIRELESS_11B);
|
||||||
|
|
||||||
if ((wirelessmode & WIRELESS_11B) && (wirelessmode == WIRELESS_11B))
|
if ((wirelessmode & WIRELESS_11B) && (wirelessmode == WIRELESS_11B))
|
||||||
_rtw_memcpy(supported_rates, rtw_basic_rate_cck, 4);
|
memcpy(supported_rates, rtw_basic_rate_cck, 4);
|
||||||
else if (wirelessmode & WIRELESS_11B)
|
else if (wirelessmode & WIRELESS_11B)
|
||||||
_rtw_memcpy(supported_rates, rtw_basic_rate_mix, 7);
|
memcpy(supported_rates, rtw_basic_rate_mix, 7);
|
||||||
else
|
else
|
||||||
_rtw_memcpy(supported_rates, rtw_basic_rate_ofdm, 3);
|
memcpy(supported_rates, rtw_basic_rate_ofdm, 3);
|
||||||
|
|
||||||
if (wirelessmode & WIRELESS_11B)
|
if (wirelessmode & WIRELESS_11B)
|
||||||
update_mgnt_tx_rate(padapter, IEEE80211_CCK_RATE_1MB);
|
update_mgnt_tx_rate(padapter, IEEE80211_CCK_RATE_1MB);
|
||||||
@ -3429,10 +3429,10 @@ void update_sta_basic_rate(struct sta_info *psta, u8 wireless_mode)
|
|||||||
{
|
{
|
||||||
if (IsSupportedTxCCK(wireless_mode)) {
|
if (IsSupportedTxCCK(wireless_mode)) {
|
||||||
/* Only B, B/G, and B/G/N AP could use CCK rate */
|
/* Only B, B/G, and B/G/N AP could use CCK rate */
|
||||||
_rtw_memcpy(psta->bssrateset, rtw_basic_rate_cck, 4);
|
memcpy(psta->bssrateset, rtw_basic_rate_cck, 4);
|
||||||
psta->bssratelen = 4;
|
psta->bssratelen = 4;
|
||||||
} else {
|
} else {
|
||||||
_rtw_memcpy(psta->bssrateset, rtw_basic_rate_ofdm, 3);
|
memcpy(psta->bssrateset, rtw_basic_rate_ofdm, 3);
|
||||||
psta->bssratelen = 3;
|
psta->bssratelen = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4196,9 +4196,9 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame)
|
|||||||
fctrl = &(pwlanhdr->frame_ctl);
|
fctrl = &(pwlanhdr->frame_ctl);
|
||||||
*(fctrl) = 0;
|
*(fctrl) = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
|
||||||
|
|
||||||
set_frame_sub_type(pframe, WIFI_BEACON);
|
set_frame_sub_type(pframe, WIFI_BEACON);
|
||||||
|
|
||||||
@ -4210,13 +4210,13 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame)
|
|||||||
len += 8;
|
len += 8;
|
||||||
|
|
||||||
/* beacon interval: 2 bytes */
|
/* beacon interval: 2 bytes */
|
||||||
_rtw_memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval_from_ie(cur_network->IEs)), 2);
|
memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval_from_ie(cur_network->IEs)), 2);
|
||||||
|
|
||||||
pframe += 2;
|
pframe += 2;
|
||||||
len += 2;
|
len += 2;
|
||||||
|
|
||||||
/* capability info: 2 bytes */
|
/* capability info: 2 bytes */
|
||||||
_rtw_memcpy(pframe, (unsigned char *)(rtw_get_capability_from_ie(cur_network->IEs)), 2);
|
memcpy(pframe, (unsigned char *)(rtw_get_capability_from_ie(cur_network->IEs)), 2);
|
||||||
|
|
||||||
pframe += 2;
|
pframe += 2;
|
||||||
len += 2;
|
len += 2;
|
||||||
@ -4448,11 +4448,11 @@ u8 rtw_set_default_pattern(_adapter *adapter)
|
|||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
target = pwrpriv->patterns[index].content;
|
target = pwrpriv->patterns[index].content;
|
||||||
_rtw_memcpy(target, adapter_mac_addr(adapter),
|
memcpy(target, adapter_mac_addr(adapter),
|
||||||
ETH_ALEN);
|
ETH_ALEN);
|
||||||
|
|
||||||
target += ETH_TYPE_OFFSET;
|
target += ETH_TYPE_OFFSET;
|
||||||
_rtw_memcpy(target, &ip_protocol,
|
memcpy(target, &ip_protocol,
|
||||||
sizeof(ip_protocol));
|
sizeof(ip_protocol));
|
||||||
|
|
||||||
/* TCP */
|
/* TCP */
|
||||||
@ -4461,10 +4461,10 @@ u8 rtw_set_default_pattern(_adapter *adapter)
|
|||||||
|
|
||||||
target += (IP_OFFSET - PROTOCOL_OFFSET);
|
target += (IP_OFFSET - PROTOCOL_OFFSET);
|
||||||
|
|
||||||
_rtw_memcpy(target, pmlmeinfo->ip_addr,
|
memcpy(target, pmlmeinfo->ip_addr,
|
||||||
RTW_IP_ADDR_LEN);
|
RTW_IP_ADDR_LEN);
|
||||||
|
|
||||||
_rtw_memcpy(pwrpriv->patterns[index].mask,
|
memcpy(pwrpriv->patterns[index].mask,
|
||||||
&unicast_mask, sizeof(unicast_mask));
|
&unicast_mask, sizeof(unicast_mask));
|
||||||
|
|
||||||
pwrpriv->patterns[index].len =
|
pwrpriv->patterns[index].len =
|
||||||
@ -4472,21 +4472,21 @@ u8 rtw_set_default_pattern(_adapter *adapter)
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
target = pwrpriv->patterns[index].content;
|
target = pwrpriv->patterns[index].content;
|
||||||
_rtw_memcpy(target, adapter_mac_addr(adapter),
|
memcpy(target, adapter_mac_addr(adapter),
|
||||||
ETH_ALEN);
|
ETH_ALEN);
|
||||||
|
|
||||||
target += ETH_TYPE_OFFSET;
|
target += ETH_TYPE_OFFSET;
|
||||||
_rtw_memcpy(target, &ip_protocol, sizeof(ip_protocol));
|
memcpy(target, &ip_protocol, sizeof(ip_protocol));
|
||||||
|
|
||||||
/* ICMP */
|
/* ICMP */
|
||||||
target += (PROTOCOL_OFFSET - ETH_TYPE_OFFSET);
|
target += (PROTOCOL_OFFSET - ETH_TYPE_OFFSET);
|
||||||
memset(target, 0x01, 1);
|
memset(target, 0x01, 1);
|
||||||
|
|
||||||
target += (IP_OFFSET - PROTOCOL_OFFSET);
|
target += (IP_OFFSET - PROTOCOL_OFFSET);
|
||||||
_rtw_memcpy(target, pmlmeinfo->ip_addr,
|
memcpy(target, pmlmeinfo->ip_addr,
|
||||||
RTW_IP_ADDR_LEN);
|
RTW_IP_ADDR_LEN);
|
||||||
|
|
||||||
_rtw_memcpy(pwrpriv->patterns[index].mask,
|
memcpy(pwrpriv->patterns[index].mask,
|
||||||
&unicast_mask, sizeof(unicast_mask));
|
&unicast_mask, sizeof(unicast_mask));
|
||||||
pwrpriv->patterns[index].len =
|
pwrpriv->patterns[index].len =
|
||||||
|
|
||||||
@ -4498,7 +4498,7 @@ u8 rtw_set_default_pattern(_adapter *adapter)
|
|||||||
target = pwrpriv->patterns[index].content;
|
target = pwrpriv->patterns[index].content;
|
||||||
target += ETH_TYPE_OFFSET;
|
target += ETH_TYPE_OFFSET;
|
||||||
|
|
||||||
_rtw_memcpy(target, &ipv6_protocol,
|
memcpy(target, &ipv6_protocol,
|
||||||
sizeof(ipv6_protocol));
|
sizeof(ipv6_protocol));
|
||||||
|
|
||||||
/* ICMPv6 */
|
/* ICMPv6 */
|
||||||
@ -4507,10 +4507,10 @@ u8 rtw_set_default_pattern(_adapter *adapter)
|
|||||||
memset(target, 0x3a, 1);
|
memset(target, 0x3a, 1);
|
||||||
|
|
||||||
target += (IPv6_OFFSET - IPv6_PROTOCOL_OFFSET);
|
target += (IPv6_OFFSET - IPv6_PROTOCOL_OFFSET);
|
||||||
_rtw_memcpy(target, pmlmeinfo->ip6_addr,
|
memcpy(target, pmlmeinfo->ip6_addr,
|
||||||
RTW_IPv6_ADDR_LEN);
|
RTW_IPv6_ADDR_LEN);
|
||||||
|
|
||||||
_rtw_memcpy(pwrpriv->patterns[index].mask,
|
memcpy(pwrpriv->patterns[index].mask,
|
||||||
&icmpv6_mask, sizeof(icmpv6_mask));
|
&icmpv6_mask, sizeof(icmpv6_mask));
|
||||||
pwrpriv->patterns[index].len =
|
pwrpriv->patterns[index].len =
|
||||||
IPv6_OFFSET + RTW_IPv6_ADDR_LEN;
|
IPv6_OFFSET + RTW_IPv6_ADDR_LEN;
|
||||||
@ -4519,21 +4519,21 @@ u8 rtw_set_default_pattern(_adapter *adapter)
|
|||||||
#endif /*CONFIG_IPV6*/
|
#endif /*CONFIG_IPV6*/
|
||||||
case 3:
|
case 3:
|
||||||
target = pwrpriv->patterns[index].content;
|
target = pwrpriv->patterns[index].content;
|
||||||
_rtw_memcpy(target, &multicast_addr,
|
memcpy(target, &multicast_addr,
|
||||||
sizeof(multicast_addr));
|
sizeof(multicast_addr));
|
||||||
|
|
||||||
target += ETH_TYPE_OFFSET;
|
target += ETH_TYPE_OFFSET;
|
||||||
_rtw_memcpy(target, &ip_protocol, sizeof(ip_protocol));
|
memcpy(target, &ip_protocol, sizeof(ip_protocol));
|
||||||
|
|
||||||
/* UDP */
|
/* UDP */
|
||||||
target += (PROTOCOL_OFFSET - ETH_TYPE_OFFSET);
|
target += (PROTOCOL_OFFSET - ETH_TYPE_OFFSET);
|
||||||
memset(target, 0x11, 1);
|
memset(target, 0x11, 1);
|
||||||
|
|
||||||
target += (IP_OFFSET - PROTOCOL_OFFSET);
|
target += (IP_OFFSET - PROTOCOL_OFFSET);
|
||||||
_rtw_memcpy(target, &multicast_ip,
|
memcpy(target, &multicast_ip,
|
||||||
sizeof(multicast_ip));
|
sizeof(multicast_ip));
|
||||||
|
|
||||||
_rtw_memcpy(pwrpriv->patterns[index].mask,
|
memcpy(pwrpriv->patterns[index].mask,
|
||||||
&multicast_mask, sizeof(multicast_mask));
|
&multicast_mask, sizeof(multicast_mask));
|
||||||
|
|
||||||
pwrpriv->patterns[index].len =
|
pwrpriv->patterns[index].len =
|
||||||
@ -4810,7 +4810,7 @@ int rtw_dev_ssid_list_set(struct pno_ssid_list *pno_ssid_list,
|
|||||||
num = MAX_PNO_LIST_COUNT;
|
num = MAX_PNO_LIST_COUNT;
|
||||||
|
|
||||||
for (i = 0 ; i < num ; i++) {
|
for (i = 0 ; i < num ; i++) {
|
||||||
_rtw_memcpy(&pno_ssid_list->node[i].SSID,
|
memcpy(&pno_ssid_list->node[i].SSID,
|
||||||
ssid[i].SSID, ssid[i].SSID_len);
|
ssid[i].SSID, ssid[i].SSID_len);
|
||||||
pno_ssid_list->node[i].SSID_len = ssid[i].SSID_len;
|
pno_ssid_list->node[i].SSID_len = ssid[i].SSID_len;
|
||||||
}
|
}
|
||||||
|
150
core/rtw_xmit.c
150
core/rtw_xmit.c
@ -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);
|
||||||
@ -1048,7 +1048,7 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib
|
|||||||
TKIP_IV(pattrib->iv, psta->dot11txpn, 0);
|
TKIP_IV(pattrib->iv, psta->dot11txpn, 0);
|
||||||
|
|
||||||
|
|
||||||
_rtw_memcpy(pattrib->dot11tkiptxmickey.skey, psta->dot11tkiptxmickey.skey, 16);
|
memcpy(pattrib->dot11tkiptxmickey.skey, psta->dot11tkiptxmickey.skey, 16);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1078,7 +1078,7 @@ static s32 update_attrib_sec_info(_adapter *padapter, struct pkt_attrib *pattrib
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pattrib->encrypt > 0)
|
if (pattrib->encrypt > 0)
|
||||||
_rtw_memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16);
|
memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16);
|
||||||
|
|
||||||
|
|
||||||
if (pattrib->encrypt &&
|
if (pattrib->encrypt &&
|
||||||
@ -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;
|
||||||
@ -1329,32 +1329,32 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
|||||||
if (MLME_IS_MESH(padapter)) /* address resolve is done for mesh */
|
if (MLME_IS_MESH(padapter)) /* address resolve is done for mesh */
|
||||||
goto get_sta_info;
|
goto get_sta_info;
|
||||||
|
|
||||||
_rtw_memcpy(pattrib->dst, ðerhdr.h_dest, ETH_ALEN);
|
memcpy(pattrib->dst, ðerhdr.h_dest, ETH_ALEN);
|
||||||
_rtw_memcpy(pattrib->src, ðerhdr.h_source, ETH_ALEN);
|
memcpy(pattrib->src, ðerhdr.h_source, ETH_ALEN);
|
||||||
|
|
||||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
|
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
|
||||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
||||||
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
|
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
|
||||||
_rtw_memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_adhoc);
|
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_adhoc);
|
||||||
} else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
|
} else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
|
||||||
#ifdef CONFIG_TDLS
|
#ifdef CONFIG_TDLS
|
||||||
if (rtw_check_tdls_established(padapter, pattrib) == _TRUE)
|
if (rtw_check_tdls_established(padapter, pattrib) == _TRUE)
|
||||||
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); /* For TDLS direct link Tx, set ra to be same to dst */
|
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); /* For TDLS direct link Tx, set ra to be same to dst */
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
_rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN);
|
memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN);
|
||||||
_rtw_memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(pattrib->ta, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_sta);
|
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_sta);
|
||||||
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
|
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
|
||||||
_rtw_memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
|
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
|
||||||
_rtw_memcpy(pattrib->ta, get_bssid(pmlmepriv), ETH_ALEN);
|
memcpy(pattrib->ta, get_bssid(pmlmepriv), ETH_ALEN);
|
||||||
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_ap);
|
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_ap);
|
||||||
} else
|
} else
|
||||||
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)
|
||||||
@ -1677,7 +1677,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||||||
rtw_secgetmic(&micdata, &(mic[0]));
|
rtw_secgetmic(&micdata, &(mic[0]));
|
||||||
/* add mic code and add the mic code length in last_txcmdsz */
|
/* add mic code and add the mic code length in last_txcmdsz */
|
||||||
|
|
||||||
_rtw_memcpy(payload, &(mic[0]), 8);
|
memcpy(payload, &(mic[0]), 8);
|
||||||
pattrib->last_txcmdsz += 8;
|
pattrib->last_txcmdsz += 8;
|
||||||
|
|
||||||
payload = payload - pattrib->last_txcmdsz + 8;
|
payload = payload - pattrib->last_txcmdsz + 8;
|
||||||
@ -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); */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1775,9 +1775,9 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
|
|||||||
#ifdef CONFIG_TDLS
|
#ifdef CONFIG_TDLS
|
||||||
if (pattrib->direct_link == _TRUE) {
|
if (pattrib->direct_link == _TRUE) {
|
||||||
/* TDLS data transfer, ToDS=0, FrDs=0 */
|
/* TDLS data transfer, ToDS=0, FrDs=0 */
|
||||||
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
|
||||||
|
|
||||||
if (pattrib->qos_en)
|
if (pattrib->qos_en)
|
||||||
qos_option = _TRUE;
|
qos_option = _TRUE;
|
||||||
@ -1788,9 +1788,9 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
|
|||||||
/* 1.Data transfer to AP */
|
/* 1.Data transfer to AP */
|
||||||
/* 2.Arp pkt will relayed by AP */
|
/* 2.Arp pkt will relayed by AP */
|
||||||
SetToDs(fctrl);
|
SetToDs(fctrl);
|
||||||
_rtw_memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN);
|
memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
|
memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
|
||||||
|
|
||||||
if (pqospriv->qos_option)
|
if (pqospriv->qos_option)
|
||||||
qos_option = _TRUE;
|
qos_option = _TRUE;
|
||||||
@ -1798,17 +1798,17 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
|
|||||||
} else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)) {
|
} else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)) {
|
||||||
/* to_ds = 0, fr_ds = 1; */
|
/* to_ds = 0, fr_ds = 1; */
|
||||||
SetFrDs(fctrl);
|
SetFrDs(fctrl);
|
||||||
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, get_bssid(pmlmepriv), ETH_ALEN);
|
memcpy(pwlanhdr->addr2, get_bssid(pmlmepriv), ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
|
memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
|
||||||
|
|
||||||
if (pattrib->qos_en)
|
if (pattrib->qos_en)
|
||||||
qos_option = _TRUE;
|
qos_option = _TRUE;
|
||||||
} else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
|
} else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) ||
|
||||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
||||||
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, pattrib->ta, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
|
||||||
|
|
||||||
if (pattrib->qos_en)
|
if (pattrib->qos_en)
|
||||||
qos_option = _TRUE;
|
qos_option = _TRUE;
|
||||||
@ -2095,30 +2095,30 @@ s32 rtw_make_tdls_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattr
|
|||||||
case TUNNELED_PROBE_RSP:
|
case TUNNELED_PROBE_RSP:
|
||||||
case TDLS_DISCOVERY_REQUEST:
|
case TDLS_DISCOVERY_REQUEST:
|
||||||
SetToDs(fctrl);
|
SetToDs(fctrl);
|
||||||
_rtw_memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN);
|
memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
|
memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
|
||||||
break;
|
break;
|
||||||
case TDLS_CHANNEL_SWITCH_REQUEST:
|
case TDLS_CHANNEL_SWITCH_REQUEST:
|
||||||
case TDLS_CHANNEL_SWITCH_RESPONSE:
|
case TDLS_CHANNEL_SWITCH_RESPONSE:
|
||||||
case TDLS_PEER_PSM_RESPONSE:
|
case TDLS_PEER_PSM_RESPONSE:
|
||||||
case TDLS_PEER_TRAFFIC_RESPONSE:
|
case TDLS_PEER_TRAFFIC_RESPONSE:
|
||||||
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
|
||||||
tdls_seq = 1;
|
tdls_seq = 1;
|
||||||
break;
|
break;
|
||||||
case TDLS_TEARDOWN:
|
case TDLS_TEARDOWN:
|
||||||
if (ptxmgmt->status_code == _RSON_TDLS_TEAR_UN_RSN_) {
|
if (ptxmgmt->status_code == _RSON_TDLS_TEAR_UN_RSN_) {
|
||||||
_rtw_memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
|
||||||
tdls_seq = 1;
|
tdls_seq = 1;
|
||||||
} else {
|
} else {
|
||||||
SetToDs(fctrl);
|
SetToDs(fctrl);
|
||||||
_rtw_memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN);
|
memcpy(pwlanhdr->addr1, get_bssid(pmlmepriv), ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
|
memcpy(pwlanhdr->addr3, pattrib->dst, ETH_ALEN);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
@ -2241,7 +2241,7 @@ s32 rtw_xmit_tdls_coalesce(_adapter *padapter, struct xmit_frame *pxmitframe, st
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(pframe, pattrib->iv, pattrib->iv_len);
|
memcpy(pframe, pattrib->iv, pattrib->iv_len);
|
||||||
pframe += pattrib->iv_len;
|
pframe += pattrib->iv_len;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2256,7 +2256,7 @@ s32 rtw_xmit_tdls_coalesce(_adapter *padapter, struct xmit_frame *pxmitframe, st
|
|||||||
|
|
||||||
if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
|
if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
|
||||||
pframe += pattrib->pktlen;
|
pframe += pattrib->pktlen;
|
||||||
_rtw_memcpy(pframe, pattrib->icv, pattrib->icv_len);
|
memcpy(pframe, pattrib->icv, pattrib->icv_len);
|
||||||
pframe += pattrib->icv_len;
|
pframe += pattrib->icv_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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) ||
|
||||||
@ -2420,7 +2420,7 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
|
|||||||
|
|
||||||
/* adding icv, if necessary... */
|
/* adding icv, if necessary... */
|
||||||
if (pattrib->iv_len) {
|
if (pattrib->iv_len) {
|
||||||
_rtw_memcpy(pframe, pattrib->iv, pattrib->iv_len); // queue or new?
|
memcpy(pframe, pattrib->iv, pattrib->iv_len); // queue or new?
|
||||||
|
|
||||||
RTW_DBG("rtw_xmitframe_coalesce: keyid=%d pattrib->iv[3]=%.2x pframe=%.2x %.2x %.2x %.2x\n",
|
RTW_DBG("rtw_xmitframe_coalesce: keyid=%d pattrib->iv[3]=%.2x pframe=%.2x %.2x %.2x %.2x\n",
|
||||||
padapter->securitypriv.dot11PrivacyKeyIndex, pattrib->iv[3], *pframe, *(pframe + 1), *(pframe + 2), *(pframe + 3));
|
padapter->securitypriv.dot11PrivacyKeyIndex, pattrib->iv[3], *pframe, *(pframe + 1), *(pframe + 2), *(pframe + 3));
|
||||||
@ -2441,9 +2441,9 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
|
|||||||
#ifdef CONFIG_RTW_MESH
|
#ifdef CONFIG_RTW_MESH
|
||||||
if (MLME_IS_MESH(padapter)) {
|
if (MLME_IS_MESH(padapter)) {
|
||||||
/* mDA(6), mSA(6), len(2), mctrl */
|
/* mDA(6), mSA(6), len(2), mctrl */
|
||||||
_rtw_memcpy(pframe, pattrib_queue->mda, ETH_ALEN);
|
memcpy(pframe, pattrib_queue->mda, ETH_ALEN);
|
||||||
pframe += ETH_ALEN;
|
pframe += ETH_ALEN;
|
||||||
_rtw_memcpy(pframe, pattrib_queue->msa, ETH_ALEN);
|
memcpy(pframe, pattrib_queue->msa, ETH_ALEN);
|
||||||
pframe += ETH_ALEN;
|
pframe += ETH_ALEN;
|
||||||
len = (u16*)pframe;
|
len = (u16*)pframe;
|
||||||
pframe += 2;
|
pframe += 2;
|
||||||
@ -2453,9 +2453,9 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* 802.3 MAC Header DA(6) SA(6) Len(2)*/
|
/* 802.3 MAC Header DA(6) SA(6) Len(2)*/
|
||||||
_rtw_memcpy(pframe, pattrib_queue->dst, ETH_ALEN);
|
memcpy(pframe, pattrib_queue->dst, ETH_ALEN);
|
||||||
pframe += ETH_ALEN;
|
pframe += ETH_ALEN;
|
||||||
_rtw_memcpy(pframe, pattrib_queue->src, ETH_ALEN);
|
memcpy(pframe, pattrib_queue->src, ETH_ALEN);
|
||||||
pframe += ETH_ALEN;
|
pframe += ETH_ALEN;
|
||||||
len = (u16*)pframe;
|
len = (u16*)pframe;
|
||||||
pframe += 2;
|
pframe += 2;
|
||||||
@ -2489,9 +2489,9 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
|
|||||||
#ifdef CONFIG_RTW_MESH
|
#ifdef CONFIG_RTW_MESH
|
||||||
if (MLME_IS_MESH(padapter)) {
|
if (MLME_IS_MESH(padapter)) {
|
||||||
/* mDA(6), mSA(6), len(2), mctrl */
|
/* mDA(6), mSA(6), len(2), mctrl */
|
||||||
_rtw_memcpy(pframe, pattrib->mda, ETH_ALEN);
|
memcpy(pframe, pattrib->mda, ETH_ALEN);
|
||||||
pframe += ETH_ALEN;
|
pframe += ETH_ALEN;
|
||||||
_rtw_memcpy(pframe, pattrib->msa, ETH_ALEN);
|
memcpy(pframe, pattrib->msa, ETH_ALEN);
|
||||||
pframe += ETH_ALEN;
|
pframe += ETH_ALEN;
|
||||||
len = (u16*)pframe;
|
len = (u16*)pframe;
|
||||||
pframe += 2;
|
pframe += 2;
|
||||||
@ -2501,9 +2501,9 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* 802.3 MAC Header DA(6) SA(6) Len(2) */
|
/* 802.3 MAC Header DA(6) SA(6) Len(2) */
|
||||||
_rtw_memcpy(pframe, pattrib->dst, ETH_ALEN);
|
memcpy(pframe, pattrib->dst, ETH_ALEN);
|
||||||
pframe += ETH_ALEN;
|
pframe += ETH_ALEN;
|
||||||
_rtw_memcpy(pframe, pattrib->src, ETH_ALEN);
|
memcpy(pframe, pattrib->src, ETH_ALEN);
|
||||||
pframe += ETH_ALEN;
|
pframe += ETH_ALEN;
|
||||||
len = (u16*)pframe;
|
len = (u16*)pframe;
|
||||||
pframe += 2;
|
pframe += 2;
|
||||||
@ -2527,7 +2527,7 @@ s32 rtw_xmitframe_coalesce_amsdu(_adapter *padapter, struct xmit_frame *pxmitfra
|
|||||||
((pattrib->bswenc) ? pattrib->icv_len : 0) ;
|
((pattrib->bswenc) ? pattrib->icv_len : 0) ;
|
||||||
|
|
||||||
if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
|
if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
|
||||||
_rtw_memcpy(pframe, pattrib->icv, pattrib->icv_len);
|
memcpy(pframe, pattrib->icv, pattrib->icv_len);
|
||||||
pframe += pattrib->icv_len;
|
pframe += pattrib->icv_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|
||||||
@ -2683,7 +2683,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
_rtw_memcpy(pframe, pattrib->iv, pattrib->iv_len);
|
memcpy(pframe, pattrib->iv, pattrib->iv_len);
|
||||||
|
|
||||||
|
|
||||||
pframe += pattrib->iv_len;
|
pframe += pattrib->iv_len;
|
||||||
@ -2718,7 +2718,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm
|
|||||||
pframe += mem_sz;
|
pframe += mem_sz;
|
||||||
|
|
||||||
if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
|
if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
|
||||||
_rtw_memcpy(pframe, pattrib->icv, pattrib->icv_len);
|
memcpy(pframe, pattrib->icv, pattrib->icv_len);
|
||||||
pframe += pattrib->icv_len;
|
pframe += pattrib->icv_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2739,7 +2739,7 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm
|
|||||||
addr = (SIZE_PTR)(pframe);
|
addr = (SIZE_PTR)(pframe);
|
||||||
|
|
||||||
mem_start = (unsigned char *)RND4(addr) + hw_hdr_offset;
|
mem_start = (unsigned char *)RND4(addr) + hw_hdr_offset;
|
||||||
_rtw_memcpy(mem_start, pbuf_start + hw_hdr_offset, pattrib->hdrlen);
|
memcpy(mem_start, pbuf_start + hw_hdr_offset, pattrib->hdrlen);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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;
|
||||||
@ -2907,14 +2907,14 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
|||||||
frame_body_len = pattrib->pktlen - sizeof(struct rtw_ieee80211_hdr_3addr);
|
frame_body_len = pattrib->pktlen - sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||||
|
|
||||||
/* conscruct AAD, copy frame control field */
|
/* conscruct AAD, copy frame control field */
|
||||||
_rtw_memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2);
|
memcpy(BIP_AAD, &pwlanhdr->frame_ctl, 2);
|
||||||
ClearRetry(BIP_AAD);
|
ClearRetry(BIP_AAD);
|
||||||
ClearPwrMgt(BIP_AAD);
|
ClearPwrMgt(BIP_AAD);
|
||||||
ClearMData(BIP_AAD);
|
ClearMData(BIP_AAD);
|
||||||
/* conscruct AAD, copy address 1 to address 3 */
|
/* conscruct AAD, copy address 1 to address 3 */
|
||||||
_rtw_memcpy(BIP_AAD + 2, pwlanhdr->addr1, 18);
|
memcpy(BIP_AAD + 2, pwlanhdr->addr1, 18);
|
||||||
/* copy management fram body */
|
/* copy management fram body */
|
||||||
_rtw_memcpy(BIP_AAD + BIP_AAD_SIZE, MGMT_body, frame_body_len);
|
memcpy(BIP_AAD + BIP_AAD_SIZE, MGMT_body, frame_body_len);
|
||||||
|
|
||||||
#if DBG_MGMT_XMIT_BIP_DUMP
|
#if DBG_MGMT_XMIT_BIP_DUMP
|
||||||
/* dump total packet include MME with zero MIC */
|
/* dump total packet include MME with zero MIC */
|
||||||
@ -2944,7 +2944,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* copy right BIP mic value, total is 128bits, we use the 0~63 bits */
|
/* copy right BIP mic value, total is 128bits, we use the 0~63 bits */
|
||||||
_rtw_memcpy(pframe - 8, mic, 8);
|
memcpy(pframe - 8, mic, 8);
|
||||||
|
|
||||||
#if DBG_MGMT_XMIT_BIP_DUMP
|
#if DBG_MGMT_XMIT_BIP_DUMP
|
||||||
/*dump all packet after mic ok */
|
/*dump all packet after mic ok */
|
||||||
@ -2977,7 +2977,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_rtw_memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16);
|
memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey, 16);
|
||||||
|
|
||||||
/* To use wrong key */
|
/* To use wrong key */
|
||||||
if (pattrib->key_type == IEEE80211W_WRONG_KEY) {
|
if (pattrib->key_type == IEEE80211W_WRONG_KEY) {
|
||||||
@ -3001,7 +3001,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* bakeup original management packet */
|
/* bakeup original management packet */
|
||||||
_rtw_memcpy(tmp_buf, pframe, pattrib->pktlen);
|
memcpy(tmp_buf, pframe, pattrib->pktlen);
|
||||||
/* move to data portion */
|
/* move to data portion */
|
||||||
pframe += pattrib->hdrlen;
|
pframe += pattrib->hdrlen;
|
||||||
|
|
||||||
@ -3025,10 +3025,10 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* insert iv header into management frame */
|
/* insert iv header into management frame */
|
||||||
_rtw_memcpy(pframe, pattrib->iv, pattrib->iv_len);
|
memcpy(pframe, pattrib->iv, pattrib->iv_len);
|
||||||
pframe += pattrib->iv_len;
|
pframe += pattrib->iv_len;
|
||||||
/* copy mgmt data portion after CCMP header */
|
/* copy mgmt data portion after CCMP header */
|
||||||
_rtw_memcpy(pframe, tmp_buf + pattrib->hdrlen, pattrib->pktlen - pattrib->hdrlen);
|
memcpy(pframe, tmp_buf + pattrib->hdrlen, pattrib->pktlen - pattrib->hdrlen);
|
||||||
/* move pframe to end of mgmt pkt */
|
/* move pframe to end of mgmt pkt */
|
||||||
pframe += pattrib->pktlen - pattrib->hdrlen;
|
pframe += pattrib->pktlen - pattrib->hdrlen;
|
||||||
/* add 8 bytes CCMP IV header to length */
|
/* add 8 bytes CCMP IV header to length */
|
||||||
@ -3046,7 +3046,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
|
if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
|
||||||
_rtw_memcpy(pframe, pattrib->icv, pattrib->icv_len);
|
memcpy(pframe, pattrib->icv, pattrib->icv_len);
|
||||||
pframe += pattrib->icv_len;
|
pframe += pattrib->icv_len;
|
||||||
}
|
}
|
||||||
/* add 8 bytes MIC */
|
/* add 8 bytes MIC */
|
||||||
@ -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
|
||||||
@ -4424,7 +4424,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
|
|||||||
|
|
||||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||||
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
|
||||||
// _rtw_memcpy(pframe, (void *)checking, len);
|
// memcpy(pframe, (void *)checking, len);
|
||||||
_rtw_pktfile_read(&pktfile, pframe, len);
|
_rtw_pktfile_read(&pktfile, pframe, len);
|
||||||
|
|
||||||
|
|
||||||
@ -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
|
||||||
|
|
||||||
@ -5730,8 +5730,8 @@ void rtw_tx_desc_backup(_adapter *padapter, struct xmit_frame *pxmitframe, u8 de
|
|||||||
|
|
||||||
pxmit_buf = pxmitframe->pxmitbuf->pbuf;
|
pxmit_buf = pxmitframe->pxmitbuf->pbuf;
|
||||||
|
|
||||||
_rtw_memcpy(tx_backup[hwq][backup_idx[hwq]].tx_bak_desc, pxmit_buf, desc_size);
|
memcpy(tx_backup[hwq][backup_idx[hwq]].tx_bak_desc, pxmit_buf, desc_size);
|
||||||
_rtw_memcpy(tx_backup[hwq][backup_idx[hwq]].tx_bak_data_hdr, pxmit_buf+desc_size, TX_BAK_DATA_LEN);
|
memcpy(tx_backup[hwq][backup_idx[hwq]].tx_bak_data_hdr, pxmit_buf+desc_size, TX_BAK_DATA_LEN);
|
||||||
|
|
||||||
tmp32 = rtw_read32(padapter, get_txbd_rw_reg(hwq));
|
tmp32 = rtw_read32(padapter, get_txbd_rw_reg(hwq));
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ void DBG_BT_INFO(u8 *dbgmsg)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
pbuf = pinfo->info + pinfo->len;
|
pbuf = pinfo->info + pinfo->len;
|
||||||
_rtw_memcpy(pbuf, dbgmsg, msglen);
|
memcpy(pbuf, dbgmsg, msglen);
|
||||||
pinfo->len += msglen;
|
pinfo->len += msglen;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -747,7 +747,7 @@ static u8 _btmpoper_cmd(PBTC_COEXIST pBtCoexist, u8 opcode, u8 opcodever, u8 *cm
|
|||||||
buf[0] = (opcodever & 0xF) | (seq << 4);
|
buf[0] = (opcodever & 0xF) | (seq << 4);
|
||||||
buf[1] = opcode;
|
buf[1] = opcode;
|
||||||
if (cmd && size)
|
if (cmd && size)
|
||||||
_rtw_memcpy(buf + 2, cmd, size);
|
memcpy(buf + 2, cmd, size);
|
||||||
|
|
||||||
GLBtcBtMpRptWait = _TRUE;
|
GLBtcBtMpRptWait = _TRUE;
|
||||||
GLBtcBtMpRptWiFiOK = _FALSE;
|
GLBtcBtMpRptWiFiOK = _FALSE;
|
||||||
@ -1486,7 +1486,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
|
|||||||
u8 dataLen = *pU1Tmp;
|
u8 dataLen = *pU1Tmp;
|
||||||
u8 tmpBuf[BTC_TMP_BUF_SHORT];
|
u8 tmpBuf[BTC_TMP_BUF_SHORT];
|
||||||
if (dataLen)
|
if (dataLen)
|
||||||
_rtw_memcpy(tmpBuf, pU1Tmp + 1, dataLen);
|
memcpy(tmpBuf, pU1Tmp + 1, dataLen);
|
||||||
BT_SendEventExtBtInfoControl(padapter, dataLen, &tmpBuf[0]);
|
BT_SendEventExtBtInfoControl(padapter, dataLen, &tmpBuf[0]);
|
||||||
}
|
}
|
||||||
#else /* !CONFIG_BT_COEXIST_SOCKET_TRX */
|
#else /* !CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||||
@ -1500,7 +1500,7 @@ u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
|
|||||||
u8 dataLen = *pU1Tmp;
|
u8 dataLen = *pU1Tmp;
|
||||||
u8 tmpBuf[BTC_TMP_BUF_SHORT];
|
u8 tmpBuf[BTC_TMP_BUF_SHORT];
|
||||||
if (dataLen)
|
if (dataLen)
|
||||||
_rtw_memcpy(tmpBuf, pU1Tmp + 1, dataLen);
|
memcpy(tmpBuf, pU1Tmp + 1, dataLen);
|
||||||
BT_SendEventExtBtCoexControl(padapter, _FALSE, dataLen, &tmpBuf[0]);
|
BT_SendEventExtBtCoexControl(padapter, _FALSE, dataLen, &tmpBuf[0]);
|
||||||
}
|
}
|
||||||
#else /* !CONFIG_BT_COEXIST_SOCKET_TRX */
|
#else /* !CONFIG_BT_COEXIST_SOCKET_TRX */
|
||||||
@ -2304,7 +2304,7 @@ static COL_H2C_STATUS halbtcoutsrc_check_c2h_ack(PADAPTER Adapter, PCOL_SINGLE_H
|
|||||||
}
|
}
|
||||||
/* else */
|
/* else */
|
||||||
{
|
{
|
||||||
_rtw_memmove(&pH2cRecord->c2h_ack_buf[0], &gl_coex_offload.c2h_ack_buf[req_num], gl_coex_offload.c2h_ack_len[req_num]);
|
memmove(&pH2cRecord->c2h_ack_buf[0], &gl_coex_offload.c2h_ack_buf[req_num], gl_coex_offload.c2h_ack_len[req_num]);
|
||||||
pH2cRecord->c2h_ack_len = gl_coex_offload.c2h_ack_len[req_num];
|
pH2cRecord->c2h_ack_len = gl_coex_offload.c2h_ack_len[req_num];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2337,7 +2337,7 @@ COL_H2C_STATUS halbtcoutsrc_CoexH2cProcess(void *pBtCoexist,
|
|||||||
gl_coex_offload.h2c_req_num++;
|
gl_coex_offload.h2c_req_num++;
|
||||||
gl_coex_offload.h2c_req_num %= 16;
|
gl_coex_offload.h2c_req_num %= 16;
|
||||||
|
|
||||||
_rtw_memmove(&pcol_h2c->buf[0], ph2c_par, h2c_par_len);
|
memmove(&pcol_h2c->buf[0], ph2c_par, h2c_par_len);
|
||||||
|
|
||||||
|
|
||||||
col_h2c_len = h2c_par_len + 2; /* 2=sizeof(OPCode, OPCode_version and Request number) */
|
col_h2c_len = h2c_par_len + 2; /* 2=sizeof(OPCode, OPCode_version and Request number) */
|
||||||
@ -2347,7 +2347,7 @@ COL_H2C_STATUS halbtcoutsrc_CoexH2cProcess(void *pBtCoexist,
|
|||||||
|
|
||||||
gl_coex_offload.h2c_record[opcode].count++;
|
gl_coex_offload.h2c_record[opcode].count++;
|
||||||
gl_coex_offload.h2c_record[opcode].h2c_len = col_h2c_len;
|
gl_coex_offload.h2c_record[opcode].h2c_len = col_h2c_len;
|
||||||
_rtw_memmove((PVOID)&gl_coex_offload.h2c_record[opcode].h2c_buf[0], (PVOID)pcol_h2c, col_h2c_len);
|
memmove((PVOID)&gl_coex_offload.h2c_record[opcode].h2c_buf[0], (PVOID)pcol_h2c, col_h2c_len);
|
||||||
|
|
||||||
h2c_status = halbtcoutsrc_send_h2c(Adapter, pcol_h2c, col_h2c_len);
|
h2c_status = halbtcoutsrc_send_h2c(Adapter, pcol_h2c, col_h2c_len);
|
||||||
|
|
||||||
@ -2617,7 +2617,7 @@ static void BT_CoexOffloadC2hAckCheck(PADAPTER Adapter, u8 *tmpBuf, u8 length)
|
|||||||
p_c2h_ack = (PCOL_C2H_ACK)tmpBuf;
|
p_c2h_ack = (PCOL_C2H_ACK)tmpBuf;
|
||||||
req_num = p_c2h_ack->req_num;
|
req_num = p_c2h_ack->req_num;
|
||||||
|
|
||||||
_rtw_memmove(&gl_coex_offload.c2h_ack_buf[req_num][0], tmpBuf, length);
|
memmove(&gl_coex_offload.c2h_ack_buf[req_num][0], tmpBuf, length);
|
||||||
gl_coex_offload.c2h_ack_len[req_num] = length;
|
gl_coex_offload.c2h_ack_len[req_num] = length;
|
||||||
|
|
||||||
complete(&gl_coex_offload.c2h_event[req_num]);
|
complete(&gl_coex_offload.c2h_event[req_num]);
|
||||||
@ -2648,13 +2648,13 @@ static void BT_CoexOffloadC2hIndCheck(PADAPTER Adapter, u8 *tmpBuf, u8 length)
|
|||||||
ind_version = p_c2h_ind->version;
|
ind_version = p_c2h_ind->version;
|
||||||
ind_length = p_c2h_ind->length;
|
ind_length = p_c2h_ind->length;
|
||||||
|
|
||||||
_rtw_memmove(&gl_coex_offload.c2h_ind_buf[0], tmpBuf, length);
|
memmove(&gl_coex_offload.c2h_ind_buf[0], tmpBuf, length);
|
||||||
gl_coex_offload.c2h_ind_len = length;
|
gl_coex_offload.c2h_ind_len = length;
|
||||||
|
|
||||||
/* log */
|
/* log */
|
||||||
gl_coex_offload.c2h_ind_record[ind_type].count++;
|
gl_coex_offload.c2h_ind_record[ind_type].count++;
|
||||||
gl_coex_offload.c2h_ind_record[ind_type].status[COL_STATUS_C2H_OK]++;
|
gl_coex_offload.c2h_ind_record[ind_type].status[COL_STATUS_C2H_OK]++;
|
||||||
_rtw_memmove(&gl_coex_offload.c2h_ind_record[ind_type].ind_buf[0], tmpBuf, length);
|
memmove(&gl_coex_offload.c2h_ind_record[ind_type].ind_buf[0], tmpBuf, length);
|
||||||
gl_coex_offload.c2h_ind_record[ind_type].ind_len = length;
|
gl_coex_offload.c2h_ind_record[ind_type].ind_len = length;
|
||||||
|
|
||||||
gl_coex_offload.c2h_ind_status[COL_STATUS_C2H_OK]++;
|
gl_coex_offload.c2h_ind_status[COL_STATUS_C2H_OK]++;
|
||||||
@ -5058,7 +5058,7 @@ void hal_btcoex_BtMpRptNotify(PADAPTER padapter, u8 length, u8 *tmpBuf)
|
|||||||
|
|
||||||
GLBtcBtMpRptSeq = seq;
|
GLBtcBtMpRptSeq = seq;
|
||||||
GLBtcBtMpRptStatus = status;
|
GLBtcBtMpRptStatus = status;
|
||||||
_rtw_memcpy(GLBtcBtMpRptRsp, tmpBuf + 3, len);
|
memcpy(GLBtcBtMpRptRsp, tmpBuf + 3, len);
|
||||||
GLBtcBtMpRptRspSize = len;
|
GLBtcBtMpRptRspSize = len;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -5220,7 +5220,7 @@ u32 hal_btcoex_GetRaMask(PADAPTER padapter)
|
|||||||
void hal_btcoex_RecordPwrMode(PADAPTER padapter, u8 *pCmdBuf, u8 cmdLen)
|
void hal_btcoex_RecordPwrMode(PADAPTER padapter, u8 *pCmdBuf, u8 cmdLen)
|
||||||
{
|
{
|
||||||
|
|
||||||
_rtw_memcpy(GLBtCoexist.pwrModeVal, pCmdBuf, cmdLen);
|
memcpy(GLBtCoexist.pwrModeVal, pCmdBuf, cmdLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hal_btcoex_DisplayBtCoexInfo(PADAPTER padapter, u8 *pbuf, u32 bufsize)
|
void hal_btcoex_DisplayBtCoexInfo(PADAPTER padapter, u8 *pbuf, u32 bufsize)
|
||||||
|
306
hal/hal_com.c
306
hal/hal_com.c
File diff suppressed because it is too large
Load Diff
@ -4094,7 +4094,7 @@ phy_ConfigMACWithParaFile(
|
|||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
pHalData->mac_reg = vzalloc(rlen);
|
pHalData->mac_reg = vzalloc(rlen);
|
||||||
if (pHalData->mac_reg) {
|
if (pHalData->mac_reg) {
|
||||||
_rtw_memcpy(pHalData->mac_reg, pHalData->para_file_buf, rlen);
|
memcpy(pHalData->mac_reg, pHalData->para_file_buf, rlen);
|
||||||
pHalData->mac_reg_len = rlen;
|
pHalData->mac_reg_len = rlen;
|
||||||
} else
|
} else
|
||||||
RTW_INFO("%s mac_reg alloc fail !\n", __FUNCTION__);
|
RTW_INFO("%s mac_reg alloc fail !\n", __FUNCTION__);
|
||||||
@ -4102,7 +4102,7 @@ phy_ConfigMACWithParaFile(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((pHalData->mac_reg_len != 0) && (pHalData->mac_reg != NULL)) {
|
if ((pHalData->mac_reg_len != 0) && (pHalData->mac_reg != NULL)) {
|
||||||
_rtw_memcpy(pHalData->para_file_buf, pHalData->mac_reg, pHalData->mac_reg_len);
|
memcpy(pHalData->para_file_buf, pHalData->mac_reg, pHalData->mac_reg_len);
|
||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
} else
|
} else
|
||||||
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
||||||
@ -4173,7 +4173,7 @@ phy_ConfigBBWithParaFile(
|
|||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
pBuf = vzalloc(rlen);
|
pBuf = vzalloc(rlen);
|
||||||
if (pBuf) {
|
if (pBuf) {
|
||||||
_rtw_memcpy(pBuf, pHalData->para_file_buf, rlen);
|
memcpy(pBuf, pHalData->para_file_buf, rlen);
|
||||||
*pBufLen = rlen;
|
*pBufLen = rlen;
|
||||||
|
|
||||||
switch (ConfigType) {
|
switch (ConfigType) {
|
||||||
@ -4190,7 +4190,7 @@ phy_ConfigBBWithParaFile(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((pBufLen != NULL) && (*pBufLen != 0) && (pBuf != NULL)) {
|
if ((pBufLen != NULL) && (*pBufLen != 0) && (pBuf != NULL)) {
|
||||||
_rtw_memcpy(pHalData->para_file_buf, pBuf, *pBufLen);
|
memcpy(pHalData->para_file_buf, pBuf, *pBufLen);
|
||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
} else
|
} else
|
||||||
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
||||||
@ -4479,7 +4479,7 @@ phy_ConfigBBWithPgParaFile(
|
|||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
pHalData->bb_phy_reg_pg = vzalloc(rlen);
|
pHalData->bb_phy_reg_pg = vzalloc(rlen);
|
||||||
if (pHalData->bb_phy_reg_pg) {
|
if (pHalData->bb_phy_reg_pg) {
|
||||||
_rtw_memcpy(pHalData->bb_phy_reg_pg, pHalData->para_file_buf, rlen);
|
memcpy(pHalData->bb_phy_reg_pg, pHalData->para_file_buf, rlen);
|
||||||
pHalData->bb_phy_reg_pg_len = rlen;
|
pHalData->bb_phy_reg_pg_len = rlen;
|
||||||
} else
|
} else
|
||||||
RTW_INFO("%s bb_phy_reg_pg alloc fail !\n", __FUNCTION__);
|
RTW_INFO("%s bb_phy_reg_pg alloc fail !\n", __FUNCTION__);
|
||||||
@ -4487,7 +4487,7 @@ phy_ConfigBBWithPgParaFile(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((pHalData->bb_phy_reg_pg_len != 0) && (pHalData->bb_phy_reg_pg != NULL)) {
|
if ((pHalData->bb_phy_reg_pg_len != 0) && (pHalData->bb_phy_reg_pg != NULL)) {
|
||||||
_rtw_memcpy(pHalData->para_file_buf, pHalData->bb_phy_reg_pg, pHalData->bb_phy_reg_pg_len);
|
memcpy(pHalData->para_file_buf, pHalData->bb_phy_reg_pg, pHalData->bb_phy_reg_pg_len);
|
||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
} else
|
} else
|
||||||
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
||||||
@ -4528,7 +4528,7 @@ phy_ConfigBBWithMpParaFile(
|
|||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
pHalData->bb_phy_reg_mp = vzalloc(rlen);
|
pHalData->bb_phy_reg_mp = vzalloc(rlen);
|
||||||
if (pHalData->bb_phy_reg_mp) {
|
if (pHalData->bb_phy_reg_mp) {
|
||||||
_rtw_memcpy(pHalData->bb_phy_reg_mp, pHalData->para_file_buf, rlen);
|
memcpy(pHalData->bb_phy_reg_mp, pHalData->para_file_buf, rlen);
|
||||||
pHalData->bb_phy_reg_mp_len = rlen;
|
pHalData->bb_phy_reg_mp_len = rlen;
|
||||||
} else
|
} else
|
||||||
RTW_INFO("%s bb_phy_reg_mp alloc fail !\n", __FUNCTION__);
|
RTW_INFO("%s bb_phy_reg_mp alloc fail !\n", __FUNCTION__);
|
||||||
@ -4536,7 +4536,7 @@ phy_ConfigBBWithMpParaFile(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((pHalData->bb_phy_reg_mp_len != 0) && (pHalData->bb_phy_reg_mp != NULL)) {
|
if ((pHalData->bb_phy_reg_mp_len != 0) && (pHalData->bb_phy_reg_mp != NULL)) {
|
||||||
_rtw_memcpy(pHalData->para_file_buf, pHalData->bb_phy_reg_mp, pHalData->bb_phy_reg_mp_len);
|
memcpy(pHalData->para_file_buf, pHalData->bb_phy_reg_mp, pHalData->bb_phy_reg_mp_len);
|
||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
} else
|
} else
|
||||||
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
||||||
@ -4632,7 +4632,7 @@ PHY_ConfigRFWithParaFile(
|
|||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
pBuf = vzalloc(rlen);
|
pBuf = vzalloc(rlen);
|
||||||
if (pBuf) {
|
if (pBuf) {
|
||||||
_rtw_memcpy(pBuf, pHalData->para_file_buf, rlen);
|
memcpy(pBuf, pHalData->para_file_buf, rlen);
|
||||||
*pBufLen = rlen;
|
*pBufLen = rlen;
|
||||||
|
|
||||||
switch (eRFPath) {
|
switch (eRFPath) {
|
||||||
@ -4652,7 +4652,7 @@ PHY_ConfigRFWithParaFile(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((pBufLen != NULL) && (*pBufLen != 0) && (pBuf != NULL)) {
|
if ((pBufLen != NULL) && (*pBufLen != 0) && (pBuf != NULL)) {
|
||||||
_rtw_memcpy(pHalData->para_file_buf, pBuf, *pBufLen);
|
memcpy(pHalData->para_file_buf, pBuf, *pBufLen);
|
||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
} else
|
} else
|
||||||
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
||||||
@ -4831,7 +4831,7 @@ PHY_ConfigRFWithTxPwrTrackParaFile(
|
|||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
pHalData->rf_tx_pwr_track = vzalloc(rlen);
|
pHalData->rf_tx_pwr_track = vzalloc(rlen);
|
||||||
if (pHalData->rf_tx_pwr_track) {
|
if (pHalData->rf_tx_pwr_track) {
|
||||||
_rtw_memcpy(pHalData->rf_tx_pwr_track, pHalData->para_file_buf, rlen);
|
memcpy(pHalData->rf_tx_pwr_track, pHalData->para_file_buf, rlen);
|
||||||
pHalData->rf_tx_pwr_track_len = rlen;
|
pHalData->rf_tx_pwr_track_len = rlen;
|
||||||
} else
|
} else
|
||||||
RTW_INFO("%s rf_tx_pwr_track alloc fail !\n", __FUNCTION__);
|
RTW_INFO("%s rf_tx_pwr_track alloc fail !\n", __FUNCTION__);
|
||||||
@ -4839,7 +4839,7 @@ PHY_ConfigRFWithTxPwrTrackParaFile(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((pHalData->rf_tx_pwr_track_len != 0) && (pHalData->rf_tx_pwr_track != NULL)) {
|
if ((pHalData->rf_tx_pwr_track_len != 0) && (pHalData->rf_tx_pwr_track != NULL)) {
|
||||||
_rtw_memcpy(pHalData->para_file_buf, pHalData->rf_tx_pwr_track, pHalData->rf_tx_pwr_track_len);
|
memcpy(pHalData->para_file_buf, pHalData->rf_tx_pwr_track, pHalData->rf_tx_pwr_track_len);
|
||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
} else
|
} else
|
||||||
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
||||||
@ -5164,7 +5164,7 @@ phy_ParsePowerLimitTableFile(
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(regulation[forCnt], szLine + i_ns, i - i_ns);
|
memcpy(regulation[forCnt], szLine + i_ns, i - i_ns);
|
||||||
regulation[forCnt][i - i_ns] = '\0';
|
regulation[forCnt][i - i_ns] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5330,7 +5330,7 @@ PHY_ConfigRFWithPowerLimitTableParaFile(
|
|||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
pHalData->rf_tx_pwr_lmt = vzalloc(rlen);
|
pHalData->rf_tx_pwr_lmt = vzalloc(rlen);
|
||||||
if (pHalData->rf_tx_pwr_lmt) {
|
if (pHalData->rf_tx_pwr_lmt) {
|
||||||
_rtw_memcpy(pHalData->rf_tx_pwr_lmt, pHalData->para_file_buf, rlen);
|
memcpy(pHalData->rf_tx_pwr_lmt, pHalData->para_file_buf, rlen);
|
||||||
pHalData->rf_tx_pwr_lmt_len = rlen;
|
pHalData->rf_tx_pwr_lmt_len = rlen;
|
||||||
} else
|
} else
|
||||||
RTW_INFO("%s rf_tx_pwr_lmt alloc fail !\n", __FUNCTION__);
|
RTW_INFO("%s rf_tx_pwr_lmt alloc fail !\n", __FUNCTION__);
|
||||||
@ -5338,7 +5338,7 @@ PHY_ConfigRFWithPowerLimitTableParaFile(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((pHalData->rf_tx_pwr_lmt_len != 0) && (pHalData->rf_tx_pwr_lmt != NULL)) {
|
if ((pHalData->rf_tx_pwr_lmt_len != 0) && (pHalData->rf_tx_pwr_lmt != NULL)) {
|
||||||
_rtw_memcpy(pHalData->para_file_buf, pHalData->rf_tx_pwr_lmt, pHalData->rf_tx_pwr_lmt_len);
|
memcpy(pHalData->para_file_buf, pHalData->rf_tx_pwr_lmt, pHalData->rf_tx_pwr_lmt_len);
|
||||||
rtStatus = _SUCCESS;
|
rtStatus = _SUCCESS;
|
||||||
} else
|
} else
|
||||||
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
RTW_INFO("%s(): Critical Error !!!\n", __FUNCTION__);
|
||||||
|
@ -204,7 +204,7 @@ void rtw_acs_get_rst(_adapter *adapter)
|
|||||||
(rpt.nhm_rpt_stamp == hal_data->acs.trig_rpt.nhm_rpt_stamp)){
|
(rpt.nhm_rpt_stamp == hal_data->acs.trig_rpt.nhm_rpt_stamp)){
|
||||||
hal_data->acs.clm_ratio[chan_idx] = rpt.clm_ratio;
|
hal_data->acs.clm_ratio[chan_idx] = rpt.clm_ratio;
|
||||||
hal_data->acs.nhm_ratio[chan_idx] = rpt.nhm_ratio;
|
hal_data->acs.nhm_ratio[chan_idx] = rpt.nhm_ratio;
|
||||||
_rtw_memcpy(&hal_data->acs.nhm[chan_idx][0], rpt.nhm_result, NHM_RPT_NUM);
|
memcpy(&hal_data->acs.nhm[chan_idx][0], rpt.nhm_result, NHM_RPT_NUM);
|
||||||
|
|
||||||
/*RTW_INFO("[ACS] get_rst success (rst = 0x%02x, clm_stamp:%d:%d, nhm_stamp:%d:%d)\n",
|
/*RTW_INFO("[ACS] get_rst success (rst = 0x%02x, clm_stamp:%d:%d, nhm_stamp:%d:%d)\n",
|
||||||
rst,
|
rst,
|
||||||
|
@ -210,7 +210,7 @@ static u8 _halmac_sdio_reg_read_n(void *p, u32 offset, u32 size, u8 *data)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(data, pbuf, size);
|
memcpy(data, pbuf, size);
|
||||||
rst = RTW_HALMAC_SUCCESS;
|
rst = RTW_HALMAC_SUCCESS;
|
||||||
exit:
|
exit:
|
||||||
rtw_mfree(pbuf, sdio_read_size);
|
rtw_mfree(pbuf, sdio_read_size);
|
||||||
@ -230,7 +230,7 @@ static void _halmac_sdio_reg_write_8(void *p, u32 offset, u8 val)
|
|||||||
pbuf = rtw_zmalloc(1);
|
pbuf = rtw_zmalloc(1);
|
||||||
if (!pbuf)
|
if (!pbuf)
|
||||||
return;
|
return;
|
||||||
_rtw_memcpy(pbuf, &val, 1);
|
memcpy(pbuf, &val, 1);
|
||||||
|
|
||||||
ret = rtw_sdio_write_cmd53(d, offset, pbuf, 1);
|
ret = rtw_sdio_write_cmd53(d, offset, pbuf, 1);
|
||||||
if (ret == _FAIL)
|
if (ret == _FAIL)
|
||||||
@ -252,7 +252,7 @@ static void _halmac_sdio_reg_write_16(void *p, u32 offset, u16 val)
|
|||||||
pbuf = rtw_zmalloc(2);
|
pbuf = rtw_zmalloc(2);
|
||||||
if (!pbuf)
|
if (!pbuf)
|
||||||
return;
|
return;
|
||||||
_rtw_memcpy(pbuf, &val, 2);
|
memcpy(pbuf, &val, 2);
|
||||||
|
|
||||||
ret = rtw_sdio_write_cmd53(d, offset, pbuf, 2);
|
ret = rtw_sdio_write_cmd53(d, offset, pbuf, 2);
|
||||||
if (ret == _FAIL)
|
if (ret == _FAIL)
|
||||||
@ -274,7 +274,7 @@ static void _halmac_sdio_reg_write_32(void *p, u32 offset, u32 val)
|
|||||||
pbuf = rtw_zmalloc(4);
|
pbuf = rtw_zmalloc(4);
|
||||||
if (!pbuf)
|
if (!pbuf)
|
||||||
return;
|
return;
|
||||||
_rtw_memcpy(pbuf, &val, 4);
|
memcpy(pbuf, &val, 4);
|
||||||
|
|
||||||
ret = rtw_sdio_write_cmd53(d, offset, pbuf, 4);
|
ret = rtw_sdio_write_cmd53(d, offset, pbuf, 4);
|
||||||
if (ret == _FAIL)
|
if (ret == _FAIL)
|
||||||
@ -396,7 +396,7 @@ static void *_halmac_malloc(void *p, u32 size)
|
|||||||
|
|
||||||
static u8 _halmac_memcpy(void *p, void *dest, void *src, u32 size)
|
static u8 _halmac_memcpy(void *p, void *dest, void *src, u32 size)
|
||||||
{
|
{
|
||||||
_rtw_memcpy(dest, src, size);
|
memcpy(dest, src, size);
|
||||||
return RTW_HALMAC_SUCCESS;
|
return RTW_HALMAC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -729,7 +729,7 @@ static u8 _halmac_event_indication(void *p, enum halmac_feature_id feature_id, e
|
|||||||
cpsz = size;
|
cpsz = size;
|
||||||
}
|
}
|
||||||
if (cpsz && indicator->buffer)
|
if (cpsz && indicator->buffer)
|
||||||
_rtw_memcpy(indicator->buffer, buf, cpsz);
|
memcpy(indicator->buffer, buf, cpsz);
|
||||||
|
|
||||||
rtw_sctx_done(&sctx);
|
rtw_sctx_done(&sctx);
|
||||||
|
|
||||||
@ -841,7 +841,7 @@ static void _read_register(struct dvobj_priv *d, u32 addr, u32 cnt, u8 *buf)
|
|||||||
if (i) {
|
if (i) {
|
||||||
val32 = cpu_to_le32(rtw_read32(a, addr & ~0x3));
|
val32 = cpu_to_le32(rtw_read32(a, addr & ~0x3));
|
||||||
n = 4 - i;
|
n = 4 - i;
|
||||||
_rtw_memcpy(buf, ((u8 *)&val32) + i, n);
|
memcpy(buf, ((u8 *)&val32) + i, n);
|
||||||
i = n;
|
i = n;
|
||||||
cnt -= n;
|
cnt -= n;
|
||||||
}
|
}
|
||||||
@ -862,12 +862,12 @@ static void _read_register(struct dvobj_priv *d, u32 addr, u32 cnt, u8 *buf)
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
val16 = cpu_to_le16(rtw_read16(a, addr+i));
|
val16 = cpu_to_le16(rtw_read16(a, addr+i));
|
||||||
_rtw_memcpy(&buf[i], &val16, 2);
|
memcpy(&buf[i], &val16, 2);
|
||||||
i += 2;
|
i += 2;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
val32 = cpu_to_le32(rtw_read32(a, addr+i));
|
val32 = cpu_to_le32(rtw_read32(a, addr+i));
|
||||||
_rtw_memcpy(&buf[i], &val32, 4);
|
memcpy(&buf[i], &val32, 4);
|
||||||
i += 4;
|
i += 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1800,7 +1800,7 @@ int rtw_halmac_get_mac_address(struct dvobj_priv *d, enum _hw_port hwport, u8 *a
|
|||||||
if (status != HALMAC_RET_SUCCESS)
|
if (status != HALMAC_RET_SUCCESS)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
_rtw_memcpy(addr, hwa.addr, 6);
|
memcpy(addr, hwa.addr, 6);
|
||||||
|
|
||||||
err = 0;
|
err = 0;
|
||||||
out:
|
out:
|
||||||
@ -2020,7 +2020,7 @@ int rtw_halmac_set_mac_address(struct dvobj_priv *d, enum _hw_port hwport, u8 *a
|
|||||||
|
|
||||||
port = _hw_port_drv2halmac(hwport);
|
port = _hw_port_drv2halmac(hwport);
|
||||||
memset(&hwa, 0, sizeof(hwa));
|
memset(&hwa, 0, sizeof(hwa));
|
||||||
_rtw_memcpy(hwa.addr, addr, 6);
|
memcpy(hwa.addr, addr, 6);
|
||||||
|
|
||||||
status = api->halmac_cfg_mac_addr(halmac, port, &hwa);
|
status = api->halmac_cfg_mac_addr(halmac, port, &hwa);
|
||||||
if (status != HALMAC_RET_SUCCESS)
|
if (status != HALMAC_RET_SUCCESS)
|
||||||
@ -2056,7 +2056,7 @@ int rtw_halmac_set_bssid(struct dvobj_priv *d, enum _hw_port hwport, u8 *addr)
|
|||||||
port = _hw_port_drv2halmac(hwport);
|
port = _hw_port_drv2halmac(hwport);
|
||||||
|
|
||||||
memset(&hwa, 0, sizeof(hwa));
|
memset(&hwa, 0, sizeof(hwa));
|
||||||
_rtw_memcpy(hwa.addr, addr, 6);
|
memcpy(hwa.addr, addr, 6);
|
||||||
status = api->halmac_cfg_bssid(halmac, port, &hwa);
|
status = api->halmac_cfg_bssid(halmac, port, &hwa);
|
||||||
if (status != HALMAC_RET_SUCCESS)
|
if (status != HALMAC_RET_SUCCESS)
|
||||||
goto out;
|
goto out;
|
||||||
@ -2090,7 +2090,7 @@ int rtw_halmac_set_tx_address(struct dvobj_priv *d, enum _hw_port hwport, u8 *ad
|
|||||||
api = HALMAC_GET_API(halmac);
|
api = HALMAC_GET_API(halmac);
|
||||||
port = _hw_port_drv2halmac(hwport);
|
port = _hw_port_drv2halmac(hwport);
|
||||||
memset(&hwa, 0, sizeof(hwa));
|
memset(&hwa, 0, sizeof(hwa));
|
||||||
_rtw_memcpy(hwa.addr, addr, 6);
|
memcpy(hwa.addr, addr, 6);
|
||||||
|
|
||||||
status = api->halmac_cfg_transmitter_addr(halmac, port, &hwa);
|
status = api->halmac_cfg_transmitter_addr(halmac, port, &hwa);
|
||||||
if (status != HALMAC_RET_SUCCESS)
|
if (status != HALMAC_RET_SUCCESS)
|
||||||
@ -3979,13 +3979,13 @@ int rtw_halmac_send_h2c(struct dvobj_priv *d, u8 *h2c)
|
|||||||
|
|
||||||
/* Write Ext command (byte 4~7) */
|
/* Write Ext command (byte 4~7) */
|
||||||
msgbox_ex_addr = REG_HMEBOX_E0 + (h2c_box_num * EX_MESSAGE_BOX_SIZE);
|
msgbox_ex_addr = REG_HMEBOX_E0 + (h2c_box_num * EX_MESSAGE_BOX_SIZE);
|
||||||
_rtw_memcpy((u8 *)(&h2c_cmd_ex), h2c + 4, EX_MESSAGE_BOX_SIZE);
|
memcpy((u8 *)(&h2c_cmd_ex), h2c + 4, EX_MESSAGE_BOX_SIZE);
|
||||||
h2c_cmd_ex = le32_to_cpu(h2c_cmd_ex);
|
h2c_cmd_ex = le32_to_cpu(h2c_cmd_ex);
|
||||||
rtw_write32(adapter, msgbox_ex_addr, h2c_cmd_ex);
|
rtw_write32(adapter, msgbox_ex_addr, h2c_cmd_ex);
|
||||||
|
|
||||||
/* Write command (byte 0~3) */
|
/* Write command (byte 0~3) */
|
||||||
msgbox_addr = REG_HMEBOX0 + (h2c_box_num * MESSAGE_BOX_SIZE);
|
msgbox_addr = REG_HMEBOX0 + (h2c_box_num * MESSAGE_BOX_SIZE);
|
||||||
_rtw_memcpy((u8 *)(&h2c_cmd), h2c, 4);
|
memcpy((u8 *)(&h2c_cmd), h2c, 4);
|
||||||
h2c_cmd = le32_to_cpu(h2c_cmd);
|
h2c_cmd = le32_to_cpu(h2c_cmd);
|
||||||
rtw_write32(adapter, msgbox_addr, h2c_cmd);
|
rtw_write32(adapter, msgbox_addr, h2c_cmd);
|
||||||
|
|
||||||
@ -4136,7 +4136,7 @@ int rtw_halmac_read_physical_efuse(struct dvobj_priv *d, u32 offset, u32 cnt, u8
|
|||||||
if (err)
|
if (err)
|
||||||
err = -1;
|
err = -1;
|
||||||
else
|
else
|
||||||
_rtw_memcpy(data, efuse + offset, cnt);
|
memcpy(data, efuse + offset, cnt);
|
||||||
|
|
||||||
rtw_mfree(efuse, size);
|
rtw_mfree(efuse, size);
|
||||||
}
|
}
|
||||||
@ -5023,7 +5023,7 @@ static int _halmac_scanoffload(struct dvobj_priv *d, u32 enable, u8 nlo,
|
|||||||
}
|
}
|
||||||
|
|
||||||
pnossid.SSID_len = ssid_len;
|
pnossid.SSID_len = ssid_len;
|
||||||
_rtw_memcpy(pnossid.SSID, ssid, ssid_len);
|
memcpy(pnossid.SSID, ssid, ssid_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
rtw_hal_construct_ProbeReq(adapter, probereq, &len, &pnossid);
|
rtw_hal_construct_ProbeReq(adapter, probereq, &len, &pnossid);
|
||||||
@ -5433,7 +5433,7 @@ int rtw_halmac_bf_add_mu_bfer(struct dvobj_priv *d, u16 paid, u16 csi_para,
|
|||||||
param.csi_para = csi_para;
|
param.csi_para = csi_para;
|
||||||
param.my_aid = my_aid;
|
param.my_aid = my_aid;
|
||||||
param.csi_length_sel = sel;
|
param.csi_length_sel = sel;
|
||||||
_rtw_memcpy(param.bfer_address.addr, addr, 6);
|
memcpy(param.bfer_address.addr, addr, 6);
|
||||||
|
|
||||||
status = api->halmac_mu_bfer_entry_init(mac, ¶m);
|
status = api->halmac_mu_bfer_entry_init(mac, ¶m);
|
||||||
if (status != HALMAC_RET_SUCCESS)
|
if (status != HALMAC_RET_SUCCESS)
|
||||||
@ -5536,13 +5536,13 @@ int rtw_halmac_bf_cfg_mu_mimo(struct dvobj_priv *d, enum halmac_snd_role role,
|
|||||||
param.mu_tx_en = mu_tx_en;
|
param.mu_tx_en = mu_tx_en;
|
||||||
|
|
||||||
if (sounding_sts)
|
if (sounding_sts)
|
||||||
_rtw_memcpy(param.sounding_sts, sounding_sts, 6);
|
memcpy(param.sounding_sts, sounding_sts, 6);
|
||||||
|
|
||||||
if (given_gid_tab)
|
if (given_gid_tab)
|
||||||
_rtw_memcpy(param.given_gid_tab, given_gid_tab, 8);
|
memcpy(param.given_gid_tab, given_gid_tab, 8);
|
||||||
|
|
||||||
if (given_user_pos)
|
if (given_user_pos)
|
||||||
_rtw_memcpy(param.given_user_pos, given_user_pos, 16);
|
memcpy(param.given_user_pos, given_user_pos, 16);
|
||||||
|
|
||||||
status = api->halmac_cfg_mumimo(mac, ¶m);
|
status = api->halmac_cfg_mumimo(mac, ¶m);
|
||||||
if (status != HALMAC_RET_SUCCESS)
|
if (status != HALMAC_RET_SUCCESS)
|
||||||
|
@ -244,7 +244,7 @@ void usb_c2h_hisr_hdl(_adapter *adapter, u8 *buf)
|
|||||||
} else {
|
} else {
|
||||||
c2h_evt = rtw_malloc(C2H_REG_LEN);
|
c2h_evt = rtw_malloc(C2H_REG_LEN);
|
||||||
if (c2h_evt != NULL) {
|
if (c2h_evt != NULL) {
|
||||||
_rtw_memcpy(c2h_evt, buf, C2H_REG_LEN);
|
memcpy(c2h_evt, buf, C2H_REG_LEN);
|
||||||
if (rtw_cbuf_push(adapter->evtpriv.c2h_queue, (void*)c2h_evt) != _SUCCESS)
|
if (rtw_cbuf_push(adapter->evtpriv.c2h_queue, (void*)c2h_evt) != _SUCCESS)
|
||||||
RTW_ERR("%s rtw_cbuf_push fail\n", __func__);
|
RTW_ERR("%s rtw_cbuf_push fail\n", __func__);
|
||||||
} else {
|
} else {
|
||||||
@ -261,18 +261,14 @@ void usb_c2h_hisr_hdl(_adapter *adapter, u8 *buf)
|
|||||||
int usb_write_async(struct usb_device *udev, u32 addr, void *pdata, u16 len)
|
int usb_write_async(struct usb_device *udev, u32 addr, void *pdata, u16 len)
|
||||||
{
|
{
|
||||||
u8 request;
|
u8 request;
|
||||||
u8 requesttype;
|
|
||||||
u16 wvalue;
|
u16 wvalue;
|
||||||
u16 index;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
requesttype = VENDOR_WRITE;/* write_out */
|
|
||||||
request = REALTEK_USB_VENQT_CMD_REQ;
|
request = REALTEK_USB_VENQT_CMD_REQ;
|
||||||
index = REALTEK_USB_VENQT_CMD_IDX;/* n/a */
|
|
||||||
|
|
||||||
wvalue = (u16)(addr & 0x0000ffff);
|
wvalue = (u16)(addr & 0x0000ffff);
|
||||||
|
|
||||||
ret = _usbctrl_vendorreq_async_write(udev, request, wvalue, index, pdata, len, requesttype);
|
ret = _usbctrl_vendorreq_async_write(udev, request, wvalue, pdata, len, REALTEK_USB_VENQT_WRITE);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -329,7 +325,7 @@ u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr)
|
|||||||
wvalue |= 0x8000;
|
wvalue |= 0x8000;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
usbctrl_vendorreq(pintfhdl, wvalue, 0, &data, 1, VENDOR_READ);
|
usbctrl_vendorreq(pintfhdl, wvalue, &data, 1, REALTEK_USB_VENQT_READ);
|
||||||
|
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
@ -346,7 +342,7 @@ u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr)
|
|||||||
wvalue |= 0x8000;
|
wvalue |= 0x8000;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
usbctrl_vendorreq(pintfhdl, wvalue, 0, &data, 2, VENDOR_READ);
|
usbctrl_vendorreq(pintfhdl, wvalue, &data, 2, REALTEK_USB_VENQT_READ);
|
||||||
|
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
@ -364,7 +360,7 @@ u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr)
|
|||||||
wvalue |= 0x8000;
|
wvalue |= 0x8000;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
usbctrl_vendorreq(pintfhdl, wvalue, 0, &data, 4, VENDOR_READ);
|
usbctrl_vendorreq(pintfhdl, wvalue, &data, 4, REALTEK_USB_VENQT_READ);
|
||||||
|
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
@ -380,7 +376,7 @@ int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val)
|
|||||||
wvalue |= 0x8000;
|
wvalue |= 0x8000;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return usbctrl_vendorreq(pintfhdl, wvalue, 0, &val, 1, VENDOR_WRITE);
|
return usbctrl_vendorreq(pintfhdl, wvalue, &val, 1, REALTEK_USB_VENQT_WRITE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,7 +390,7 @@ int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val)
|
|||||||
wvalue |= 0x8000;
|
wvalue |= 0x8000;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return usbctrl_vendorreq(pintfhdl, wvalue, 0, &val, 2, VENDOR_WRITE);
|
return usbctrl_vendorreq(pintfhdl, wvalue, &val, 2, REALTEK_USB_VENQT_WRITE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,7 +404,7 @@ int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val)
|
|||||||
wvalue |= 0x8000;
|
wvalue |= 0x8000;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return usbctrl_vendorreq(pintfhdl, wvalue, 0, &val, 4, VENDOR_WRITE);
|
return usbctrl_vendorreq(pintfhdl, wvalue, &val, 4, REALTEK_USB_VENQT_WRITE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -421,7 +417,7 @@ int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
memcpy(buf, pdata, length);
|
memcpy(buf, pdata, length);
|
||||||
return usbctrl_vendorreq(pintfhdl, wvalue, 0, buf, (length & 0xffff), VENDOR_WRITE);
|
return usbctrl_vendorreq(pintfhdl, wvalue, buf, (length & 0xffff), REALTEK_USB_VENQT_WRITE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ static void rtw_hal_mcc_build_p2p_noa_attr(PADAPTER padapter, u8 *ie, u32 *ie_le
|
|||||||
noa_interval = mcc_switch_channel_policy_table[mcc_policy_idx][MCC_INTERVAL_IDX] * TU;
|
noa_interval = mcc_switch_channel_policy_table[mcc_policy_idx][MCC_INTERVAL_IDX] * TU;
|
||||||
|
|
||||||
/* P2P OUI(4 bytes) */
|
/* P2P OUI(4 bytes) */
|
||||||
_rtw_memcpy(p2p_noa_attr_ie, P2P_OUI, 4);
|
memcpy(p2p_noa_attr_ie, P2P_OUI, 4);
|
||||||
p2p_noa_attr_len = p2p_noa_attr_len + 4;
|
p2p_noa_attr_len = p2p_noa_attr_len + 4;
|
||||||
|
|
||||||
/* attrute ID(1 byte) */
|
/* attrute ID(1 byte) */
|
||||||
@ -997,9 +997,9 @@ static void rtw_hal_construct_CTS(PADAPTER padapter, u8 *pframe, u32 *pLength)
|
|||||||
*(pframe + 3) = 0x78;
|
*(pframe + 3) = 0x78;
|
||||||
|
|
||||||
/* frame recvaddr, length = 6 */
|
/* frame recvaddr, length = 6 */
|
||||||
_rtw_memcpy((pframe + 4), broadcast_addr, ETH_ALEN);
|
memcpy((pframe + 4), broadcast_addr, ETH_ALEN);
|
||||||
_rtw_memcpy((pframe + 4 + ETH_ALEN), adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy((pframe + 4 + ETH_ALEN), adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
_rtw_memcpy((pframe + 4 + ETH_ALEN*2), adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy((pframe + 4 + ETH_ALEN*2), adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
*pLength = 22;
|
*pLength = 22;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3288,7 +3288,7 @@ u8 *rtw_hal_mcc_append_go_p2p_ie(PADAPTER padapter, u8 *pframe, u32 *len)
|
|||||||
if (pmccadapriv->p2p_go_noa_ie_len == 0)
|
if (pmccadapriv->p2p_go_noa_ie_len == 0)
|
||||||
return pframe;
|
return pframe;
|
||||||
|
|
||||||
_rtw_memcpy(pframe, pmccadapriv->p2p_go_noa_ie, pmccadapriv->p2p_go_noa_ie_len);
|
memcpy(pframe, pmccadapriv->p2p_go_noa_ie, pmccadapriv->p2p_go_noa_ie_len);
|
||||||
*len = *len + pmccadapriv->p2p_go_noa_ie_len;
|
*len = *len + pmccadapriv->p2p_go_noa_ie_len;
|
||||||
|
|
||||||
return pframe + pmccadapriv->p2p_go_noa_ie_len;
|
return pframe + pmccadapriv->p2p_go_noa_ie_len;
|
||||||
@ -3476,7 +3476,7 @@ u8 rtw_set_mcc_duration_cmd(_adapter *adapter, u8 type, u8 val)
|
|||||||
pdrvextra_cmd_parm->size = 1;
|
pdrvextra_cmd_parm->size = 1;
|
||||||
pdrvextra_cmd_parm->pbuf = mcc_duration;
|
pdrvextra_cmd_parm->pbuf = mcc_duration;
|
||||||
|
|
||||||
_rtw_memcpy(mcc_duration, &val, 1);
|
memcpy(mcc_duration, &val, 1);
|
||||||
|
|
||||||
init_h2fwcmd_w_parm_no_rsp(cmdobj, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
init_h2fwcmd_w_parm_no_rsp(cmdobj, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
||||||
res = rtw_enqueue_cmd(pcmdpriv, cmdobj);
|
res = rtw_enqueue_cmd(pcmdpriv, cmdobj);
|
||||||
|
@ -2270,7 +2270,7 @@ void mpt_ProSetPMacTx(PADAPTER Adapter)
|
|||||||
u4bTmp = PMacTxInfo.VHT_SIG_A[3] | ((PMacTxInfo.VHT_SIG_A[4]) << 8) | ((PMacTxInfo.VHT_SIG_A[5]) << 16);
|
u4bTmp = PMacTxInfo.VHT_SIG_A[3] | ((PMacTxInfo.VHT_SIG_A[4]) << 8) | ((PMacTxInfo.VHT_SIG_A[5]) << 16);
|
||||||
phy_set_bb_reg(Adapter, 0xb10, 0xffffff, u4bTmp);
|
phy_set_bb_reg(Adapter, 0xb10, 0xffffff, u4bTmp);
|
||||||
|
|
||||||
_rtw_memcpy(&u4bTmp, PMacTxInfo.VHT_SIG_B, 4);
|
memcpy(&u4bTmp, PMacTxInfo.VHT_SIG_B, 4);
|
||||||
phy_set_bb_reg(Adapter, 0xb14, bMaskDWord, u4bTmp);
|
phy_set_bb_reg(Adapter, 0xb14, bMaskDWord, u4bTmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2278,7 +2278,7 @@ void mpt_ProSetPMacTx(PADAPTER Adapter)
|
|||||||
u4bTmp = (PMacTxInfo.VHT_SIG_B_CRC << 24) | PMacTxInfo.PacketPeriod; /* for TX interval */
|
u4bTmp = (PMacTxInfo.VHT_SIG_B_CRC << 24) | PMacTxInfo.PacketPeriod; /* for TX interval */
|
||||||
phy_set_bb_reg(Adapter, 0xb20, bMaskDWord, u4bTmp);
|
phy_set_bb_reg(Adapter, 0xb20, bMaskDWord, u4bTmp);
|
||||||
|
|
||||||
_rtw_memcpy(&u4bTmp, PMacTxInfo.VHT_Delimiter, 4);
|
memcpy(&u4bTmp, PMacTxInfo.VHT_Delimiter, 4);
|
||||||
phy_set_bb_reg(Adapter, 0xb24, bMaskDWord, u4bTmp);
|
phy_set_bb_reg(Adapter, 0xb24, bMaskDWord, u4bTmp);
|
||||||
|
|
||||||
/* 0xb28 - 0xb34 24 byte Probe Request MAC Header*/
|
/* 0xb28 - 0xb34 24 byte Probe Request MAC Header*/
|
||||||
|
@ -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);
|
||||||
|
@ -407,7 +407,7 @@ void odm_move_memory(struct dm_struct *dm, void *dest, void *src, u32 length)
|
|||||||
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211_V2)
|
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211_V2)
|
||||||
memcpy(dest, src, length);
|
memcpy(dest, src, length);
|
||||||
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE)
|
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE)
|
||||||
_rtw_memcpy(dest, src, length);
|
memcpy(dest, src, length);
|
||||||
#elif (DM_ODM_SUPPORT_TYPE & ODM_WIN)
|
#elif (DM_ODM_SUPPORT_TYPE & ODM_WIN)
|
||||||
PlatformMoveMemory(dest, src, length);
|
PlatformMoveMemory(dest, src, length);
|
||||||
#elif (DM_ODM_SUPPORT_TYPE & ODM_IOT)
|
#elif (DM_ODM_SUPPORT_TYPE & ODM_IOT)
|
||||||
|
@ -1056,9 +1056,9 @@ send_fw_ht_ndpa_packet(
|
|||||||
set_order_bit(pframe);
|
set_order_bit(pframe);
|
||||||
set_frame_sub_type(pframe, WIFI_ACTION_NOACK);
|
set_frame_sub_type(pframe, WIFI_ACTION_NOACK);
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, RA, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, RA, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
||||||
|
|
||||||
if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
|
if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
|
||||||
a_sifs_time = 10;
|
a_sifs_time = 10;
|
||||||
@ -1078,7 +1078,7 @@ send_fw_ht_ndpa_packet(
|
|||||||
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
|
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
|
||||||
SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1);
|
SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1);
|
||||||
|
|
||||||
_rtw_memcpy(pframe + 28, action_hdr, 4);
|
memcpy(pframe + 28, action_hdr, 4);
|
||||||
|
|
||||||
pattrib->pktlen = 32;
|
pattrib->pktlen = 32;
|
||||||
|
|
||||||
@ -1142,9 +1142,9 @@ send_sw_ht_ndpa_packet(
|
|||||||
set_order_bit(pframe);
|
set_order_bit(pframe);
|
||||||
set_frame_sub_type(pframe, WIFI_ACTION_NOACK);
|
set_frame_sub_type(pframe, WIFI_ACTION_NOACK);
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, RA, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, RA, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
||||||
|
|
||||||
if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
|
if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
|
||||||
a_sifs_time = 10;
|
a_sifs_time = 10;
|
||||||
@ -1164,7 +1164,7 @@ send_sw_ht_ndpa_packet(
|
|||||||
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
|
SET_HT_CTRL_CSI_STEERING(pframe + 24, 3);
|
||||||
SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1);
|
SET_HT_CTRL_NDP_ANNOUNCEMENT(pframe + 24, 1);
|
||||||
|
|
||||||
_rtw_memcpy(pframe + 28, action_hdr, 4);
|
memcpy(pframe + 28, action_hdr, 4);
|
||||||
|
|
||||||
pattrib->pktlen = 32;
|
pattrib->pktlen = 32;
|
||||||
|
|
||||||
@ -1209,7 +1209,7 @@ send_fw_vht_ndpa_packet(
|
|||||||
|
|
||||||
/* update attribute */
|
/* update attribute */
|
||||||
pattrib = &pmgntframe->attrib;
|
pattrib = &pmgntframe->attrib;
|
||||||
_rtw_memcpy(pattrib->ra, RA, ETH_ALEN);
|
memcpy(pattrib->ra, RA, ETH_ALEN);
|
||||||
update_mgntframe_attrib(adapter, pattrib);
|
update_mgntframe_attrib(adapter, pattrib);
|
||||||
|
|
||||||
pattrib->qsel = QSLT_BEACON;
|
pattrib->qsel = QSLT_BEACON;
|
||||||
@ -1231,8 +1231,8 @@ send_fw_vht_ndpa_packet(
|
|||||||
|
|
||||||
set_frame_sub_type(pframe, WIFI_NDPA);
|
set_frame_sub_type(pframe, WIFI_NDPA);
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, RA, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, RA, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode))
|
if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode))
|
||||||
a_sifs_time = 16;
|
a_sifs_time = 16;
|
||||||
@ -1256,7 +1256,7 @@ send_fw_vht_ndpa_packet(
|
|||||||
else
|
else
|
||||||
beam_info->sounding_sequence++;
|
beam_info->sounding_sequence++;
|
||||||
|
|
||||||
_rtw_memcpy(pframe + 16, &sequence, 1);
|
memcpy(pframe + 16, &sequence, 1);
|
||||||
|
|
||||||
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE))
|
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE))
|
||||||
AID = 0;
|
AID = 0;
|
||||||
@ -1265,7 +1265,7 @@ send_fw_vht_ndpa_packet(
|
|||||||
sta_info.feedback_type = 0;
|
sta_info.feedback_type = 0;
|
||||||
sta_info.nc_index = 0;
|
sta_info.nc_index = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pframe + 17, (u8 *)&sta_info, 2);
|
memcpy(pframe + 17, (u8 *)&sta_info, 2);
|
||||||
|
|
||||||
pattrib->pktlen = 19;
|
pattrib->pktlen = 19;
|
||||||
|
|
||||||
@ -1314,7 +1314,7 @@ send_sw_vht_ndpa_packet(
|
|||||||
|
|
||||||
/*update attribute*/
|
/*update attribute*/
|
||||||
pattrib = &pmgntframe->attrib;
|
pattrib = &pmgntframe->attrib;
|
||||||
_rtw_memcpy(pattrib->ra, RA, ETH_ALEN);
|
memcpy(pattrib->ra, RA, ETH_ALEN);
|
||||||
update_mgntframe_attrib(adapter, pattrib);
|
update_mgntframe_attrib(adapter, pattrib);
|
||||||
pattrib->qsel = QSLT_MGNT;
|
pattrib->qsel = QSLT_MGNT;
|
||||||
pattrib->rate = ndp_tx_rate;
|
pattrib->rate = ndp_tx_rate;
|
||||||
@ -1332,8 +1332,8 @@ send_sw_vht_ndpa_packet(
|
|||||||
|
|
||||||
set_frame_sub_type(pframe, WIFI_NDPA);
|
set_frame_sub_type(pframe, WIFI_NDPA);
|
||||||
|
|
||||||
_rtw_memcpy(pwlanhdr->addr1, RA, ETH_ALEN);
|
memcpy(pwlanhdr->addr1, RA, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN);
|
memcpy(pwlanhdr->addr2, beamform_entry->my_mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode))
|
if (is_supported_5g(pmlmeext->cur_wireless_mode) || is_supported_ht(pmlmeext->cur_wireless_mode))
|
||||||
a_sifs_time = 16;
|
a_sifs_time = 16;
|
||||||
@ -1357,7 +1357,7 @@ send_sw_vht_ndpa_packet(
|
|||||||
else
|
else
|
||||||
beam_info->sounding_sequence++;
|
beam_info->sounding_sequence++;
|
||||||
|
|
||||||
_rtw_memcpy(pframe + 16, &sequence, 1);
|
memcpy(pframe + 16, &sequence, 1);
|
||||||
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE))
|
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE))
|
||||||
AID = 0;
|
AID = 0;
|
||||||
|
|
||||||
@ -1365,7 +1365,7 @@ send_sw_vht_ndpa_packet(
|
|||||||
ndpa_sta_info.feedback_type = 0;
|
ndpa_sta_info.feedback_type = 0;
|
||||||
ndpa_sta_info.nc_index = 0;
|
ndpa_sta_info.nc_index = 0;
|
||||||
|
|
||||||
_rtw_memcpy(pframe + 17, (u8 *)&ndpa_sta_info, 2);
|
memcpy(pframe + 17, (u8 *)&ndpa_sta_info, 2);
|
||||||
|
|
||||||
pattrib->pktlen = 19;
|
pattrib->pktlen = 19;
|
||||||
|
|
||||||
|
@ -100,10 +100,10 @@ s32 FillH2CCmd_8192E(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer
|
|||||||
*(u8 *)(&h2c_cmd) = ElementID;
|
*(u8 *)(&h2c_cmd) = ElementID;
|
||||||
|
|
||||||
if (CmdLen <= 3)
|
if (CmdLen <= 3)
|
||||||
_rtw_memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, CmdLen);
|
memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, CmdLen);
|
||||||
else {
|
else {
|
||||||
_rtw_memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, 3);
|
memcpy((u8 *)(&h2c_cmd) + 1, pCmdBuffer, 3);
|
||||||
_rtw_memcpy((u8 *)(&h2c_cmd_ex), pCmdBuffer + 3, CmdLen - 3);
|
memcpy((u8 *)(&h2c_cmd_ex), pCmdBuffer + 3, CmdLen - 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write Ext command */
|
/* Write Ext command */
|
||||||
|
@ -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;
|
||||||
|
@ -28,16 +28,16 @@ void interrupt_handler_8192eu(_adapter *padapter, u16 pkt_len, u8 *pbuf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* HISR */
|
/* HISR */
|
||||||
_rtw_memcpy(&(pHalData->IntArray[0]), &(pbuf[USB_INTR_CONTENT_HISR_OFFSET]), 4);
|
memcpy(&(pHalData->IntArray[0]), &(pbuf[USB_INTR_CONTENT_HISR_OFFSET]), 4);
|
||||||
_rtw_memcpy(&(pHalData->IntArray[1]), &(pbuf[USB_INTR_CONTENT_HISRE_OFFSET]), 4);
|
memcpy(&(pHalData->IntArray[1]), &(pbuf[USB_INTR_CONTENT_HISRE_OFFSET]), 4);
|
||||||
|
|
||||||
#if 0 /* DBG */
|
#if 0 /* DBG */
|
||||||
{
|
{
|
||||||
u32 hisr = 0 , hisr_ex = 0;
|
u32 hisr = 0 , hisr_ex = 0;
|
||||||
_rtw_memcpy(&hisr, &(pHalData->IntArray[0]), 4);
|
memcpy(&hisr, &(pHalData->IntArray[0]), 4);
|
||||||
hisr = le32_to_cpu(hisr);
|
hisr = le32_to_cpu(hisr);
|
||||||
|
|
||||||
_rtw_memcpy(&hisr_ex, &(pHalData->IntArray[1]), 4);
|
memcpy(&hisr_ex, &(pHalData->IntArray[1]), 4);
|
||||||
hisr_ex = le32_to_cpu(hisr_ex);
|
hisr_ex = le32_to_cpu(hisr_ex);
|
||||||
|
|
||||||
if ((hisr != 0) || (hisr_ex != 0))
|
if ((hisr != 0) || (hisr_ex != 0))
|
||||||
@ -68,8 +68,8 @@ void interrupt_handler_8192eu(_adapter *padapter, u16 pkt_len, u8 *pbuf)
|
|||||||
|
|
||||||
#ifdef CONFIG_LPS_LCLK
|
#ifdef CONFIG_LPS_LCLK
|
||||||
if (pHalData->IntArray[0] & IMR_CPWM_88E) {
|
if (pHalData->IntArray[0] & IMR_CPWM_88E) {
|
||||||
_rtw_memcpy(&pwr_rpt.state, &(pbuf[USB_INTR_CONTENT_CPWM1_OFFSET]), 1);
|
memcpy(&pwr_rpt.state, &(pbuf[USB_INTR_CONTENT_CPWM1_OFFSET]), 1);
|
||||||
/* _rtw_memcpy(&pwr_rpt.state2, &(pbuf[USB_INTR_CONTENT_CPWM2_OFFSET]), 1); */
|
/* memcpy(&pwr_rpt.state2, &(pbuf[USB_INTR_CONTENT_CPWM2_OFFSET]), 1); */
|
||||||
|
|
||||||
/* 88e's cpwm value only change BIT0, so driver need to add PS_STATE_S2 for LPS flow. */
|
/* 88e's cpwm value only change BIT0, so driver need to add PS_STATE_S2 for LPS flow. */
|
||||||
pwr_rpt.state |= PS_STATE_S2;
|
pwr_rpt.state |= PS_STATE_S2;
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
||||||
* more details.
|
|
||||||
*
|
|
||||||
*****************************************************************************/
|
|
||||||
#ifndef __CMD_OSDEP_H_
|
|
||||||
#define __CMD_OSDEP_H_
|
|
||||||
|
|
||||||
|
|
||||||
extern sint _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
|
|
||||||
extern sint _rtw_init_evt_priv(struct evt_priv *pevtpriv);
|
|
||||||
extern void _rtw_free_evt_priv(struct evt_priv *pevtpriv);
|
|
||||||
extern void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv);
|
|
||||||
extern sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head);
|
|
||||||
extern struct cmd_obj *_rtw_dequeue_cmd(_queue *queue);
|
|
||||||
|
|
||||||
#endif
|
|
@ -62,7 +62,6 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <rtw_cmd.h>
|
#include <rtw_cmd.h>
|
||||||
#include <cmd_osdep.h>
|
|
||||||
#include <rtw_security.h>
|
#include <rtw_security.h>
|
||||||
#include <rtw_xmit.h>
|
#include <rtw_xmit.h>
|
||||||
#include <xmit_osdep.h>
|
#include <xmit_osdep.h>
|
||||||
@ -130,9 +129,6 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER;
|
|||||||
#include <rtw_iol.h>
|
#include <rtw_iol.h>
|
||||||
#endif /* CONFIG_IOL */
|
#endif /* CONFIG_IOL */
|
||||||
|
|
||||||
#include <ip.h>
|
|
||||||
#include <if_ether.h>
|
|
||||||
#include <ethernet.h>
|
|
||||||
#include <circ_buf.h>
|
#include <circ_buf.h>
|
||||||
|
|
||||||
#include <rtw_android.h>
|
#include <rtw_android.h>
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
||||||
* more details.
|
|
||||||
*
|
|
||||||
*****************************************************************************/
|
|
||||||
/*! \file */
|
|
||||||
#ifndef __INC_ETHERNET_H
|
|
||||||
#define __INC_ETHERNET_H
|
|
||||||
|
|
||||||
#define ETHERNET_ADDRESS_LENGTH 6 /* !< Ethernet Address Length */
|
|
||||||
#define ETHERNET_HEADER_SIZE 14 /* !< Ethernet Header Length */
|
|
||||||
#define LLC_HEADER_SIZE 6 /* !< LLC Header Length */
|
|
||||||
#define TYPE_LENGTH_FIELD_SIZE 2 /* !< Type/Length Size */
|
|
||||||
#define MINIMUM_ETHERNET_PACKET_SIZE 60 /* !< Minimum Ethernet Packet Size */
|
|
||||||
#define MAXIMUM_ETHERNET_PACKET_SIZE 1514 /* !< Maximum Ethernet Packet Size */
|
|
||||||
|
|
||||||
#define RT_ETH_IS_MULTICAST(_pAddr) ((((UCHAR *)(_pAddr))[0]&0x01) != 0) /* !< Is Multicast Address? */
|
|
||||||
#define RT_ETH_IS_BROADCAST(_pAddr) (\
|
|
||||||
((UCHAR *)(_pAddr))[0] == 0xff && \
|
|
||||||
((UCHAR *)(_pAddr))[1] == 0xff && \
|
|
||||||
((UCHAR *)(_pAddr))[2] == 0xff && \
|
|
||||||
((UCHAR *)(_pAddr))[3] == 0xff && \
|
|
||||||
((UCHAR *)(_pAddr))[4] == 0xff && \
|
|
||||||
((UCHAR *)(_pAddr))[5] == 0xff) /* !< Is Broadcast Address? */
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* #ifndef __INC_ETHERNET_H */
|
|
@ -693,65 +693,6 @@ struct ieee80211_snap_hdr {
|
|||||||
#define WLAN_GET_SEQ_FRAG(seq) ((seq) & RTW_IEEE80211_SCTL_FRAG)
|
#define WLAN_GET_SEQ_FRAG(seq) ((seq) & RTW_IEEE80211_SCTL_FRAG)
|
||||||
#define WLAN_GET_SEQ_SEQ(seq) ((seq) & RTW_IEEE80211_SCTL_SEQ)
|
#define WLAN_GET_SEQ_SEQ(seq) ((seq) & RTW_IEEE80211_SCTL_SEQ)
|
||||||
|
|
||||||
/* Authentication algorithms */
|
|
||||||
#define WLAN_AUTH_OPEN 0
|
|
||||||
#define WLAN_AUTH_SHARED_KEY 1
|
|
||||||
#define WLAN_AUTH_SAE 3
|
|
||||||
|
|
||||||
#define WLAN_AUTH_CHALLENGE_LEN 128
|
|
||||||
|
|
||||||
#define WLAN_CAPABILITY_BSS (1<<0)
|
|
||||||
#define WLAN_CAPABILITY_IBSS (1<<1)
|
|
||||||
#define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
|
|
||||||
#define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
|
|
||||||
#define WLAN_CAPABILITY_PRIVACY (1<<4)
|
|
||||||
#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
|
|
||||||
#define WLAN_CAPABILITY_PBCC (1<<6)
|
|
||||||
#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
|
|
||||||
#define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
|
|
||||||
|
|
||||||
/* Status codes */
|
|
||||||
#define WLAN_STATUS_SUCCESS 0
|
|
||||||
#define WLAN_STATUS_UNSPECIFIED_FAILURE 1
|
|
||||||
#define WLAN_STATUS_CAPS_UNSUPPORTED 10
|
|
||||||
#define WLAN_STATUS_REASSOC_NO_ASSOC 11
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12
|
|
||||||
#define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13
|
|
||||||
#define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14
|
|
||||||
#define WLAN_STATUS_CHALLENGE_FAIL 15
|
|
||||||
#define WLAN_STATUS_AUTH_TIMEOUT 16
|
|
||||||
#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_RATES 18
|
|
||||||
/* 802.11b */
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21
|
|
||||||
|
|
||||||
/* Reason codes */
|
|
||||||
#define WLAN_REASON_UNSPECIFIED 1
|
|
||||||
#define WLAN_REASON_PREV_AUTH_NOT_VALID 2
|
|
||||||
#define WLAN_REASON_DEAUTH_LEAVING 3
|
|
||||||
#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
|
|
||||||
#define WLAN_REASON_DISASSOC_AP_BUSY 5
|
|
||||||
#define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6
|
|
||||||
#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
|
|
||||||
#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
|
|
||||||
#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
|
|
||||||
#define WLAN_REASON_MESH_PEER_CANCELED 52
|
|
||||||
#define WLAN_REASON_MESH_MAX_PEERS 53
|
|
||||||
#define WLAN_REASON_MESH_CONFIG 54
|
|
||||||
#define WLAN_REASON_MESH_CLOSE 55
|
|
||||||
#define WLAN_REASON_MESH_MAX_RETRIES 56
|
|
||||||
#define WLAN_REASON_MESH_CONFIRM_TIMEOUT 57
|
|
||||||
#define WLAN_REASON_MESH_INVALID_GTK 58
|
|
||||||
#define WLAN_REASON_MESH_INCONSISTENT_PARAM 59
|
|
||||||
#define WLAN_REASON_MESH_INVALID_SECURITY 60
|
|
||||||
#define WLAN_REASON_MESH_PATH_NOPROXY 61
|
|
||||||
#define WLAN_REASON_MESH_PATH_NOFORWARD 62
|
|
||||||
#define WLAN_REASON_MESH_PATH_DEST_UNREACHABLE 63
|
|
||||||
#define WLAN_REASON_MAC_EXISTS_IN_MBSS 64
|
|
||||||
#define WLAN_REASON_MESH_CHAN_REGULATORY 65
|
|
||||||
#define WLAN_REASON_MESH_CHAN 66
|
|
||||||
#define WLAN_REASON_SA_QUERY_TIMEOUT 65532
|
#define WLAN_REASON_SA_QUERY_TIMEOUT 65532
|
||||||
#define WLAN_REASON_ACTIVE_ROAM 65533
|
#define WLAN_REASON_ACTIVE_ROAM 65533
|
||||||
#define WLAN_REASON_JOIN_WRONG_CHANNEL 65534
|
#define WLAN_REASON_JOIN_WRONG_CHANNEL 65534
|
||||||
@ -764,56 +705,6 @@ struct ieee80211_snap_hdr {
|
|||||||
|| reason == WLAN_REASON_SA_QUERY_TIMEOUT \
|
|| reason == WLAN_REASON_SA_QUERY_TIMEOUT \
|
||||||
)
|
)
|
||||||
|
|
||||||
/* Information Element IDs */
|
|
||||||
#define WLAN_EID_SSID 0
|
|
||||||
#define WLAN_EID_SUPP_RATES 1
|
|
||||||
#define WLAN_EID_FH_PARAMS 2
|
|
||||||
#define WLAN_EID_DS_PARAMS 3
|
|
||||||
#define WLAN_EID_CF_PARAMS 4
|
|
||||||
#define WLAN_EID_TIM 5
|
|
||||||
#define WLAN_EID_IBSS_PARAMS 6
|
|
||||||
#define WLAN_EID_CHALLENGE 16
|
|
||||||
/* EIDs defined by IEEE 802.11h - START */
|
|
||||||
#define WLAN_EID_PWR_CONSTRAINT 32
|
|
||||||
#define WLAN_EID_PWR_CAPABILITY 33
|
|
||||||
#define WLAN_EID_TPC_REQUEST 34
|
|
||||||
#define WLAN_EID_TPC_REPORT 35
|
|
||||||
#define WLAN_EID_SUPPORTED_CHANNELS 36
|
|
||||||
#define WLAN_EID_CHANNEL_SWITCH 37
|
|
||||||
#define WLAN_EID_MEASURE_REQUEST 38
|
|
||||||
#define WLAN_EID_MEASURE_REPORT 39
|
|
||||||
#define WLAN_EID_QUITE 40
|
|
||||||
#define WLAN_EID_IBSS_DFS 41
|
|
||||||
/* EIDs defined by IEEE 802.11h - END */
|
|
||||||
#define WLAN_EID_ERP_INFO 42
|
|
||||||
#define WLAN_EID_HT_CAP 45
|
|
||||||
#define WLAN_EID_RSN 48
|
|
||||||
#define WLAN_EID_EXT_SUPP_RATES 50
|
|
||||||
#define WLAN_EID_MOBILITY_DOMAIN 54
|
|
||||||
#define WLAN_EID_FAST_BSS_TRANSITION 55
|
|
||||||
#define WLAN_EID_TIMEOUT_INTERVAL 56
|
|
||||||
#define WLAN_EID_RIC_DATA 57
|
|
||||||
#define WLAN_EID_HT_OPERATION 61
|
|
||||||
#define WLAN_EID_SECONDARY_CHANNEL_OFFSET 62
|
|
||||||
#define WLAN_EID_20_40_BSS_COEXISTENCE 72
|
|
||||||
#define WLAN_EID_20_40_BSS_INTOLERANT 73
|
|
||||||
#define WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS 74
|
|
||||||
#define WLAN_EID_MMIE 76
|
|
||||||
#define WLAN_EID_MESH_CONFIG 113
|
|
||||||
#define WLAN_EID_MESH_ID 114
|
|
||||||
#define WLAN_EID_MPM 117
|
|
||||||
#define WLAN_EID_RANN 126
|
|
||||||
#define WLAN_EID_PREQ 130
|
|
||||||
#define WLAN_EID_PREP 131
|
|
||||||
#define WLAN_EID_PERR 132
|
|
||||||
#define WLAN_EID_AMPE 139
|
|
||||||
#define WLAN_EID_MIC 140
|
|
||||||
#define WLAN_EID_VENDOR_SPECIFIC 221
|
|
||||||
#define WLAN_EID_GENERIC (WLAN_EID_VENDOR_SPECIFIC)
|
|
||||||
#define WLAN_EID_VHT_CAPABILITY 191
|
|
||||||
#define WLAN_EID_VHT_OPERATION 192
|
|
||||||
#define WLAN_EID_VHT_OP_MODE_NOTIFY 199
|
|
||||||
|
|
||||||
#define IEEE80211_MGMT_HDR_LEN 24
|
#define IEEE80211_MGMT_HDR_LEN 24
|
||||||
#define IEEE80211_DATA_HDR3_LEN 24
|
#define IEEE80211_DATA_HDR3_LEN 24
|
||||||
#define IEEE80211_DATA_HDR4_LEN 30
|
#define IEEE80211_DATA_HDR4_LEN 30
|
||||||
|
@ -1,471 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
||||||
* more details.
|
|
||||||
*
|
|
||||||
*****************************************************************************/
|
|
||||||
#ifndef __IEEE80211_EXT_H
|
|
||||||
#define __IEEE80211_EXT_H
|
|
||||||
|
|
||||||
#include <drv_conf.h>
|
|
||||||
#include <osdep_service.h>
|
|
||||||
#include <drv_types.h>
|
|
||||||
|
|
||||||
#define WMM_OUI_TYPE 2
|
|
||||||
#define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0
|
|
||||||
#define WMM_OUI_SUBTYPE_PARAMETER_ELEMENT 1
|
|
||||||
#define WMM_OUI_SUBTYPE_TSPEC_ELEMENT 2
|
|
||||||
#define WMM_VERSION 1
|
|
||||||
|
|
||||||
#define WPA_PROTO_WPA BIT(0)
|
|
||||||
#define WPA_PROTO_RSN BIT(1)
|
|
||||||
|
|
||||||
#define WPA_KEY_MGMT_IEEE8021X BIT(0)
|
|
||||||
#define WPA_KEY_MGMT_PSK BIT(1)
|
|
||||||
#define WPA_KEY_MGMT_NONE BIT(2)
|
|
||||||
#define WPA_KEY_MGMT_IEEE8021X_NO_WPA BIT(3)
|
|
||||||
#define WPA_KEY_MGMT_WPA_NONE BIT(4)
|
|
||||||
|
|
||||||
|
|
||||||
#define WPA_CAPABILITY_PREAUTH BIT(0)
|
|
||||||
#define WPA_CAPABILITY_MGMT_FRAME_PROTECTION BIT(6)
|
|
||||||
#define WPA_CAPABILITY_PEERKEY_ENABLED BIT(9)
|
|
||||||
|
|
||||||
|
|
||||||
#define PMKID_LEN 16
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef PLATFORM_LINUX
|
|
||||||
struct wpa_ie_hdr {
|
|
||||||
u8 elem_id;
|
|
||||||
u8 len;
|
|
||||||
u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
|
|
||||||
u8 version[2]; /* little endian */
|
|
||||||
} __attribute__((packed));
|
|
||||||
|
|
||||||
struct rsn_ie_hdr {
|
|
||||||
u8 elem_id; /* WLAN_EID_RSN */
|
|
||||||
u8 len;
|
|
||||||
u8 version[2]; /* little endian */
|
|
||||||
} __attribute__((packed));
|
|
||||||
|
|
||||||
struct wme_ac_parameter {
|
|
||||||
#if defined(CONFIG_LITTLE_ENDIAN)
|
|
||||||
/* byte 1 */
|
|
||||||
u8 aifsn:4,
|
|
||||||
acm:1,
|
|
||||||
aci:2,
|
|
||||||
reserved:1;
|
|
||||||
|
|
||||||
/* byte 2 */
|
|
||||||
u8 eCWmin:4,
|
|
||||||
eCWmax:4;
|
|
||||||
#elif defined(CONFIG_BIG_ENDIAN)
|
|
||||||
/* byte 1 */
|
|
||||||
u8 reserved:1,
|
|
||||||
aci:2,
|
|
||||||
acm:1,
|
|
||||||
aifsn:4;
|
|
||||||
|
|
||||||
/* byte 2 */
|
|
||||||
u8 eCWmax:4,
|
|
||||||
eCWmin:4;
|
|
||||||
#else
|
|
||||||
#error "Please fix <endian.h>"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* bytes 3 & 4 */
|
|
||||||
u16 txopLimit;
|
|
||||||
} __attribute__((packed));
|
|
||||||
|
|
||||||
struct wme_parameter_element {
|
|
||||||
/* required fields for WME version 1 */
|
|
||||||
u8 oui[3];
|
|
||||||
u8 oui_type;
|
|
||||||
u8 oui_subtype;
|
|
||||||
u8 version;
|
|
||||||
u8 acInfo;
|
|
||||||
u8 reserved;
|
|
||||||
struct wme_ac_parameter ac[4];
|
|
||||||
|
|
||||||
} __attribute__((packed));
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
|
|
||||||
struct wpa_ie_hdr {
|
|
||||||
u8 elem_id;
|
|
||||||
u8 len;
|
|
||||||
u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
|
|
||||||
u8 version[2]; /* little endian */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct rsn_ie_hdr {
|
|
||||||
u8 elem_id; /* WLAN_EID_RSN */
|
|
||||||
u8 len;
|
|
||||||
u8 version[2]; /* little endian */
|
|
||||||
};
|
|
||||||
|
|
||||||
#pragma pack()
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define WPA_PUT_LE16(a, val) \
|
|
||||||
do { \
|
|
||||||
(a)[1] = ((u16) (val)) >> 8; \
|
|
||||||
(a)[0] = ((u16) (val)) & 0xff; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define WPA_PUT_BE32(a, val) \
|
|
||||||
do { \
|
|
||||||
(a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff); \
|
|
||||||
(a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff); \
|
|
||||||
(a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff); \
|
|
||||||
(a)[3] = (u8) (((u32) (val)) & 0xff); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define WPA_PUT_LE32(a, val) \
|
|
||||||
do { \
|
|
||||||
(a)[3] = (u8) ((((u32) (val)) >> 24) & 0xff); \
|
|
||||||
(a)[2] = (u8) ((((u32) (val)) >> 16) & 0xff); \
|
|
||||||
(a)[1] = (u8) ((((u32) (val)) >> 8) & 0xff); \
|
|
||||||
(a)[0] = (u8) (((u32) (val)) & 0xff); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define RSN_SELECTOR_PUT(a, val) WPA_PUT_BE32((u8 *) (a), (val))
|
|
||||||
/* #define RSN_SELECTOR_PUT(a, val) WPA_PUT_LE32((u8 *) (a), (val)) */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Action category code */
|
|
||||||
enum ieee80211_category {
|
|
||||||
WLAN_CATEGORY_SPECTRUM_MGMT = 0,
|
|
||||||
WLAN_CATEGORY_QOS = 1,
|
|
||||||
WLAN_CATEGORY_DLS = 2,
|
|
||||||
WLAN_CATEGORY_BACK = 3,
|
|
||||||
WLAN_CATEGORY_HT = 7,
|
|
||||||
WLAN_CATEGORY_WMM = 17,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* SPECTRUM_MGMT action code */
|
|
||||||
enum ieee80211_spectrum_mgmt_actioncode {
|
|
||||||
WLAN_ACTION_SPCT_MSR_REQ = 0,
|
|
||||||
WLAN_ACTION_SPCT_MSR_RPRT = 1,
|
|
||||||
WLAN_ACTION_SPCT_TPC_REQ = 2,
|
|
||||||
WLAN_ACTION_SPCT_TPC_RPRT = 3,
|
|
||||||
WLAN_ACTION_SPCT_CHL_SWITCH = 4,
|
|
||||||
WLAN_ACTION_SPCT_EXT_CHL_SWITCH = 5,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* BACK action code */
|
|
||||||
enum ieee80211_back_actioncode {
|
|
||||||
WLAN_ACTION_ADDBA_REQ = 0,
|
|
||||||
WLAN_ACTION_ADDBA_RESP = 1,
|
|
||||||
WLAN_ACTION_DELBA = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* HT features action code */
|
|
||||||
enum ieee80211_ht_actioncode {
|
|
||||||
WLAN_ACTION_NOTIFY_CH_WIDTH = 0,
|
|
||||||
WLAN_ACTION_SM_PS = 1,
|
|
||||||
WLAN_ACTION_PSPM = 2,
|
|
||||||
WLAN_ACTION_PCO_PHASE = 3,
|
|
||||||
WLAN_ACTION_MIMO_CSI_MX = 4,
|
|
||||||
WLAN_ACTION_MIMO_NONCP_BF = 5,
|
|
||||||
WLAN_ACTION_MIMP_CP_BF = 6,
|
|
||||||
WLAN_ACTION_ASEL_INDICATES_FB = 7,
|
|
||||||
WLAN_ACTION_HI_INFO_EXCHG = 8,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* BACK (block-ack) parties */
|
|
||||||
enum ieee80211_back_parties {
|
|
||||||
WLAN_BACK_RECIPIENT = 0,
|
|
||||||
WLAN_BACK_INITIATOR = 1,
|
|
||||||
WLAN_BACK_TIMER = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef PLATFORM_LINUX
|
|
||||||
|
|
||||||
struct ieee80211_mgmt {
|
|
||||||
u16 frame_control;
|
|
||||||
u16 duration;
|
|
||||||
u8 da[6];
|
|
||||||
u8 sa[6];
|
|
||||||
u8 bssid[6];
|
|
||||||
u16 seq_ctrl;
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
u16 auth_alg;
|
|
||||||
u16 auth_transaction;
|
|
||||||
u16 status_code;
|
|
||||||
/* possibly followed by Challenge text */
|
|
||||||
u8 variable[0];
|
|
||||||
} __attribute__((packed)) auth;
|
|
||||||
struct {
|
|
||||||
u16 reason_code;
|
|
||||||
} __attribute__((packed)) deauth;
|
|
||||||
struct {
|
|
||||||
u16 capab_info;
|
|
||||||
u16 listen_interval;
|
|
||||||
/* followed by SSID and Supported rates */
|
|
||||||
u8 variable[0];
|
|
||||||
} __attribute__((packed)) assoc_req;
|
|
||||||
struct {
|
|
||||||
u16 capab_info;
|
|
||||||
u16 status_code;
|
|
||||||
u16 aid;
|
|
||||||
/* followed by Supported rates */
|
|
||||||
u8 variable[0];
|
|
||||||
} __attribute__((packed)) assoc_resp, reassoc_resp;
|
|
||||||
struct {
|
|
||||||
u16 capab_info;
|
|
||||||
u16 listen_interval;
|
|
||||||
u8 current_ap[6];
|
|
||||||
/* followed by SSID and Supported rates */
|
|
||||||
u8 variable[0];
|
|
||||||
} __attribute__((packed)) reassoc_req;
|
|
||||||
struct {
|
|
||||||
u16 reason_code;
|
|
||||||
} __attribute__((packed)) disassoc;
|
|
||||||
struct {
|
|
||||||
__le64 timestamp;
|
|
||||||
u16 beacon_int;
|
|
||||||
u16 capab_info;
|
|
||||||
/* followed by some of SSID, Supported rates,
|
|
||||||
* FH Params, DS Params, CF Params, IBSS Params, TIM */
|
|
||||||
u8 variable[0];
|
|
||||||
} __attribute__((packed)) beacon;
|
|
||||||
struct {
|
|
||||||
/* only variable items: SSID, Supported rates */
|
|
||||||
u8 variable[0];
|
|
||||||
} __attribute__((packed)) probe_req;
|
|
||||||
struct {
|
|
||||||
__le64 timestamp;
|
|
||||||
u16 beacon_int;
|
|
||||||
u16 capab_info;
|
|
||||||
/* followed by some of SSID, Supported rates,
|
|
||||||
* FH Params, DS Params, CF Params, IBSS Params */
|
|
||||||
u8 variable[0];
|
|
||||||
} __attribute__((packed)) probe_resp;
|
|
||||||
struct {
|
|
||||||
u8 category;
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u8 dialog_token;
|
|
||||||
u8 status_code;
|
|
||||||
u8 variable[0];
|
|
||||||
} __attribute__((packed)) wme_action;
|
|
||||||
#if 0
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u8 element_id;
|
|
||||||
u8 length;
|
|
||||||
struct ieee80211_channel_sw_ie sw_elem;
|
|
||||||
} __attribute__((packed)) chan_switch;
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u8 dialog_token;
|
|
||||||
u8 element_id;
|
|
||||||
u8 length;
|
|
||||||
struct ieee80211_msrment_ie msr_elem;
|
|
||||||
} __attribute__((packed)) measurement;
|
|
||||||
#endif
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u8 dialog_token;
|
|
||||||
u16 capab;
|
|
||||||
u16 timeout;
|
|
||||||
u16 start_seq_num;
|
|
||||||
} __attribute__((packed)) addba_req;
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u8 dialog_token;
|
|
||||||
u16 status;
|
|
||||||
u16 capab;
|
|
||||||
u16 timeout;
|
|
||||||
} __attribute__((packed)) addba_resp;
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u16 params;
|
|
||||||
u16 reason_code;
|
|
||||||
} __attribute__((packed)) delba;
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
/* capab_info for open and confirm,
|
|
||||||
* reason for close
|
|
||||||
*/
|
|
||||||
u16 aux;
|
|
||||||
/* Followed in plink_confirm by status
|
|
||||||
* code, AID and supported rates,
|
|
||||||
* and directly by supported rates in
|
|
||||||
* plink_open and plink_close
|
|
||||||
*/
|
|
||||||
u8 variable[0];
|
|
||||||
} __attribute__((packed)) plink_action;
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u8 variable[0];
|
|
||||||
} __attribute__((packed)) mesh_action;
|
|
||||||
} __attribute__((packed)) u;
|
|
||||||
} __attribute__((packed)) action;
|
|
||||||
} __attribute__((packed)) u;
|
|
||||||
} __attribute__((packed));
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
|
|
||||||
struct ieee80211_mgmt {
|
|
||||||
u16 frame_control;
|
|
||||||
u16 duration;
|
|
||||||
u8 da[6];
|
|
||||||
u8 sa[6];
|
|
||||||
u8 bssid[6];
|
|
||||||
u16 seq_ctrl;
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
u16 auth_alg;
|
|
||||||
u16 auth_transaction;
|
|
||||||
u16 status_code;
|
|
||||||
/* possibly followed by Challenge text */
|
|
||||||
u8 variable[0];
|
|
||||||
} auth;
|
|
||||||
struct {
|
|
||||||
u16 reason_code;
|
|
||||||
} deauth;
|
|
||||||
struct {
|
|
||||||
u16 capab_info;
|
|
||||||
u16 listen_interval;
|
|
||||||
/* followed by SSID and Supported rates */
|
|
||||||
u8 variable[0];
|
|
||||||
} assoc_req;
|
|
||||||
struct {
|
|
||||||
u16 capab_info;
|
|
||||||
u16 status_code;
|
|
||||||
u16 aid;
|
|
||||||
/* followed by Supported rates */
|
|
||||||
u8 variable[0];
|
|
||||||
} assoc_resp, reassoc_resp;
|
|
||||||
struct {
|
|
||||||
u16 capab_info;
|
|
||||||
u16 listen_interval;
|
|
||||||
u8 current_ap[6];
|
|
||||||
/* followed by SSID and Supported rates */
|
|
||||||
u8 variable[0];
|
|
||||||
} reassoc_req;
|
|
||||||
struct {
|
|
||||||
u16 reason_code;
|
|
||||||
} disassoc;
|
|
||||||
#if 0
|
|
||||||
struct {
|
|
||||||
__le64 timestamp;
|
|
||||||
u16 beacon_int;
|
|
||||||
u16 capab_info;
|
|
||||||
/* followed by some of SSID, Supported rates,
|
|
||||||
* FH Params, DS Params, CF Params, IBSS Params, TIM */
|
|
||||||
u8 variable[0];
|
|
||||||
} beacon;
|
|
||||||
struct {
|
|
||||||
/* only variable items: SSID, Supported rates */
|
|
||||||
u8 variable[0];
|
|
||||||
} probe_req;
|
|
||||||
|
|
||||||
struct {
|
|
||||||
__le64 timestamp;
|
|
||||||
u16 beacon_int;
|
|
||||||
u16 capab_info;
|
|
||||||
/* followed by some of SSID, Supported rates,
|
|
||||||
* FH Params, DS Params, CF Params, IBSS Params */
|
|
||||||
u8 variable[0];
|
|
||||||
} probe_resp;
|
|
||||||
#endif
|
|
||||||
struct {
|
|
||||||
u8 category;
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u8 dialog_token;
|
|
||||||
u8 status_code;
|
|
||||||
u8 variable[0];
|
|
||||||
} wme_action;
|
|
||||||
#if 0
|
|
||||||
struct{
|
|
||||||
u8 action_code;
|
|
||||||
u8 element_id;
|
|
||||||
u8 length;
|
|
||||||
struct ieee80211_channel_sw_ie sw_elem;
|
|
||||||
} chan_switch;
|
|
||||||
struct{
|
|
||||||
u8 action_code;
|
|
||||||
u8 dialog_token;
|
|
||||||
u8 element_id;
|
|
||||||
u8 length;
|
|
||||||
struct ieee80211_msrment_ie msr_elem;
|
|
||||||
} measurement;
|
|
||||||
#endif
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u8 dialog_token;
|
|
||||||
u16 capab;
|
|
||||||
u16 timeout;
|
|
||||||
u16 start_seq_num;
|
|
||||||
} addba_req;
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u8 dialog_token;
|
|
||||||
u16 status;
|
|
||||||
u16 capab;
|
|
||||||
u16 timeout;
|
|
||||||
} addba_resp;
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u16 params;
|
|
||||||
u16 reason_code;
|
|
||||||
} delba;
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
/* capab_info for open and confirm,
|
|
||||||
* reason for close
|
|
||||||
*/
|
|
||||||
u16 aux;
|
|
||||||
/* Followed in plink_confirm by status
|
|
||||||
* code, AID and supported rates,
|
|
||||||
* and directly by supported rates in
|
|
||||||
* plink_open and plink_close
|
|
||||||
*/
|
|
||||||
u8 variable[0];
|
|
||||||
} plink_action;
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u8 variable[0];
|
|
||||||
} mesh_action;
|
|
||||||
} u;
|
|
||||||
} action;
|
|
||||||
} u;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
#pragma pack()
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* mgmt header + 1 byte category code */
|
|
||||||
#define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,106 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
||||||
* more details.
|
|
||||||
*
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef _LINUX_IF_ETHER_H
|
|
||||||
#define _LINUX_IF_ETHER_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
* IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
|
|
||||||
* and FCS/CRC (frame check sequence).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define ETH_ALEN 6 /* Octets in one ethernet addr */
|
|
||||||
#define ETH_HLEN 14 /* Total octets in header. */
|
|
||||||
#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */
|
|
||||||
#define ETH_DATA_LEN 1500 /* Max. octets in payload */
|
|
||||||
#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* These are the defined Ethernet Protocol ID's.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */
|
|
||||||
#define ETH_P_PUP 0x0200 /* Xerox PUP packet */
|
|
||||||
#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */
|
|
||||||
#define ETH_P_IP 0x0800 /* Internet Protocol packet */
|
|
||||||
#define ETH_P_X25 0x0805 /* CCITT X.25 */
|
|
||||||
#define ETH_P_ARP 0x0806 /* Address Resolution packet */
|
|
||||||
#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */
|
|
||||||
#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */
|
|
||||||
#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */
|
|
||||||
#define ETH_P_DEC 0x6000 /* DEC Assigned proto */
|
|
||||||
#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */
|
|
||||||
#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */
|
|
||||||
#define ETH_P_DNA_RT 0x6003 /* DEC DNA Routing */
|
|
||||||
#define ETH_P_LAT 0x6004 /* DEC LAT */
|
|
||||||
#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */
|
|
||||||
#define ETH_P_CUST 0x6006 /* DEC Customer use */
|
|
||||||
#define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */
|
|
||||||
#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */
|
|
||||||
#define ETH_P_ATALK 0x809B /* Appletalk DDP */
|
|
||||||
#define ETH_P_AARP 0x80F3 /* Appletalk AARP */
|
|
||||||
#define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */
|
|
||||||
#define ETH_P_IPX 0x8137 /* IPX over DIX */
|
|
||||||
#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */
|
|
||||||
#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */
|
|
||||||
#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */
|
|
||||||
#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */
|
|
||||||
#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport
|
|
||||||
* over Ethernet
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Non DIX types. Won't clash for 1500 types.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */
|
|
||||||
#define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */
|
|
||||||
#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */
|
|
||||||
#define ETH_P_802_2 0x0004 /* 802.2 frames */
|
|
||||||
#define ETH_P_SNAP 0x0005 /* Internal only */
|
|
||||||
#define ETH_P_DDCMP 0x0006 /* DEC DDCMP: Internal only */
|
|
||||||
#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/
|
|
||||||
#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */
|
|
||||||
#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */
|
|
||||||
#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/
|
|
||||||
#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */
|
|
||||||
#define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */
|
|
||||||
#define ETH_P_CONTROL 0x0016 /* Card specific control frames */
|
|
||||||
#define ETH_P_IRDA 0x0017 /* Linux-IrDA */
|
|
||||||
#define ETH_P_ECONET 0x0018 /* Acorn Econet */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is an Ethernet frame header.
|
|
||||||
*/
|
|
||||||
|
|
||||||
struct ethhdr {
|
|
||||||
unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
|
|
||||||
unsigned char h_source[ETH_ALEN]; /* source ether addr */
|
|
||||||
unsigned short h_proto; /* packet type ID field */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _vlan {
|
|
||||||
unsigned short h_vlan_TCI; /* Encapsulates priority and VLAN ID */
|
|
||||||
unsigned short h_vlan_encapsulated_proto;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define get_vlan_id(pvlan) ((ntohs((unsigned short)pvlan->h_vlan_TCI)) & 0xfff)
|
|
||||||
#define get_vlan_priority(pvlan) ((ntohs((unsigned short)pvlan->h_vlan_TCI))>>13)
|
|
||||||
#define get_vlan_encap_proto(pvlan) (ntohs((unsigned short)pvlan->h_vlan_encapsulated_proto))
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* _LINUX_IF_ETHER_H */
|
|
135
include/ip.h
135
include/ip.h
@ -1,135 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
*
|
|
||||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
||||||
* more details.
|
|
||||||
*
|
|
||||||
*****************************************************************************/
|
|
||||||
#ifndef _LINUX_IP_H
|
|
||||||
#define _LINUX_IP_H
|
|
||||||
|
|
||||||
/* SOL_IP socket options */
|
|
||||||
|
|
||||||
#define IPTOS_TOS_MASK 0x1E
|
|
||||||
#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK)
|
|
||||||
#define IPTOS_LOWDELAY 0x10
|
|
||||||
#define IPTOS_THROUGHPUT 0x08
|
|
||||||
#define IPTOS_RELIABILITY 0x04
|
|
||||||
#define IPTOS_MINCOST 0x02
|
|
||||||
|
|
||||||
#define IPTOS_PREC_MASK 0xE0
|
|
||||||
#define IPTOS_PREC(tos) ((tos)&IPTOS_PREC_MASK)
|
|
||||||
#define IPTOS_PREC_NETCONTROL 0xe0
|
|
||||||
#define IPTOS_PREC_INTERNETCONTROL 0xc0
|
|
||||||
#define IPTOS_PREC_CRITIC_ECP 0xa0
|
|
||||||
#define IPTOS_PREC_FLASHOVERRIDE 0x80
|
|
||||||
#define IPTOS_PREC_FLASH 0x60
|
|
||||||
#define IPTOS_PREC_IMMEDIATE 0x40
|
|
||||||
#define IPTOS_PREC_PRIORITY 0x20
|
|
||||||
#define IPTOS_PREC_ROUTINE 0x00
|
|
||||||
|
|
||||||
|
|
||||||
/* IP options */
|
|
||||||
#define IPOPT_COPY 0x80
|
|
||||||
#define IPOPT_CLASS_MASK 0x60
|
|
||||||
#define IPOPT_NUMBER_MASK 0x1f
|
|
||||||
|
|
||||||
#define IPOPT_COPIED(o) ((o)&IPOPT_COPY)
|
|
||||||
#define IPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK)
|
|
||||||
#define IPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK)
|
|
||||||
|
|
||||||
#define IPOPT_CONTROL 0x00
|
|
||||||
#define IPOPT_RESERVED1 0x20
|
|
||||||
#define IPOPT_MEASUREMENT 0x40
|
|
||||||
#define IPOPT_RESERVED2 0x60
|
|
||||||
|
|
||||||
#define IPOPT_END (0 | IPOPT_CONTROL)
|
|
||||||
#define IPOPT_NOOP (1 | IPOPT_CONTROL)
|
|
||||||
#define IPOPT_SEC (2 | IPOPT_CONTROL | IPOPT_COPY)
|
|
||||||
#define IPOPT_LSRR (3 | IPOPT_CONTROL | IPOPT_COPY)
|
|
||||||
#define IPOPT_TIMESTAMP (4 | IPOPT_MEASUREMENT)
|
|
||||||
#define IPOPT_RR (7 | IPOPT_CONTROL)
|
|
||||||
#define IPOPT_SID (8 | IPOPT_CONTROL | IPOPT_COPY)
|
|
||||||
#define IPOPT_SSRR (9 | IPOPT_CONTROL | IPOPT_COPY)
|
|
||||||
#define IPOPT_RA (20 | IPOPT_CONTROL | IPOPT_COPY)
|
|
||||||
|
|
||||||
#define IPVERSION 4
|
|
||||||
#define MAXTTL 255
|
|
||||||
#define IPDEFTTL 64
|
|
||||||
|
|
||||||
/* struct timestamp, struct route and MAX_ROUTES are removed.
|
|
||||||
|
|
||||||
REASONS: it is clear that nobody used them because:
|
|
||||||
- MAX_ROUTES value was wrong.
|
|
||||||
- "struct route" was wrong.
|
|
||||||
- "struct timestamp" had fatally misaligned bitfields and was completely unusable.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define IPOPT_OPTVAL 0
|
|
||||||
#define IPOPT_OLEN 1
|
|
||||||
#define IPOPT_OFFSET 2
|
|
||||||
#define IPOPT_MINOFF 4
|
|
||||||
#define MAX_IPOPTLEN 40
|
|
||||||
#define IPOPT_NOP IPOPT_NOOP
|
|
||||||
#define IPOPT_EOL IPOPT_END
|
|
||||||
#define IPOPT_TS IPOPT_TIMESTAMP
|
|
||||||
|
|
||||||
#define IPOPT_TS_TSONLY 0 /* timestamps only */
|
|
||||||
#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
|
|
||||||
#define IPOPT_TS_PRESPEC 3 /* specified modules only */
|
|
||||||
|
|
||||||
#ifdef PLATFORM_LINUX
|
|
||||||
|
|
||||||
struct ip_options {
|
|
||||||
__u32 faddr; /* Saved first hop address */
|
|
||||||
unsigned char optlen;
|
|
||||||
unsigned char srr;
|
|
||||||
unsigned char rr;
|
|
||||||
unsigned char ts;
|
|
||||||
unsigned char is_setbyuser:1, /* Set by setsockopt? */
|
|
||||||
is_data:1, /* Options in __data, rather than skb */
|
|
||||||
is_strictroute:1, /* Strict source route */
|
|
||||||
srr_is_hit:1, /* Packet destination addr was our one */
|
|
||||||
is_changed:1, /* IP checksum more not valid */
|
|
||||||
rr_needaddr:1, /* Need to record addr of outgoing dev */
|
|
||||||
ts_needtime:1, /* Need to record timestamp */
|
|
||||||
ts_needaddr:1; /* Need to record addr of outgoing dev */
|
|
||||||
unsigned char router_alert;
|
|
||||||
unsigned char __pad1;
|
|
||||||
unsigned char __pad2;
|
|
||||||
unsigned char __data[0];
|
|
||||||
};
|
|
||||||
|
|
||||||
#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct iphdr {
|
|
||||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
|
||||||
__u8 ihl:4,
|
|
||||||
version:4;
|
|
||||||
#elif defined (__BIG_ENDIAN_BITFIELD)
|
|
||||||
__u8 version:4,
|
|
||||||
ihl:4;
|
|
||||||
#else
|
|
||||||
#error "Please fix <asm/byteorder.h>"
|
|
||||||
#endif
|
|
||||||
__u8 tos;
|
|
||||||
__u16 tot_len;
|
|
||||||
__u16 id;
|
|
||||||
__u16 frag_off;
|
|
||||||
__u8 ttl;
|
|
||||||
__u8 protocol;
|
|
||||||
__u16 check;
|
|
||||||
__u32 saddr;
|
|
||||||
__u32 daddr;
|
|
||||||
/*The options start here. */
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* _LINUX_IP_H */
|
|
@ -254,10 +254,7 @@ _pkt *rtw_os_pkt_copy(_pkt *pkt);
|
|||||||
void *rtw_os_pkt_data(_pkt *pkt);
|
void *rtw_os_pkt_data(_pkt *pkt);
|
||||||
u32 rtw_os_pkt_len(_pkt *pkt);
|
u32 rtw_os_pkt_len(_pkt *pkt);
|
||||||
|
|
||||||
extern void _rtw_memcpy(void *dec, const void *sour, u32 sz);
|
|
||||||
extern void _rtw_memmove(void *dst, const void *src, u32 sz);
|
|
||||||
extern int _rtw_memcmp(const void *dst, const void *src, u32 sz);
|
extern int _rtw_memcmp(const void *dst, const void *src, u32 sz);
|
||||||
extern void _rtw_memset(void *pbuf, int c, u32 sz);
|
|
||||||
|
|
||||||
extern void _rtw_init_listhead(_list *list);
|
extern void _rtw_init_listhead(_list *list);
|
||||||
extern u32 rtw_is_list_empty(_list *phead);
|
extern u32 rtw_is_list_empty(_list *phead);
|
||||||
|
@ -55,7 +55,6 @@
|
|||||||
#include <netinet/in_systm.h>
|
#include <netinet/in_systm.h>
|
||||||
#include <netinet/in_var.h>
|
#include <netinet/in_var.h>
|
||||||
#include <netinet/if_ether.h>
|
#include <netinet/if_ether.h>
|
||||||
#include <if_ether.h>
|
|
||||||
|
|
||||||
#include <net80211/ieee80211_var.h>
|
#include <net80211/ieee80211_var.h>
|
||||||
#include <net80211/ieee80211_regdomain.h>
|
#include <net80211/ieee80211_regdomain.h>
|
||||||
@ -523,10 +522,6 @@ usb_put_dev(struct usb_device *dev)
|
|||||||
int rtw_usb_submit_urb(struct urb *urb, uint16_t mem_flags);
|
int rtw_usb_submit_urb(struct urb *urb, uint16_t mem_flags);
|
||||||
int rtw_usb_unlink_urb(struct urb *urb);
|
int rtw_usb_unlink_urb(struct urb *urb);
|
||||||
int rtw_usb_clear_halt(struct usb_device *dev, struct usb_host_endpoint *uhe);
|
int rtw_usb_clear_halt(struct usb_device *dev, struct usb_host_endpoint *uhe);
|
||||||
int rtw_usb_control_msg(struct usb_device *dev, struct usb_host_endpoint *uhe,
|
|
||||||
uint8_t request, uint8_t requesttype,
|
|
||||||
uint16_t value, uint16_t index, void *data,
|
|
||||||
uint16_t size, usb_timeout_t timeout);
|
|
||||||
int rtw_usb_set_interface(struct usb_device *dev, uint8_t iface_no, uint8_t alt_index);
|
int rtw_usb_set_interface(struct usb_device *dev, uint8_t iface_no, uint8_t alt_index);
|
||||||
int rtw_usb_setup_endpoint(struct usb_device *dev,
|
int rtw_usb_setup_endpoint(struct usb_device *dev,
|
||||||
struct usb_host_endpoint *uhe, usb_size_t bufsize);
|
struct usb_host_endpoint *uhe, usb_size_t bufsize);
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
#include <linux/rtnetlink.h>
|
#include <linux/rtnetlink.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/interrupt.h> /* for struct tasklet_struct */
|
#include <linux/interrupt.h> /* for struct tasklet_struct */
|
||||||
#include <linux/ip.h>
|
|
||||||
#include <linux/kthread.h>
|
#include <linux/kthread.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <linux/vmalloc.h>
|
#include <linux/vmalloc.h>
|
||||||
|
@ -106,15 +106,11 @@ struct _io_ops {
|
|||||||
void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||||
void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||||
|
|
||||||
void (*_sync_irp_protocol_rw)(struct io_queue *pio_q);
|
|
||||||
|
|
||||||
u32(*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
|
u32(*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
|
||||||
|
|
||||||
u32(*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
u32(*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||||
u32(*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
u32(*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||||
|
|
||||||
u32(*_write_scsi)(struct intf_hdl *pintfhdl, u32 cnt, u8 *pmem);
|
|
||||||
|
|
||||||
void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
|
void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
|
||||||
void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
|
void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
|
||||||
|
|
||||||
|
@ -1419,15 +1419,15 @@ void rtw_proxim_send_packet(_adapter *padapter, u8 *pbuf, u16 len, u8 m_rate);
|
|||||||
#define ARP_TARGET_MAC_ADDR(_arp) ARP_THA(_arp, ETH_ALEN, RTW_IP_ADDR_LEN)
|
#define ARP_TARGET_MAC_ADDR(_arp) ARP_THA(_arp, ETH_ALEN, RTW_IP_ADDR_LEN)
|
||||||
#define ARP_TARGET_IP_ADDR(_arp) ARP_TPA(_arp, ETH_ALEN, RTW_IP_ADDR_LEN)
|
#define ARP_TARGET_IP_ADDR(_arp) ARP_TPA(_arp, ETH_ALEN, RTW_IP_ADDR_LEN)
|
||||||
|
|
||||||
#define GET_ARP_SENDER_MAC_ADDR(_arp, _val) _rtw_memcpy(_val, ARP_SENDER_MAC_ADDR(_arp), ETH_ALEN)
|
#define GET_ARP_SENDER_MAC_ADDR(_arp, _val) memcpy(_val, ARP_SENDER_MAC_ADDR(_arp), ETH_ALEN)
|
||||||
#define GET_ARP_SENDER_IP_ADDR(_arp, _val) _rtw_memcpy(_val, ARP_SENDER_IP_ADDR(_arp), RTW_IP_ADDR_LEN)
|
#define GET_ARP_SENDER_IP_ADDR(_arp, _val) memcpy(_val, ARP_SENDER_IP_ADDR(_arp), RTW_IP_ADDR_LEN)
|
||||||
#define GET_ARP_TARGET_MAC_ADDR(_arp, _val) _rtw_memcpy(_val, ARP_TARGET_MAC_ADDR(_arp), ETH_ALEN)
|
#define GET_ARP_TARGET_MAC_ADDR(_arp, _val) memcpy(_val, ARP_TARGET_MAC_ADDR(_arp), ETH_ALEN)
|
||||||
#define GET_ARP_TARGET_IP_ADDR(_arp, _val) _rtw_memcpy(_val, ARP_TARGET_IP_ADDR(_arp), RTW_IP_ADDR_LEN)
|
#define GET_ARP_TARGET_IP_ADDR(_arp, _val) memcpy(_val, ARP_TARGET_IP_ADDR(_arp), RTW_IP_ADDR_LEN)
|
||||||
|
|
||||||
#define SET_ARP_SENDER_MAC_ADDR(_arp, _val) _rtw_memcpy(ARP_SENDER_MAC_ADDR(_arp), _val, ETH_ALEN)
|
#define SET_ARP_SENDER_MAC_ADDR(_arp, _val) memcpy(ARP_SENDER_MAC_ADDR(_arp), _val, ETH_ALEN)
|
||||||
#define SET_ARP_SENDER_IP_ADDR(_arp, _val) _rtw_memcpy(ARP_SENDER_IP_ADDR(_arp), _val, RTW_IP_ADDR_LEN)
|
#define SET_ARP_SENDER_IP_ADDR(_arp, _val) memcpy(ARP_SENDER_IP_ADDR(_arp), _val, RTW_IP_ADDR_LEN)
|
||||||
#define SET_ARP_TARGET_MAC_ADDR(_arp, _val) _rtw_memcpy(ARP_TARGET_MAC_ADDR(_arp), _val, ETH_ALEN)
|
#define SET_ARP_TARGET_MAC_ADDR(_arp, _val) memcpy(ARP_TARGET_MAC_ADDR(_arp), _val, ETH_ALEN)
|
||||||
#define SET_ARP_TARGET_IP_ADDR(_arp, _val) _rtw_memcpy(ARP_TARGET_IP_ADDR(_arp), _val, RTW_IP_ADDR_LEN)
|
#define SET_ARP_TARGET_IP_ADDR(_arp, _val) memcpy(ARP_TARGET_IP_ADDR(_arp), _val, RTW_IP_ADDR_LEN)
|
||||||
|
|
||||||
void dump_arp_pkt(void *sel, u8 *da, u8 *sa, u8 *arp, bool tx);
|
void dump_arp_pkt(void *sel, u8 *da, u8 *sa, u8 *arp, bool tx);
|
||||||
|
|
||||||
|
@ -700,8 +700,6 @@ extern void mp_stop_test(PADAPTER padapter);
|
|||||||
extern u32 _read_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 bitmask);
|
extern u32 _read_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 bitmask);
|
||||||
extern void _write_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 bitmask, u32 val);
|
extern void _write_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 bitmask, u32 val);
|
||||||
|
|
||||||
extern u32 read_macreg(_adapter *padapter, u32 addr, u32 sz);
|
|
||||||
extern void write_macreg(_adapter *padapter, u32 addr, u32 val, u32 sz);
|
|
||||||
extern u32 read_bbreg(_adapter *padapter, u32 addr, u32 bitmask);
|
extern u32 read_bbreg(_adapter *padapter, u32 addr, u32 bitmask);
|
||||||
extern void write_bbreg(_adapter *padapter, u32 addr, u32 bitmask, u32 val);
|
extern void write_bbreg(_adapter *padapter, u32 addr, u32 bitmask, u32 val);
|
||||||
extern u32 read_rfreg(PADAPTER padapter, u8 rfpath, u32 addr);
|
extern u32 read_rfreg(PADAPTER padapter, u8 rfpath, u32 addr);
|
||||||
|
@ -89,6 +89,8 @@
|
|||||||
extern u8 rtw_bridge_tunnel_header[];
|
extern u8 rtw_bridge_tunnel_header[];
|
||||||
extern u8 rtw_rfc1042_header[];
|
extern u8 rtw_rfc1042_header[];
|
||||||
|
|
||||||
|
#define LLC_HEADER_SIZE 6
|
||||||
|
|
||||||
/* for Rx reordering buffer control */
|
/* for Rx reordering buffer control */
|
||||||
struct recv_reorder_ctrl {
|
struct recv_reorder_ctrl {
|
||||||
_adapter *padapter;
|
_adapter *padapter;
|
||||||
|
@ -22,10 +22,6 @@
|
|||||||
#define REALTEK_USB_VENQT_CMD_IDX 0x00
|
#define REALTEK_USB_VENQT_CMD_IDX 0x00
|
||||||
#define REALTEK_USB_IN_INT_EP_IDX 1
|
#define REALTEK_USB_IN_INT_EP_IDX 1
|
||||||
|
|
||||||
enum {
|
|
||||||
VENDOR_WRITE = 0x00,
|
|
||||||
VENDOR_READ = 0x01,
|
|
||||||
};
|
|
||||||
#define ALIGNMENT_UNIT 16
|
#define ALIGNMENT_UNIT 16
|
||||||
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
|
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
|
||||||
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT)
|
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT)
|
||||||
|
@ -59,10 +59,10 @@ void usb_read_port_cancel(struct intf_hdl *pintfhdl);
|
|||||||
u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
|
u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
|
||||||
void usb_write_port_cancel(struct intf_hdl *pintfhdl);
|
void usb_write_port_cancel(struct intf_hdl *pintfhdl);
|
||||||
|
|
||||||
int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pdata, u16 len, u8 requesttype);
|
int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, void *pdata, u16 len, u8 requesttype);
|
||||||
#ifdef CONFIG_USB_SUPPORT_ASYNC_VDN_REQ
|
#ifdef CONFIG_USB_SUPPORT_ASYNC_VDN_REQ
|
||||||
int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request,
|
int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request,
|
||||||
u16 value, u16 index, void *pdata, u16 len, u8 requesttype);
|
u16 value, void *pdata, u16 len, u8 requesttype);
|
||||||
#endif /* CONFIG_USB_SUPPORT_ASYNC_VDN_REQ */
|
#endif /* CONFIG_USB_SUPPORT_ASYNC_VDN_REQ */
|
||||||
|
|
||||||
u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr);
|
u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr);
|
||||||
|
@ -150,40 +150,11 @@ enum WIFI_REASON_CODE {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Reason codes (IEEE 802.11-2007, 7.3.1.7, Table 7-22) */
|
/* Reason codes (IEEE 802.11-2007, 7.3.1.7, Table 7-22) */
|
||||||
#if 0
|
|
||||||
#define WLAN_REASON_UNSPECIFIED 1
|
|
||||||
#define WLAN_REASON_PREV_AUTH_NOT_VALID 2
|
|
||||||
#define WLAN_REASON_DEAUTH_LEAVING 3
|
|
||||||
#define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
|
|
||||||
#define WLAN_REASON_DISASSOC_AP_BUSY 5
|
|
||||||
#define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6
|
|
||||||
#define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
|
|
||||||
#define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
|
|
||||||
#define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
|
|
||||||
#endif
|
|
||||||
/* IEEE 802.11h */
|
|
||||||
#define WLAN_REASON_PWR_CAPABILITY_NOT_VALID 10
|
|
||||||
#define WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID 11
|
|
||||||
#if 0
|
|
||||||
/* IEEE 802.11i */
|
|
||||||
#define WLAN_REASON_INVALID_IE 13
|
|
||||||
#define WLAN_REASON_MICHAEL_MIC_FAILURE 14
|
|
||||||
#define WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT 15
|
|
||||||
#define WLAN_REASON_GROUP_KEY_UPDATE_TIMEOUT 16
|
|
||||||
#define WLAN_REASON_IE_IN_4WAY_DIFFERS 17
|
|
||||||
#define WLAN_REASON_GROUP_CIPHER_NOT_VALID 18
|
|
||||||
#define WLAN_REASON_PAIRWISE_CIPHER_NOT_VALID 19
|
|
||||||
#define WLAN_REASON_AKMP_NOT_VALID 20
|
|
||||||
#define WLAN_REASON_UNSUPPORTED_RSN_IE_VERSION 21
|
|
||||||
#define WLAN_REASON_INVALID_RSN_IE_CAPAB 22
|
|
||||||
#define WLAN_REASON_IEEE_802_1X_AUTH_FAILED 23
|
|
||||||
#define WLAN_REASON_CIPHER_SUITE_REJECTED 24
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum WIFI_STATUS_CODE {
|
enum WIFI_STATUS_CODE {
|
||||||
_STATS_SUCCESSFUL_ = 0,
|
_STATS_SUCCESSFUL_ = 0,
|
||||||
_STATS_FAILURE_ = 1,
|
_STATS_FAILURE_ = 1,
|
||||||
_STATS_SEC_DISABLED_ = 5,
|
_STATS_SEC_DISABLED_ = 5,
|
||||||
_STATS_NOT_IN_SAME_BSS_ = 7,
|
_STATS_NOT_IN_SAME_BSS_ = 7,
|
||||||
_STATS_CAP_FAIL_ = 10,
|
_STATS_CAP_FAIL_ = 10,
|
||||||
_STATS_NO_ASOC_ = 11,
|
_STATS_NO_ASOC_ = 11,
|
||||||
@ -197,58 +168,11 @@ enum WIFI_STATUS_CODE {
|
|||||||
_STATS_REFUSED_TEMPORARILY_ = 30,
|
_STATS_REFUSED_TEMPORARILY_ = 30,
|
||||||
_STATS_DECLINE_REQ_ = 37,
|
_STATS_DECLINE_REQ_ = 37,
|
||||||
_STATS_INVALID_PARAMETERS_ = 38,
|
_STATS_INVALID_PARAMETERS_ = 38,
|
||||||
_STATS_INVALID_RSNIE_ = 72,
|
_STATS_INVALID_RSNIE_ = 72,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Status codes (IEEE 802.11-2007, 7.3.1.9, Table 7-23) */
|
|
||||||
#if 0
|
|
||||||
#define WLAN_STATUS_SUCCESS 0
|
|
||||||
#define WLAN_STATUS_UNSPECIFIED_FAILURE 1
|
|
||||||
#define WLAN_STATUS_CAPS_UNSUPPORTED 10
|
|
||||||
#define WLAN_STATUS_REASSOC_NO_ASSOC 11
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12
|
|
||||||
#define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13
|
|
||||||
#define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14
|
|
||||||
#define WLAN_STATUS_CHALLENGE_FAIL 15
|
|
||||||
#define WLAN_STATUS_AUTH_TIMEOUT 16
|
|
||||||
#define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_RATES 18
|
|
||||||
#endif
|
|
||||||
/* entended */
|
|
||||||
/* IEEE 802.11b */
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21
|
|
||||||
/* IEEE 802.11h */
|
|
||||||
#define WLAN_STATUS_SPEC_MGMT_REQUIRED 22
|
|
||||||
#define WLAN_STATUS_PWR_CAPABILITY_NOT_VALID 23
|
|
||||||
#define WLAN_STATUS_SUPPORTED_CHANNEL_NOT_VALID 24
|
|
||||||
/* IEEE 802.11g */
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_NO_SHORT_SLOT_TIME 25
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_NO_ER_PBCC 26
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_NO_DSSS_OFDM 27
|
|
||||||
/* IEEE 802.11w */
|
|
||||||
#define WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY 30
|
|
||||||
#define WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION 31
|
|
||||||
/* IEEE 802.11i */
|
|
||||||
#define WLAN_STATUS_INVALID_IE 40
|
|
||||||
#define WLAN_STATUS_GROUP_CIPHER_NOT_VALID 41
|
|
||||||
#define WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID 42
|
|
||||||
#define WLAN_STATUS_AKMP_NOT_VALID 43
|
|
||||||
#define WLAN_STATUS_UNSUPPORTED_RSN_IE_VERSION 44
|
|
||||||
#define WLAN_STATUS_INVALID_RSN_IE_CAPAB 45
|
|
||||||
#define WLAN_STATUS_CIPHER_REJECTED_PER_POLICY 46
|
|
||||||
#define WLAN_STATUS_TS_NOT_CREATED 47
|
|
||||||
#define WLAN_STATUS_DIRECT_LINK_NOT_ALLOWED 48
|
|
||||||
#define WLAN_STATUS_DEST_STA_NOT_PRESENT 49
|
|
||||||
#define WLAN_STATUS_DEST_STA_NOT_QOS_STA 50
|
|
||||||
#define WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE 51
|
|
||||||
/* IEEE 802.11r */
|
/* IEEE 802.11r */
|
||||||
#define WLAN_STATUS_INVALID_FT_ACTION_FRAME_COUNT 52
|
|
||||||
#define WLAN_STATUS_INVALID_PMKID 53
|
#define WLAN_STATUS_INVALID_PMKID 53
|
||||||
#define WLAN_STATUS_INVALID_MDIE 54
|
|
||||||
#define WLAN_STATUS_INVALID_FTIE 55
|
|
||||||
|
|
||||||
|
|
||||||
enum WIFI_REG_DOMAIN {
|
enum WIFI_REG_DOMAIN {
|
||||||
DOMAIN_FCC = 1,
|
DOMAIN_FCC = 1,
|
||||||
@ -440,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;
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -84,7 +84,7 @@ int rtw_mp_write_reg(struct net_device *dev,
|
|||||||
*pnext = 0;
|
*pnext = 0;
|
||||||
/*addr = simple_strtoul(pch, &ptmp, 16);
|
/*addr = simple_strtoul(pch, &ptmp, 16);
|
||||||
memset(buf, '\0', sizeof(buf));
|
memset(buf, '\0', sizeof(buf));
|
||||||
_rtw_memcpy(buf, pch, pnext-pch);
|
memcpy(buf, pch, pnext-pch);
|
||||||
ret = kstrtoul(buf, 16, &addr);*/
|
ret = kstrtoul(buf, 16, &addr);*/
|
||||||
ret = sscanf(pch, "%x", &addr);
|
ret = sscanf(pch, "%x", &addr);
|
||||||
if (addr > 0x3FFF)
|
if (addr > 0x3FFF)
|
||||||
@ -2154,7 +2154,7 @@ int rtw_mp_hwtx(struct net_device *dev,
|
|||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
memset(&pMptCtx->PMacTxInfo, 0, sizeof(RT_PMAC_TX_INFO));
|
memset(&pMptCtx->PMacTxInfo, 0, sizeof(RT_PMAC_TX_INFO));
|
||||||
_rtw_memcpy((void *)&pMptCtx->PMacTxInfo, (void *)input, sizeof(RT_PMAC_TX_INFO));
|
memcpy((void *)&pMptCtx->PMacTxInfo, (void *)input, sizeof(RT_PMAC_TX_INFO));
|
||||||
memset(wrqu->data.pointer, 0, wrqu->data.length);
|
memset(wrqu->data.pointer, 0, wrqu->data.length);
|
||||||
|
|
||||||
if (pMptCtx->PMacTxInfo.bEnPMacTx == 1 && pmp_priv->mode != MP_ON) {
|
if (pMptCtx->PMacTxInfo.bEnPMacTx == 1 && pmp_priv->mode != MP_ON) {
|
||||||
|
@ -114,7 +114,7 @@ void rtw_reset_securitypriv(_adapter *adapter)
|
|||||||
|
|
||||||
memset(&backupPMKIDList[0], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
|
memset(&backupPMKIDList[0], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
|
||||||
|
|
||||||
_rtw_memcpy(&backupPMKIDList[0], &adapter->securitypriv.PMKIDList[0], sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
|
memcpy(&backupPMKIDList[0], &adapter->securitypriv.PMKIDList[0], sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
|
||||||
backupPMKIDIndex = adapter->securitypriv.PMKIDIndex;
|
backupPMKIDIndex = adapter->securitypriv.PMKIDIndex;
|
||||||
backupTKIPCountermeasure = adapter->securitypriv.btkip_countermeasure;
|
backupTKIPCountermeasure = adapter->securitypriv.btkip_countermeasure;
|
||||||
backupTKIPcountermeasure_time = adapter->securitypriv.btkip_countermeasure_time;
|
backupTKIPcountermeasure_time = adapter->securitypriv.btkip_countermeasure_time;
|
||||||
@ -122,7 +122,7 @@ void rtw_reset_securitypriv(_adapter *adapter)
|
|||||||
|
|
||||||
/* Added by Albert 2009/02/18 */
|
/* Added by Albert 2009/02/18 */
|
||||||
/* Restore the PMK information to securitypriv structure for the following connection. */
|
/* Restore the PMK information to securitypriv structure for the following connection. */
|
||||||
_rtw_memcpy(&adapter->securitypriv.PMKIDList[0], &backupPMKIDList[0], sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
|
memcpy(&adapter->securitypriv.PMKIDList[0], &backupPMKIDList[0], sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
|
||||||
adapter->securitypriv.PMKIDIndex = backupPMKIDIndex;
|
adapter->securitypriv.PMKIDIndex = backupPMKIDIndex;
|
||||||
adapter->securitypriv.btkip_countermeasure = backupTKIPCountermeasure;
|
adapter->securitypriv.btkip_countermeasure = backupTKIPCountermeasure;
|
||||||
adapter->securitypriv.btkip_countermeasure_time = backupTKIPcountermeasure_time;
|
adapter->securitypriv.btkip_countermeasure_time = backupTKIPcountermeasure_time;
|
||||||
@ -242,7 +242,7 @@ void rtw_indicate_sta_assoc_event(_adapter *padapter, struct sta_info *psta)
|
|||||||
|
|
||||||
wrqu.addr.sa_family = ARPHRD_ETHER;
|
wrqu.addr.sa_family = ARPHRD_ETHER;
|
||||||
|
|
||||||
_rtw_memcpy(wrqu.addr.sa_data, psta->cmn.mac_addr, ETH_ALEN);
|
memcpy(wrqu.addr.sa_data, psta->cmn.mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
RTW_INFO("+rtw_indicate_sta_assoc_event\n");
|
RTW_INFO("+rtw_indicate_sta_assoc_event\n");
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ void rtw_indicate_sta_disassoc_event(_adapter *padapter, struct sta_info *psta)
|
|||||||
|
|
||||||
wrqu.addr.sa_family = ARPHRD_ETHER;
|
wrqu.addr.sa_family = ARPHRD_ETHER;
|
||||||
|
|
||||||
_rtw_memcpy(wrqu.addr.sa_data, psta->cmn.mac_addr, ETH_ALEN);
|
memcpy(wrqu.addr.sa_data, psta->cmn.mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
RTW_INFO("+rtw_indicate_sta_disassoc_event\n");
|
RTW_INFO("+rtw_indicate_sta_disassoc_event\n");
|
||||||
|
|
||||||
@ -404,7 +404,7 @@ int hostapd_mode_init(_adapter *padapter)
|
|||||||
mac[4] = 0x11;
|
mac[4] = 0x11;
|
||||||
mac[5] = 0x12;
|
mac[5] = 0x12;
|
||||||
|
|
||||||
_rtw_memcpy(pnetdev->dev_addr, mac, ETH_ALEN);
|
memcpy(pnetdev->dev_addr, mac, ETH_ALEN);
|
||||||
|
|
||||||
|
|
||||||
rtw_netif_carrier_off(pnetdev);
|
rtw_netif_carrier_off(pnetdev);
|
||||||
|
@ -900,7 +900,7 @@ uint loadparam(_adapter *padapter)
|
|||||||
/* registry_par->hci = (u8)hci; */
|
/* registry_par->hci = (u8)hci; */
|
||||||
registry_par->network_mode = (u8)rtw_network_mode;
|
registry_par->network_mode = (u8)rtw_network_mode;
|
||||||
|
|
||||||
_rtw_memcpy(registry_par->ssid.Ssid, "ANY", 3);
|
memcpy(registry_par->ssid.Ssid, "ANY", 3);
|
||||||
registry_par->ssid.SsidLength = 3;
|
registry_par->ssid.SsidLength = 3;
|
||||||
|
|
||||||
registry_par->channel = (u8)rtw_channel;
|
registry_par->channel = (u8)rtw_channel;
|
||||||
@ -1011,7 +1011,7 @@ uint loadparam(_adapter *padapter)
|
|||||||
RTW_ERR("%s discard rtw_country_code not in alpha2\n", __func__);
|
RTW_ERR("%s discard rtw_country_code not in alpha2\n", __func__);
|
||||||
memset(registry_par->alpha2, 0xFF, 2);
|
memset(registry_par->alpha2, 0xFF, 2);
|
||||||
} else
|
} else
|
||||||
_rtw_memcpy(registry_par->alpha2, rtw_country_code, 2);
|
memcpy(registry_par->alpha2, rtw_country_code, 2);
|
||||||
|
|
||||||
registry_par->channel_plan = (u8)rtw_channel_plan;
|
registry_par->channel_plan = (u8)rtw_channel_plan;
|
||||||
rtw_regsty_load_excl_chs(registry_par);
|
rtw_regsty_load_excl_chs(registry_par);
|
||||||
@ -1249,8 +1249,8 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */
|
memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */
|
||||||
_rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */
|
memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (rtw_is_hw_init_completed(padapter)) {
|
if (rtw_is_hw_init_completed(padapter)) {
|
||||||
@ -1366,7 +1366,7 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
|
|||||||
u32 priority;
|
u32 priority;
|
||||||
u8 *pdata = skb->data;
|
u8 *pdata = skb->data;
|
||||||
|
|
||||||
_rtw_memcpy(ð_type, pdata + (ETH_ALEN << 1), 2);
|
memcpy(ð_type, pdata + (ETH_ALEN << 1), 2);
|
||||||
|
|
||||||
switch (eth_type) {
|
switch (eth_type) {
|
||||||
case htons(ETH_P_IP):
|
case htons(ETH_P_IP):
|
||||||
@ -1696,7 +1696,7 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
|
|||||||
/* alloc netdev name */
|
/* alloc netdev name */
|
||||||
rtw_init_netdev_name(ndev, name);
|
rtw_init_netdev_name(ndev, name);
|
||||||
|
|
||||||
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
|
memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
|
||||||
|
|
||||||
/* Tell the network stack we exist */
|
/* Tell the network stack we exist */
|
||||||
|
|
||||||
@ -2639,7 +2639,7 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
|
|||||||
if (primary_padapter->bup == _FALSE)
|
if (primary_padapter->bup == _FALSE)
|
||||||
rtw_macaddr_cfg(adapter_mac_addr(primary_padapter), get_hal_mac_addr(primary_padapter));
|
rtw_macaddr_cfg(adapter_mac_addr(primary_padapter), get_hal_mac_addr(primary_padapter));
|
||||||
|
|
||||||
_rtw_memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN);
|
memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the BIT1 is 0, the address is universally administered.
|
* If the BIT1 is 0, the address is universally administered.
|
||||||
@ -2647,13 +2647,13 @@ int _netdev_vir_if_open(struct net_device *pnetdev)
|
|||||||
*/
|
*/
|
||||||
mac[0] |= BIT(1);
|
mac[0] |= BIT(1);
|
||||||
|
|
||||||
_rtw_memcpy(adapter_mac_addr(padapter), mac, ETH_ALEN);
|
memcpy(adapter_mac_addr(padapter), mac, ETH_ALEN);
|
||||||
|
|
||||||
#ifdef CONFIG_MI_WITH_MBSSID_CAM
|
#ifdef CONFIG_MI_WITH_MBSSID_CAM
|
||||||
rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter));
|
rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter));
|
||||||
#endif
|
#endif
|
||||||
rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter));
|
rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter));
|
||||||
_rtw_memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
}
|
}
|
||||||
#endif /*CONFIG_PLATFORM_INTEL_BYT*/
|
#endif /*CONFIG_PLATFORM_INTEL_BYT*/
|
||||||
|
|
||||||
@ -2812,7 +2812,7 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter,
|
|||||||
if (loadparam(padapter) != _SUCCESS)
|
if (loadparam(padapter) != _SUCCESS)
|
||||||
goto free_adapter;
|
goto free_adapter;
|
||||||
|
|
||||||
_rtw_memcpy(padapter, primary_padapter, sizeof(_adapter));
|
memcpy(padapter, primary_padapter, sizeof(_adapter));
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
padapter->bup = _FALSE;
|
padapter->bup = _FALSE;
|
||||||
@ -2850,7 +2850,7 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter,
|
|||||||
|
|
||||||
|
|
||||||
/*get mac address from primary_padapter*/
|
/*get mac address from primary_padapter*/
|
||||||
_rtw_memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN);
|
memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the BIT1 is 0, the address is universally administered.
|
* If the BIT1 is 0, the address is universally administered.
|
||||||
@ -2860,7 +2860,7 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter,
|
|||||||
if (padapter->iface_id > IFACE_ID1)
|
if (padapter->iface_id > IFACE_ID1)
|
||||||
mac[4] ^= BIT(padapter->iface_id);
|
mac[4] ^= BIT(padapter->iface_id);
|
||||||
|
|
||||||
_rtw_memcpy(adapter_mac_addr(padapter), mac, ETH_ALEN);
|
memcpy(adapter_mac_addr(padapter), mac, ETH_ALEN);
|
||||||
/* update mac-address to mbsid-cam cache*/
|
/* update mac-address to mbsid-cam cache*/
|
||||||
#ifdef CONFIG_MI_WITH_MBSSID_CAM
|
#ifdef CONFIG_MI_WITH_MBSSID_CAM
|
||||||
rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter));
|
rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter));
|
||||||
@ -2991,7 +2991,7 @@ static int rtw_inetaddr_notifier_call(struct notifier_block *nb,
|
|||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case NETDEV_UP:
|
case NETDEV_UP:
|
||||||
_rtw_memcpy(pmlmeinfo->ip_addr, &ifa->ifa_address,
|
memcpy(pmlmeinfo->ip_addr, &ifa->ifa_address,
|
||||||
RTW_IP_ADDR_LEN);
|
RTW_IP_ADDR_LEN);
|
||||||
RTW_DBG("%s[%s]: up IP: %pI4\n", __func__,
|
RTW_DBG("%s[%s]: up IP: %pI4\n", __func__,
|
||||||
ifa->ifa_label, pmlmeinfo->ip_addr);
|
ifa->ifa_label, pmlmeinfo->ip_addr);
|
||||||
@ -3044,7 +3044,7 @@ static int rtw_inet6addr_notifier_call(struct notifier_block *nb,
|
|||||||
#ifdef CONFIG_WOWLAN
|
#ifdef CONFIG_WOWLAN
|
||||||
pwrctl->wowlan_ns_offload_en = _TRUE;
|
pwrctl->wowlan_ns_offload_en = _TRUE;
|
||||||
#endif
|
#endif
|
||||||
_rtw_memcpy(pmlmeinfo->ip6_addr, &inet6_ifa->addr,
|
memcpy(pmlmeinfo->ip6_addr, &inet6_ifa->addr,
|
||||||
RTW_IPv6_ADDR_LEN);
|
RTW_IPv6_ADDR_LEN);
|
||||||
RTW_DBG("%s: up IPv6 addrs: %pI6\n", __func__,
|
RTW_DBG("%s: up IPv6 addrs: %pI6\n", __func__,
|
||||||
pmlmeinfo->ip6_addr);
|
pmlmeinfo->ip6_addr);
|
||||||
@ -3402,7 +3402,7 @@ int _netdev_open(struct net_device *pnetdev)
|
|||||||
rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter));
|
rtw_mbid_camid_alloc(padapter, adapter_mac_addr(padapter));
|
||||||
#endif
|
#endif
|
||||||
rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter));
|
rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter));
|
||||||
_rtw_memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
#endif /* CONFIG_PLATFORM_INTEL_BYT */
|
||||||
|
|
||||||
rtw_clr_surprise_removed(padapter);
|
rtw_clr_surprise_removed(padapter);
|
||||||
@ -4160,7 +4160,7 @@ static int arp_query(unsigned char *haddr, u32 paddr,
|
|||||||
if (neighbor_entry != NULL) {
|
if (neighbor_entry != NULL) {
|
||||||
neighbor_entry->used = jiffies;
|
neighbor_entry->used = jiffies;
|
||||||
if (neighbor_entry->nud_state & NUD_VALID) {
|
if (neighbor_entry->nud_state & NUD_VALID) {
|
||||||
_rtw_memcpy(haddr, neighbor_entry->ha, dev->addr_len);
|
memcpy(haddr, neighbor_entry->ha, dev->addr_len);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
neigh_release(neighbor_entry);
|
neigh_release(neighbor_entry);
|
||||||
@ -4213,7 +4213,7 @@ int rtw_gw_addr_query(_adapter *padapter)
|
|||||||
pmlmepriv->gw_ip[1] = (gw_addr & 0xff00) >> 8;
|
pmlmepriv->gw_ip[1] = (gw_addr & 0xff00) >> 8;
|
||||||
pmlmepriv->gw_ip[2] = (gw_addr & 0xff0000) >> 16;
|
pmlmepriv->gw_ip[2] = (gw_addr & 0xff0000) >> 16;
|
||||||
pmlmepriv->gw_ip[3] = (gw_addr & 0xff000000) >> 24;
|
pmlmepriv->gw_ip[3] = (gw_addr & 0xff000000) >> 24;
|
||||||
_rtw_memcpy(pmlmepriv->gw_mac_addr, gw_mac, ETH_ALEN);
|
memcpy(pmlmepriv->gw_mac_addr, gw_mac, ETH_ALEN);
|
||||||
RTW_INFO("%s Gateway Mac:\t" MAC_FMT "\n", __FUNCTION__, MAC_ARG(pmlmepriv->gw_mac_addr));
|
RTW_INFO("%s Gateway Mac:\t" MAC_FMT "\n", __FUNCTION__, MAC_ARG(pmlmepriv->gw_mac_addr));
|
||||||
RTW_INFO("%s Gateway IP:\t" IP_FMT "\n", __FUNCTION__, IP_ARG(pmlmepriv->gw_ip));
|
RTW_INFO("%s Gateway IP:\t" IP_FMT "\n", __FUNCTION__, IP_ARG(pmlmepriv->gw_ip));
|
||||||
} else
|
} else
|
||||||
|
@ -96,7 +96,7 @@ int rtw_os_alloc_recvframe(_adapter *padapter, union recv_frame *precvframe, u8
|
|||||||
precvframe->u.hdr.rx_end = pkt_copy->data + alloc_sz;
|
precvframe->u.hdr.rx_end = pkt_copy->data + alloc_sz;
|
||||||
skb_reserve(pkt_copy, 8 - ((SIZE_PTR)(pkt_copy->data) & 7)); /* force pkt_copy->data at 8-byte alignment address */
|
skb_reserve(pkt_copy, 8 - ((SIZE_PTR)(pkt_copy->data) & 7)); /* force pkt_copy->data at 8-byte alignment address */
|
||||||
skb_reserve(pkt_copy, shift_sz);/* force ip_hdr at 8-byte alignment address according to shift_sz. */
|
skb_reserve(pkt_copy, shift_sz);/* force ip_hdr at 8-byte alignment address according to shift_sz. */
|
||||||
_rtw_memcpy(pkt_copy->data, pdata, skb_len);
|
memcpy(pkt_copy->data, pdata, skb_len);
|
||||||
precvframe->u.hdr.rx_data = precvframe->u.hdr.rx_tail = pkt_copy->data;
|
precvframe->u.hdr.rx_data = precvframe->u.hdr.rx_tail = pkt_copy->data;
|
||||||
} else {
|
} else {
|
||||||
#if 0
|
#if 0
|
||||||
@ -296,7 +296,7 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, const u8 *da, const u8 *s
|
|||||||
if (sub_skb) {
|
if (sub_skb) {
|
||||||
skb_reserve(sub_skb, 14);
|
skb_reserve(sub_skb, 14);
|
||||||
data_ptr = (u8 *)skb_put(sub_skb, msdu_len);
|
data_ptr = (u8 *)skb_put(sub_skb, msdu_len);
|
||||||
_rtw_memcpy(data_ptr, msdu, msdu_len);
|
memcpy(data_ptr, msdu, msdu_len);
|
||||||
} else
|
} else
|
||||||
#endif /* CONFIG_SKB_COPY */
|
#endif /* CONFIG_SKB_COPY */
|
||||||
{
|
{
|
||||||
@ -320,16 +320,16 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, const u8 *da, const u8 *s
|
|||||||
) {
|
) {
|
||||||
/* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
|
/* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
|
||||||
skb_pull(sub_skb, SNAP_SIZE);
|
skb_pull(sub_skb, SNAP_SIZE);
|
||||||
_rtw_memcpy(skb_push(sub_skb, ETH_ALEN), sa, ETH_ALEN);
|
memcpy(skb_push(sub_skb, ETH_ALEN), sa, ETH_ALEN);
|
||||||
_rtw_memcpy(skb_push(sub_skb, ETH_ALEN), da, ETH_ALEN);
|
memcpy(skb_push(sub_skb, ETH_ALEN), da, ETH_ALEN);
|
||||||
} else {
|
} else {
|
||||||
/* Leave Ethernet header part of hdr and full payload */
|
/* Leave Ethernet header part of hdr and full payload */
|
||||||
u16 len;
|
u16 len;
|
||||||
|
|
||||||
len = htons(sub_skb->len);
|
len = htons(sub_skb->len);
|
||||||
_rtw_memcpy(skb_push(sub_skb, 2), &len, 2);
|
memcpy(skb_push(sub_skb, 2), &len, 2);
|
||||||
_rtw_memcpy(skb_push(sub_skb, ETH_ALEN), sa, ETH_ALEN);
|
memcpy(skb_push(sub_skb, ETH_ALEN), sa, ETH_ALEN);
|
||||||
_rtw_memcpy(skb_push(sub_skb, ETH_ALEN), da, ETH_ALEN);
|
memcpy(skb_push(sub_skb, ETH_ALEN), da, ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sub_skb;
|
return sub_skb;
|
||||||
@ -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); */
|
||||||
|
|
||||||
@ -590,7 +590,7 @@ void rtw_handle_tkip_mic_err(_adapter *padapter, struct sta_info *sta, u8 bgroup
|
|||||||
ev.flags |= IW_MICFAILURE_PAIRWISE;
|
ev.flags |= IW_MICFAILURE_PAIRWISE;
|
||||||
|
|
||||||
ev.src_addr.sa_family = ARPHRD_ETHER;
|
ev.src_addr.sa_family = ARPHRD_ETHER;
|
||||||
_rtw_memcpy(ev.src_addr.sa_data, sta->cmn.mac_addr, ETH_ALEN);
|
memcpy(ev.src_addr.sa_data, sta->cmn.mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
memset(&wrqu, 0x00, sizeof(wrqu));
|
memset(&wrqu, 0x00, sizeof(wrqu));
|
||||||
wrqu.data.length = sizeof(ev);
|
wrqu.data.length = sizeof(ev);
|
||||||
|
@ -415,7 +415,7 @@ int rtw_android_get_p2p_dev_addr(struct net_device *net, char *command, int tota
|
|||||||
int bytes_written = 0;
|
int bytes_written = 0;
|
||||||
|
|
||||||
/* We use the same address as our HW MAC address */
|
/* We use the same address as our HW MAC address */
|
||||||
_rtw_memcpy(command, net->dev_addr, ETH_ALEN);
|
memcpy(command, net->dev_addr, ETH_ALEN);
|
||||||
|
|
||||||
bytes_written = ETH_ALEN;
|
bytes_written = ETH_ALEN;
|
||||||
return bytes_written;
|
return bytes_written;
|
||||||
@ -538,7 +538,7 @@ int rtw_gtk_offload(struct net_device *net, u8 *cmd_ptr)
|
|||||||
/* string command length of "GTK_REKEY_OFFLOAD" */
|
/* string command length of "GTK_REKEY_OFFLOAD" */
|
||||||
cmd_ptr += 18;
|
cmd_ptr += 18;
|
||||||
|
|
||||||
_rtw_memcpy(psta->kek, cmd_ptr, RTW_KEK_LEN);
|
memcpy(psta->kek, cmd_ptr, RTW_KEK_LEN);
|
||||||
cmd_ptr += RTW_KEK_LEN;
|
cmd_ptr += RTW_KEK_LEN;
|
||||||
/*
|
/*
|
||||||
printk("supplicant KEK: ");
|
printk("supplicant KEK: ");
|
||||||
@ -546,13 +546,13 @@ int rtw_gtk_offload(struct net_device *net, u8 *cmd_ptr)
|
|||||||
printk(" %02x ", psta->kek[i]);
|
printk(" %02x ", psta->kek[i]);
|
||||||
printk("\n supplicant KCK: ");
|
printk("\n supplicant KCK: ");
|
||||||
*/
|
*/
|
||||||
_rtw_memcpy(psta->kck, cmd_ptr, RTW_KCK_LEN);
|
memcpy(psta->kck, cmd_ptr, RTW_KCK_LEN);
|
||||||
cmd_ptr += RTW_KCK_LEN;
|
cmd_ptr += RTW_KCK_LEN;
|
||||||
/*
|
/*
|
||||||
for(i=0;i<RTW_KEK_LEN; i++)
|
for(i=0;i<RTW_KEK_LEN; i++)
|
||||||
printk(" %02x ", psta->kck[i]);
|
printk(" %02x ", psta->kck[i]);
|
||||||
*/
|
*/
|
||||||
_rtw_memcpy(psta->replay_ctr, cmd_ptr, RTW_REPLAY_CTR_LEN);
|
memcpy(psta->replay_ctr, cmd_ptr, RTW_REPLAY_CTR_LEN);
|
||||||
psecuritypriv->binstallKCK_KEK = _TRUE;
|
psecuritypriv->binstallKCK_KEK = _TRUE;
|
||||||
|
|
||||||
/* printk("\nREPLAY_CTR: "); */
|
/* printk("\nREPLAY_CTR: "); */
|
||||||
|
@ -1358,7 +1358,7 @@ void rtw_cfgvendor_rssi_monitor_evt(_adapter *padapter) {
|
|||||||
|
|
||||||
data.version = RSSI_MONITOR_EVT_VERSION;
|
data.version = RSSI_MONITOR_EVT_VERSION;
|
||||||
data.cur_rssi = rssi;
|
data.cur_rssi = rssi;
|
||||||
_rtw_memcpy(data.BSSID, pcur_network->network.MacAddress, sizeof(mac_addr));
|
memcpy(data.BSSID, pcur_network->network.MacAddress, sizeof(mac_addr));
|
||||||
|
|
||||||
nla_append(skb, sizeof(data), &data);
|
nla_append(skb, sizeof(data), &data);
|
||||||
|
|
||||||
@ -1476,7 +1476,7 @@ static int rtw_cfgvendor_logger_get_ring_status(struct wiphy *wiphy,
|
|||||||
wifi_ring_buffer_status ring_status;
|
wifi_ring_buffer_status ring_status;
|
||||||
|
|
||||||
|
|
||||||
_rtw_memcpy(ring_status.name, ring_buf_name, strlen(ring_buf_name)+1);
|
memcpy(ring_status.name, ring_buf_name, strlen(ring_buf_name)+1);
|
||||||
ring_status.ring_id = 1;
|
ring_status.ring_id = 1;
|
||||||
/* Alloc the SKB for vendor_event */
|
/* Alloc the SKB for vendor_event */
|
||||||
skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy,
|
skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy,
|
||||||
@ -1700,7 +1700,7 @@ static int rtw_cfgvendor_set_country(struct wiphy *wiphy,
|
|||||||
type = nla_type(iter);
|
type = nla_type(iter);
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ANDR_WIFI_ATTRIBUTE_COUNTRY:
|
case ANDR_WIFI_ATTRIBUTE_COUNTRY:
|
||||||
_rtw_memcpy(country_code, nla_data(iter),
|
memcpy(country_code, nla_data(iter),
|
||||||
MIN(nla_len(iter), CNTRY_BUF_SZ));
|
MIN(nla_len(iter), CNTRY_BUF_SZ));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -23,7 +23,7 @@ struct rtw_async_write_data {
|
|||||||
struct usb_ctrlrequest dr;
|
struct usb_ctrlrequest dr;
|
||||||
};
|
};
|
||||||
|
|
||||||
int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pdata, u16 len, u8 requesttype)
|
int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, void *pdata, u16 len, u8 requesttype)
|
||||||
{
|
{
|
||||||
_adapter *padapter = pintfhdl->padapter;
|
_adapter *padapter = pintfhdl->padapter;
|
||||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||||
@ -34,7 +34,6 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pda
|
|||||||
#ifdef CONFIG_USB_VENDOR_REQ_BUFFER_DYNAMIC_ALLOCATE
|
#ifdef CONFIG_USB_VENDOR_REQ_BUFFER_DYNAMIC_ALLOCATE
|
||||||
u32 tmp_buflen = 0;
|
u32 tmp_buflen = 0;
|
||||||
#endif
|
#endif
|
||||||
u8 reqtype;
|
|
||||||
u8 *pIo_buf;
|
u8 *pIo_buf;
|
||||||
int vendorreq_times = 0;
|
int vendorreq_times = 0;
|
||||||
|
|
||||||
@ -94,29 +93,30 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pda
|
|||||||
goto release_mutex;
|
goto release_mutex;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) {
|
if (requesttype == REALTEK_USB_VENQT_READ)
|
||||||
memset(pIo_buf, 0, len);
|
pipe = usb_rcvctrlpipe(udev, 0);/* read_in */
|
||||||
|
else
|
||||||
|
pipe = usb_sndctrlpipe(udev, 0);/* write_out */
|
||||||
|
|
||||||
if (requesttype == 0x01) {
|
while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) {
|
||||||
pipe = usb_rcvctrlpipe(udev, 0);/* read_in */
|
|
||||||
reqtype = REALTEK_USB_VENQT_READ;
|
if (requesttype == REALTEK_USB_VENQT_READ) {
|
||||||
|
memset(pIo_buf, 0, len);
|
||||||
} else {
|
} else {
|
||||||
pipe = usb_sndctrlpipe(udev, 0);/* write_out */
|
memcpy(pIo_buf, pdata, len);
|
||||||
reqtype = REALTEK_USB_VENQT_WRITE;
|
|
||||||
_rtw_memcpy(pIo_buf, pdata, len);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
status = usb_control_msg(udev, pipe, REALTEK_USB_VENQT_CMD_REQ, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT);
|
status = usb_control_msg(udev, pipe, REALTEK_USB_VENQT_CMD_REQ, requesttype, value, REALTEK_USB_VENQT_CMD_IDX, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT);
|
||||||
|
|
||||||
if (status == len) { /* Success this control transfer. */
|
if (status == len) { /* Success this control transfer. */
|
||||||
rtw_reset_continual_io_error(pdvobjpriv);
|
rtw_reset_continual_io_error(pdvobjpriv);
|
||||||
if (requesttype == 0x01) {
|
if (requesttype == REALTEK_USB_VENQT_READ) {
|
||||||
/* For Control read transfer, we have to copy the read data from pIo_buf to pdata. */
|
/* For Control read transfer, we have to copy the read data from pIo_buf to pdata. */
|
||||||
_rtw_memcpy(pdata, pIo_buf, len);
|
memcpy(pdata, pIo_buf, len);
|
||||||
}
|
}
|
||||||
} else { /* error cases */
|
} else { /* error cases */
|
||||||
RTW_INFO("reg 0x%x, usb %s %u fail, status:%d value=0x%x, vendorreq_times:%d\n"
|
RTW_INFO("reg 0x%x, usb %s %u fail, status:%d value=0x%x, vendorreq_times:%d\n"
|
||||||
, value, (requesttype == 0x01) ? "read" : "write" , len, status, *(u32 *)pdata, vendorreq_times);
|
, value, (requesttype == REALTEK_USB_VENQT_READ) ? "read" : "write" , len, status, *(u32 *)pdata, vendorreq_times);
|
||||||
|
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
if (status == (-ESHUTDOWN) || status == -ENODEV)
|
if (status == (-ESHUTDOWN) || status == -ENODEV)
|
||||||
@ -133,7 +133,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pda
|
|||||||
if (status > 0) {
|
if (status > 0) {
|
||||||
if (requesttype == 0x01) {
|
if (requesttype == 0x01) {
|
||||||
/* For Control read transfer, we have to copy the read data from pIo_buf to pdata. */
|
/* For Control read transfer, we have to copy the read data from pIo_buf to pdata. */
|
||||||
_rtw_memcpy(pdata, pIo_buf, len);
|
memcpy(pdata, pIo_buf, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -165,15 +165,11 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pda
|
|||||||
|
|
||||||
if (current_reg_sec == REG_ON_SEC) {
|
if (current_reg_sec == REG_ON_SEC) {
|
||||||
unsigned int t_pipe = usb_sndctrlpipe(udev, 0);/* write_out */
|
unsigned int t_pipe = usb_sndctrlpipe(udev, 0);/* write_out */
|
||||||
u8 t_reqtype = REALTEK_USB_VENQT_WRITE;
|
|
||||||
u8 t_len = 1;
|
u8 t_len = 1;
|
||||||
u8 t_req = 0x05;
|
|
||||||
u16 t_reg = 0;
|
u16 t_reg = 0;
|
||||||
u16 t_index = 0;
|
|
||||||
|
|
||||||
t_reg = 0x4e0;
|
t_reg = 0x4e0;
|
||||||
|
|
||||||
status = usb_control_msg(udev, t_pipe, t_req, t_reqtype, t_reg, t_index, pIo_buf, t_len, RTW_USB_CONTROL_MSG_TIMEOUT);
|
status = usb_control_msg(udev, t_pipe, REALTEK_USB_VENQT_CMD_REQ, REALTEK_USB_VENQT_WRITE, t_reg, REALTEK_USB_VENQT_CMD_IDX, pIo_buf, t_len, RTW_USB_CONTROL_MSG_TIMEOUT);
|
||||||
|
|
||||||
if (status == t_len)
|
if (status == t_len)
|
||||||
rtw_reset_continual_io_error(pdvobjpriv);
|
rtw_reset_continual_io_error(pdvobjpriv);
|
||||||
@ -208,22 +204,19 @@ static void _usbctrl_vendorreq_async_callback(struct urb *urb, struct pt_regs *r
|
|||||||
}
|
}
|
||||||
|
|
||||||
int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request,
|
int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request,
|
||||||
u16 value, u16 index, void *pdata, u16 len, u8 requesttype)
|
u16 value, void *pdata, u16 len, u8 requesttype)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
unsigned int pipe;
|
unsigned int pipe;
|
||||||
u8 reqtype;
|
|
||||||
struct usb_ctrlrequest *dr;
|
struct usb_ctrlrequest *dr;
|
||||||
struct urb *urb;
|
struct urb *urb;
|
||||||
struct rtw_async_write_data *buf;
|
struct rtw_async_write_data *buf;
|
||||||
|
|
||||||
|
|
||||||
if (requesttype == VENDOR_READ) {
|
if (requesttype == REALTEK_USB_VENQT_READ) {
|
||||||
pipe = usb_rcvctrlpipe(udev, 0);/* read_in */
|
pipe = usb_rcvctrlpipe(udev, 0);/* read_in */
|
||||||
reqtype = REALTEK_USB_VENQT_READ;
|
|
||||||
} else {
|
} else {
|
||||||
pipe = usb_sndctrlpipe(udev, 0);/* write_out */
|
pipe = usb_sndctrlpipe(udev, 0);/* write_out */
|
||||||
reqtype = REALTEK_USB_VENQT_WRITE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = (struct rtl819x_async_write_data *)rtw_zmalloc(sizeof(*buf));
|
buf = (struct rtl819x_async_write_data *)rtw_zmalloc(sizeof(*buf));
|
||||||
@ -241,13 +234,13 @@ int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request,
|
|||||||
|
|
||||||
dr = &buf->dr;
|
dr = &buf->dr;
|
||||||
|
|
||||||
dr->bRequestType = reqtype;
|
dr->bRequestType = requesttype;
|
||||||
dr->bRequest = request;
|
dr->bRequest = request;
|
||||||
dr->wValue = cpu_to_le16(value);
|
dr->wValue = cpu_to_le16(value);
|
||||||
dr->wIndex = cpu_to_le16(index);
|
dr->wIndex = cpu_to_le16(REALTEK_USB_VENQT_CMD_IDX);
|
||||||
dr->wLength = cpu_to_le16(len);
|
dr->wLength = cpu_to_le16(len);
|
||||||
|
|
||||||
_rtw_memcpy(buf, pdata, len);
|
memcpy(buf, pdata, len);
|
||||||
|
|
||||||
usb_fill_control_urb(urb, udev, pipe, (unsigned char *)dr, buf, len,
|
usb_fill_control_urb(urb, udev, pipe, (unsigned char *)dr, buf, len,
|
||||||
_usbctrl_vendorreq_async_callback, buf);
|
_usbctrl_vendorreq_async_callback, buf);
|
||||||
|
@ -421,7 +421,7 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
|
|||||||
newskb = rtw_skb_copy(skb);
|
newskb = rtw_skb_copy(skb);
|
||||||
|
|
||||||
if (newskb) {
|
if (newskb) {
|
||||||
_rtw_memcpy(newskb->data, psta->cmn.mac_addr, ETH_ALEN);
|
memcpy(newskb->data, psta->cmn.mac_addr, ETH_ALEN);
|
||||||
res = rtw_xmit(padapter, &newskb);
|
res = rtw_xmit(padapter, &newskb);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_entry_err_xmit);
|
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_entry_err_xmit);
|
||||||
|
@ -792,32 +792,6 @@ inline u32 rtw_os_pkt_len(_pkt *pkt)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtw_memcpy(void *dst, const void *src, u32 sz)
|
|
||||||
{
|
|
||||||
|
|
||||||
#if defined(PLATFORM_LINUX) || defined (PLATFORM_FREEBSD)
|
|
||||||
|
|
||||||
memcpy(dst, src, sz);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisMoveMemory(dst, src, sz);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void _rtw_memmove(void *dst, const void *src, u32 sz)
|
|
||||||
{
|
|
||||||
#if defined(PLATFORM_LINUX)
|
|
||||||
memmove(dst, src, sz);
|
|
||||||
#else
|
|
||||||
#error "TBD\n"
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
int _rtw_memcmp(const void *dst, const void *src, u32 sz)
|
int _rtw_memcmp(const void *dst, const void *src, u32 sz)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -2028,7 +2002,7 @@ int rtw_change_ifname(_adapter *padapter, const char *ifname)
|
|||||||
|
|
||||||
rtw_init_netdev_name(pnetdev, ifname);
|
rtw_init_netdev_name(pnetdev, ifname);
|
||||||
|
|
||||||
_rtw_memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
|
memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
|
||||||
|
|
||||||
if (rtnl_lock_needed)
|
if (rtnl_lock_needed)
|
||||||
ret = register_netdev(pnetdev);
|
ret = register_netdev(pnetdev);
|
||||||
@ -2181,7 +2155,7 @@ void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len)
|
|||||||
dup = rtw_malloc(src_len);
|
dup = rtw_malloc(src_len);
|
||||||
if (dup) {
|
if (dup) {
|
||||||
dup_len = src_len;
|
dup_len = src_len;
|
||||||
_rtw_memcpy(dup, src, dup_len);
|
memcpy(dup, src, dup_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
keep_ori:
|
keep_ori:
|
||||||
@ -2343,7 +2317,7 @@ int map_readN(const struct map_t *map, u16 offset, u16 len, u8 *buf)
|
|||||||
c_len = seg->sa + seg->len - offset;
|
c_len = seg->sa + seg->len - offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
_rtw_memcpy(c_dst, c_src, c_len);
|
memcpy(c_dst, c_src, c_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
@ -2413,7 +2387,7 @@ int rtw_blacklist_add(_queue *blist, const u8 *addr, u32 timeout_ms)
|
|||||||
if (exist == _FALSE) {
|
if (exist == _FALSE) {
|
||||||
ent = rtw_malloc(sizeof(struct blacklist_ent));
|
ent = rtw_malloc(sizeof(struct blacklist_ent));
|
||||||
if (ent) {
|
if (ent) {
|
||||||
_rtw_memcpy(ent->addr, addr, ETH_ALEN);
|
memcpy(ent->addr, addr, ETH_ALEN);
|
||||||
ent->exp_time = rtw_get_current_time()
|
ent->exp_time = rtw_get_current_time()
|
||||||
+ rtw_ms_to_systime(timeout_ms);
|
+ rtw_ms_to_systime(timeout_ms);
|
||||||
rtw_list_insert_tail(&ent->list, head);
|
rtw_list_insert_tail(&ent->list, head);
|
||||||
|
Loading…
Reference in New Issue
Block a user