Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp508685imw; Wed, 13 Jul 2022 02:48:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u6z0n0/MIkVXdSmudbxD2ZtDMEEMGLLK57mPOgkDll6MNn2DVU2jxMpQp3U4EHRs4Q1ayN X-Received: by 2002:a05:6a00:174b:b0:525:4eea:8ff2 with SMTP id j11-20020a056a00174b00b005254eea8ff2mr2495824pfc.23.1657705728099; Wed, 13 Jul 2022 02:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657705728; cv=none; d=google.com; s=arc-20160816; b=RcAQrYIBcHmzlL8Elp8zYRuqEwYgm78bALIfzw2wbSPwbJImQhL1OQjBdCMEpkrAuD ozPEiWEkOVDeQe1krAxfcBheJZuTB8J2cUi8dTlusFp2hPSwymER88JOV1rLd4RlUOBE gtDmRsZoGPiNUTNkVDz98I8qyrgNkp7W4cjEK3gFZpFQmeEBVNWAPw0dJjTuQuKl/eTs aIjEFRUeVQLuDhjhykr2g8heDhrUP2+RD3XrEJaREN8+Lr74XHLUDPxLUTCk2kcq1WQj zsQ6qjQVBzhp4oUC1V2DLTm/863cxzOs0IfyJyBm9Xt0d7DF1wurMr2hK5bkSUJzBJsh 5PBQ== 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=pNIS6Qd57JpoL/PgMEksYPHHYztiAgCOQTRbG4eEmHs=; b=wcTDDGvK5YdHuIX8232OBPofuNGe/xXj0IPL3FxCidJ58Ouq6R7SYyhGvWqv84Qies 51V6i9WtLW3DkQgVsGJM+Uf0ovEPx3VmiCQdEJqytusHfvA6zt6PlCN+H+4UnJXRY6Pb /FDbXPPRAw0eceylrupGlu1a2u5SpJVfmvjkSPGQt3fnj6qk7HUAyvnUlGmstLY/f8cU tKOwSrYaiSjVr1eR+/fj6p4wtpDKPEZJF4gx8RROEnOo4xSzy61Xoe8qLC7uk4jAKk5G TgN/GcDC9cZtukxLnGhPKuVLddRxa/Cfr/HDopoyKlrZxuKHthnKEhfQ3e6bRkswbgkU ckuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=Or+ORj7G; 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 t11-20020a056a0021cb00b005254abef688si17558391pfj.239.2022.07.13.02.48.40; Wed, 13 Jul 2022 02:48: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=Or+ORj7G; 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 S235105AbiGMJq4 (ORCPT + 65 others); Wed, 13 Jul 2022 05:46:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235741AbiGMJpm (ORCPT ); Wed, 13 Jul 2022 05:45:42 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D82A4F680D for ; Wed, 13 Jul 2022 02:45:30 -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=pNIS6Qd57JpoL/PgMEksYPHHYztiAgCOQTRbG4eEmHs=; t=1657705530; x=1658915130; b=Or+ORj7GmX57+vLJHR+bLhKzLRhC/5vpUYx7IU6fp30ZLcH sYHt75dPRjSqD/Uywse1NhqmvjUf1FGnikNFsRDZA1f03+a7iTa+PfIj6WPJ0A4QBEPKyXYXX9iRY 0ig07pP1XhTiTW+zQg93ZI0F/X6ACg1MIh7CWxBG7Bn6gtDHdqfoza3fe0FK5inW8kdaEz25OpnjZ cKVTJB7QBFiSjptmFCZxFtKnKX0Dn5sF4DtYK38qBGnUlKYb9JIJch2znsKCSpko7j283nhOfFp1r +kBsmH8714vR/QuXC/jqfdB9wKwo2FRLGec3xeF6IsbTnXk3Svwz2lND8Ds4uWQA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1oBYvx-00EgvB-0J; Wed, 13 Jul 2022 11:45:29 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Ilan Peer Subject: [PATCH 70/76] wifi: nl80211: allow link ID in set_wiphy with frequency Date: Wed, 13 Jul 2022 11:44:56 +0200 Message-Id: <20220713114426.114795c9b65c.I46594499a53c951bb8eb02f4dafbcaaaaa4a2349@changeid> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220713094502.163926-1-johannes@sipsolutions.net> References: <20220713094502.163926-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: Ilan Peer This simplifies hostapd implementation, since it didn't switch to NL80211_CMD_SET_CHANNEL. Signed-off-by: Ilan Peer Signed-off-by: Johannes Berg --- net/wireless/nl80211.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 53d63effbca9..0bf1f7267b89 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -3475,16 +3475,19 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) } if (info->attrs[NL80211_ATTR_WIPHY_FREQ]) { + int link_id = nl80211_link_id_or_invalid(info->attrs); + if (wdev) { wdev_lock(wdev); result = __nl80211_set_channel( rdev, nl80211_can_set_dev_channel(wdev) ? netdev : NULL, - info, -1); + info, link_id); wdev_unlock(wdev); } else { - result = __nl80211_set_channel(rdev, netdev, info, -1); + result = __nl80211_set_channel(rdev, netdev, info, link_id); } + if (result) goto out; } -- 2.36.1