projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df16737
)
cfg80211: check for set_wiphy_params
author
Johannes Berg
<johannes.berg@intel.com>
Mon, 13 Jan 2020 11:53:59 +0000
(12:53 +0100)
committer
Johannes Berg
<johannes.berg@intel.com>
Wed, 15 Jan 2020 08:53:24 +0000
(09:53 +0100)
Check if set_wiphy_params is assigned and return an error if not,
some drivers (e.g. virt_wifi where syzbot reported it) don't have
it.
Reported-by: syzbot+e8a797964a4180eb57d5@syzkaller.appspotmail.com
Reported-by: syzbot+34b582cf32c1db008f8e@syzkaller.appspotmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link:
https://lore.kernel.org/r/20200113125358.ac07f276efff.Ibd85ee1b12e47b9efb00a2adc5cd3fac50da791a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/rdev-ops.h
patch
|
blob
|
history
diff --git
a/net/wireless/rdev-ops.h
b/net/wireless/rdev-ops.h
index
663c0d3
..
e0d34f7
100644
(file)
--- a/
net/wireless/rdev-ops.h
+++ b/
net/wireless/rdev-ops.h
@@
-538,6
+538,10
@@
static inline int
rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed)
{
int ret;
+
+ if (!rdev->ops->set_wiphy_params)
+ return -EOPNOTSUPP;
+
trace_rdev_set_wiphy_params(&rdev->wiphy, changed);
ret = rdev->ops->set_wiphy_params(&rdev->wiphy, changed);
trace_rdev_return_int(&rdev->wiphy, ret);