mirror of https://github.com/torvalds/linux.git
wifi: mac80211: Accept authentication frames on P2P device
This is needed for PASN based P2P pairing. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241203222744.6ee3ef9f1374.Ib3074ffbe7b296e0f162b2543e84346b190dfbeb@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
1b5b7f3d29
commit
bee404e144
|
|
@ -5,7 +5,7 @@
|
||||||
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
|
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
|
||||||
* Copyright 2013-2014 Intel Mobile Communications GmbH
|
* Copyright 2013-2014 Intel Mobile Communications GmbH
|
||||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||||
* Copyright (C) 2018-2023 Intel Corporation
|
* Copyright (C) 2018-2024 Intel Corporation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <net/mac80211.h>
|
#include <net/mac80211.h>
|
||||||
|
|
@ -726,8 +726,13 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
|
||||||
},
|
},
|
||||||
[NL80211_IFTYPE_P2P_DEVICE] = {
|
[NL80211_IFTYPE_P2P_DEVICE] = {
|
||||||
.tx = 0xffff,
|
.tx = 0xffff,
|
||||||
|
/*
|
||||||
|
* To support P2P PASN pairing let user space register to rx
|
||||||
|
* also AUTH frames on P2P device interface.
|
||||||
|
*/
|
||||||
.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
|
.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
|
||||||
BIT(IEEE80211_STYPE_PROBE_REQ >> 4),
|
BIT(IEEE80211_STYPE_PROBE_REQ >> 4) |
|
||||||
|
BIT(IEEE80211_STYPE_AUTH >> 4),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4562,7 +4562,9 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
|
||||||
return ieee80211_is_public_action(hdr, skb->len) ||
|
return ieee80211_is_public_action(hdr, skb->len) ||
|
||||||
ieee80211_is_probe_req(hdr->frame_control) ||
|
ieee80211_is_probe_req(hdr->frame_control) ||
|
||||||
ieee80211_is_probe_resp(hdr->frame_control) ||
|
ieee80211_is_probe_resp(hdr->frame_control) ||
|
||||||
ieee80211_is_beacon(hdr->frame_control);
|
ieee80211_is_beacon(hdr->frame_control) ||
|
||||||
|
(ieee80211_is_auth(hdr->frame_control) &&
|
||||||
|
ether_addr_equal(sdata->vif.addr, hdr->addr1));
|
||||||
case NL80211_IFTYPE_NAN:
|
case NL80211_IFTYPE_NAN:
|
||||||
/* Currently no frames on NAN interface are allowed */
|
/* Currently no frames on NAN interface are allowed */
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue