From patchwork Wed Sep 9 15:36:26 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: 249484 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp523966ilg; Wed, 9 Sep 2020 08:35:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv8Gtu9Tyk1+pkXG5P8kYZZrVNWvOoGFp5qlxBq/0E7hodkDrvOexlP6azICyT6O68xq4M X-Received: by 2002:a92:7307:: with SMTP id o7mr4292526ilc.226.1599665752424; Wed, 09 Sep 2020 08:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665752; cv=none; d=google.com; s=arc-20160816; b=vcJYdV4jwNcTp529jEjDMAk0RPNGoEKHFI1hRqHY0ccmxXjPRbcrZaudNg9bkyuw9k YEb8aC7esLlaclUlVQ2LxP2uELlgrLAuPbrJirMLPxeNfAC2vSG6vAzIMMW0ukh/3OLO kp1RWh3qRJliRYFSfK7BxQ+wqGFehq6Ged5beyBBpcZ09/bqANmHRTAuAI4KPwrpZ2VI 3iJAnnL+96JqhqWVjYE2Lt97Mops4jJnCWCVzmW/GK2z0Ds/J+ayN8oiVfPhcrC9nwsc C6EM5VdTsGsEACV/BOxQfwmnUd3uJ5vI8PoeVLXca72OQcVFXlGY6pG8OrqHl9L0ABVv AASg== 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=BWzy6ZUsoQ3EWIP2kVJ0DQVHpadDIIGcmYjyyU728uYt25n4vN9POv55j/sEYM6t5N b2ib+EjBberAZnmCV0CXboApn/70YvBl8/LejrM35ztq1VstQvQ+BxzzjD3aOcfSh8FU DyaedFvCp3DIHZoNubupWBZ+wZqXzsKn49+hDo+GlqrgjCbjTFrdRj4KO2/knCT0hEbP n8yLsaQCnrycoidbkwqZkV7N2bh+Zo0lybyylePQ3dF7IaVtPnRLUl5CUs/8+bzctchF CsPjIvehWftdwUyErd2WcGhvPweAY/wWDZW1uvBxUJpcEI7dJt6E/l9Y9dG9ZZNForKo oGAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=DEZyNCFX; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gn6su5lY; 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 t67si3010538iof.26.2020.09.09.08.35.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:52 -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=DEZyNCFX; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gn6su5lY; 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=DEZyNCFXrkePTZU7NAXVkbjPP 8Jo3I2aad15EOXxnkE432O7SlrB19CFL1TOzXkIMY8ZvtnrhEL2ZiWGxGQFIpCnujUQmM/0m8QMpr UoYKoCQM8KGygvFsZK2W8/CGgbqO1C7n3WdpEJ1jiiBpcRy89bk61sLWRF/xgvFtnbWgSchiE35Dr KkCF4KpY/fH5SpQbUQSadpH/ho9CbAVYp8QsZmaZkch8kFzPY5mcpunbiDZlBHLk2HUkzeagJg/4g sTKlUDBT7NhxeI0wbFybKwnbsOzyHNpFIT2M9V8/r5gmOqiWc+QygaGEE3RHJIHjs910sLrA7BO3T HzZVDHjrA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28T-0006Uw-9D; Wed, 09 Sep 2020 15:35:49 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28P-0006Sg-KF for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:35:46 +0000 Received: by mail-wr1-x443.google.com with SMTP id x14so3419934wrl.12 for ; Wed, 09 Sep 2020 08:35:45 -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=gn6su5lYht2SYy5qbVTDc4jr27USvSHy28HZjSXLv/oDPCOfMRfbMD0o7hCFPzrhsO R++1ZQNXvrcfjnPgKdLNBDbrzwK4RtQi78aI2Xo51+dE45MtIG/HQmSs83aq1le/uAto mqZgGA445sISsYdaG479J2XJIbnYyIcMIBjS22OBtASVNcigXLhDF6mw+R60v/VjAf3Q GUsaRmgKPU44wiK5Cv1/1hDkKWqYjOtyThnPFiZVTZLiRP+UUFp5/C+iHyWSzVDWExox l5CZPlHy6OfLYQS/UvP0CXU/pRp87Un7wnldhcuDs3T8kWrhjEznXpG5QpbEbMmpJ7CI enKw== 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=BLIwAH5qHUT/z4yBz2g72M7fvv33ydqeY516ZMx4IigD6PCSBwSzG4QrotiNzhuJbf SOdrhO3okuOXuZ03HUzJLIi5KvttP18xj3kFsOsvbPfQo7aLzpPLF2bF39AO0C95N+iW lUp+rBP2dqrgmQlYMFqSt9jA41U138NEk9dM9Cl79bNbmjMwm+Esf/eFqxmrxBxNyIK1 fxpferU8MZUMpAgDiCVzdV2zaKUBxjaSyutaIlppPwxpJe4t8LHun7IePbZnnDcsCxG0 XdxKATbuS2CAiefQpPor6dXN4/ofupxFfUFoexkq2bTL4a6SEKxFXUgwqOi7nudwptrs ivmQ== X-Gm-Message-State: AOAM532xYFeHN5pWjOpEuYINClAWQwoUSlzE551H4UN+pZ2DXBORJ/q5 HJDVozXrydbY/FYdus5Dx6HA7w== X-Received: by 2002:adf:c3cc:: with SMTP id d12mr4482893wrg.399.1599665744654; Wed, 09 Sep 2020 08:35:44 -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 c18sm4924871wrx.63.2020.09.09.08.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:44 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 5/7] wcn36xx: Add wcn36xx_smd_config_bss_v0 Date: Wed, 9 Sep 2020 16:36:26 +0100 Message-Id: <20200909153628.2904888-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153628.2904888-1-bryan.odonoghue@linaro.org> References: <20200909153628.2904888-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-20200909_113545_795231_273A19BF X-CRM114-Status: GOOD ( 12.33 ) 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:443 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 | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) -- 2.27.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx Reported-by: kernel test robot Reported-by: kernel test robot 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,