Commit cddaaa56 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau
Browse files

mt76: mt7615: hold mt76 lock queueing wd in mt7615_queue_key_update



wq queue is always updated holding mt76 spinlock. Grab mt76 lock in
mt7615_queue_key_update() before putting a new element at the end of the
queue.

Fixes: eb99cc95 ("mt76: mt7615: introduce mt7663u support")
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent d6e08f2b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -361,7 +361,10 @@ mt7615_queue_key_update(struct mt7615_dev *dev, enum set_key_cmd cmd,
	wd->key.keylen = key->keylen;
	wd->key.cmd = cmd;

	spin_lock_bh(&dev->mt76.lock);
	list_add_tail(&wd->node, &dev->wd_head);
	spin_unlock_bh(&dev->mt76.lock);

	queue_work(dev->mt76.wq, &dev->wtbl_work);

	return 0;