mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 18:04:38 -04:00
staging: r8188eu: replace GetAddr1Ptr call in OnAction_p2p
Define a struct ieee80211_mgmt in OnAction_p2p and use it to check the destination address. This replaces a call to the driver-specific GetAddr1Ptr function. 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-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e246bf42ef
commit
fc47cb05cf
@@ -3834,6 +3834,7 @@ static void on_action_public(struct adapter *padapter, struct recv_frame *precv_
|
||||
|
||||
static void OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_frame)
|
||||
{
|
||||
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data;
|
||||
u8 *frame_body;
|
||||
u8 OUI_Subtype;
|
||||
u8 *pframe = precv_frame->rx_data;
|
||||
@@ -3841,7 +3842,7 @@ static void OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_fram
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
|
||||
/* check RA matches or not */
|
||||
if (memcmp(myid(&padapter->eeprompriv), GetAddr1Ptr(pframe), ETH_ALEN))/* for if1, sta/ap mode */
|
||||
if (memcmp(myid(&padapter->eeprompriv), mgmt->da, ETH_ALEN))/* for if1, sta/ap mode */
|
||||
return;
|
||||
|
||||
frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr));
|
||||
|
||||
Reference in New Issue
Block a user