From nobody Mon Sep 29 20:17:17 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90F23C19F2C for ; Tue, 16 Aug 2022 04:57:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233962AbiHPE5H (ORCPT ); Tue, 16 Aug 2022 00:57:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234152AbiHPE4Z (ORCPT ); Tue, 16 Aug 2022 00:56:25 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E661FBBA50; Mon, 15 Aug 2022 13:51:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 7675ECE12C3; Mon, 15 Aug 2022 20:50:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7EF23C433C1; Mon, 15 Aug 2022 20:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596653; bh=l8T1bFz4R/GbxK6CIV6og1RrUXHJ5KWwpqh2rejeafg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bm9+/Ju4fZvC5fz+pMF9jK7Bnew+MGUtQ9WCBr6B7GH5ryD5LVDJNlO7XoELXSHUM x1yAM84xPU4rAUsSfIrbhwn49anzX+/zVDoMG8ndKZou+lPsCGEMfKtEVYm5FcUj3m wtYDIeR0gsMRGM9vfoaN7RfCqD28lZQWB1ZRPyqg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+90d912872157e63589e4@syzkaller.appspotmail.com, Johannes Berg Subject: [PATCH 5.19 1147/1157] wifi: cfg80211: handle IBSS in channel switch Date: Mon, 15 Aug 2022 20:08:23 +0200 Message-Id: <20220815180526.397830233@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Johannes Berg commit 77e7b6ba78edf817bddfa97fadb15a971992b1ee upstream. Prior to commit 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") the interface type didn't really matter here, but now we need to handle all of the possible cases. Add IBSS ("ADHOC") and handle it. Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") Reported-by: syzbot+90d912872157e63589e4@syzkaller.appspotmail.com Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/wireless/nl80211.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -18294,6 +18294,9 @@ void cfg80211_ch_switch_notify(struct ne case NL80211_IFTYPE_P2P_GO: wdev->links[link_id].ap.chandef =3D *chandef; break; + case NL80211_IFTYPE_ADHOC: + wdev->u.ibss.chandef =3D *chandef; + break; default: WARN_ON(1); break;