mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-12 07:34:08 +08:00
staging: r8188eu: ra and ta do not depend on to_ds, from_ds
The "DS bit usage" table in include/linux/ieee80211.h shows that ra is always addr1 and ta is always addr2. We can set pattrib->ra and pattrib->ta regardless of the to_ds and from_ds bits. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1a90b6e23b
commit
d88a36bdc5
@ -962,19 +962,15 @@ static int validate_recv_data_frame(struct adapter *adapter,
|
||||
if (ieee80211_has_a4(hdr->frame_control))
|
||||
return _FAIL;
|
||||
|
||||
if (ieee80211_has_fromds(hdr->frame_control)) {
|
||||
memcpy(pattrib->ra, pda, ETH_ALEN);
|
||||
memcpy(pattrib->ta, pbssid, ETH_ALEN);
|
||||
memcpy(pattrib->ra, hdr->addr1, ETH_ALEN);
|
||||
memcpy(pattrib->ta, hdr->addr2, ETH_ALEN);
|
||||
|
||||
if (ieee80211_has_fromds(hdr->frame_control))
|
||||
ret = ap2sta_data_frame(adapter, precv_frame, &psta);
|
||||
} else if (ieee80211_has_tods(hdr->frame_control)) {
|
||||
memcpy(pattrib->ra, pbssid, ETH_ALEN);
|
||||
memcpy(pattrib->ta, psa, ETH_ALEN);
|
||||
else if (ieee80211_has_tods(hdr->frame_control))
|
||||
ret = sta2ap_data_frame(adapter, precv_frame, &psta);
|
||||
} else {
|
||||
memcpy(pattrib->ra, pda, ETH_ALEN);
|
||||
memcpy(pattrib->ta, psa, ETH_ALEN);
|
||||
else
|
||||
ret = sta2sta_data_frame(adapter, precv_frame, &psta);
|
||||
}
|
||||
|
||||
if (ret == _FAIL || ret == RTW_RX_HANDLED)
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user