Skip to content

Commit cb3ad11

Browse files
committed
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/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents c4a14f6 + 09573b1 commit cb3ad11

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

drivers/net/ieee802154/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ config IEEE802154_CA8210_DEBUGFS
101101

102102
config IEEE802154_MCR20A
103103
tristate "MCR20A transceiver driver"
104+
select REGMAP_SPI
104105
depends on IEEE802154_DRIVERS && MAC802154
105106
depends on SPI
106107
help

drivers/net/ieee802154/mcr20a.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -1302,16 +1302,13 @@ mcr20a_probe(struct spi_device *spi)
13021302
irq_type = IRQF_TRIGGER_FALLING;
13031303

13041304
ret = devm_request_irq(&spi->dev, spi->irq, mcr20a_irq_isr,
1305-
irq_type, dev_name(&spi->dev), lp);
1305+
irq_type | IRQF_NO_AUTOEN, dev_name(&spi->dev), lp);
13061306
if (ret) {
13071307
dev_err(&spi->dev, "could not request_irq for mcr20a\n");
13081308
ret = -ENODEV;
13091309
goto free_dev;
13101310
}
13111311

1312-
/* disable_irq by default and wait for starting hardware */
1313-
disable_irq(spi->irq);
1314-
13151312
ret = ieee802154_register_hw(hw);
13161313
if (ret) {
13171314
dev_crit(&spi->dev, "ieee802154_register_hw failed\n");

net/mac802154/scan.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ void mac802154_scan_worker(struct work_struct *work)
176176
struct ieee802154_local *local =
177177
container_of(work, struct ieee802154_local, scan_work.work);
178178
struct cfg802154_scan_request *scan_req;
179+
enum nl802154_scan_types scan_req_type;
179180
struct ieee802154_sub_if_data *sdata;
180181
unsigned int scan_duration = 0;
181182
struct wpan_phy *wpan_phy;
@@ -209,6 +210,7 @@ void mac802154_scan_worker(struct work_struct *work)
209210
}
210211

211212
wpan_phy = scan_req->wpan_phy;
213+
scan_req_type = scan_req->type;
212214
scan_req_duration = scan_req->duration;
213215

214216
/* Look for the next valid chan */
@@ -246,7 +248,7 @@ void mac802154_scan_worker(struct work_struct *work)
246248
goto end_scan;
247249
}
248250

249-
if (scan_req->type == NL802154_SCAN_ACTIVE) {
251+
if (scan_req_type == NL802154_SCAN_ACTIVE) {
250252
ret = mac802154_transmit_beacon_req(local, sdata);
251253
if (ret)
252254
dev_err(&sdata->dev->dev,

0 commit comments

Comments
 (0)