Commit cb3ad113 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge tag 'ieee802154-for-net-2024-09-27' of...

Merge tag 'ieee802154-for-net-2024-09-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan

Stefan Schmidt says:

====================
pull-request: ieee802154 for net 2024-09-27

Jinjie Ruan added the use of IRQF_NO_AUTOEN in the mcr20a driver and fixed
and addiotinal build dependency problem while doing so.

Jiawei Ye, ensured a correct RCU handling in mac802154_scan_worker.

* tag 'ieee802154-for-net-2024-09-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan:
  net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq()
  mac802154: Fix potential RCU dereference issue in mac802154_scan_worker
  ieee802154: Fix build error
====================

Link: https://patch.msgid.link/20240927094351.3865511-1-stefan@datenfreihafen.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents c4a14f6d 09573b1c
...@@ -101,6 +101,7 @@ config IEEE802154_CA8210_DEBUGFS ...@@ -101,6 +101,7 @@ config IEEE802154_CA8210_DEBUGFS
config IEEE802154_MCR20A config IEEE802154_MCR20A
tristate "MCR20A transceiver driver" tristate "MCR20A transceiver driver"
select REGMAP_SPI
depends on IEEE802154_DRIVERS && MAC802154 depends on IEEE802154_DRIVERS && MAC802154
depends on SPI depends on SPI
help help
......
...@@ -1302,16 +1302,13 @@ mcr20a_probe(struct spi_device *spi) ...@@ -1302,16 +1302,13 @@ mcr20a_probe(struct spi_device *spi)
irq_type = IRQF_TRIGGER_FALLING; irq_type = IRQF_TRIGGER_FALLING;
ret = devm_request_irq(&spi->dev, spi->irq, mcr20a_irq_isr, ret = devm_request_irq(&spi->dev, spi->irq, mcr20a_irq_isr,
irq_type, dev_name(&spi->dev), lp); irq_type | IRQF_NO_AUTOEN, dev_name(&spi->dev), lp);
if (ret) { if (ret) {
dev_err(&spi->dev, "could not request_irq for mcr20a\n"); dev_err(&spi->dev, "could not request_irq for mcr20a\n");
ret = -ENODEV; ret = -ENODEV;
goto free_dev; goto free_dev;
} }
/* disable_irq by default and wait for starting hardware */
disable_irq(spi->irq);
ret = ieee802154_register_hw(hw); ret = ieee802154_register_hw(hw);
if (ret) { if (ret) {
dev_crit(&spi->dev, "ieee802154_register_hw failed\n"); dev_crit(&spi->dev, "ieee802154_register_hw failed\n");
......
...@@ -176,6 +176,7 @@ void mac802154_scan_worker(struct work_struct *work) ...@@ -176,6 +176,7 @@ void mac802154_scan_worker(struct work_struct *work)
struct ieee802154_local *local = struct ieee802154_local *local =
container_of(work, struct ieee802154_local, scan_work.work); container_of(work, struct ieee802154_local, scan_work.work);
struct cfg802154_scan_request *scan_req; struct cfg802154_scan_request *scan_req;
enum nl802154_scan_types scan_req_type;
struct ieee802154_sub_if_data *sdata; struct ieee802154_sub_if_data *sdata;
unsigned int scan_duration = 0; unsigned int scan_duration = 0;
struct wpan_phy *wpan_phy; struct wpan_phy *wpan_phy;
...@@ -209,6 +210,7 @@ void mac802154_scan_worker(struct work_struct *work) ...@@ -209,6 +210,7 @@ void mac802154_scan_worker(struct work_struct *work)
} }
wpan_phy = scan_req->wpan_phy; wpan_phy = scan_req->wpan_phy;
scan_req_type = scan_req->type;
scan_req_duration = scan_req->duration; scan_req_duration = scan_req->duration;
/* Look for the next valid chan */ /* Look for the next valid chan */
...@@ -246,7 +248,7 @@ void mac802154_scan_worker(struct work_struct *work) ...@@ -246,7 +248,7 @@ void mac802154_scan_worker(struct work_struct *work)
goto end_scan; goto end_scan;
} }
if (scan_req->type == NL802154_SCAN_ACTIVE) { if (scan_req_type == NL802154_SCAN_ACTIVE) {
ret = mac802154_transmit_beacon_req(local, sdata); ret = mac802154_transmit_beacon_req(local, sdata);
if (ret) if (ret)
dev_err(&sdata->dev->dev, dev_err(&sdata->dev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment