mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
wifi: cfg80211: limit NAN func management APIs to offloaded DE
A driver that declared that it has userspace DE should not call NAN func related APIs such as cfg80211_nan_match and cfg80211_nan_func_terminated Check and warn in such a case, as this indicates a driver bug. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260107141549.86fa96c75211.I8fbb0506377170dd7b41234f20bcba057951dd1e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
e1696c8bd0
commit
f816141cba
@@ -16126,6 +16126,9 @@ void cfg80211_nan_match(struct wireless_dev *wdev,
|
||||
struct sk_buff *msg;
|
||||
void *hdr;
|
||||
|
||||
if (WARN_ON(wiphy->nan_capa.flags & WIPHY_NAN_FLAGS_USERSPACE_DE))
|
||||
return;
|
||||
|
||||
if (WARN_ON(!match->inst_id || !match->peer_inst_id || !match->addr))
|
||||
return;
|
||||
|
||||
@@ -16208,6 +16211,9 @@ void cfg80211_nan_func_terminated(struct wireless_dev *wdev,
|
||||
struct nlattr *func_attr;
|
||||
void *hdr;
|
||||
|
||||
if (WARN_ON(wiphy->nan_capa.flags & WIPHY_NAN_FLAGS_USERSPACE_DE))
|
||||
return;
|
||||
|
||||
if (WARN_ON(!inst_id))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user