From patchwork Wed Sep 9 15:35: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: 249469 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp523445ilg; Wed, 9 Sep 2020 08:35:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziFFJBIP4EWQNO7qkIoYvIv8d31Ixff5fPO7FWn+nVQv1fa22ACpNehPC1r+dQkWn91Chc X-Received: by 2002:a02:cd2e:: with SMTP id h14mr4623861jaq.6.1599665714743; Wed, 09 Sep 2020 08:35:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665714; cv=none; d=google.com; s=arc-20160816; b=t8UwI6yX+M5tdXmv02m6Gt57e8TebE8ePUTh4ahS1kz4NQqerehlgBYWc1JJlDC8Wb 1kbAuPb93KaO/hJ2oDExmYXKeFwHveDrYbq6888otdpvUec3EyPIK9uYLpN1aHCaU4UX gs0FTUijvUrlVytg/pBsVB9QmcFzORSnhDfNHFb88xCxqJxQTY5mgddLJzXASpKq9ay+ avmfCpto1yb0bN9AFslOR8Lng3gie1+9l7g2BoBaQC3h0iD25grJ4V8MOp2BBfIHwudM +4IHasWwwbvcpStFdCLzUgmoWyvfk/2KmdPng1tN+Wk3KK5oW4phLT6yPDreQQxm6hoH ZBlA== 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=mrHQXYgOzGrE5OAhUl3GjkI12DsuBI9GCRW5xszef4U=; b=oBder/5G3SGEyOLuZU8HvIJX+q89g4Z9tZ81lpgwlbAanoGTUtB45cgh/8rgXATnnh joeYcqQtOnuY2v1fK631uYs6Se0JWH6HbfuITz2fOi/5v3M7lYaRqwZRxesKQ4Y0nEvk Efk9Tt4j0W7/ZXgQBRcLg6jLcoIsVM1zc2Yioj7ZCtrk/yM8CdesZmGe7XrrJMwvtxxs S8SfxuioGd7crfZs9Hna+1FOBhnKzSUkY90E/X/f+SpQ+j2oH+r2lYBO1KyFBOdUEjvy +ZjWVVdvA1WICdF+wOlDDPBkoDqCxtTvR/YUDynHQ+HQnb12WJrtfsmEg11SsAbgX+V0 UHbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=H2rkGCfr; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=I8waGxoj; 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 f7si2364266ils.80.2020.09.09.08.35.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:14 -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=H2rkGCfr; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=I8waGxoj; 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=mrHQXYgOzGrE5OAhUl3GjkI12DsuBI9GCRW5xszef4U=; b=H2rkGCfro9f/znPKtSFs6NvQH 8URBjkESrXzUMvGlkazzZHzYyYSDzcVB9A53w9LjHCUGBtFsLSrObIbnCEiqJPVDFVSxpWc+1YnsH PX0SBJIRMv/2G0VAgpCjB/ZMKQHRvIgwQoDV+J5UOXrqMSJ+lZS2iSl++vmPCh0GULHSbGgEXdjcj PSaNIrcWkARAwiVAOMMcnHSvq+Zu9IBXKfa3pfQpdvFEppR8NPE2Ru4I1f5ckEV5U2+BhKH4dlpLJ iymPnrkYC791ESkdtLtloqoi2B4hixtD+4/5lLYQyrxhBmH0M577wOQrj3uvau2R51A1Jy0H8nHmU UxFISlHng==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG27r-0006Ho-9P; Wed, 09 Sep 2020 15:35:11 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG27o-0006Gh-1N for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:35:09 +0000 Received: by mail-wm1-x343.google.com with SMTP id b79so2818717wmb.4 for ; Wed, 09 Sep 2020 08:35:07 -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=RqOhclRRIqI97WuGHZsdvXxzhC2mxsIcVlTbaDy3Bdg=; b=I8waGxojlzkRIl6Ew8JGRtxReXZpz0VU+jHluWkVETFxLkMTVb4sJRk3I9ZNkrD2L2 Cfc/3HFNgR6X6LKixBdbgHauFjurngCXFVUYGqp/QFdA4ZD4Xiez5XMdOf434hlPjWlW /MlQ6wU9gOVsWdvXpsr7U69zlcWYwX5ajbnF78hzgNdZP41yODTP8dCZMSSG5VzNgQM5 h7QtSDa/G3vFK2lItUMIDEppvbo7xul1v0315zkZFk1Aknh79juP6XsV7pYHAKEiuswO 11EkkU/l0iPosmmDerUQ0c9AOTYfREvGHyOyaLCnasVCWsagRjIIqFfNmTKF/j/o0DGL Jorg== 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=RqOhclRRIqI97WuGHZsdvXxzhC2mxsIcVlTbaDy3Bdg=; b=Xj5J9CBNEE6Ugge+0bLiKYKQIOcfJ/MP508fIaPoPVK75T9LPcmg8122B77S5zT0H6 NnmblKFJ9vdlErH8Be7XduqU/piXThmeeNU9Xmc0eZpXUt3H8umA0+yKknTlRT/oj28J KoVN2wrTCV3MB4gTRuWfJLqaHMRxdRH32VP2bwF8/pEepBAWtd4vP369T9KrcpGc8NaL JlPY7DJ/qq6ogxwzdm0BF/zuqSPsehhd9U6VrsAOmURu2JDKQ8fW7S+9M+oqoemeVXIs ldh4ynrfk/dIGbBSwZ534Tiu0aXYL4DsEQgNkrlaZrc4PIfJigGun3E26BCNW4XMDhB0 7kvw== X-Gm-Message-State: AOAM533RE5ui9Q7cjpCtbyiWFVSibjbPDz4YvQRo98jwVW0WuewUCiY6 7MrQQYh+h99efTqY3F2UFpXX0Q== X-Received: by 2002:a1c:5a87:: with SMTP id o129mr4237839wmb.145.1599665707121; Wed, 09 Sep 2020 08:35:07 -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 c4sm4922120wrp.85.2020.09.09.08.35.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:06 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 1/2] wcn36xx: Add VHT fields to parameter data structures Date: Wed, 9 Sep 2020 16:35:53 +0100 Message-Id: <20200909153554.2904762-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153554.2904762-1-bryan.odonoghue@linaro.org> References: <20200909153554.2904762-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_113508_412783_8610EAE0 X-CRM114-Status: GOOD ( 14.81 ) 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:343 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 In order to pass VHT parameters to wcn3680 we need to use a super-set of the V1 data-structures with additional VHT parameters tacked on. This patch adds the additional fields to the STA and BSS parameter structures. Since neither wcn3620 nor wcn3660 support VHT the size of the passed message is fixed to the previous message length. Subsequent changes will differentiate between wcn3620/wcn3660 and wcn3680 which does use the larger message size. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/hal.h | 14 +++++++++++++- drivers/net/wireless/ath/wcn36xx/smd.c | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) -- 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/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h index 573799274a02..3cceeaf0136f 100644 --- a/drivers/net/wireless/ath/wcn36xx/hal.h +++ b/drivers/net/wireless/ath/wcn36xx/hal.h @@ -1592,9 +1592,15 @@ struct wcn36xx_hal_config_sta_params_v1 { u8 reserved:4; /* These rates are the intersection of peer and self capabilities. */ - struct wcn36xx_hal_supported_rates supported_rates; + struct wcn36xx_hal_supported_rates_v1 supported_rates; + + u8 vht_capable; + u8 vht_tx_channel_width_set; + } __packed; +#define WCN36XX_DIFF_STA_PARAMS_V1_NOVHT 10 + struct wcn36xx_hal_config_sta_req_msg_v1 { struct wcn36xx_hal_msg_header header; struct wcn36xx_hal_config_sta_params_v1 sta_params; @@ -2015,8 +2021,14 @@ struct wcn36xx_hal_config_bss_params_v1 { * "STA context" */ struct wcn36xx_hal_config_sta_params_v1 sta; + + u8 vht_capable; + u8 vht_tx_channel_width_set; + } __packed; +#define WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT (WCN36XX_DIFF_STA_PARAMS_V1_NOVHT + 2) + struct wcn36xx_hal_config_bss_req_msg_v1 { struct wcn36xx_hal_msg_header header; struct wcn36xx_hal_config_bss_params_v1 bss_params; diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 4c30036e2e56..55aaaeb78b14 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1223,6 +1223,7 @@ static int wcn36xx_smd_config_sta_v1(struct wcn36xx *wcn, struct wcn36xx_hal_config_sta_params_v1 *sta = &msg_body.sta_params; INIT_HAL_MSG(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); + msg_body.header.len -= WCN36XX_DIFF_STA_PARAMS_V1_NOVHT; wcn36xx_smd_convert_sta_to_v1(wcn, &orig->sta_params, &msg_body.sta_params); @@ -1294,6 +1295,7 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, return -ENOMEM; INIT_HAL_MSG((*msg_body), WCN36XX_HAL_CONFIG_BSS_REQ); + msg_body->header.len -= WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT; bss = &msg_body->bss_params; sta = &bss->sta; From patchwork Wed Sep 9 15:35:54 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: 249470 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp523450ilg; Wed, 9 Sep 2020 08:35:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaKAaGQWhC4Ojt1E7f5RjbMa8ysAhFn+3qOB+JYCA42+k0BCFbhdOwQpRRomosnq7/y5bw X-Received: by 2002:a92:9992:: with SMTP id t18mr4382331ilk.170.1599665715168; Wed, 09 Sep 2020 08:35:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665715; cv=none; d=google.com; s=arc-20160816; b=XlLooi478bpEKWiSfJA9NDa/S4b4B9rfAPk+0se+GVmlUMubOTP+KCVbQzocxN2ruj hKJcgfjcovojar0kKD9S08+Uo4yQBozSkRTGRmZRSzNcWgmdv9IteJ6+HRxev+ZJBJcL tz2jc1R+jnbA36SbiiwvRFt/ijEsstTxX+jsLoYj5/iuJqYld0tyh3/IOPqIe2HSlxAt W9wc6aC1+yT0GWpNaW+sSZIa4AyFM/0OJPGd+3KqVW8ttn5Yv+JyzW/O1EhFoX83aaG/ UB4t3Shj56IbbstO9H/UQlPQbGeITmy+lGVaSdKrZbKbaMUR1jtL/foENEjD7TETWRXM MIxw== 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=WPX/raHK3PZn7zGmCoReNfg6IqomfvdKqSX2zIKfvE8=; b=g6m20+yp3c3xhrIFbQZgXkIuGmzJNYVyhKD8ciqcGl9kMN747lpVhUV0MG2QTc0bJL oQMGfz4fEgfKwB8gUL81A9VMCH78r0WuGedpwEqHHe+UtsaHxwXGh/HDEZBIOfekXScV gIUJvbbvJqXGRQvAfcjeKYlnWUzjMnO0TUGhMe+LN2wZSuvFsWjFbpYSpzuB5QSoN2a/ nxa8rL6KqZrE8xXc+Y2/6G3joigGRpN4ul4n4ktDQOkq+lT9407O3qqfgU4U8G8O+Ugh E+yZ39bzCtT5Y/rzGRGZaVJgscIzHfqy+hPPXvd6rtQi0LMa6pVCpHWlvw+amPZ/vraL MS7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=wIAT9+AN; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Xi/gaK17"; 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 k18si2259299ilk.39.2020.09.09.08.35.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:15 -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=wIAT9+AN; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Xi/gaK17"; 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=WPX/raHK3PZn7zGmCoReNfg6IqomfvdKqSX2zIKfvE8=; b=wIAT9+ANjXJ9HM23N3728bJsM pcyINxb59MS7cwz5W25HkkxdE/iGr3DSko8o18l1uHS4nYK7237A3d1Z7AISwGKNHJLhc4uYISod/ 8GEGQt72CmnoO7X8QlXdzmthTl1qTtxFQgDzVfFkY70QuP9av6KfxIt2BcdtPBtQxi6//So2USyeW kNWPlpVlIWfYa+NpLHsXcJqVtzkhaO4QSfacKaxH4NSgrCru3Xx6hiDrNd2E75r/lWixEAPXLQ2BE wbblGj4rZ2a4kZZK5DcPthDjnXSB5gwJBwIQfsiXTq7podLWBicqOX56HZIv8qbNKtWYZ/z7ntu97 y879dxKTA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG27r-0006I7-Qz; Wed, 09 Sep 2020 15:35:12 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG27p-0006Gx-4K for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:35:10 +0000 Received: by mail-wm1-x342.google.com with SMTP id k18so2809561wmj.5 for ; Wed, 09 Sep 2020 08:35:08 -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=tfNF9Nm72/GLHvVDln+H8GXexy5WDv58YkhHrtQxFnI=; b=Xi/gaK17S7A1P2TqeadY6OnuOBv2ko5+M3uMj9PoGSNOgZUW5DvaG0y24kHMGiqz7v +17c2FzRk0CUO6m5FYrb6K75lbtW+5wP+asoLHVbYg4lemsIBIgLiioQq+cb3NJ3E11V d1yxfZe/rHr9vjnh6QvufcfaUJI9P18H8Edac/FgaJ7sIg0P+6PrhWi2aW5I7VWeKHCe dU5kfU3U0wH1HWnikYLo45mk6D1O5VfH7cdWIlsuqKr0CsfXBb5AIiKo4UpzMISF2XfQ fWj8AbM+BycP6RTHPrxGSgX157+PtFIPbebOM9flbJeXtujxSZFG05ihSA0f1g3T5/Sl wF9w== 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=tfNF9Nm72/GLHvVDln+H8GXexy5WDv58YkhHrtQxFnI=; b=m21BFb1qth1pURPcZH0iaiJtxCAEepRRoP3Cfo+n2NyBbQ7jUFlsons4EcZp558lyk QR2lUfdk3WxO2q1ImfMwsr0FgD9g0Jjb8ohr53VDgAXq5zJ7/W5CZd31Yw8LmxRokPEz AB8Cjh7veh1wj9RiI+Jsf8mJQ6RTiRi/T8M42KxaPUAHQAFSnruMJx7OFVdJYt9VGqJU ydS5FmastbiM8DIGd5Qmx/b7/5mfYY6ktZEmsiVNK2Ays3AHN8pbZJBm4DguAbjh8b5N ac1RZEFZ35xKfNpwGXxJpAWiXHEQmPxiT1DWP7KwRT1N7A2PLvIUIfMaNRCyac+b+WXM bFUg== X-Gm-Message-State: AOAM530dvvce9/5srWiybotJzBOMwEnMDrYgazJDBrvjkoV6ZCuCBmBS dY5W7eptRnnLK8GIRgFDSjKT4EJV3CPIfQ== X-Received: by 2002:a1c:6385:: with SMTP id x127mr4298855wmb.95.1599665708121; Wed, 09 Sep 2020 08:35:08 -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 c4sm4922120wrp.85.2020.09.09.08.35.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:07 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 2/2] wcn36xx: Use V1 data structure to store supported rates Date: Wed, 9 Sep 2020 16:35:54 +0100 Message-Id: <20200909153554.2904762-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153554.2904762-1-bryan.odonoghue@linaro.org> References: <20200909153554.2904762-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_113509_210506_B5C36D3B X-CRM114-Status: GOOD ( 13.88 ) 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:342 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 patch converts the internal data structure used to store data-rates from version 0 to version 1. This allows us to extend out the internal storage to represent VHT parameters. Using the extended version 1 data-structure allows us to avoid a whole raft of version 1 specific fixup functions. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 5 +++-- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) -- 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 55aaaeb78b14..d5ca9907af86 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -242,9 +242,10 @@ static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn, sta_params->aid = sta_priv->aid; wcn36xx_smd_set_sta_ht_params(sta, sta_params); memcpy(&sta_params->supported_rates, &sta_priv->supported_rates, - sizeof(sta_priv->supported_rates)); + sizeof(struct wcn36xx_hal_supported_rates)); } else { - wcn36xx_set_default_rates(&sta_params->supported_rates); + wcn36xx_set_default_rates((struct wcn36xx_hal_supported_rates *) + &sta_params->supported_rates); wcn36xx_smd_set_sta_default_ht_params(sta_params); } } diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 342ca0ae7e28..d7d349de20e6 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -169,7 +169,7 @@ struct wcn36xx_sta { u8 bss_dpu_desc_index; bool is_data_encrypted; /* Rates */ - struct wcn36xx_hal_supported_rates supported_rates; + struct wcn36xx_hal_supported_rates_v1 supported_rates; spinlock_t ampdu_lock; /* protects next two fields */ enum wcn36xx_ampdu_state ampdu_state[16];