From patchwork Thu Sep 10 15:07:04 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: 249647 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp826555ilk; Thu, 10 Sep 2020 08:06:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxygZRM4RkOSrO5/RJOjsDJvqYzzdFyG6qaEtjiu5APx8n80u9xF4rNwQPNX4Hc6RxI/gv+ X-Received: by 2002:a05:6e02:e4e:: with SMTP id l14mr8200377ilk.10.1599750388159; Thu, 10 Sep 2020 08:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750388; cv=none; d=google.com; s=arc-20160816; b=uAmKgsNk1+iCOqlifRNx8M4Jy6mk9wZRorg+15G7GwAC6ZeSc0y522WtgW7BsaNw3n oCr8kttk/BU39EfRrGoWIYeMKRlmzk4R2eEORm6eU1BXkDGC+UB2c1/Gi4h0vhN83lb1 QhkJUxxzNQgZAOkodFnd9ZukxckVpgk6Pxv+OIBGMe3FZWRIjJfeQRSkPoBrq89KZTCm GkVRJjatbR5DpM+1UTYibn+BJRTrU+wCYuKbYC+fu0XO6GKeAhV7Po1Rkesi8PtJ8XJw X0Tv6wuzlj8s6ix48OKUtjv76X0VUbQTCMcT97S6CaSbfHgvDj8VKT8ZBVZnR1r2z3aI UjHQ== 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=flXNHQYuvE/kP9x2ix+60tIaj+7wI5SXY3ip5wDBkGM=; b=QTMg0UdadBJpi9WVmIrHRo/ituGHTeqsLwhVgWHHxQXpJqWWaWvZL5CaFWz17JW7GW W4jwYULq9PzhVckuzKTS2AS0DihDJuozHmHmh94nOYuvSRzGVYNodg8GKZoB1MxQguTt btp543iVzCYoFh55nEvM2bp1JPPkL3wctYtON1R83lS9QDFRtqMPm3q1QztsGWFEnK7I /p7BX9QiHlHIJjzJJNrwkHsH+ISloaHGloMegP01bk9tGRDQAKhYHrpG4XX/rKJ0LwfH WTzCNJccwpptFqg8DUYUD74hFm15u0O24sSWz9xMOomA4Oz2x3H3AsD+6M3xduVcCv0S xnGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=WFfUAt+G; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=oCOn9uu7; 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 w25si4238055jap.15.2020.09.10.08.06.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:06:28 -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=WFfUAt+G; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=oCOn9uu7; 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=flXNHQYuvE/kP9x2ix+60tIaj+7wI5SXY3ip5wDBkGM=; b=WFfUAt+Gby5WvFdq2sAFJ05uT WfUFXqOwZssctOwvo0h/jRMxU1gX3aR1zMEjOW0nU46vFCdHe5pmRIGd4wotS9OYVkOWBfIwPUc3C TRQUt3GiP6q/BX8023o2u4Ps03RW/I0wqZOnBvP9XN2l7UA2G3PiYBGNq44M2hpL4yObwoS6S2Ba3 gz4f80MOdJfHegZUAQKmo/8c7pAj7vv2vcpKgpdt27SCa9wttJzruleCILPXXUsPSJbPwyY2eRNM4 Vc9svnrhBkd8uJzvm1+jHRaCKboPUCGeAUCEjPg9pFnhq1960lLX2jxWui5RAUZCxY+taa5baWijF J5HUuPgCg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO9Z-0007p8-23; Thu, 10 Sep 2020 15:06:25 +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 1kGO9W-0007nf-LI for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:06:23 +0000 Received: by mail-wr1-x441.google.com with SMTP id k15so7057668wrn.10 for ; Thu, 10 Sep 2020 08:06:22 -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=yBk3qb6esZU21s8yt3ET2KrYd742m2TmS8YznjO4lK8=; b=oCOn9uu78jvK2Mxprh5yp4HQIcZPjab4XJthUN3hJp6aCzH1VASdy5T+C1nBdjXtAw dfMt4H3gindzAcYHdWnQVAPC+HFI5LtMqHLIkYmCK12Hr5LASFt/GtzUAyJ02dd3WBKg xTBW4RQDsLy6SugjCwHRhmVmL+tnW3Dq0ac+r1i8BXilFBFNw8/+rcVKL1UG+rd9SGoq 5fSNzmgTdnjQJux7v+Ok1/bO8lDW/iCYDGZZTa79UYdkUknW6p9///gLBbvqeEHX6lbF 2619aAQLrFk3Qc8pu3rFMhuim0FkpJ45I8ftAdxHlZYClI/byhPG2LFQZdM/CejfdE4l Ptdw== 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=yBk3qb6esZU21s8yt3ET2KrYd742m2TmS8YznjO4lK8=; b=uBqYHu/zI1JPBtBCyn+hNnSdlpTmE3fVMAE2Nv5GeLukLVXGQ8V3CfYHDQGswM4Swy 3vndgSe/xkb/7m7NwtrzyMLBtpYcaEikn+dAP6I7YK/p+dQPDurjIn7PpzENQV3/c+1C itBGVZjXkxT+9xCFmm9BDJEsskzlWClJP/fBsPMtJWBzUOIcv9GNE1gokIGo4qYwzQII vtd7WetRplIpowEDcsd6AHYxIR2L/xIJoDHnLbnvHSs5Ujht1pLfNqGUWnjxJo0qou3d saFLsUULTi3vLtvFnUdS6Dj7Qzf9KeuNyjUqxCkqnxmOTsFbKqJTz5TBXdkdb5IMRIsK pyfQ== X-Gm-Message-State: AOAM530yYEbdkQoEoPfrUdX4emOlHh4gcmrxBK1YNffnP6wQ1EV0FRB1 Sa7jqtm1uNHmo4SflQUSyi8jzg== X-Received: by 2002:adf:df05:: with SMTP id y5mr10361317wrl.39.1599750381737; Thu, 10 Sep 2020 08:06:21 -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 i11sm8778906wre.32.2020.09.10.08.06.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:06:21 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 1/5] wcn36xx: Add accessor macro HW_VALUE_CHANNEL for hardware channels Date: Thu, 10 Sep 2020 16:07:04 +0100 Message-Id: <20200910150708.2179043-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150708.2179043-1-bryan.odonoghue@linaro.org> References: <20200910150708.2179043-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_110622_715111_860CA773 X-CRM114-Status: GOOD ( 12.02 ) 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 Adds HW_VALUE_CHANNEL(hw_value) an access macro that will be used to extract the channel number from struct ieee80211_channel->hw_value in preparation for also storing PHY settings for 802.11ac in the upper bits of hw_value. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 4 +++- 1 file changed, 3 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/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index 2da81d9926c4..ebce1ed7adf7 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -83,7 +83,9 @@ enum wcn36xx_ampdu_state { WCN36XX_AMPDU_OPERATIONAL, }; -#define WCN36XX_HW_CHANNEL(__wcn) (__wcn->hw->conf.chandef.chan->hw_value) +#define HW_VALUE_CHANNEL(hw_value) ((hw_value) & 0xFF) +#define WCN36XX_HW_CHANNEL(__wcn)\ + HW_VALUE_CHANNEL(__wcn->hw->conf.chandef.chan->hw_value) #define WCN36XX_BAND(__wcn) (__wcn->hw->conf.chandef.chan->band) #define WCN36XX_CENTER_FREQ(__wcn) (__wcn->hw->conf.chandef.chan->center_freq) #define WCN36XX_LISTEN_INTERVAL(__wcn) (__wcn->hw->conf.listen_interval) From patchwork Thu Sep 10 15:07:05 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: 249648 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp826560ilk; Thu, 10 Sep 2020 08:06:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgJ831JHX4BcR4fOv6Ty57LCqu+ZLyUykvIJLcqScnJG+5zcONbOqO32cOhoznL29A1bhs X-Received: by 2002:a92:1b4d:: with SMTP id b74mr8738434ilb.198.1599750388813; Thu, 10 Sep 2020 08:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750388; cv=none; d=google.com; s=arc-20160816; b=sUsRgBePVwxAjvLvYcGQt/T0vUhlkK9wyD3PEOvZzPQkkhDhyN4oKXox6VvVTYB3EV qbJr1u59RnPRIZ+gFA4XajIynMS6K7I/uGBjcbEuQhXyPpNfv16q8bZ7EkVv3fnFiaAt kKiPEGZJTIuHXSYUPqdvakpq5+8nNPljMQ4tvSHvPxK21ePuJwjsFfCL7bFSI8qmRyNm TvlwoUbR94SjhqqRqJoxrxG3rvx+Ed0jf5918YLPjM9cTtsXJSn/CygP3HT9c8PYeGIN JlULXSpfx1p7BFSkVtvWv9IsHUALShHGuBKJxNe870Kx7vsFELxao3oQWJJG728edvoA 38yQ== 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=e4IkzUqtAvhEqdrL0bzDndXW7RPBdGGfGR6KOnIayMU=; b=TrGGpgLgnko5X2T57sDvtPBQQv5ivwkeMMbQCIBXSCM2kIc4gLqW13PE8lxgaNlg69 WIFGke25ilqyW8MEkCIDj+eiGCFutDw9seCccmBW8TDcA7VFf/aK4psQZ5/7G/ZQ/WIB SFj1MtiUxy06hXK9HL1Hfs978lMoesiaGS3JnIxH8Jkg476pgmuzkbKR/v3V0WGHK+H5 9UncOlJ9llvCe5onZjBOztcqCYqSn3l+npXbWzTzK8KWVPWMSnFB5eQNuucc059sSOjV cM0EAaF+jWYm7r4oFC7jBCjmerzvl3/NHejbvCcUitfM1heCL8RSCJ/xlaY6tjMftFhc Gvyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=Gnf16z+e; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=L3MkbVXG; 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 y17si1257901ilq.44.2020.09.10.08.06.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:06:28 -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=Gnf16z+e; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=L3MkbVXG; 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=e4IkzUqtAvhEqdrL0bzDndXW7RPBdGGfGR6KOnIayMU=; b=Gnf16z+eHu4i0iKs9hkZVohxc 49qBPrdk3RAMV/kHjFKOR5DJCrvx03tbLqEoKuLyEVcFD3efl7hXL92catfQCKE5zaz4hhwuIL5zo sj1lJdPCbrgcEOCAXsutoq7owD+pS8pQc04ziE4WUbIk0CUbWmNYoz+aZpFit6Jc9dytzuC1UEaDg pNbJ9YgAZd8DfpE6po2wC3jxbqIBP33uRqqwOtxzyDs939ZSnG5tLB4Z7AeeXCubnze6Txg0wfXSz qx9rLiSdTWJIZl+uCYmlTPO7ZDG+XvZKLPFxbDINH9cdGBDJE0+I/miU7i9lB5/A9wbMXtLbO8dCc 4UyU8ODTw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO9Z-0007pe-Nr; Thu, 10 Sep 2020 15:06:25 +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 1kGO9X-0007oE-IV for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:06:24 +0000 Received: by mail-wm1-x342.google.com with SMTP id e11so2099872wme.0 for ; Thu, 10 Sep 2020 08:06:23 -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=NwCebeUlM9NmAaYhyXx/fGUpE3fedfQDauBCeR9/OgI=; b=L3MkbVXGJPurnYM3WDW1dF3eJa47VxzV+MKyRjLNW/5JJwOMxEOp7Lvsms+/L06oNq 6wO7i2QiP4x/HjG7VXaakOErwTgFkGWDZTbgHq1BBgPdhIzsQmhWzTZngTn8ZGwDi0cB t80Aw2mTdbqdjAmmy3Y578uJNHClTA/X534ct4YEKEdsoSz6HiE1ZHIaPBSrSblWj9+u fBMD/4e0XThL5j4zjSJBt1P0+BzuS+kumYJg1BupFawctkCQ8rGb8im5cWyE2nmS/4De itXIvvLLNcLuI1YpBm4xWmKwAqNAOvKzv3tD7dtYY73g4M9obxji5vWbaE4LuzjgiII+ thng== 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=NwCebeUlM9NmAaYhyXx/fGUpE3fedfQDauBCeR9/OgI=; b=P3OnISvmp23qFYBX9nbuM79oQY07DpUjzQxhwg4Xy5JWdsyQ9CRkQNrNKIKfHw6FtN zhcWlpdvIWCF63Kh34INu0W+DZ0vCVSr9JSW3B56/dv+jL1yGNuS7g54txV1yKEUvRGi 9nxV3F2ontYwjASFdUqgBts9MWfxKvS8voGh8ZuiGnOKVidDkDUYOaU4fM+/ru1y+GJ/ DM325yOUtjOGtxBQPTv1YQAO3cdxJ8avB6jn2cAq8Oe0xXWVxOiI8WfV8JwEINFt6Yh4 8BIbagllSqZPJgmhmxxoSs8yjq4Ya9gkLROcx/cN7TQ4huReTNMtKIK2ksKYXTVi7359 /Llg== X-Gm-Message-State: AOAM530jxc+UcMhWBGHeEnsAiRHR/P3iO/jngg5NBe3nCoPuuH5lRjCt 8PqrY124YscBbxXmgCUoE2jANQ== X-Received: by 2002:a7b:c768:: with SMTP id x8mr422223wmk.189.1599750382696; Thu, 10 Sep 2020 08:06:22 -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 i11sm8778906wre.32.2020.09.10.08.06.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:06:22 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 2/5] wcn36xx: Use HW_VALUE_CHANNEL macro to get channel number Date: Thu, 10 Sep 2020 16:07:05 +0100 Message-Id: <20200910150708.2179043-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150708.2179043-1-bryan.odonoghue@linaro.org> References: <20200910150708.2179043-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_110623_632347_7E805A6B X-CRM114-Status: GOOD ( 12.30 ) 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 Uses HW_VALUE_CHANNEL() to extract the channel number from a struct ieee80211_channel->hw_value. Once done we can use the upper bits of the hw_value to encode PHY related data. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 05e5e079dab3..feeb27851f7a 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -773,8 +773,10 @@ int wcn36xx_smd_start_hw_scan(struct wcn36xx *wcn, struct ieee80211_vif *vif, msg_body->num_channel = min_t(u8, req->n_channels, sizeof(msg_body->channels)); - for (i = 0; i < msg_body->num_channel; i++) - msg_body->channels[i] = req->channels[i]->hw_value; + for (i = 0; i < msg_body->num_channel; i++) { + msg_body->channels[i] = + HW_VALUE_CHANNEL(req->channels[i]->hw_value); + } msg_body->header.len -= WCN36XX_MAX_SCAN_IE_LEN; From patchwork Thu Sep 10 15:07:06 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: 249649 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp826576ilk; Thu, 10 Sep 2020 08:06:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoM5Dr0ZTeAluHdM+LpynnV/YkoJzlOKY3QIwLjL/Sdj3EMeg+5kkKO0ymzGtwECU65boA X-Received: by 2002:a05:6602:2e0e:: with SMTP id o14mr8094845iow.111.1599750390057; Thu, 10 Sep 2020 08:06:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750390; cv=none; d=google.com; s=arc-20160816; b=HuWeLTyMJICKoMTJLbcnAZNmHEMh2pydkKwPSsK82fGd1cdBtSz06Do1Xo0DkMsPSR Ftk8yCFTb021nYG3U0f1mc8a+x/qFWYG3kHVeqNnVp/Vxt7L3GsRTGYTt8yAHslQojE5 CphlynsK4f2R83OZIwTvGOUrlMHo31B221Teb7Q0CqrwuAh7ZE8S+Oxzy85KQFZ0ye2/ eZz7vZ7Ia4TT8jfUu/JONKb7y3ZG/KcEwFe3AoupO9AkwQ5M9wWTnzbcuo/tq6An1FPL Y+oOLFbfwgUhpi03XvZnIIqn5sBDAGfGHOp3wlaebPrCmBR/XJmWzj3g9Dyi4s4eW5vi M2Pg== 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=24BKZVtj12JRlleNm6PPRQzhJdaLhvOx7jvBAIsYZMo=; b=fVCAGkxZSGSFu0MY2vjVTkaOx0WCUixjY8MnmXTu1KD9en9/QmfnFriKl42cJv2Whl aOLTUEKI1wdGDDLDc3rXqae/1ihCkemRxo0hCLVgrZssZU+M1aTCg3uc/uxes4BsZtPR 8dd2nVJIPEB1Yxd9dSWQsS37/x5Oz4c2VCQd/CZlPKqrK/3s8+OCkSTZ+atTrRJgRGd9 akB7WwJBC3F0deks1aJaJ6Wopk9DPTRA0ycJmKKXzs/swhi3UYqw1A4xsSFk9IxQUSnO 2eSqRjJ3v5XYjizMzm03oXoK/s1sC7P6/nS9v3Jv6FfVMpVA3R9YIGZdaTIsguEf02NI BRZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=qGlzbAZS; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=o3eaOHXL; 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 i10si4035714jab.40.2020.09.10.08.06.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:06:30 -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=qGlzbAZS; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=o3eaOHXL; 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=24BKZVtj12JRlleNm6PPRQzhJdaLhvOx7jvBAIsYZMo=; b=qGlzbAZSj0PpYazitRj1OZwbi AZsseoOmY8AB6ukLp56jQNd4HVuwgSWDyjt14ddhfYdP/po8wDyeW71ZWlSql17XTxL5NZFfT5cwQ nIIyRsAx27cIXgkWP9dMcBogzzRzp7/H8PNCVwfvsugrWWslf3+xf87hryZG5L4Fge+NJK+E0IJ74 9CZJNGcFO/+XWJ5UMpgbKNKVBb1PYLM1jlLVN1Wv4VsQAPirC4pR2wjRSqTIh6oi4zVlljwVKMpzo CcQbsIaxTtXXhF3sfJrgqzDMKj4ZokC1SuvP6uEdK5kYjEvjNy3H4gGwY14myih71nWzDiIsCdMZQ AHMjBz3CA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO9b-0007qV-2R; Thu, 10 Sep 2020 15:06:27 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO9Y-0007od-Hs for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:06:25 +0000 Received: by mail-wr1-x444.google.com with SMTP id t10so7103487wrv.1 for ; Thu, 10 Sep 2020 08:06:24 -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=gyyyc+eVVPBc5oNmWeDufnX8Vdj7EzlctFSImbJVqV4=; b=o3eaOHXLlTKZVJQusL0agAIXoJElOD7EcgoIE6ivOCT1Sun7E0GZt9W3fdTKMY8CzL PoguPeVbDKi8qqcvowUP3Ph/qoH3RlydHakEvdpyRXiMw4zO8YAUPsbEuesjxVdDez5D 81VxtJ8SeSzqJbsnhOr7YnakTET6/bpfWqScp8vb/nkC/VFxZ+Dtb3aeCcilgbQZTlr3 C41VGj92BKqJXAljTkRylPuBlI2vSb6mWbMVoDo8DgBRrHiQuHpfhtbsrygWDpTtC+vp pRbJ/eDqqckprTFJmkazUgNCA4hOWj97gfBO0vCQUUtSMCzsFjuPi/s3BFOBZoZ1M1A3 sAxQ== 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=gyyyc+eVVPBc5oNmWeDufnX8Vdj7EzlctFSImbJVqV4=; b=p/gsvzA7UvIhCMR7ntju4BnxvdIeHqvAgtKt1Gu8Dd6GRysHpPkFt8etNeUi8jv3aQ AcbMDueJy3jifDYjnwErOW/9/4Px8ypG6A8J81iZq87niEXUUvPULya1h1RjswvRteDe oqYln8KrtqTGY2zoNq5IDU+r6ehSTIyZqmzT9cQu8WzcRcnVoIEy/oMxqCIDKVkaDP45 qIKWSxrdeYFeCNWDsb7ZafbZAy542zKZ+VAwA4drG0yZWBaIkrtPaq+QERmPdmdOIWe9 M1C5Lflezdz9rfQ33HrDH/HTlwfAmr7hs+QDEFKPkB3kMj1mniboYxJNapdi1IFZeZ8m Fhvw== X-Gm-Message-State: AOAM532D1UvC+3zF4XUmXuiG6S9gCDgvfvArWMKlvlqexLIP3dFHrrhl Gdue0EOrIswfNnsEgxmwQ7douQ== X-Received: by 2002:a5d:4d8f:: with SMTP id b15mr9608394wru.341.1599750383661; Thu, 10 Sep 2020 08:06:23 -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 i11sm8778906wre.32.2020.09.10.08.06.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:06:23 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 3/5] wcn36xx: Add accessor macro HW_VALUE_PHY for PHY settings Date: Thu, 10 Sep 2020 16:07:06 +0100 Message-Id: <20200910150708.2179043-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150708.2179043-1-bryan.odonoghue@linaro.org> References: <20200910150708.2179043-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_110624_646215_22BA7B4E X-CRM114-Status: GOOD ( 11.35 ) 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:444 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 Adds HW_VALUE_PHY(hw_value) an access macro that will be used to extract a hardware specific PHY setting for a given channel. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 2 ++ 1 file changed, 2 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/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h index ebce1ed7adf7..71fa9992b118 100644 --- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h +++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h @@ -83,6 +83,8 @@ enum wcn36xx_ampdu_state { WCN36XX_AMPDU_OPERATIONAL, }; +#define HW_VALUE_PHY_SHIFT 8 +#define HW_VALUE_PHY(hw_value) ((hw_value) >> HW_VALUE_PHY_SHIFT) #define HW_VALUE_CHANNEL(hw_value) ((hw_value) & 0xFF) #define WCN36XX_HW_CHANNEL(__wcn)\ HW_VALUE_CHANNEL(__wcn->hw->conf.chandef.chan->hw_value) From patchwork Thu Sep 10 15:07:07 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: 249651 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp826624ilk; Thu, 10 Sep 2020 08:06:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBuKUS7Feh2EC9hzNeVxJSy/3UALPcpfqaI41WNcLY4v3nYSW3FzQQLTFQqEt1oquN3Y7j X-Received: by 2002:a92:d902:: with SMTP id s2mr7745826iln.21.1599750392566; Thu, 10 Sep 2020 08:06:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750392; cv=none; d=google.com; s=arc-20160816; b=Vvl7DHS+wcmiKREP0oLA0gJ40DdifaAg34HtWRngel9CwTEP+Ij/LKe83FwyNc5bJI fIZ90cXhzFPKa/TVUgi2i07X5G9JUz3Th1HYBGqODC5fjsl6dbaItxzCxTBqxxjJQi1L X6weMkpqeUq3bR1gK5qhgaebBVXK8uyIEGw2rRfir1E/NX+cuSxVN7hrkicQl1KvnlJ9 Zf/pftsYiVsj00E8VWv3X6PawansUEBwGnkxf9y+//TvxtfdSN53C1y0dBUad3SxOitg 1n5iGpY1z7Yiy50WHX+IMp3L1z55vBTJYm6mPLIUappLUdQ4X0Cqa1YNL/kBAU4Com/9 QCbA== 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=mZ+9Z5IM62SRNNDsj/7kgbbI+wzN+HdVOimUOJSajSQ=; b=HwpEs7vnFtMLKzWKbf5K8wK0RrcGlvFBFt9wyV03Nvo4kAtn5hbSTkngEKfZ+TTDOh e5D7GZahj2MtyltkcRA1pzl+ammP1tToA7W7guzdw/thKa3yXkzntqiUZzY7g8zKMEJr +KYrROJlo4yQvADJPGE9ePoGDqDBrhf8fAEBTlX7xEQ6XYFwHL0QflS3JhTx/DmiM8Au T+5tAu9fFATOxgHEULWaLAWOwVQ+iiXf6EiXHhvK3TP8enr3vIIJa0xiuDijB9fP5KUn Ds65BYZwjWm2h2GMGQ2stb3X55u7pFy6j8f4ROHuoe2vWxDq+9T5N0TnciE0JFoYXC6j tBHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=o+yoGHVa; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=mLUG+m2R; 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 u27si3913965jap.115.2020.09.10.08.06.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:06:31 -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=o+yoGHVa; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=mLUG+m2R; 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=mZ+9Z5IM62SRNNDsj/7kgbbI+wzN+HdVOimUOJSajSQ=; b=o+yoGHVaZgz086a1b6SmmVAD6 AcIxIPnMWUZrS29rDTR88ecFYYNwzfWe/KQg1FCVPn84xX4LZytGRizKYlS29JlV670t9CSqLpqbK XGYz0RZ5PQXeYMJo0xVk6W3NIKjCn+qFFI6NakeAnfwH5gs0IHYqSp/AryACRQCaZfofdC3kwuv6Y W1ebCuZXIYxJLo5lsPVd++ewvMsSvKsO9XgOQ0eTTpKTGQ6hySNDgTHxroKz8dCDT1TqyyAVxrCSd WG2MKDAhdLovfNZ4Zy3j7sBv+x+QngB0MR4oQOqTI+BEFYxes0bsxJNdOnte4w7i2oMITSTqrZwnd ZYIKy0FQQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO9c-0007r2-BU; Thu, 10 Sep 2020 15:06:28 +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 1kGO9Z-0007p5-CX for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:06:26 +0000 Received: by mail-wm1-x342.google.com with SMTP id k18so361581wmj.5 for ; Thu, 10 Sep 2020 08:06:25 -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=mNr+Pfqwu/0aRFo1Po43D8D7g7/h15rV4ULpD0JgPO4=; b=mLUG+m2RMLYxd7+leQI+qGNm+14EZ05Cj539MxNHPEzvfR0Y/j63C+135xIHgv8k2v Bxna23J5ESOfrp/FVfyICxm9P3jBJiIrvuhJ9Ux/Tfjtc8Ivoi+hmL7ZoA7sk8XT6JLf xtv4U7hZsBjxSsrVanmUqcSwZpLJhph1N7uvYy6aePa3CG1CIF2MFM46bpxGvUHUhmGN lRN38DQwOw3MB0Aahg1whV902XAPZNvViZCvdDqKDYIdflfTXvlHILv3Lx1UBzA4QDTS RW6axvCy7GUgyta00Y4vSzyO9f8dRt6AjG1SkcvlwspdAwOjswil9bOQxBzfqvgvNMng WeQg== 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=mNr+Pfqwu/0aRFo1Po43D8D7g7/h15rV4ULpD0JgPO4=; b=MKxYMqeJK2dy0CVk9gydEmROKpuo6Q/Ost5swJXC9W3A19zFNam7LEVaJ6KTvqkQum sATiAXMWaSQ3LEwkez6hSl2xpn8ZQku9ZCHH/53F+PXTSzk4pS55k1bkgwuu7ZTuiPW3 ME8xQs3af2dtFjyOJIpQbfwUExQvG4zPk84t6SF4ZeV0QK81x0fMcBTa/cUPEFDW8olp VvXrQXWar37JPy4qWAiOHnrR0ruV8/Yzq7Er5lNcaPIQy6z92TuB/W6ELlTew1naGf32 90+9QoqonyzZC4Q7fgvnkOeRyhj8S3nFMvmiMAFVKbWg3sTal1H9Pq71uPbvUQIBqkAt Jikg== X-Gm-Message-State: AOAM530mIHpGHZorGAqAf6vGcIx+6mszLhnePR+RgekDyo7IWnjUXXc7 3rssvXvyqG9Op+vVvWqtpBva/A== X-Received: by 2002:a1c:cc0c:: with SMTP id h12mr411822wmb.57.1599750384590; Thu, 10 Sep 2020 08:06:24 -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 i11sm8778906wre.32.2020.09.10.08.06.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:06:24 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 4/5] wcn36xx: Encode PHY mode for 80MHz channel in hw_value Date: Thu, 10 Sep 2020 16:07:07 +0100 Message-Id: <20200910150708.2179043-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150708.2179043-1-bryan.odonoghue@linaro.org> References: <20200910150708.2179043-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_110625_466171_48C684C8 X-CRM114-Status: GOOD ( 12.67 ) 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 commit encodes the 802.11ac PHY mode for a given channel in the upper bits of the hw_value field. This allows for a neat read-out and application of the relevant PHY setting. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/main.c | 50 ++++++++++++------------- 1 file changed, 25 insertions(+), 25 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/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index ab6685dc956b..36cfa7043bc3 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -39,10 +39,10 @@ MODULE_PARM_DESC(debug_mask, "Debugging mask"); .max_power = 25, \ } -#define CHAN5G(_freq, _idx) { \ +#define CHAN5G(_freq, _idx, _phy_val) { \ .band = NL80211_BAND_5GHZ, \ .center_freq = (_freq), \ - .hw_value = (_idx), \ + .hw_value = (_phy_val) << HW_VALUE_PHY_SHIFT | HW_VALUE_CHANNEL(_idx), \ .max_power = 25, \ } @@ -67,29 +67,29 @@ static struct ieee80211_channel wcn_2ghz_channels[] = { }; static struct ieee80211_channel wcn_5ghz_channels[] = { - CHAN5G(5180, 36), - CHAN5G(5200, 40), - CHAN5G(5220, 44), - CHAN5G(5240, 48), - CHAN5G(5260, 52), - CHAN5G(5280, 56), - CHAN5G(5300, 60), - CHAN5G(5320, 64), - CHAN5G(5500, 100), - CHAN5G(5520, 104), - CHAN5G(5540, 108), - CHAN5G(5560, 112), - CHAN5G(5580, 116), - CHAN5G(5600, 120), - CHAN5G(5620, 124), - CHAN5G(5640, 128), - CHAN5G(5660, 132), - CHAN5G(5700, 140), - CHAN5G(5745, 149), - CHAN5G(5765, 153), - CHAN5G(5785, 157), - CHAN5G(5805, 161), - CHAN5G(5825, 165) + CHAN5G(5180, 36, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5200, 40, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5220, 44, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5240, 48, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5260, 52, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5280, 56, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5300, 60, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5320, 64, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5500, 100, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5520, 104, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5540, 108, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5560, 112, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5580, 116, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5600, 120, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5620, 124, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5640, 128, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5660, 132, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5700, 140, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5745, 149, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW), + CHAN5G(5765, 153, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW), + CHAN5G(5785, 157, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH), + CHAN5G(5805, 161, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH), + CHAN5G(5825, 165, 0) }; #define RATE(_bitrate, _hw_rate, _flags) { \ From patchwork Thu Sep 10 15:07:08 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: 249650 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp826615ilk; Thu, 10 Sep 2020 08:06:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL5RoYxzLg+q5fsMOmMU4LdCPb99pNyGp1bMhLJcGZ6W+Luv2ik0C1OQXkdoIGaiT+5igf X-Received: by 2002:a5d:914a:: with SMTP id y10mr8049121ioq.108.1599750391963; Thu, 10 Sep 2020 08:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750391; cv=none; d=google.com; s=arc-20160816; b=KTy885s7cjoyPds8qnF3F4lXQ29qG3nQKJFAmAE+hjLudg/MN8m3msqsGTuTqKiRqZ F/ZXzmd/l1pAaxzDJZj3um4lup+hDfCqg+Tlg30r4uko3dJSQHinXIXxaw7vctNIbHuw tEE1R9ngNZ2p1sCeZYwNLDvBZf0FD0YYncIdLD2uDfeaFdAF7qDrpMVRSN9gjx6CmBga qVioIRskStWpWQtiyU8NqmXxJsgIFuF9+y/kABO+Hx/1M72eVH6qLAECmIjaBvE8LhXK mzOTJ4jnsWnNdpISygRnU/L5JM3el+gHE2+afI4/Xc3PRzA+jZCE7e43gzkqdHRyMx0e JpKQ== 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=T1+tElhCmVZ6QO/fGgPQvdf8mWsHXS0X1j5a20OmXfk=; b=c95jexWT3hoeB2Ikz5svaLlSCowOtdjSE3hD82S2mKhJlCO2AN2Hqcsnm3Jsff7hv6 qsPdOBEpUnkzl/hK8cO5R/lyR2oy9cUz8TuI03qJAQo9t0wXQ78yWmmc+Ge2ZuWDYcPW 0uzO3JjSYaW0QbI7Ti1kAUFodWGBBRenVzUauduL69pTKJWH7HrHeu/sdOEmZJukqSjI 6CHAoW0dwthCr4ZpqPkN0AVxVj93D0/G5x49RM/NtvE2vywRJQxeB3bIyIuyh3XjUxSY qrl5loVbw91ChbZMrPLGfTxQFGnpO2+LKdKuAcSsZ7eU2ha3MPEoqC93ZIeqdw864keU 3/xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=3Ai3UnHT; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="U/XYFWpn"; 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 c64si1471384ilg.30.2020.09.10.08.06.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:06:31 -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=3Ai3UnHT; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="U/XYFWpn"; 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=T1+tElhCmVZ6QO/fGgPQvdf8mWsHXS0X1j5a20OmXfk=; b=3Ai3UnHTV6wcNX8kxQgE2hJBj 2Bf279Xf4aGog+YkX4qPEviNo+6/6D5rOQ7Swi213r4fBHMsqVXNFSPcU93OTjaTRBzBbqVhe23Tz k0yM3lndkLfUh9dkvthlJMzSef8T0FcYvA7uegl6Re866b7aUYyay2J2ubeUs1hioDrLn+XyBH0wL mLqtPsAweHjU2vL2aAlNqqUExAzNnyb1LwaTr5happYrYkv3jprSuqemo5XzV1GOaTiN2c1QwS8ce XeNpuw1tbqVOan8PnKghzawu/wJMGCRrEA6Cn1I37AHoi/ayBbg7KmlwAuRAzSg0VaKh/GACq7ATq EcQFzrx4g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO9d-0007rS-2M; Thu, 10 Sep 2020 15:06:29 +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 1kGO9a-0007pn-Fg for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:06:27 +0000 Received: by mail-wr1-x443.google.com with SMTP id j2so7085102wrx.7 for ; Thu, 10 Sep 2020 08:06:26 -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=kbuSpUHUK9Xf5kW5O/ETlw8jaTEXI5Gq5SIeCS+jaOg=; b=U/XYFWpntw9A4GcKyqUzPvxG99HZUxnQeS7+9JsXO8alW/1bYOJ4OnvAEUISI1Zzn/ m8D1VDmaL08oBdQojRiAPCQBb05ZaVsxLV6JajOLFYdb+yQeXnoz3slcz7cexpvjfLJr 6Rd/AJvjGRcbAJMfTQfHrwvyQfXnN4+maGPuEvtuvs+JDQGYYy5JqTRbs8VrKSgUq2bG Ye88eCMy1KntLfI2LblzmDLKWI6hME70yC4BTmkCv7BcW30IbtaRHWenrhi8wJH2ft68 co9/CsjrUCIlQJJ0do+yebvunCaJWInlHp1ParrKO9JdEBxpNmN0/J3ZzD78iyYyzEiN Ao9w== 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=kbuSpUHUK9Xf5kW5O/ETlw8jaTEXI5Gq5SIeCS+jaOg=; b=tDNYupLMOX8KPLLMK7sa6t6I+Sf4AqFnjYx2Y0E3G1Jhx85m61oRlBTnO8O9i2BHGA J9cgzG7FKd1eGxHVsLXgRoz1JFC9SL+CaXfVi7VkVqxD7QHOGyCP0RNGddo1U44RvH/4 eflMIdPkpXmHC9yIkxcpiAtgAGCz1832iMkqNK/Jo0ewU1FoaRoVwmlX04zQs9fl6rvu rsAUym5MQU7tzCVbYKWrJlq4ijMbV03NGoiwW5zL+dw/OA3ODWGECBQGJmrmv/MTaUmg dBCZa8nuTwz53pJjag4zfHfDtW+mq3vwBaAuEBBpcEbk9w7vMj241qcCt8iiAwAzGDea 4/fQ== X-Gm-Message-State: AOAM533zriMxBe5M+rD5ybpH3guMDynI63i8dLNQ7KRhOJVoqzZe7Lmr yzL5BMQAXsuEM+vjgCrryQ7oaw== X-Received: by 2002:adf:ef48:: with SMTP id c8mr9613696wrp.370.1599750385515; Thu, 10 Sep 2020 08:06:25 -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 i11sm8778906wre.32.2020.09.10.08.06.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:06:25 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 5/5] wcn36xx: Set PHY into correct mode for 80MHz channel width Date: Thu, 10 Sep 2020 16:07:08 +0100 Message-Id: <20200910150708.2179043-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150708.2179043-1-bryan.odonoghue@linaro.org> References: <20200910150708.2179043-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_110626_546408_969FAE04 X-CRM114-Status: GOOD ( 14.37 ) 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 For the 80MHz channel we need to set the PHY mode to one of four PHY modes that span the 80MHz range. This patch latches the hw_value PHY field previously defined for 5GHz channels directly to the parameter passed to the firmware. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 9 ++++++++- 1 file changed, 8 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/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index feeb27851f7a..7dada66b9f87 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1508,6 +1508,7 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, struct wcn36xx_hal_config_bss_params_v1 *bss; struct wcn36xx_hal_config_bss_params bss_v0; struct wcn36xx_hal_config_sta_params_v1 *sta; + struct cfg80211_chan_def *chandef; int ret; msg_body = kzalloc(sizeof(*msg_body), GFP_KERNEL); @@ -1547,7 +1548,13 @@ static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, bss->dtim_period = bss_v0.dtim_period; bss->tx_channel_width_set = bss_v0.tx_channel_width_set; bss->oper_channel = bss_v0.oper_channel; - bss->ext_channel = bss_v0.ext_channel; + + if (wcn->hw->conf.chandef.width == NL80211_CHAN_WIDTH_80) { + chandef = &wcn->hw->conf.chandef; + bss->ext_channel = HW_VALUE_PHY(chandef->chan->hw_value); + } else { + bss->ext_channel = bss_v0.ext_channel; + } bss->reserved = bss_v0.reserved;