From: Gabor Juhos <juhosg@openwrt.org>
To: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 10/13] qca-swiss-army-knife: allow to print initvals with more than 5 columns
Date: Fri, 07 Dec 2012 17:23:07 +0100 [thread overview]
Message-ID: <50C217EB.3070808@openwrt.org> (raw)
In-Reply-To: <CAB=NE6WwuwKzLkLxsggvAGhF5TKcDjWbaw3vkst4gnLFEYjP7Q@mail.gmail.com>
2012.12.07. 0:02 keltezéssel, Luis R. Rodriguez írta:
> On Thu, Dec 6, 2012 at 10:17 AM, Gabor Juhos <juhosg@openwrt.org> wrote:
>> @@ -416,19 +423,26 @@ static u32 ath9k_patch_initval(u32 idx, u32 val)
>> return val;
>> }
>>
>> -static void ath9k_hw_print_initval(const char *name, const u32 *array, u32 rows, u32 columns, bool onedim)
>> +static void ath9k_hw_print_initval(const char *name, const u32 *array, u32 rows,
>> + u32 columns, bool onedim, bool wide)
>> {
>> - u32 p_columns = columns > 5 ? 5 : columns;
>> + u32 p_columns;
>> u32 col, row;
>>
>> - /*
>> - * This checksum stuff is designed for columns <= 8),
>> - * and spreads the checksum over 64 bits but since currently
>> - * the initval max column size is 6 we only use the first 48
>> - * bits.
>> - */
>> - if (columns > 6)
>> - return;
>> + if (wide) {
>> + p_columns = columns;
>> + } else {
>> + p_columns = columns > 5 ? 5 : columns;
>> +
>> + /*
>> + * This checksum stuff is designed for columns <= 8),
>> + * and spreads the checksum over 64 bits but since currently
>> + * the initval max column size is 6 we only use the first 48
>> + * bits.
>> + */
>> + if (columns > 6)
>> + return;
>> + }
>
> The comment here was for the case that we were using the old nasty
> checksum thingy I invented, prior to you adding SHA1 checksum support.
> The column limitation therefore seems artificial here ?
Well, the comment and the 'if (columns > 6)' block can be removed.
However, the
p_columns = columns > 5 ? 5 : columns;
line ensures that we don't print the values for 'Turbo' modes. Although it can
be removed (along with the 'wide' argument) but that needs more changes.
> Also, as per Adrian's advice on the eeprom dump tool, perhaps we can
> remove clutter from the initvals tool by allowing us to copy to the
> local directory the initval files from a linux-next tag.
>
> git show next-20121204:drivers/net/wireless/ath/ath9k/ar9002_initvals.h
>> path/ar9002_initvals.h
>
> For example. But this would mean requiring us to get diffs by using a
> kernel git tree, separate from where we are. Not sure if there are
> gains with this strategy. Its unclear.
Copying the initval headers from a git tree would add unnecessary complexity
IMHO. If we want to check the validity of the initval headers in a given kernel
tree, that can be achieved in a simpler way. The path which contains the ath9k
specific initval headers can be defined as an include dir while compiling the
initval tool.
-Gabor
next prev parent reply other threads:[~2012-12-07 16:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 18:17 [PATCH v2 00/13] qca-swiss-army-knife: initvals fixes and improvements Gabor Juhos
2012-12-06 18:17 ` [PATCH v2 01/13] qca-swiss-army-knife: refresh checksums.txt Gabor Juhos
2012-12-06 18:17 ` [PATCH v2 02/13] qca-swiss-army-knife: fix ar9330_1p2_initvals.h Gabor Juhos
2012-12-06 18:17 ` [PATCH v2 03/13] qca-swiss-army-knife: print AR9565 initvals Gabor Juhos
2012-12-06 18:17 ` [PATCH v2 04/13] qca-swiss-army-knife: fix comment in ar9340_initvals.h Gabor Juhos
2012-12-06 18:17 ` [PATCH v2 05/13] qca-swiss-army-knife: add missing families to verify_checksums.sh Gabor Juhos
2012-12-06 18:17 ` [PATCH v2 06/13] qca-swiss-army-knife: fix string length for ar9340 Gabor Juhos
2012-12-06 18:17 ` [PATCH v2 07/13] qca-swiss-army-knife: add ar9462-2p0 to the usage text Gabor Juhos
2012-12-06 18:17 ` [PATCH v2 08/13] qca-swiss-army-knife: reformat INI_PRINT_* macros Gabor Juhos
2012-12-06 18:17 ` [PATCH v2 09/13] qca-swiss-army-knife: simplify initval family handling Gabor Juhos
2012-12-06 18:17 ` [PATCH v2 10/13] qca-swiss-army-knife: allow to print initvals with more than 5 columns Gabor Juhos
2012-12-06 23:02 ` Luis R. Rodriguez
2012-12-07 16:23 ` Gabor Juhos [this message]
2012-12-07 17:56 ` Luis R. Rodriguez
2012-12-06 18:17 ` [PATCH v2 11/13] qca-swiss-army-knife: add initval support for AR955X Gabor Juhos
2012-12-06 18:17 ` [PATCH v2 12/13] qca-swiss-army-knife: add checksums for AR955X initvals Gabor Juhos
2012-12-06 18:17 ` [PATCH v2 13/13] qca-swiss-army-knife: allow to verify " Gabor Juhos
2012-12-06 22:40 ` [PATCH v2 00/13] qca-swiss-army-knife: initvals fixes and improvements Luis R. Rodriguez
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=50C217EB.3070808@openwrt.org \
--to=juhosg@openwrt.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@qca.qualcomm.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).