Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Miri Korenblit and committed by
Johannes Berg
f816141c e1696c8b

+6
+6
net/wireless/nl80211.c
··· 16126 16126 struct sk_buff *msg; 16127 16127 void *hdr; 16128 16128 16129 + if (WARN_ON(wiphy->nan_capa.flags & WIPHY_NAN_FLAGS_USERSPACE_DE)) 16130 + return; 16131 + 16129 16132 if (WARN_ON(!match->inst_id || !match->peer_inst_id || !match->addr)) 16130 16133 return; 16131 16134 ··· 16210 16207 struct sk_buff *msg; 16211 16208 struct nlattr *func_attr; 16212 16209 void *hdr; 16210 + 16211 + if (WARN_ON(wiphy->nan_capa.flags & WIPHY_NAN_FLAGS_USERSPACE_DE)) 16212 + return; 16213 16213 16214 16214 if (WARN_ON(!inst_id)) 16215 16215 return;