All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/2] wifi: mt76: init chan pointer to aovid unexpected behavior
@ 2026-12-02  8:18 Anthony Liu
  2026-12-02  8:18 ` [PATCH v1 2/2] wifi: mt76: add boundary check to array accesses Anthony Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony Liu @ 2026-12-02  8:18 UTC (permalink / raw)
  To: anthony.liu
  Cc: Emery.Hsin, Jb.Tsai, Leon.Yen, Litien.Chang, Quan.Zhou, Ryder.Lee,
	Sean.Wang, kun.wu, linux-wireless, lorenzo, nbd

In mt76_remain_on_channel(), defensively initialize chandef.chan with
the requested channel instead of using an empty initializer.

Signed-off-by: Anthony Liu <anthony.liu@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/channel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/channel.c b/drivers/net/wireless/mediatek/mt76/channel.c
index b3c17f76b101..0db1e5456c30 100644
--- a/drivers/net/wireless/mediatek/mt76/channel.c
+++ b/drivers/net/wireless/mediatek/mt76/channel.c
@@ -449,7 +449,7 @@ int mt76_remain_on_channel(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 			   struct ieee80211_channel *chan, int duration,
 			   enum ieee80211_roc_type type)
 {
-	struct cfg80211_chan_def chandef = {};
+	struct cfg80211_chan_def chandef = { .chan = chan };
 	struct mt76_phy *phy = hw->priv;
 	struct mt76_dev *dev = phy->dev;
 	struct mt76_vif_link *mlink;
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-03  3:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02  8:18 [PATCH v1 1/2] wifi: mt76: init chan pointer to aovid unexpected behavior Anthony Liu
2026-12-02  8:18 ` [PATCH v1 2/2] wifi: mt76: add boundary check to array accesses Anthony Liu
2026-12-03  3:02   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.