From patchwork Tue Sep 3 01:18:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 11127097 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 921BD1813 for ; Tue, 3 Sep 2019 01:18:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 70A8B21881 for ; Tue, 3 Sep 2019 01:18:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qdGRaApG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726074AbfICBSh (ORCPT ); Mon, 2 Sep 2019 21:18:37 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:41547 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbfICBSh (ORCPT ); Mon, 2 Sep 2019 21:18:37 -0400 Received: by mail-ot1-f67.google.com with SMTP id o101so15068930ota.8 for ; Mon, 02 Sep 2019 18:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=17EKxzbZ4mVYEmjN9suxyqpGaIxSPUwazBx/Ht6eI+M=; b=qdGRaApGMoTLMvAOrdAPxZbZEsTsD/WZAmRyotIhF4npI1i9D707gSwGSI6fvqBk66 Zo56NzZHQBF7B3O5GgSlL/ckrzQ6XB59eM8qAK8P4hVbqOloyFPcLflikhsYH4/IRPg9 CBrapjZxZS0q3kxHrZZ5Uly8UhYZMNTgAmBSWcq/X0J/Mp09B/ETNw0ogttxsx7ZrHZ2 a5JiNzAaGGJSIQ9leXU6ojQBMmcSo+em7HWrvBBySQNYciU6DPlsQZp110ysBBJ9up8j PnaJhSsd66xYtIqDCE8fePaAuM8W5WZsw5JG9h4uy6x65V6zLG95qRpQQbmnl9xfAkZ0 AOMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=17EKxzbZ4mVYEmjN9suxyqpGaIxSPUwazBx/Ht6eI+M=; b=EJ5YwyiOBGfnmH+F1w/Q7EkTGAkFwgw1kOjScrfpRFG3VcnsaNRLPWQC7tQ3GGl37W WGnqljTk0yTaBre89IzQQnCyIRp89mC6+nQODriwiQ4CAMkqrwmq5gbUQ2Gqign7b9Kx gDSHycEuVjX4FVpCBcnfsJquSwMwhfxtCXvKWG08tvFmPipG7fd89OXWelyvEQY+irMM AzejUKDCxxDny3r18aV0KI9NRoaz3lL23pByRSk17vZzsYSwgryN8ZuqrYvKRnuq9IcQ I1secdpb+P0cO2GjA9fe0K+lunE1kpSycoicUX/4uI7p3jidxswhRrORhJRGAYM76MkO yq6w== X-Gm-Message-State: APjAAAU5uYjrZRWmuTSQ1jP+8XYCQeDABg4rrEeArQIpEomB/UZyZNgw jmS5k9d8M6qtzikzdMCX2ac= X-Google-Smtp-Source: APXvYqx6anVXbh23JXu5xdm8nmUhh7EOk7jwP1jaXcSjsUDottpz+WT82rzK2u6AmgjXWafcFQRx4A== X-Received: by 2002:a05:6830:1bd4:: with SMTP id v20mr17170998ota.159.1567473516414; Mon, 02 Sep 2019 18:18:36 -0700 (PDT) Received: from localhost.localdomain (cpe-24-31-245-230.kc.res.rr.com. [24.31.245.230]) by smtp.gmail.com with ESMTPSA id d13sm230244oth.11.2019.09.02.18.18.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Sep 2019 18:18:36 -0700 (PDT) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, pkshih@realtek.com, Larry Finger Subject: [PATCH 1/3] rtlwifi: rtl8821ae: Fix incorrect returned values Date: Mon, 2 Sep 2019 20:18:11 -0500 Message-Id: <20190903011813.13946-2-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190903011813.13946-1-Larry.Finger@lwfinger.net> References: <20190903011813.13946-1-Larry.Finger@lwfinger.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In commit bd421dab7515 ("rtlwifi: rtl8821ae: Convert macros that set descriptor"), all the routines that get fields from a descriptor were changed to return signed integer values. This is incorrect for the routines that get the entire 32-bit word. In this case, an unsigned quantity is required. Fixes: bd421dab7515 ("rtlwifi: rtl8821ae: Convert macros that set descriptor") Signed-off-by: Larry Finger --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h index 81951f0c80b6..a9ed6fd41089 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h @@ -214,7 +214,7 @@ static inline void set_tx_desc_tx_buffer_address(__le32 *__pdesc, u32 __val) *(__pdesc + 10) = cpu_to_le32(__val); } -static inline int get_tx_desc_tx_buffer_address(__le32 *__pdesc) +static inline u32 get_tx_desc_tx_buffer_address(__le32 *__pdesc) { return le32_to_cpu(*(__pdesc + 10)); } @@ -324,12 +324,12 @@ static inline int get_rx_desc_bw(__le32 *__pdesc) return le32_get_bits(*(__pdesc + 4), GENMASK(5, 4)); } -static inline int get_rx_desc_tsfl(__le32 *__pdesc) +static inline u32 get_rx_desc_tsfl(__le32 *__pdesc) { return le32_to_cpu(*(__pdesc + 5)); } -static inline int get_rx_desc_buff_addr(__le32 *__pdesc) +static inline u32 get_rx_desc_buff_addr(__le32 *__pdesc) { return le32_to_cpu(*(__pdesc + 6)); } @@ -341,12 +341,12 @@ static inline void set_rx_desc_buff_addr(__le32 *__pdesc, u32 __val) /* TX report 2 format in Rx desc*/ -static inline int get_rx_rpt2_desc_macid_valid_1(__le32 *__status) +static inline u32 get_rx_rpt2_desc_macid_valid_1(__le32 *__status) { return le32_to_cpu(*(__status + 4)); } -static inline int get_rx_rpt2_desc_macid_valid_2(__le32 *__status) +static inline u32 get_rx_rpt2_desc_macid_valid_2(__le32 *__status) { return le32_to_cpu(*(__status + 5)); } From patchwork Tue Sep 3 01:18:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 11127099 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C039014E5 for ; Tue, 3 Sep 2019 01:18:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 97CA8217F4 for ; Tue, 3 Sep 2019 01:18:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EtEq4Ekq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726177AbfICBSi (ORCPT ); Mon, 2 Sep 2019 21:18:38 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:37857 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbfICBSi (ORCPT ); Mon, 2 Sep 2019 21:18:38 -0400 Received: by mail-ot1-f68.google.com with SMTP id 97so12248233otr.4 for ; Mon, 02 Sep 2019 18:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=sLR478LLqGoNj13u0bbs34zaHf9Vy4KuN85agfzuqXc=; b=EtEq4EkqBV8ffECzv1gl2aSz0tfEIRsFS8nNuJfIX2CJ5iv0V/gP+HjqMvKDmsH0VU iqLG4DRVrJuVGg2tmpb7zjlcoSyRdrFLG2MWe+AInMy8d3Zvq/KNgAdHTh9E8y9CZdI0 Ym2p9F8NpyWdjEzRAafRDWR48DrKuiIWaHzfWyNQs6ZLDUw9KYpMw0XlgdksW+x/eDfj eCLZNPWYimF4AS3T65xPjwkmjTH7xi+nYRk0L/OuZ88VfWE0lipWtFsjssBVBDkUsyax lkj4PA4oBU0znCigorrh6PJq7RMNjLZ08fPfFwDS15rXgjZ5+JO8b0lUf3YRfKMOIE04 LWcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=sLR478LLqGoNj13u0bbs34zaHf9Vy4KuN85agfzuqXc=; b=r03AiEkZ/+uXJk2oHgNBOzHTXZwtO6toVI7x+wSX6+0+am58hrCamoSm4xm1MV3rmw pojR0vIczEs9/+t6VRjUOAx9171YHpzV/Kshft+hFbVWf6pB6fOsvpg7zPnfgtOchUzS Im2DxaS0qNxCWL1yhs0uoehYpUBcDKZIcyYjEuYsn2E71QKbHiBYEyxhlKuxbz/z5vzH ZxW9RjwElremJ4tIqtVMtNqGTO3LCn4r4UDRDIdm1hl3b8qnulAhc64c98nnt5PIEaXV fBb0bzfOJuOrB/U9wZrP1ABVF8rvLYJbSAnqKUqliAxdtLUflfjs3y77hp8tWRw2Og+O dvSw== X-Gm-Message-State: APjAAAUExiaRZiQqgL8MC5zKDebuxoHZykm3oyaFEaA5PZxdCB0KZj0Q eeTFDDAvJ3AeLnaEaNFddpM= X-Google-Smtp-Source: APXvYqyiTTYE6wlAFyeCWqfKP0dT6+9enpGvU9R8w0AhpPDtpHNywb40Baa4SSF+zEwKdW2trLCVGg== X-Received: by 2002:a9d:6856:: with SMTP id c22mr25939883oto.307.1567473517127; Mon, 02 Sep 2019 18:18:37 -0700 (PDT) Received: from localhost.localdomain (cpe-24-31-245-230.kc.res.rr.com. [24.31.245.230]) by smtp.gmail.com with ESMTPSA id d13sm230244oth.11.2019.09.02.18.18.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Sep 2019 18:18:36 -0700 (PDT) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, pkshih@realtek.com, Larry Finger Subject: [PATCH 2/3] rtlwifi: rtl8188ee: Fix incorrect returned values Date: Mon, 2 Sep 2019 20:18:12 -0500 Message-Id: <20190903011813.13946-3-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190903011813.13946-1-Larry.Finger@lwfinger.net> References: <20190903011813.13946-1-Larry.Finger@lwfinger.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In commit 36eda7568f2e ("rtlwifi: rtl8188ee: Convert macros that set descriptor"), all the routines that get fields from a descriptor were changed to return signed integer values. This is incorrect for the routines that get the entire 32-bit word. In this case, an unsigned quantity is required. Fixes: 36eda7568f2e ("rtlwifi: rtl8188ee: Convert macros that set descriptor") Signed-off-by: Larry Finger --- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h index bd862732d6ae..917729807514 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h @@ -244,7 +244,7 @@ static inline void set_tx_desc_tx_buffer_address(__le32 *__pdesc, u32 __val) *(__pdesc + 8) = cpu_to_le32(__val); } -static inline int get_tx_desc_tx_buffer_address(__le32 *__pdesc) +static inline u32 get_tx_desc_tx_buffer_address(__le32 *__pdesc) { return le32_to_cpu(*(__pdesc + 8)); } @@ -464,22 +464,22 @@ static inline int get_rx_status_desc_magic_match(__le32 *__pdesc) return le32_get_bits(*(__pdesc + 3), BIT(31)); } -static inline int get_rx_desc_iv1(__le32 *__pdesc) +static inline u32 get_rx_desc_iv1(__le32 *__pdesc) { return le32_to_cpu(*(__pdesc + 4)); } -static inline int get_rx_desc_tsfl(__le32 *__pdesc) +static inline u32 get_rx_desc_tsfl(__le32 *__pdesc) { return le32_to_cpu(*(__pdesc + 5)); } -static inline int get_rx_desc_buff_addr(__le32 *__pdesc) +static inline u32 get_rx_desc_buff_addr(__le32 *__pdesc) { return le32_to_cpu(*(__pdesc + 6)); } -static inline int get_rx_desc_buff_addr64(__le32 *__pdesc) +static inline u32 get_rx_desc_buff_addr64(__le32 *__pdesc) { return le32_to_cpu(*(__pdesc + 7)); } @@ -501,12 +501,12 @@ static inline int get_rx_rpt2_desc_pkt_len(__le32 *__status) return le32_get_bits(*(__status), GENMASK(8, 0)); } -static inline int get_rx_rpt2_desc_macid_valid_1(__le32 *__status) +static inline u32 get_rx_rpt2_desc_macid_valid_1(__le32 *__status) { return le32_to_cpu(*(__status + 4)); } -static inline int get_rx_rpt2_desc_macid_valid_2(__le32 *__status) +static inline u32 get_rx_rpt2_desc_macid_valid_2(__le32 *__status) { return le32_to_cpu(*(__status + 5)); } From patchwork Tue Sep 3 01:18:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 11127101 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E94791920 for ; Tue, 3 Sep 2019 01:18:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C81D5217F4 for ; Tue, 3 Sep 2019 01:18:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fh7MKIWp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726220AbfICBSi (ORCPT ); Mon, 2 Sep 2019 21:18:38 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:35319 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbfICBSi (ORCPT ); Mon, 2 Sep 2019 21:18:38 -0400 Received: by mail-ot1-f67.google.com with SMTP id 100so15134220otn.2 for ; Mon, 02 Sep 2019 18:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=iKRw3YAmqmgHvf0RsxYwv0O/aEY2i3zqXVRRQVICAnA=; b=fh7MKIWpVMn+vBpBL+m8DP7sPbJQqC/WCYwJH9+Y73947T4YPIGKZrCEpQeSzZx5SC FYEsAr7iCvA2IMTUbPuK37Z6FikaCjxEJXU5nds/Df3huEBKk19pXx5UhEmY3WZmT4gt /gLbIbL9iv1Ufwy0UQO+Rv3t28aQXr+Az+tvrrC2kMwIInRi7Z8qgIp8EluFrDEOqncg X2Do7PD85VKFpWl340buuG3Lkt9g7R4MHprKNbuOnCdKTNtwQqA5i34gjPBZpPlx5NXR dHATFfkBAes+Nt8dgqWI1dRyK0NnMUkJ3FGjQamo93h4EYdEUyuE6sQ38rrg+TeYBIlD TCQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=iKRw3YAmqmgHvf0RsxYwv0O/aEY2i3zqXVRRQVICAnA=; b=c7/r7qcIrYoRYuSSW5PWTDa9IbLfhTaNOfEg2xPU72NwsPX6wtdxMKipYTuw+RGvNC qBtM1L5DLCGUECmgSIXEQ4evgAWcXZi5FSaq8KEpDZ6It6uazC5mDRy3gIgxIK/ltu9h 1cLJwp8coPizeV4Sl6E7IBCnlwfHSuh/mPzSxkCeG5xfWfBLKhwTky8pqTk8Gj0Ic/kc Z69FPNmh8lH7/thDaaX+epzEm+QrWJxxgh1Un+u6J3mFYhvbSM1QB/Ow/8NnPix1bVlR vaNq8sWlp6wJHh2kQ6SnwJXyFUvhKg+lKxQD0wZdLidaXtPPxNzOsclrilfoJ2jel8E1 KHGg== X-Gm-Message-State: APjAAAWNoAQpbWV+ka75GJmzUAA8c5UoLE+iRtvzE66AJyBAcaweBygj Ik63bShrr7ZxHyBtPTOdUQk= X-Google-Smtp-Source: APXvYqxHIgEL05Ycemi7/iJWxvOnAVE8IkHOECBc50/bu/zQO2yh/JGXct17ghTA4/snCCncNhKvvw== X-Received: by 2002:a9d:6218:: with SMTP id g24mr845309otj.326.1567473517833; Mon, 02 Sep 2019 18:18:37 -0700 (PDT) Received: from localhost.localdomain (cpe-24-31-245-230.kc.res.rr.com. [24.31.245.230]) by smtp.gmail.com with ESMTPSA id d13sm230244oth.11.2019.09.02.18.18.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Sep 2019 18:18:37 -0700 (PDT) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, pkshih@realtek.com, Larry Finger Subject: [PATCH 3/3] rtlwifi: rtl8192ce: Fix incorrect returned values Date: Mon, 2 Sep 2019 20:18:13 -0500 Message-Id: <20190903011813.13946-4-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190903011813.13946-1-Larry.Finger@lwfinger.net> References: <20190903011813.13946-1-Larry.Finger@lwfinger.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In commit 98fd8db59a00 ("rtlwifi: rtl8192ce: Convert macros that set descriptor"), all the routines that get fields from a descriptor were changed to return signed integer values. This is incorrect for the routines that get the entire 32-bit word. In this case, an unsigned quantity is required. Fixes: 98fd8db59a00 ("rtlwifi: rtl8192ce: Convert macros that set descriptor") Signed-off-by: Larry Finger --- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h index 709dcac9d84b..b45b05a6a523 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h @@ -216,7 +216,7 @@ static inline void set_tx_desc_tx_buffer_address(__le32 *__pdesc, u32 __val) *(__pdesc + 8) = cpu_to_le32(__val); } -static inline int get_tx_desc_tx_buffer_address(__le32 *__pdesc) +static inline u32 get_tx_desc_tx_buffer_address(__le32 *__pdesc) { return le32_to_cpu(*((__pdesc + 8))); } @@ -311,12 +311,12 @@ static inline int get_rx_desc_bw(__le32 *__pdesc) return le32_get_bits(*((__pdesc + 3)), BIT(9)); } -static inline int get_rx_desc_tsfl(__le32 *__pdesc) +static inline u32 get_rx_desc_tsfl(__le32 *__pdesc) { return le32_to_cpu(*((__pdesc + 5))); } -static inline int get_rx_desc_buff_addr(__le32 *__pdesc) +static inline u32 get_rx_desc_buff_addr(__le32 *__pdesc) { return le32_to_cpu(*((__pdesc + 6))); }