Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1649240pxb; Wed, 9 Feb 2022 01:09:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwt4NSE0z0UvPTu6gOENAxilWXG5otm20xoKBLsZpZSkW1CMk02E7kGFONfhb18C9rwIgWg X-Received: by 2002:aa7:938c:: with SMTP id t12mr1255622pfe.51.1644397781879; Wed, 09 Feb 2022 01:09:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644397781; cv=none; d=google.com; s=arc-20160816; b=eIVloJC2DFWcKXqZytHJkJiCah3rC3RW1OvNzhu66x8oDdCh/oveJ/0tIMoA14reKv cv7pb/9nnOLfmv4fS0/8eloomv662jVxhnuiXPmJeXSzM+0KdVdWj6OfXbp7L8Pdq9uX jYdbob9eL0mSA/7wbkPw91zhESAYxbnzhqrKk9JZmaw5oPU4ut71eKB6Cb+n3BkSGqC/ Lho5zHZhwpFWdo+QhhkvfbJM38Akr7Pzi9QLEY/sM0suyHpkBrq5S5iJmuATuIjDmdSZ aR1uFgj5f/p8ST4u+5dhA4wZEXGvksm8n8XMFJMFErT2nvrjCcDshOLsb4mUMrQayukG FOsw== 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=xt1ox1JXEFQLIUouxd9s2OnqZQHp0X7t5m9hxg0463c=; b=DSWQ8X6bfjWQf15O2LZ2wixdQV6JeeIWu24wSkTKTgSU6hPN/SvMDhzxibJaaSyU59 6eROwiiISL+zD4LNlJdnX0wFM2YjFXJPvpjiYPKRNY1/CzJeXLa5fmAR9IGx5M3Y7oVM HmHqHwmXj8neML/qe9aBBJ/kebcxb7QpdvjY7H52dOr8AGzePi9OKobhDyCVQQHtqBDW YVKrFYS9wr4/beYCYhx243h8nxc0dC8KbNKcwT0R8o0yfzmY+Ct1mYI74dQA6GcJNyXR QZQIsqoKtIm0Dvc0PPq/pZ17Lxz5DTTvCdiKZbfLwXGzGERiLLt51GJlDVeP4ddq18IG PI/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mqUFsrvg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c21si16117922pgh.514.2022.02.09.01.09.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 01:09:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mqUFsrvg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 843FEDF28B09; Wed, 9 Feb 2022 00:52:19 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383280AbiBGLV7 (ORCPT + 99 others); Mon, 7 Feb 2022 06:21:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381667AbiBGLRR (ORCPT ); Mon, 7 Feb 2022 06:17:17 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8691FC03FEDB; Mon, 7 Feb 2022 03:17:04 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 52833B81028; Mon, 7 Feb 2022 11:17:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B906C004E1; Mon, 7 Feb 2022 11:17:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644232622; bh=Y2D14aJlGlPFcq4A1gKe14I/jmpS3CFzo1RgycGaS+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mqUFsrvgnDH+ITWsSYLuy1uytOnsFUfpgM2DaUPvTXHRGARZJUMO2fZZ08ISbW48W nE/I4fuQQzjP0bCejtN3iOTKDrDCfAQDJ5Fks7htI6P7r+jBNbEjlBJn0dNicYJvd9 Hb8xCKLSAzO2ERB3K2SOFTJaktHOyooUGTTgfASQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miquel Raynal , Alexander Aring , Stefan Schmidt Subject: [PATCH 4.19 70/86] net: ieee802154: hwsim: Ensure proper channel selection at probe time Date: Mon, 7 Feb 2022 12:06:33 +0100 Message-Id: <20220207103759.966838188@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220207103757.550973048@linuxfoundation.org> References: <20220207103757.550973048@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: Miquel Raynal commit 1293fccc9e892712d910ec96079d3717307f1d2d upstream. Drivers are expected to set the PHY current_channel and current_page according to their default state. The hwsim driver is advertising being configured on channel 13 by default but that is not reflected in its own internal pib structure. In order to ensure that this driver consider the current channel as being 13 internally, we at least need to set the pib->channel field to 13. Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") Signed-off-by: Miquel Raynal [stefan@datenfreihafen.org: fixed assigment from page to channel] Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20220125121426.848337-2-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt Signed-off-by: Greg Kroah-Hartman --- drivers/net/ieee802154/mac802154_hwsim.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ieee802154/mac802154_hwsim.c +++ b/drivers/net/ieee802154/mac802154_hwsim.c @@ -805,6 +805,7 @@ static int hwsim_add_one(struct genl_inf goto err_pib; } + pib->channel = 13; rcu_assign_pointer(phy->pib, pib); phy->idx = idx; INIT_LIST_HEAD(&phy->edges);