From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: Luca Coelho <luca@coelho.fi>
Cc: Kalle Valo <kvalo@codeaurora.org>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2 05/12] iwlwifi: mvm: store PPAG enabled/disabled flag properly
Date: Tue, 7 Sep 2021 19:30:21 +0800 [thread overview]
Message-ID: <CAAd53p5udakjRZeFLyrzwtfoq5Vr937CNRghS6_YnCet9yhB1Q@mail.gmail.com> (raw)
In-Reply-To: <iwlwifi.20210210135352.889862e6d393.I8b894c1b2b3fe0ad2fb39bf438273ea47eb5afa4@changeid>
Hi Luca,
On Wed, Feb 10, 2021 at 8:00 PM Luca Coelho <luca@coelho.fi> wrote:
>
> From: Luca Coelho <luciano.coelho@intel.com>
>
> When reading the PPAG table from ACPI, we should store everything in
> our fwrt structure, so it can be accessed later. But we had a local
> ppag_table variable in the function and were erroneously storing the
> enabled/disabled flag in it instead of storing it in the fwrt. Fix
> this by removing the local variable and storing everything directly in
> fwrt.
This patch enables PPAG, but it breaks one of HP laptop with Intel 9560.
dmesg with iwlwifi.debug=0x80 attached in the bug report:
https://bugzilla.kernel.org/show_bug.cgi?id=214343
>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> Fixes: f2134f66f40e ("iwlwifi: acpi: support ppag table command v2")
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---
> drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> index 3bfb80dd17cf..57471ab2f5ef 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> @@ -895,7 +895,6 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
> static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm)
> {
> union acpi_object *wifi_pkg, *data, *enabled;
> - union iwl_ppag_table_cmd ppag_table;
> int i, j, ret, tbl_rev, num_sub_bands;
> int idx = 2;
> s8 *gain;
> @@ -949,8 +948,8 @@ static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm)
> goto out_free;
> }
>
> - ppag_table.v1.enabled = cpu_to_le32(enabled->integer.value);
> - if (!ppag_table.v1.enabled) {
> + mvm->fwrt.ppag_table.v1.enabled = cpu_to_le32(enabled->integer.value);
> + if (!mvm->fwrt.ppag_table.v1.enabled) {
> ret = 0;
> goto out_free;
> }
> @@ -978,7 +977,7 @@ static int iwl_mvm_get_ppag_table(struct iwl_mvm *mvm)
> (j != 0 &&
> (gain[i * num_sub_bands + j] > ACPI_PPAG_MAX_HB ||
> gain[i * num_sub_bands + j] < ACPI_PPAG_MIN_HB))) {
> - ppag_table.v1.enabled = cpu_to_le32(0);
> + mvm->fwrt.ppag_table.v1.enabled = cpu_to_le32(0);
> ret = -EINVAL;
> goto out_free;
> }
> --
> 2.30.0
>
next prev parent reply other threads:[~2021-09-07 11:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 11:56 [PATCH v2 00/12] iwlwifi: updates intended for v5.12 2021-02-07 Luca Coelho
2021-02-10 11:56 ` [PATCH v2 01/12] iwlwifi: pcie: add a few missing entries for So with Hr Luca Coelho
2021-02-10 12:38 ` Luca Coelho
2021-02-10 11:56 ` [PATCH v2 02/12] iwlwifi: pcie: don't disable interrupts for reg_lock Luca Coelho
2021-02-10 11:56 ` [PATCH v2 03/12] iwlwifi: acpi: fix PPAG table sizes Luca Coelho
2021-02-10 11:56 ` [PATCH v2 04/12] iwlwifi: mvm: fix the type we use in the PPAG table validity checks Luca Coelho
2021-02-10 11:56 ` [PATCH v2 05/12] iwlwifi: mvm: store PPAG enabled/disabled flag properly Luca Coelho
2021-09-07 11:30 ` Kai-Heng Feng [this message]
2021-09-07 12:07 ` Luca Coelho
2021-02-10 11:56 ` [PATCH v2 06/12] iwlwifi: mvm: send stored PPAG command instead of local Luca Coelho
2021-02-10 11:56 ` [PATCH v2 07/12] iwlwifi: mvm: enhance a print in CSA flows Luca Coelho
2021-02-10 11:56 ` [PATCH v2 08/12] iwlwifi: mvm: remove useless iwl_mvm_resume_d3() function Luca Coelho
2021-02-10 11:56 ` [PATCH v2 09/12] iwlwifi: mvm: assign SAR table revision to the command later Luca Coelho
2021-02-10 11:56 ` [PATCH v2 10/12] iwlwifi: pcie: NULLify pointers after free Luca Coelho
2021-02-10 11:56 ` [PATCH v2 11/12] iwlwifi: when HW has rate offload don't look at control field Luca Coelho
2021-02-10 11:56 ` [PATCH v2 12/12] iwlwifi: pcie: Change Ma device ID Luca Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAd53p5udakjRZeFLyrzwtfoq5Vr937CNRghS6_YnCet9yhB1Q@mail.gmail.com \
--to=kai.heng.feng@canonical.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luca@coelho.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).