From: Dongliang Mu <hidden> Date: 2021-07-07 15:56:49
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 <redacted>
---
drivers/net/ieee802154/mac802154_hwsim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Dongliang Mu <hidden> Date: 2021-07-07 16:11:28
On Wed, Jul 7, 2021 at 11:56 PM Dongliang Mu [off-list ref] wrote:
Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE
must be present to fix GPF.
I double-check the whole file, and there is only one similar issue
left in Line 421.
mac802154_hwsim.c 187 if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID])
mac802154_hwsim.c 299 if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID])
mac802154_hwsim.c 421 if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID] &&
mac802154_hwsim.c 483 if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID] ||
mac802154_hwsim.c 531 if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID] ||
mac80211_hwsim.c 3575 if (!info->attrs[HWSIM_ATTR_ADDR_TRANSMITTER] ||
mac80211_hwsim.c 3663 if (!info->attrs[HWSIM_ATTR_ADDR_RECEIVER] ||
mac80211_hwsim.c 3982 if (!info->attrs[HWSIM_ATTR_RADIO_ID])
In addition, I check this pattern in the whole source code, it seems
if statements with "&&" in other files are correct. For example,
if (!info->attrs[NFC_ATTR_DEVICE_INDEX] ||
(!info->attrs[NFC_ATTR_LLC_PARAM_LTO] &&
!info->attrs[NFC_ATTR_LLC_PARAM_RW] &&
!info->attrs[NFC_ATTR_LLC_PARAM_MIUX]))
return -EINVAL;
From: Alexander Aring <alex.aring@gmail.com> Date: 2021-07-07 23:34:44
Hi,
On Wed, 7 Jul 2021 at 11:56, Dongliang Mu [off-list ref] wrote:
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 <redacted>
Acked-by: Alexander Aring <aahringo@redhat.com>
- Alex
From: Stefan Schmidt <stefan@datenfreihafen.org> Date: 2021-07-08 07:40:40
Hello.
On 08.07.21 01:34, Alexander Aring wrote:
Hi,
On Wed, 7 Jul 2021 at 11:56, Dongliang Mu [off-list ref] wrote:
quoted
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 <redacted>
Acked-by: Alexander Aring <aahringo@redhat.com>
This patch has been applied to the wpan tree and will be
part of the next pull request to net. Thanks!
regards
Stefan Schmidt