diff options
| author | Dongliang Mu <[email protected]> | 2021-07-07 15:56:32 +0000 |
|---|---|---|
| committer | Stefan Schmidt <[email protected]> | 2021-07-08 07:37:03 +0000 |
| commit | 889d0e7dc68314a273627d89cbb60c09e1cc1c25 (patch) | |
| tree | cded30fc9a3a52d3e5f45c73ab61aef06a54ae47 | |
| parent | ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi (diff) | |
| download | kernel-889d0e7dc68314a273627d89cbb60c09e1cc1c25.tar.gz kernel-889d0e7dc68314a273627d89cbb60c09e1cc1c25.zip | |
ieee802154: hwsim: fix GPF in hwsim_new_edge_nl
Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE
must be present to fix GPF.
Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")
Signed-off-by: Dongliang Mu <[email protected]>
Acked-by: Alexander Aring <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Stefan Schmidt <[email protected]>
| -rw-r--r-- | drivers/net/ieee802154/mac802154_hwsim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ieee802154/mac802154_hwsim.c b/drivers/net/ieee802154/mac802154_hwsim.c index cae52bfb871e..8caa61ec718f 100644 --- a/drivers/net/ieee802154/mac802154_hwsim.c +++ b/drivers/net/ieee802154/mac802154_hwsim.c @@ -418,7 +418,7 @@ static int hwsim_new_edge_nl(struct sk_buff *msg, struct genl_info *info) struct hwsim_edge *e; u32 v0, v1; - if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID] && + if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID] || !info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE]) return -EINVAL; |
