From patchwork Fri Mar 20 13:54:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 6056851 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C97689F318 for ; Fri, 20 Mar 2015 13:57:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 11D0320529 for ; Fri, 20 Mar 2015 13:57:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 354E320523 for ; Fri, 20 Mar 2015 13:57:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752404AbbCTN5D (ORCPT ); Fri, 20 Mar 2015 09:57:03 -0400 Received: from mail-la0-f53.google.com ([209.85.215.53]:35280 "EHLO mail-la0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752347AbbCTN4z (ORCPT ); Fri, 20 Mar 2015 09:56:55 -0400 Received: by labjg1 with SMTP id jg1so87651202lab.2 for ; Fri, 20 Mar 2015 06:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K+U1N4ho7efOOPWZYodRbOXuVDmGQmEgMZBvEdzI5TA=; b=3LFYwfl9aWuZKkeHN4Z1t6escfBd/2AGQxhLKsa6w9hYVC7uYB2zety6DNMW56P1KR lwx5445JsgubgUD8xwwzsgelJDOBAnRiwNda6/SVaD5Wd7jhPvhw6Ymst5zuBPUCa9fj kqIjV1LzuEKbtydAWog62WBaCgZyw22Z9nJJQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K+U1N4ho7efOOPWZYodRbOXuVDmGQmEgMZBvEdzI5TA=; b=YPvNL+Drx6JnoGF9+aVVTC3CJvMIuW1fvf0X5gdpF9149HhKsKiPD9DSKGCzqP9Gb7 WKoGuneXPUN3wbLfYNA32Nm73qCYenUT/3pJZdGxCM2cqoTyQFA0V5c+aej3gaGnmwOO wnCrIpQtis7afkDqLfSe/EWl0UMXQxndj6c2liyX/qnpqlmHgX9q0+MqLf2w9K2DEzbg XLJcaBJDvJw09hIbWBigX0VM6cxtwVL5cVxlf5M4pz1+l4XWPVCHXmYVjY+tAtxQ/cCN VSRSP8Xeoc20ShvGUG4S04+OqzznArFmgFAdIGbssJ4qNb7NDSQtZfvQgk6RvTg0AcAH rq4A== X-Gm-Message-State: ALoCoQkWKr3Y0Oicmsyrk08vlppeumrcYhB/2oYtoKML+pymNcIpxLTi3ysicl3NlEWNU5w8J6Y2KfiLZa64whaWz0S7Etv8GfjI/j61JND0fDSnKBElZbfEaTpKjmo8+zJXoPLWuotd X-Received: by 10.152.7.212 with SMTP id l20mr61764409laa.68.1426859813680; Fri, 20 Mar 2015 06:56:53 -0700 (PDT) Received: from bob.homerouter.cpe (apn-77-113-71-242.dynamic.gprs.plus.pl. [77.113.71.242]) by mx.google.com with ESMTPSA id us1sm955771lbc.1.2015.03.20.06.56.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2015 06:56:53 -0700 (PDT) From: Michal Kazior To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Michal Kazior Subject: [PATCH 5/9] ath10k: use hw rate definitions for fixed rate Date: Fri, 20 Mar 2015 13:54:11 +0000 Message-Id: <1426859655-11797-6-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1426859655-11797-1-git-send-email-michal.kazior@tieto.com> References: <1426859655-11797-1-git-send-email-michal.kazior@tieto.com> X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Using raw values is discouraged. Having defines/enums is preferred. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/mac.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index f4e76e7..72fbdc2 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4972,20 +4972,18 @@ exit: /* Helper table for legacy fixed_rate/bitrate_mask */ static const u8 cck_ofdm_rate[] = { - /* CCK */ - 3, /* 1Mbps */ - 2, /* 2Mbps */ - 1, /* 5.5Mbps */ - 0, /* 11Mbps */ - /* OFDM */ - 3, /* 6Mbps */ - 7, /* 9Mbps */ - 2, /* 12Mbps */ - 6, /* 18Mbps */ - 1, /* 24Mbps */ - 5, /* 36Mbps */ - 0, /* 48Mbps */ - 4, /* 54Mbps */ + ATH10K_HW_RATE_CCK_LP_1M, + ATH10K_HW_RATE_CCK_LP_2M, + ATH10K_HW_RATE_CCK_LP_5_5M, + ATH10K_HW_RATE_CCK_LP_11M, + ATH10K_HW_RATE_OFDM_6M, + ATH10K_HW_RATE_OFDM_9M, + ATH10K_HW_RATE_OFDM_12M, + ATH10K_HW_RATE_OFDM_18M, + ATH10K_HW_RATE_OFDM_24M, + ATH10K_HW_RATE_OFDM_36M, + ATH10K_HW_RATE_OFDM_48M, + ATH10K_HW_RATE_OFDM_54M, }; /* Check if only one bit set */