From patchwork Thu Sep 10 15:06:29 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: 249642 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp826009ilk; Thu, 10 Sep 2020 08:05:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiguMSHGhcFL5WWZI6Ds/1OLNmDa1fbfRqSzq5EJ4YZtU6Ya3Z56+WDVTsLGmy6A2PfB5h X-Received: by 2002:aca:f5cc:: with SMTP id t195mr323725oih.10.1599750355406; Thu, 10 Sep 2020 08:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750355; cv=none; d=google.com; s=arc-20160816; b=hq3mltMWrmqBdZ/7WphoFa5aFtOlR1OuqzAsE4r9qyu5CFKnmO7me2/xMAL7HTUku0 58UpA+lC8aSQV0Lohb+qg83r1uZoQ4OGkWpZRQmC0GjvZSqODyxKovnoMKg4Sv9fAgi7 pbN7knKZKNk7AUqFcqfSlpzRHTxjNRjBYtmQMYmTYtJua+XbxdUd2ozHQUKSPlL4OtSR SSHsF/Vi+ROLGFmppU3LDdQsXBOw0FGluzSUlKIAM8mHd1GJJ9N1Vru0uwM6NT7sQJzH f3Yv1j/FxPYE8nDY9aRShFLUmNlUF/Km2BSMSkS9tcibzsNn9jy5wSYIYQo5+nGEZcBI TWQw== 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=W8lWxu3ahLbR8bLwpVBIJ4ulfySRTpcTGXdztMZSeYE=; b=t7ori1D/3+n0oDSpDcxaHNwEf4voN4lzMYo422jWPzW2WuIAUenXvWTUrckaXUBDld CC9B+RBqSe2MCPvMcFwAAUR9aximZPECs+qKiQAsFJI+7cX/eHBMsTnhtU87VWs9kJPO lD+Nk3N05LC8YWzcoh5GGTiuI+pkXcIuYRnRI5oZPYSOBr6cbokt6kN2idAXx0IZMD8Y Dxe1ObTCaLNRhyebAIClR0zh9QV4FqSbWhf9K9/jFOQCzUrGAgA3qrxPKHVE+soUURMD MEezOc+0IhWry0CkFD8AfgYOQoGU8on7lsdv1D3gd/Wvt9g6MaXBK1ZUYX2Jqrft5MGo jN5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=Kkm2cMig; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ucpAjTCa; 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 t25si3326148ots.115.2020.09.10.08.05.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:55 -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=Kkm2cMig; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ucpAjTCa; 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=W8lWxu3ahLbR8bLwpVBIJ4ulfySRTpcTGXdztMZSeYE=; b=Kkm2cMigTQl7mpyC3+yct3mS7 k3RLsecQuD46Qqxsyr5AnpbrNSr75a4fTEfsRGtd5Xp+jKuGc0LjKt0GtRpM1JwEjf9lhUEAJiX6U mvI2iY1M4rBhZYGCPKtYYTkfEcYWVzRxORBIdFMJBTAUhE0+MGbBFO16VZCTpeiKFAlPPvR2kB70l yRn0fLUJcaScmErgf21/lm2ahug25vfFKK7Dwksv+NT0rrTE8LB1biiwlLsxFGCwySYT+umJvGMSO 9NH1SabFArdIYhi6LHI4kyuWlbOwa4j3qPR96XUIAvUV+1jHoO9SpKDNw9AGK0KL84PojRV7egNLj anWasN95A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO92-0007iE-57; Thu, 10 Sep 2020 15:05:52 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO8z-0007gE-As for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:05:50 +0000 Received: by mail-wr1-x441.google.com with SMTP id w5so7060632wrp.8 for ; Thu, 10 Sep 2020 08:05:49 -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=DQTt4ZJIu8GTxj+4B1cvxGG4nybh/ZrPxormf6iSTCU=; b=ucpAjTCaNTUlZJQEWLRjLbssJXBm1SZt/yxRqtoouzmk77RdUBsbFmOShJDl8PD6TG d4hbRJLnGhz354i7xar3axwWUh7cBcuwfxj3pCoA90tiBAUdv7fp17i9EZ1sFz0gFH/u R2nNEyrSwuWHVq30F8dDq3BkvOQGUfF3/rCvazqpC5vOEyTWYZxpCZPULItp+YzZA4wv IoarB7c3QNy1ue7JgiQ9/nnGLEpjBUVVT1Te4Quc+FFRXR8g9ZfktV5/M6G+E6IINyL3 siYscq+JNeFURo//EjmCllqq/ysPNQzvCOrDeeY9lpp6BLPMd5g36ABIJx5VN/5kh8k8 D1LQ== 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=DQTt4ZJIu8GTxj+4B1cvxGG4nybh/ZrPxormf6iSTCU=; b=WXQqw+830zH8zTGfRIEQ748eckS3NJnDXxO9li+AWZd+z7/m8LZrOcB/LibW6B2GBV 13wyUt/dmPtuBmsWb26DakkZTcZPrAZxhD5/+VgCrgJ2FSHYVGoL20NE5MDk7tJWM9S2 UqrWk1MyThtH176cpOPMB1rHGypXyCosKhkOTN22NuARcdhQUmtRei/SN0ZDKMxK+vQk MtbW+4yE3fi5rMHskE3exZGHT0Avs7F9UKiQ43ksMQTxG5tScsY3IVkywey+0OvCkZhS vvUFgcG6CUCQtw9DAnyEzdDgqOAPsxeXjPzii68q4eQIp/8ehWbQDmECu2mrAE7tcEka a8OQ== X-Gm-Message-State: AOAM530Cx6Ir0+JUMVfoQ3RHdRlaTkUZv3gln7R0ghzEsh0nLcE+P6/h gipfAzLQmMMKm+cC6+XjxOFRgA== X-Received: by 2002:a5d:4d8a:: with SMTP id b10mr9498645wru.82.1599750348555; Thu, 10 Sep 2020 08:05:48 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id k24sm3857005wmj.19.2020.09.10.08.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:48 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0 Date: Thu, 10 Sep 2020 16:06:29 +0100 Message-Id: <20200910150631.2178970-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150631.2178970-1-bryan.odonoghue@linaro.org> References: <20200910150631.2178970-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-20200910_110549_386061_4E272EB1 X-CRM114-Status: GOOD ( 13.09 ) 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:441 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_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 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 | 44 ++++++++++++++++++++++++++ 1 file changed, 44 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 809a4c0899ff..57833eec16eb 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1605,6 +1605,50 @@ 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); +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,