From: Kalle Valo <kvalo@codeaurora.org>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>,
Tony Chuang <yhchuang@realtek.com>,
"linux-wireless\@vger.kernel.org"
<linux-wireless@vger.kernel.org>, Pkshih <pkshih@realtek.com>,
Andy Huang <tehuang@realtek.com>
Subject: Re: [PATCH 01/12] rtwlan: main files
Date: Thu, 04 Oct 2018 15:35:44 +0300 [thread overview]
Message-ID: <87o9c928kf.fsf@codeaurora.org> (raw)
In-Reply-To: <a54dec4e-1164-f9c5-c791-3396a239eeba@lwfinger.net> (Larry Finger's message of "Tue, 2 Oct 2018 10:23:44 -0500")
Larry Finger <Larry.Finger@lwfinger.net> writes:
> On 10/2/18 5:29 AM, Stanislaw Gruszka wrote:
>> On Fri, Sep 28, 2018 at 11:32:41AM +0000, Tony Chuang wrote:
>>>> if (rtw_hci_tx(rtwdev, &pkt_info, skb))
>>>> dev_kfree_skb_any(skb)
>>>>
>>>> just to remove 'return;' and out label.
>>>
>>>
>>> OK, but why not use ieee80211_free_txskb, should it be better for mac80211?
>>
>> Yes, it is better as it also do some extra thing for dropped frame.
>>
>>>>> OK, but I think this is needed, our tables have different forms ....
>>>>
>>>> Not sure if that is better solution, but could the tables be pre-prarsed
>>>> by user-space program and then embed in the driver in ready to send
>>>> to the hardware from ?
>>>>
>>>> Also there are lot of redundancy in those tables, for example:
>>>>
>>>> + 0x81C, 0xFF000003,
>>>> + 0x81C, 0xF5000003,
>>>> + 0x81C, 0xF4020003,
>>>> + 0x81C, 0xF3040003,
>>>> + 0x81C, 0xF2060003,
>>>> + 0x81C, 0xF1080003,
>>>> + 0x81C, 0xF00A0003,
>>>> + 0x81C, 0xEF0C0003,
>>>> + 0x81C, 0xEE0E0003,
>>>> + 0x81C, 0xED100003,
>>>> + 0x81C, 0xEC120003,
>>>> + 0x81C, 0xEB140003,
>>>> + 0x81C, 0xEA160003,
>>>> + 0x81C, 0xE9180003,
>>>> + 0x81C, 0xE81A0003,
>>>> + 0x81C, 0xE71C0003,
>>>> + 0x81C, 0xE61E0003,
>>>> + 0x81C, 0xE5200003,
>>>>
>>>> 0x81C and 0003 repeats in many lines.
>>>>
>>>> This seems to be parse data, not that we have to write 0x81C
>>>> register many times. Would be possible to remove the redundancy?
>>>
>>>
>>> No, they cannot be removed, the sequence matters.
>>> And it is really writing to 0x81C ...
>>> It is really magic, I cannot believe to this, too.
>>
>> This is contradiction for what I asked you before, i.e. doing parsing
>> in user space, but since we have this parsing mechanism in the driver
>> perhaps the tables can be coded in some more compact way, for example:
>>
>> { prefix, suffix, len, {data} }
>>
>> { 0x81C, 0x0003, N ,
>> { 0xFF02 , 0xF500 , .... , 0xE520 } }
>>
>> The rtw8822b_table.c file is quite big.
>
> You might also consider having these tables as a configuration file
> read from the firmware directory.
Configuration files for upstream drivers is something I would like to
avoid until we have a generic solution. That seems to come up now and
then but there does not seem to be any consensus how it should be
implemented.
--
Kalle Valo
next prev parent reply other threads:[~2018-10-04 12:35 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-21 6:03 [RFC 00/12] rtwlan: mac80211 driver for Realtek 802.11ac wireless network chips yhchuang
2018-09-21 6:03 ` [PATCH 01/12] rtwlan: main files yhchuang
2018-09-27 13:50 ` Stanislaw Gruszka
2018-09-27 15:40 ` Larry Finger
2018-09-28 9:08 ` Stanislaw Gruszka
2018-10-04 12:32 ` Kalle Valo
2018-09-28 3:20 ` Tony Chuang
2018-09-28 9:29 ` Stanislaw Gruszka
2018-09-28 11:32 ` Tony Chuang
2018-10-02 10:29 ` Stanislaw Gruszka
2018-10-02 15:23 ` Larry Finger
2018-10-03 2:57 ` Tony Chuang
2018-10-03 5:40 ` Larry Finger
2018-10-04 12:39 ` Kalle Valo
2018-10-04 13:42 ` Stanislaw Gruszka
2018-10-04 16:19 ` Larry Finger
2018-10-05 7:51 ` Stanislaw Gruszka
2018-10-06 12:20 ` Kalle Valo
2018-10-06 12:16 ` Kalle Valo
2018-10-04 12:35 ` Kalle Valo [this message]
2018-10-02 9:35 ` Tony Chuang
2018-10-02 10:14 ` Stanislaw Gruszka
2018-10-03 3:25 ` Tony Chuang
2018-10-03 6:05 ` Stanislaw Gruszka
2018-10-04 12:30 ` Kalle Valo
2018-09-21 6:03 ` [PATCH 02/12] rtwlan: core files yhchuang
2018-09-21 6:03 ` [PATCH 03/12] rtwlan: hci files yhchuang
2018-09-21 6:03 ` [PATCH 04/12] rtwlan: trx files yhchuang
2018-09-21 6:04 ` [PATCH 05/12] rtwlan: mac files yhchuang
2018-09-21 6:04 ` [PATCH 06/12] rtwlan: fw and efuse files yhchuang
2018-09-21 6:04 ` [PATCH 07/12] rtwlan: phy files yhchuang
2018-09-21 6:04 ` [PATCH 08/12] rtwlan: debug files yhchuang
2018-09-21 6:04 ` [PATCH 09/12] rtwlan: chip files yhchuang
2018-09-21 6:04 ` [PATCH 10/12] rtwlan: 8822B init table yhchuang
2018-09-21 6:04 ` [PATCH 11/12] rtwlan: 8822C " yhchuang
2018-09-21 6:04 ` [PATCH 12/12] rtwlan: Kconfig & Makefile yhchuang
2018-09-22 23:39 ` kbuild test robot
2018-09-23 8:55 ` kbuild test robot
2018-09-21 13:12 ` [RFC 00/12] rtwlan: mac80211 driver for Realtek 802.11ac wireless network chips Stanislaw Gruszka
2018-09-24 11:05 ` Kalle Valo
2018-09-25 11:09 ` Tony Chuang
2018-10-06 11:45 ` Kalle Valo
[not found] ` <CAP71bdW0P8xFeLfGgNeENJf_9+S+DTnK4S=tXZi1FPY7U-AL3A@mail.gmail.com>
2018-09-24 11:08 ` Kalle Valo
2018-09-24 17:09 ` Larry Finger
2018-09-25 11:10 ` Tony Chuang
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=87o9c928kf.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=Larry.Finger@lwfinger.net \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=sgruszka@redhat.com \
--cc=tehuang@realtek.com \
--cc=yhchuang@realtek.com \
/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).