From patchwork Tue Sep 8 18:24:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 249327 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791666ilg; Tue, 8 Sep 2020 11:24:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws+zqrpjqNqvTZb9QLmSuqj/yqyBnO3LXZk+vkF3d/9lAhvzMV7FPlgmQ5d/ZFJz9+CETV X-Received: by 2002:a5e:8d04:: with SMTP id m4mr114716ioj.107.1599589463646; Tue, 08 Sep 2020 11:24:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589463; cv=none; d=google.com; s=arc-20160816; b=jUq7M5TGrMnemEHmMYoS3X8HwHvBY8CuaezpZbkJlj3+qD1LRgx1dXBWOD9CwWLuyP bPqB/NsaeYefNdvKh5L/oycOUBxSco1y9lGAqMyghdlpa49sDr5wsCV8PDj+QZnteHnA bjKFoQ6EwQtcejQpDmCdp6E9bJasWHrNHDBWNfJGuXaWSe7JxqccY6IVw7BPYufxxzXZ ssFIVHuSh21Cf2ahzK0Vx7oeRa3dFJDkt+qqXIhOI9gz/B9APsPvpRAP8oORgE634CJx bsPt4LioOv4td+OOIBqpvr+7G5uEwO765bhTZpdgp2L42gdhSKLLphNPYn5kV14CGUir Izeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=ahAVr0H/CY/zv7IoHNoRY7SQJFXHlESdzTzdc+EnOH0=; b=rGyWMCBSHrlqqvTMsg3J2fZrS9qwVy5EPKjUC7Mvr6ttWYfJTZrDvWF/ZgiBeln0Eg Wkx8UR46N+hPk6dFD0RNu+lTfmYmKQbPo95phd/mMGYmImLD4eRZ2V4Cg/LpJwMNt+K/ I8QCkcIkyHHxJmNmwQ2D1JE6dfeJnhzWZDp6cplT5X9UKCE8XBEZSVQKEi5HONoxV1hb NOUETWG/a8HpyVeSyZ3SrY0vAPt9+npjW2P0ixjwkDKg4oRAH1TCYU6PaJqe7fFNeYSl PTcM6Jxg2gFZ6JrAp5JH6EfjJ0uq1Hg4qeo/iOym3Lesbj6t3W1anQPcf/RsSg0WRwdY XSUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=qOl5hEoh; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=y4UZqdFw; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id z18si123322iod.17.2020.09.08.11.24.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=qOl5hEoh; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=y4UZqdFw; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ahAVr0H/CY/zv7IoHNoRY7SQJFXHlESdzTzdc+EnOH0=; b=qOl5hEohJjKpnRU0HlFNcPuor H64eZ57o8b53HYX3bpy12eOxD52UzTbAT/kxjk9QS3VhKGqjchtXr1zAyXSOmrvjfdoJWV7CCCe// lAYhWSpoYGcm4rMstNSYuJ66w4LHoz1mja+GVKKUPS+zTKVTEBrMPFd0o+SaKdWTJVljLTO7FpVrZ s+aMRrhGUlBseepU6iCrfZTxALql1dc/KlbBYusozSF1lkvMjyGdWW3Ck+6a8lxN1u5heyb2w5GZ8 3hmSPlQZndlYUdXPgTSeoSZTDP28xQMUaLUN2Zucdi/QhOOgq24cBNZwxVCjyiPeC+5ZkAAvQCoSm pf171f3PA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiI0-0005DB-Kt; Tue, 08 Sep 2020 18:24:20 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiHw-0005A9-0n for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:24:17 +0000 Received: by mail-wr1-x442.google.com with SMTP id s12so193989wrw.11 for ; Tue, 08 Sep 2020 11:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HkVQqcl8Y72suOLVUyDLPMVLmKcAEdEBQttsVtZoFdc=; b=y4UZqdFwkp8nFPNtkEBkwllKDqiZ5DJDPAoBQ1pt+AR0JBZGN4f7fZLScqvPdZ+5gN gEWX8+QDG7hzBMrEsrr/M1BMq6I3JpC6U/xpXHG/xXJv89+5qpaY/yP7fQB2B4CiI9hP eH0P2vw4VQ9OBXKugLSNBMx+PyHzV1lcwfkhYLAuXZleCoUzzWqFTc16v/3mN9Rbc+ty xLpxL4Yi88QCh3T2Tq52TctSGCM5ZE2PhazvxteoPr+PRL+RNyBSu+Lcqgp8oAzodc3R kp1g+v3j+qUF2O6OvhUw7D5px4thZ5TCnrgja/98Lk35Frp5n4Y9ur/+nbaqYt0Un1Za oOOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HkVQqcl8Y72suOLVUyDLPMVLmKcAEdEBQttsVtZoFdc=; b=XeUj6R9PSX6gbeLJr/8AEFOn//sqZWsA+aBOU53QAWAKtJmcmQFXrb0azMeWqmb9KN VLnTKv6OgUlM+I3O4cqKNJFGlfoiVJM36czip6VJ0BCpqGoY8qM081TSk7ClXR8hZ6RG Drvn/h18ENLGKsd44Scu7FDF5zhMoUhKXZ5yRAxshpmyg2is8akepOTIhZem31uLw8wD sHJsvTbdPxdqDqaXlaZ3cVowPYfG+gphO0tjcYEZb1qSqQWFiG/NUEmdecPHeSzidV1+ Bf81Fin8Q5c+bmeos/30BiBtmeePi09hvU+wULMLRWUD3fNNm7BhEwRxbQ5rdbypDKOy mP7g== X-Gm-Message-State: AOAM5309Twkeak/tLmX5iJAox8ztDsgHZLRhFYSmhu4+QxkAMHcZTjJe wbYn5yOPho3zkT/YtM0MYZ/tLw== X-Received: by 2002:a5d:46c5:: with SMTP id g5mr951320wrs.416.1599589455037; Tue, 08 Sep 2020 11:24:15 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id 189sm330439wmb.3.2020.09.08.11.24.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:14 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v3 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0 Date: Tue, 8 Sep 2020 19:24:53 +0100 Message-Id: <20200908182455.2870345-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182455.2870345-1-bryan.odonoghue@linaro.org> References: <20200908182455.2870345-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200908_142416_066673_B5509F3A X-CRM114-Status: GOOD ( 13.48 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:442 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: wcn36xx@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org This commit adds wcn36xx_smd_config_bss_v0() as a step along the road of functionally decomposing wcn36xx_smd_config_bss(). Signed-off-by: Bryan O'Donoghue Reviewed-by: Loic Poulain --- drivers/net/wireless/ath/wcn36xx/smd.c | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) -- 2.27.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 7e3302ba97fa..e603e2d3be16 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1584,6 +1584,47 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, return ret; } +int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, struct ieee80211_vif *vif, + struct ieee80211_sta *sta, const u8 *bssid, + bool update) +{ + struct wcn36xx_hal_config_bss_req_msg *msg; + struct wcn36xx_hal_config_bss_params *bss; + struct wcn36xx_hal_config_sta_params *sta_params; + int ret; + + msg = kzalloc(sizeof(*msg), GFP_KERNEL); + if (!msg) + return -ENOMEM; + + INIT_HAL_MSG((*msg), WCN36XX_HAL_CONFIG_BSS_REQ); + + bss = &msg->bss_params; + sta_params = &bss->sta; + + wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss); + wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params); + + PREPARE_HAL_BUF(wcn->hal_buf, (*msg)); + + wcn36xx_dbg(WCN36XX_DBG_HAL, + "hal config bss bssid %pM self_mac_addr %pM bss_type %d oper_mode %d nw_type %d\n", + bss->bssid, bss->self_mac_addr, bss->bss_type, + bss->oper_mode, bss->nw_type); + + wcn36xx_dbg(WCN36XX_DBG_HAL, + "- sta bssid %pM action %d sta_index %d bssid_index %d aid %d type %d mac %pM\n", + sta_params->bssid, sta_params->action, + sta_params->sta_index, sta_params->bssid_index, + sta_params->aid, sta_params->type, + sta_params->mac); + + ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len); + kfree(msg); + + return ret; +} + static int wcn36xx_smd_config_bss_rsp(struct wcn36xx *wcn, struct ieee80211_vif *vif, struct ieee80211_sta *sta,