staging: r8188eu: pattrib addresses were already set by the caller
authorMartin Kaiser <martin@kaiser.cx>
Thu, 7 Jul 2022 19:49:14 +0000 (21:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Jul 2022 12:29:07 +0000 (14:29 +0200)
commit3deb12ea54645a34ef326dc99d2d0c136b78f9c5
treeb99ddb615ec8fcb2d3fd4b6dde941432647a31fb
parent8eaa8197bc2230760c7b53175049ff5595079319
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>
drivers/staging/r8188eu/core/rtw_recv.c