summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2022-07-07 21:49:14 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-07-08 14:29:07 +0200
commit3deb12ea54645a34ef326dc99d2d0c136b78f9c5 (patch)
treeb99ddb615ec8fcb2d3fd4b6dde941432647a31fb
parent8eaa8197bc2230760c7b53175049ff5595079319 (diff)
staging: r8188eu: pattrib addresses were already set by the caller
Do not set pattrib's src, dst, bssid, ra and ta again in sta2sta_data_frame. sta2sta_data_frame is called from validate_recv_data_frame when both to_ds and from_ds are 0. All pattrib address fields have already been set to the correct addresses when sta2sta_data_frame is called. memcpy(pattrib->dst, ieee80211_get_DA(hdr), ETH_ALEN); ieee80211_get_DA returns addr1 if to_ds and from_ds are 0 memcpy(pattrib->src, ieee80211_get_SA(hdr), ETH_ALEN); ieee80211_get_SA returns addr2 if to_ds and from_ds are 0 memcpy(pattrib->ra, hdr->addr1, ETH_ALEN); memcpy(pattrib->ta, hdr->addr2, ETH_ALEN); For pattrib->dst == addr1, pattrib->src == addr2, these assignments match those in sta2sta_data_frame that this patch removes. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220707194914.63794-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/r8188eu/core/rtw_recv.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 6a2a1b1664ac6..e5a7b7dfc3879 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -559,7 +559,6 @@ static void count_rx_stats(struct adapter *padapter, struct recv_frame *prframe,
static int sta2sta_data_frame(struct adapter *adapter,
struct recv_frame *precv_frame, struct sta_info **psta)
{
- u8 *ptr = precv_frame->rx_data;
int ret = _SUCCESS;
struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
struct sta_priv *pstapriv = &adapter->stapriv;
@@ -614,12 +613,6 @@ static int sta2sta_data_frame(struct adapter *adapter,
sta_addr = pattrib->src;
}
} else if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
- memcpy(pattrib->dst, GetAddr1Ptr(ptr), ETH_ALEN);
- memcpy(pattrib->src, GetAddr2Ptr(ptr), ETH_ALEN);
- memcpy(pattrib->bssid, GetAddr3Ptr(ptr), ETH_ALEN);
- memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
- memcpy(pattrib->ta, pattrib->src, ETH_ALEN);
-
sta_addr = mybssid;
} else {
ret = _FAIL;