Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2054527rwe; Fri, 2 Sep 2022 07:54:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR5OQR5qIq9alqbVL8xlxXehK2NW3lMir/ABhzRaAusH7ZlMKPtaoqHqM+EbNjzn697k0b+b X-Received: by 2002:a62:b614:0:b0:537:6d2:85e0 with SMTP id j20-20020a62b614000000b0053706d285e0mr36585705pff.40.1662130488098; Fri, 02 Sep 2022 07:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662130488; cv=none; d=google.com; s=arc-20160816; b=OsfcJhJiVYdJpdcjiYYaQyn01TkKqrUNs4C+76TZrO7Boga2jloO6N6l3VZb/wKJFm UAdba4351pns+M24kvLieXMiuIugIS9x3dT1+YcE+/73tfOIkL5Z3rhANrh6ydgIhk9B cpeuGIeHeVvEnskD1Iu3aL7JdVTdwkieYi6GG9xyKDG1C/CjuvghzFIF1LjEsx6xpFvD QUkZR6c6d9ZIs8bkEugof3Pm8S+I47udcohK2e9vRy3mhXuQJ6g3MbOsO6Yx9CfX89Nn 9Lxs4GsoCfxHXan/OZhYTv7YHVlGB/4t9w1sq9JJCoyo722qjoerl8oCGJYKCbsXnzC7 6A4w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ok0HDtDYudgcWjKSmwSS3/DuI1i+c2eEBX6M/Txs0Qo=; b=SJiAeNBNq9EVlsL8I+3tCiHijNoOEuhD3CR2ypJs9HHVmQA43srWwVKjqCDmIAs/MR 5PCgtbc8ShCXebwui97Ksc5PisPkf6MXRIp379vwePJuoWPtszAJIiAONT4ugx15pVcU 8X2kJsu/wXeAfe5WIxbLyUMd5d221VUbL36D8GQHcofn6cFe5EvqCZOVQn7T2PlzIy+3 u+0BV+lYX7gBWpFH+XFmL4087fip+A2m14Qu4wHnwXvwvWa8bDqcHG72W1uFM9pDnz7P 1y1URmx3mfJZRYGlGMtlFSLSLb17KojZhZlEeWxYRBRZPYQ/mnUamEFISSBORndD3P8E +PpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=hTQ0U6JW; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y3-20020a056a00180300b0052f60f7e0a1si2565929pfa.5.2022.09.02.07.54.38; Fri, 02 Sep 2022 07:54:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@sipsolutions.net header.s=mail header.b=hTQ0U6JW; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236629AbiIBOvX (ORCPT + 64 others); Fri, 2 Sep 2022 10:51:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236962AbiIBOvD (ORCPT ); Fri, 2 Sep 2022 10:51:03 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3518B61D85 for ; Fri, 2 Sep 2022 07:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=ok0HDtDYudgcWjKSmwSS3/DuI1i+c2eEBX6M/Txs0Qo=; t=1662127986; x=1663337586; b=hTQ0U6JWhTZYV4/uwgl53wRDY9Y5ARWVEm6sFRlZyipzet2 kC7gkYPkBpT0lRpy2LQT9vxUDIcEG4rgO3hvRwhG6sr7hhUft3v7dl8Hr75pcBBSD/y+5hkweQpSj elkqol9TnhuWvqLfnlkENRV5R0dT7M+5H/Oi51L0kHjp54nO72CDig7jlhIOd40jEWR0zqqE6df7w CREmuXgzq95fpxDf12kH7AzfSS3r5+V7nUwW24XJPKlFFqfH+1Ex0il+BwpGcBLdO2TrZ4upsqUha 716lkpaNZ0UfrGqqzI2NVsqTTdB2V5wgqa2IgSzzoNty8sv28zW132FqxYlBQacQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oU7Pr-006Ch3-1X; Fri, 02 Sep 2022 16:13:03 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 03/27] wifi: mac80211_hwsim: check STA magic in change_sta_links Date: Fri, 2 Sep 2022 16:12:35 +0200 Message-Id: <20220902161143.05f3fcf0d10f.Ie97f4d0615e75fbf1f73a41dc915503a93864aaa@changeid> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220902141259.377789-1-johannes@sipsolutions.net> References: <20220902141259.377789-1-johannes@sipsolutions.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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-wireless@vger.kernel.org From: Johannes Berg Just as an additional check that mac80211 isn't doing anything strange, add a check of the STA magic (which gets assigned when the station is added, and cleared when the station is removed). Signed-off-by: Johannes Berg --- drivers/net/wireless/mac80211_hwsim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 87176b205fc1..48b1c39c1c05 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -3021,6 +3021,8 @@ static int mac80211_hwsim_change_sta_links(struct ieee80211_hw *hw, struct ieee80211_sta *sta, u16 old_links, u16 new_links) { + hwsim_check_sta_magic(sta); + return 0; } -- 2.37.2