From patchwork Thu Jun 20 19:15:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muna Sinada X-Patchwork-Id: 11007807 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8561E13AF for ; Thu, 20 Jun 2019 19:15:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76EDA2881A for ; Thu, 20 Jun 2019 19:15:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69A8328856; Thu, 20 Jun 2019 19:15:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 11F352881A for ; Thu, 20 Jun 2019 19:15:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=edCHplcXCuhc10Ajn+nwEUqru3AIh91nnWUkmzeXrqA=; b=ZHcSg7js2Nlt7t36L18uff7nRz 1sEiXb9Q0XM1893pRsBETh237j6osOPI44ptCdeMmAxYgyugwANC6guZJunmNe+CGR8o201PINMqZ GmlCkbVwsmG7H5iJdXoQ52Q3b0WCpuur2T1VzaGqwm/Ns//gKK58wAEx8D36nSN2Wdi8TGec6PNrm zMLid5o6YULgX9Xz9pMu9moJ0Nt6ZncWLDCl9XEYoRoKFaC6ykoj8PTuYpfGBgT+2WmVzDLDKvhwg t+9y4pL8S8pbzqQZ+AByVoBbbSkzVJIMoFvoNK7AISsX6CKLsfVAqoGPPQM2KiOg0/dpXxuywZBEi lFT8dJig==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1he2XM-0001tM-5k; Thu, 20 Jun 2019 19:15:56 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1he2XJ-0001so-PA for ath11k@lists.infradead.org; Thu, 20 Jun 2019 19:15:55 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 838FF60A00; Thu, 20 Jun 2019 19:15:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1561058153; bh=f2Fky27Q84XkzmosyGjw+bINUfmfOfO4mZTHMvcbA5Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kAojPYdnJ/5o27/sZwiRQfRCE4MflKi3d4IQaCHJ93Zt+PTx5FGRSBJ3gCFb4kYWj qICVsgaEux5GTYAKyrn43Qv1kpfJNji4IuDJiLpUtUABr3WnWs07+9S4Ir3CahoE2i +RCrUh6JLLd3W0ITQEt835zQ+OR4NolkfxeMaKTk= Received: from msinada-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: msinada@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 01570604BE; Thu, 20 Jun 2019 19:15:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1561058153; bh=f2Fky27Q84XkzmosyGjw+bINUfmfOfO4mZTHMvcbA5Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kAojPYdnJ/5o27/sZwiRQfRCE4MflKi3d4IQaCHJ93Zt+PTx5FGRSBJ3gCFb4kYWj qICVsgaEux5GTYAKyrn43Qv1kpfJNji4IuDJiLpUtUABr3WnWs07+9S4Ir3CahoE2i +RCrUh6JLLd3W0ITQEt835zQ+OR4NolkfxeMaKTk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 01570604BE Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=msinada@codeaurora.org From: Muna Sinada To: ath11k@lists.infradead.org Subject: [PATCH 2/4] ath11k: Use macros for magic arguments Date: Thu, 20 Jun 2019 12:15:27 -0700 Message-Id: <1561058129-25625-2-git-send-email-msinada@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561058129-25625-1-git-send-email-msinada@codeaurora.org> References: <1561058129-25625-1-git-send-email-msinada@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190620_121553_850619_BF571E06 X-CRM114-Status: UNSURE ( 8.28 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Muna Sinada MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Created macros to provide clarity in the use of the magic parameter Signed-off-by: Muna Sinada --- drivers/net/wireless/ath/ath11k/hal_rx.c | 12 ++++++++---- drivers/net/wireless/ath/ath11k/hal_rx.h | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.c b/drivers/net/wireless/ath/ath11k/hal_rx.c index 329ecc6566f8..622f4dfa5535 100644 --- a/drivers/net/wireless/ath/ath11k/hal_rx.c +++ b/drivers/net/wireless/ath/ath11k/hal_rx.c @@ -753,7 +753,8 @@ void ath11k_hal_reo_qdesc_setup(void *vaddr, int tid, u32 ba_window_size, memset(qdesc, 0, sizeof(*qdesc)); ath11k_hal_reo_set_desc_hdr(&qdesc->desc_hdr, HAL_DESC_REO_OWNED, - HAL_DESC_REO_QUEUE_DESC, 0xDDBEEF); + HAL_DESC_REO_QUEUE_DESC, + REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_0); qdesc->rx_queue_num = FIELD_PREP(HAL_RX_REO_QUEUE_RX_QUEUE_NUMBER, tid); @@ -800,13 +801,16 @@ void ath11k_hal_reo_qdesc_setup(void *vaddr, int tid, u32 ba_window_size, */ memset(ext_desc, 0, 3 * sizeof(*ext_desc)); ath11k_hal_reo_set_desc_hdr(&ext_desc->desc_hdr, HAL_DESC_REO_OWNED, - HAL_DESC_REO_QUEUE_EXT_DESC, 0xADBEEF); + HAL_DESC_REO_QUEUE_EXT_DESC, + REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_1); ext_desc++; ath11k_hal_reo_set_desc_hdr(&ext_desc->desc_hdr, HAL_DESC_REO_OWNED, - HAL_DESC_REO_QUEUE_EXT_DESC, 0xBDBEEF); + HAL_DESC_REO_QUEUE_EXT_DESC, + REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_2); ext_desc++; ath11k_hal_reo_set_desc_hdr(&ext_desc->desc_hdr, HAL_DESC_REO_OWNED, - HAL_DESC_REO_QUEUE_EXT_DESC, 0xCDBEEF); + HAL_DESC_REO_QUEUE_EXT_DESC, + REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_3); } void ath11k_hal_reo_init_cmd_ring(struct ath11k_base *ab, diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.h b/drivers/net/wireless/ath/ath11k/hal_rx.h index 650ebe5d952c..bd6b8d2e9d5e 100644 --- a/drivers/net/wireless/ath/ath11k/hal_rx.h +++ b/drivers/net/wireless/ath/ath11k/hal_rx.h @@ -337,4 +337,8 @@ enum hal_rx_mon_status ath11k_hal_rx_parse_mon_status(struct ath11k_base *ab, struct hal_rx_mon_ppdu_info *ppdu_info, u8 *data); +#define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_0 0xDDBEEF +#define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_1 0xADBEEF +#define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_2 0xBDBEEF +#define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_3 0xCDBEEF #endif