]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: r8188eu: replace a GetAddr1Ptr call
authorMartin Kaiser <martin@kaiser.cx>
Sun, 30 Oct 2022 17:33:14 +0000 (18:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2022 08:09:02 +0000 (09:09 +0100)
Define a struct ieee80211_mgmt and use it to read the destination address.

This replaces one call to the driver-specific GetAddr1Ptr function, which
should eventually be removed.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_mlme_ext.c

index 127dbc4e8b9acb1d838b90045ff4cc321774bfee..5a366688a3f7dac385a1c1fffe05bad1c9d229c0 100644 (file)
@@ -3815,13 +3815,14 @@ exit:
 
 unsigned int on_action_public(struct adapter *padapter, struct recv_frame *precv_frame)
 {
+       struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data;
        unsigned int ret = _FAIL;
        u8 *pframe = precv_frame->rx_data;
        u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr);
        u8 category, action;
 
        /* check RA matches or not */
-       if (memcmp(myid(&padapter->eeprompriv), GetAddr1Ptr(pframe), ETH_ALEN))
+       if (memcmp(myid(&padapter->eeprompriv), mgmt->da, ETH_ALEN))
                goto exit;
 
        category = frame_body[0];