[PATCH 09/11] staging: r8188eu: remove psa, pda

From: Martin Kaiser
Date: Sun Apr 03 2022 - 12:55:14 EST


Remove the psa, pda variables. They are set and read only once.
We can use the ieee80211 helpers directly.

Signed-off-by: Martin Kaiser <martin@xxxxxxxxx>
---
drivers/staging/r8188eu/core/rtw_recv.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 75c0e0b17185..63ce66489146 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -937,7 +937,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
struct recv_frame *precv_frame)
{
u8 bretry;
- u8 *psa, *pda, *pbssid;
+ u8 *pbssid;
struct sta_info *psta = NULL;
u8 *ptr = precv_frame->rx_data;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)precv_frame->rx_data;
@@ -946,15 +946,13 @@ static int validate_recv_data_frame(struct adapter *adapter,
int ret;

bretry = ieee80211_has_retry(hdr->frame_control);
- pda = ieee80211_get_DA(hdr);
- psa = ieee80211_get_SA(hdr);

pbssid = get_hdr_bssid(ptr);
if (!pbssid)
return _FAIL;

- memcpy(pattrib->dst, pda, ETH_ALEN);
- memcpy(pattrib->src, psa, ETH_ALEN);
+ memcpy(pattrib->dst, ieee80211_get_DA(hdr), ETH_ALEN);
+ memcpy(pattrib->src, ieee80211_get_SA(hdr), ETH_ALEN);

memcpy(pattrib->bssid, pbssid, ETH_ALEN);

--
2.30.2