From patchwork Fri Sep 1 17:04:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 13372755 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3726CC2C4 for ; Fri, 1 Sep 2023 17:05:14 +0000 (UTC) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B031D10F6; Fri, 1 Sep 2023 10:05:12 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 4D229C0002; Fri, 1 Sep 2023 17:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1693587911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DQh+VL37lttml5PY/RZhphyyTOjmlGUq3/JRTV8uL1c=; b=edGKe6P+EV/gqPHE5F113uqDySC9WDp3LUih0jMP3MSdOXivsz1ZkTZMpFqdUyswbi0L5V +l5OPZcPCbxWJOv7pZvux7js7HxEcUOI/O6bdUdGz5GU57J13sfKaB62puc2CplBn2G/zD 9Bkq48Iq2JZPDL1ncU9PyHUpbRxI0YcMODWRQ/r32AYgLgIpWqskuEgcJ4V64RhFTLsDAc OE5VMHFLLbT89HzlOaPGtJI7ru6MefoeIzUdcdPNZR4A7eGuw27WwY+UIYJfejWbTXDLRi JpZU5xPJNoITyXXBqjFtfqmA0x15Smj00UskYEZyQKPlhy4oDNp87PVr8dlKfA== From: Miquel Raynal To: Alexander Aring , Stefan Schmidt , linux-wpan@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet , netdev@vger.kernel.org, David Girault , Romuald Despres , Frederic Blain , Nicolas Schodet , Guilhem Imberton , Thomas Petazzoni , Miquel Raynal Subject: [PATCH wpan-next v2 01/11] ieee802154: Let PAN IDs be reset Date: Fri, 1 Sep 2023 19:04:51 +0200 Message-Id: <20230901170501.1066321-2-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230901170501.1066321-1-miquel.raynal@bootlin.com> References: <20230901170501.1066321-1-miquel.raynal@bootlin.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: miquel.raynal@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Soon association and disassociation will be implemented, which will require to be able to either change the PAN ID from 0xFFFF to a real value when association succeeded, or to reset the PAN ID to 0xFFFF upon disassociation. Let's allow to do that manually for now. Signed-off-by: Miquel Raynal --- net/ieee802154/nl802154.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c index d610c1886160..46ac6f599fe1 100644 --- a/net/ieee802154/nl802154.c +++ b/net/ieee802154/nl802154.c @@ -1087,16 +1087,6 @@ static int nl802154_set_pan_id(struct sk_buff *skb, struct genl_info *info) pan_id = nla_get_le16(info->attrs[NL802154_ATTR_PAN_ID]); - /* TODO - * I am not sure about to check here on broadcast pan_id. - * Broadcast is a valid setting, comment from 802.15.4: - * If this value is 0xffff, the device is not associated. - * - * This could useful to simple deassociate an device. - */ - if (pan_id == cpu_to_le16(IEEE802154_PAN_ID_BROADCAST)) - return -EINVAL; - return rdev_set_pan_id(rdev, wpan_dev, pan_id); }