Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3260414rwb; Mon, 15 Aug 2022 22:34:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR5lCQu3pn4kWTDYnjtUYOKnBr7q1fYelm7ENdwaxcQNLAh368wxRe05FZiScG+bOaL3xo70 X-Received: by 2002:aa7:c983:0:b0:43d:3879:216b with SMTP id c3-20020aa7c983000000b0043d3879216bmr17250429edt.131.1660628092840; Mon, 15 Aug 2022 22:34:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660628092; cv=none; d=google.com; s=arc-20160816; b=CMmxQyKGRymDae2OjO8iGdMY3wvjWK1EEKFbCkzj/oZbPJSi0CufKRsrOWABfXu5tz WlaJPzLosGbCjIM+uz2MbugqiQmJOAxPjF8PQgQx2hOVwH8EcUBD2lIKavtSnlfJRT4W 5yH8Q/NRqPkkOoZ1TUpOHfBPHNnMSY409QWnej51FFlkprQ7PSqh9Jl30lQl8HxqX281 bAiLzbK2O9dIWT2P1OEz+/Sa7OSd5g1QafN98d46DVoxIX0uDeBaUZxJ6L7Tbc6bKfN6 ca69Ti6Kn55tx0er3rmEUYRcyA8NM4ShofDmUAWVGYzdP4NPz+Y24eyhrVDujk0g1VdW CKTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bQysu01GvOq2xqPdc7onhIFqkphehN2rLKS7sEBd8dY=; b=lp1sKaIaPrYOKz/PMhCjtB3Xae7ljiQM6aeoAW6hmmBxZjHssnMgmUotgvb55pLvUU BMVFwDDOyg6s+RIUPWC+buFDvL+Gi8bGBHMScRPw+yRU0UPHOmllqqhHK8Ckk5dftHbs XmDKrB4MldGKs98WZdKooNvWiCdaRyma7wrL9F1SYPEy4wHd70m+HZ68tVreP6H5fz14 iuZktm2ZsMnqhr2EZXTeYMkjNhKfnk2c6OVLKO3SJGf7UDtRkIMTEGhXApc6xBzC0+h2 C1lVn+/ykN/o3qzG+62Fu/VEUhl9Gt8Rl4hp6hts6GZsmrSal2mgj4C4FEWiBYoqM9O/ 1BOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="bm9+/Ju4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10-20020a50fd0a000000b0043dafb921f0si7492828eds.617.2022.08.15.22.34.27; Mon, 15 Aug 2022 22:34:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="bm9+/Ju4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233947AbiHPE5G (ORCPT + 99 others); Tue, 16 Aug 2022 00:57:06 -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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = *chandef; break; + case NL80211_IFTYPE_ADHOC: + wdev->u.ibss.chandef = *chandef; + break; default: WARN_ON(1); break;