From nobody Fri Dec 19 17:24:23 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 425EAC433FE for ; Sat, 22 Oct 2022 07:52:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231669AbiJVHwa (ORCPT ); Sat, 22 Oct 2022 03:52:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231933AbiJVHtl (ORCPT ); Sat, 22 Oct 2022 03:49:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73FBF2C2AC2; Sat, 22 Oct 2022 00:46:17 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 6A3C160B91; Sat, 22 Oct 2022 07:43:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82659C433D6; Sat, 22 Oct 2022 07:43:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424602; bh=PBClYfgcUgCNfOMwp2cjYimZKZ/95lBXgpCYtvQU0AM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G5aI5RvX8CxCipiUtv23eGuNiLlIdq8xJ+S99mxsdn1K9BVcp9kf5GfLmDKW7oury 9bAOs+f6zzvPKeaXIqZ5BG1lKYRlUDGIuiBjkzxDYZhFUgddqTCzgle34xZNvQ5g5g k7vJ0cqropbPhtADKxhCGjj6Vu35hXKPNqMInBpo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shaul Triebitz , Johannes Berg , Sasha Levin Subject: [PATCH 5.19 208/717] wifi: cfg80211: get correct AP link chandef Date: Sat, 22 Oct 2022 09:21:27 +0200 Message-Id: <20221022072452.095033007@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@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: Shaul Triebitz [ Upstream commit bc1857619cc7612117d2ee1ed05b5bfeb638614b ] When checking for channel regulatory validity, use the AP link chandef (and not mesh's chandef). Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") Signed-off-by: Shaul Triebitz Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/wireless/reg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index c7383ede794f..d5c7a5aa6853 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -2389,6 +2389,10 @@ static bool reg_wdev_chan_valid(struct wiphy *wiphy,= struct wireless_dev *wdev) switch (iftype) { case NL80211_IFTYPE_AP: case NL80211_IFTYPE_P2P_GO: + if (!wdev->links[link].ap.beacon_interval) + continue; + chandef =3D wdev->links[link].ap.chandef; + break; case NL80211_IFTYPE_MESH_POINT: if (!wdev->u.mesh.beacon_interval) continue; --=20 2.35.1