All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Stefan Lippers-Hollmann <s.l-h@gmx.de>,
	Christian Hewitt <chewitt@libreelec.tv>
Subject: Re: [PATCH v5 5/6] wifi: rtlwifi: Clean up rtl8192d-common a bit
Date: Thu, 18 Apr 2024 15:22:10 +0300	[thread overview]
Message-ID: <cc3c4c40-e07b-42c4-8d24-80d67fa1f46f@gmail.com> (raw)
In-Reply-To: <42113d0a089d4096aa1b5cc3861ac297@realtek.com>

On 18/04/2024 03:49, Ping-Ke Shih wrote:
> Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
>>
>> On 17/04/2024 09:48, Ping-Ke Shih wrote:
>>> Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
>>>
>>>> @@ -228,35 +238,25 @@ static void _rtl92d_fill_h2c_command(struct ieee80211_hw *hw,
>>>>                         break;
>>>>                 }
>>>>         }
>>>> +
>>>>         while (!bwrite_success) {
>>>>                 wait_writeh2c_limmit--;
>>>>                 if (wait_writeh2c_limmit == 0) {
>>>>                         pr_err("Write H2C fail because no trigger for FW INT!\n");
>>>>                         break;
>>>>                 }
>>>> +
>>>>                 boxnum = rtlhal->last_hmeboxnum;
>>>>                 switch (boxnum) {
>>>> -               case 0:
>>>> -                       box_reg = REG_HMEBOX_0;
>>>> -                       box_extreg = REG_HMEBOX_EXT_0;
>>>> -                       break;
>>>> -               case 1:
>>>> -                       box_reg = REG_HMEBOX_1;
>>>> -                       box_extreg = REG_HMEBOX_EXT_1;
>>>> -                       break;
>>>> -               case 2:
>>>> -                       box_reg = REG_HMEBOX_2;
>>>> -                       box_extreg = REG_HMEBOX_EXT_2;
>>>> -                       break;
>>>> -               case 3:
>>>> -                       box_reg = REG_HMEBOX_3;
>>>> -                       box_extreg = REG_HMEBOX_EXT_3;
>>>> +               case 0 ... 3:
>>>> +                       box_reg = REG_HMEBOX_0 + boxnum * 4;
>>>> +                       box_extreg = REG_HMEBOX_EXT_0 + boxnum * 2;
>>>
>>> Should be "* 4" as well?
>>>
>>> box_extreg = REG_HMEBOX_EXT_0 + boxnum * 4;
>>>
>>
>> No, because they are only two bytes apart in this old chip:
>>
>> #define REG_HMEBOX_EXT_0                0x0088
>> #define REG_HMEBOX_EXT_1                0x008A
>> #define REG_HMEBOX_EXT_2                0x008C
>> #define REG_HMEBOX_EXT_3                0x008E
>>
> 
> Sorry, I misread them in rtl8188ee/reg.h. 
> 
> To clearly know what 4 and 2 are, how about to define:
> 
> #define SIZE_OF_REG_HMEBOX 4
> #define SIZE_OF_REG_HMEBOX_EXT 2
> 

Sounds good.

  reply	other threads:[~2024-04-18 12:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 20:23 [PATCH v5 0/6] wifi: rtlwifi: Move common code from rtl8192de to rtl8192d-common Bitterblue Smith
2024-04-15 20:24 ` [PATCH v5 1/6] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power Bitterblue Smith
2024-04-15 20:24 ` [PATCH v5 2/6] wifi: rtlwifi: rtl8192de: Fix low speed with WPA3-SAE Bitterblue Smith
2024-04-15 20:26 ` [PATCH v5 3/6] wifi: rtlwifi: rtl8192de: Fix endianness issue in RX path Bitterblue Smith
2024-04-17  2:30   ` Ping-Ke Shih
2024-04-15 20:27 ` [PATCH v5 4/6] wifi: rtlwifi: Move code from rtl8192de to rtl8192d-common Bitterblue Smith
2024-04-17  4:04   ` Ping-Ke Shih
2024-04-17 16:43     ` Bitterblue Smith
2024-04-18  0:42       ` Ping-Ke Shih
2024-04-18 11:40         ` Bitterblue Smith
2024-04-15 20:29 ` [PATCH v5 5/6] wifi: rtlwifi: Clean up rtl8192d-common a bit Bitterblue Smith
2024-04-17  6:48   ` Ping-Ke Shih
2024-04-17 17:13     ` Bitterblue Smith
2024-04-18  0:49       ` Ping-Ke Shih
2024-04-18 12:22         ` Bitterblue Smith [this message]
2024-04-15 20:29 ` [PATCH v5 6/6] wifi: rtlwifi: Adjust rtl8192d-common for USB Bitterblue Smith
2024-04-17  7:33   ` Ping-Ke Shih
2024-04-17 17:29     ` Bitterblue Smith

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=cc3c4c40-e07b-42c4-8d24-80d67fa1f46f@gmail.com \
    --to=rtl8821cerfe2@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=chewitt@libreelec.tv \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    --cc=s.l-h@gmx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.