diff mbox

ath confusing log message "country IE"

Message ID 87o9ig1s3o.fsf@toke.dk (mailing list archive)
State Not Applicable
Delegated to: Johannes Berg
Headers show

Commit Message

Toke Høiland-Jørgensen April 18, 2018, 2:55 p.m. UTC
Bernhard Gabler <Bernhard_Gabler@web.de> writes:

> Dear all,
>
> would it be possible to re-write the log message from
>     "regdomain ... dynamically updated by country IE"
> in a less ambiguous way, e.g. to:
>     "regdomain ... dynamically updated by country-IE"
>     "regdomain ... dynamically updated by country information element"
> , please?
>
> To the occasional reader, the following system log messages seem to 
> convey that
>   -  "DE" (Germany) was intended to be used, but
>   -  "IE" (Ireland) was configured as regdomain.
>
>      [ 2723.739071] ath: EEPROM regdomain: 0x8114
>      [ 2723.739072] ath: EEPROM indicates we should expect a country code
>      [ 2723.739073] ath: doing EEPROM country->regdmn map search
>      [ 2723.739074] ath: country maps to regdmn code: 0x37
>      [ 2723.739075] ath: Country alpha2 being used: DE
>      [ 2723.739076] ath: Regpair used: 0x37
>      [ 2723.739077] ath: regdomain 0x8114 dynamically updated by country IE
>
> Only after intense googling, I now know that IE stands for "information 
> element", not for Ireland. But this is not obvious at. To prevent others 
> from confusion and wasting time on a non-problem, could please someone 
> rewrite the log message?

Heh, that is a good point, I think. The patch below should fix it; but I
worry that the log lines become quite long, then? Maybe better to use
"country-IE", but that could also be confused. "country inf.elem"
perhaps?

Ah, the bike-shedding possibilities are endless! :)

-Toke

Comments

Steve deRosier April 18, 2018, 3:02 p.m. UTC | #1
On Wed, Apr 18, 2018 at 7:55 AM, Toke Høiland-Jørgensen <toke@toke.dk> wrote:
> Bernhard Gabler <Bernhard_Gabler@web.de> writes:
>
>> Dear all,
>>
>> would it be possible to re-write the log message from
>>     "regdomain ... dynamically updated by country IE"
>> in a less ambiguous way, e.g. to:
>>     "regdomain ... dynamically updated by country-IE"
>>     "regdomain ... dynamically updated by country information element"
>> , please?
>>
>> To the occasional reader, the following system log messages seem to
>> convey that
>>   -  "DE" (Germany) was intended to be used, but
>>   -  "IE" (Ireland) was configured as regdomain.
>>
>>      [ 2723.739071] ath: EEPROM regdomain: 0x8114
>>      [ 2723.739072] ath: EEPROM indicates we should expect a country code
>>      [ 2723.739073] ath: doing EEPROM country->regdmn map search
>>      [ 2723.739074] ath: country maps to regdmn code: 0x37
>>      [ 2723.739075] ath: Country alpha2 being used: DE
>>      [ 2723.739076] ath: Regpair used: 0x37
>>      [ 2723.739077] ath: regdomain 0x8114 dynamically updated by country IE
>>
>> Only after intense googling, I now know that IE stands for "information
>> element", not for Ireland. But this is not obvious at. To prevent others
>> from confusion and wasting time on a non-problem, could please someone
>> rewrite the log message?
>
> Heh, that is a good point, I think. The patch below should fix it; but I
> worry that the log lines become quite long, then? Maybe better to use
> "country-IE", but that could also be confused. "country inf.elem"
> perhaps?
>

Instead of just rewording the message, perhaps adjusting it to show
more information would make it more clear:

    `regdomain 0x8114 dynamically updated by country I.E. to DE`

Assuming the message two lines higher is related, I know the
information is already there, but this way the line stands on its own,
is more information rich, and is also clear.

- Steve
Johannes Berg April 18, 2018, 8:57 p.m. UTC | #2
On Wed, 2018-04-18 at 16:55 +0200, Toke Høiland-Jørgensen wrote:
> 
> Heh, that is a good point, I think. The patch below should fix it; but I
> worry that the log lines become quite long, then? Maybe better to use
> "country-IE", but that could also be confused. "country inf.elem"
> perhaps?

Heh. Drop "information" entirely, the spec also did :-)

802.11-2016 just says

9.4.2 Elements
[...]
9.4.2.9 Country element

johannes
Toke Høiland-Jørgensen April 19, 2018, 9:10 a.m. UTC | #3
Johannes Berg <johannes@sipsolutions.net> writes:

> On Wed, 2018-04-18 at 16:55 +0200, Toke Høiland-Jørgensen wrote:
>> 
>> Heh, that is a good point, I think. The patch below should fix it; but I
>> worry that the log lines become quite long, then? Maybe better to use
>> "country-IE", but that could also be confused. "country inf.elem"
>> perhaps?
>
> Heh. Drop "information" entirely, the spec also did :-)
>
> 802.11-2016 just says
>
> 9.4.2 Elements
> [...]
> 9.4.2.9 Country element

Ah, excellent. Will send a proper patch :)

-Toke
diff mbox

Patch

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 7b42f0bacfd8..7f432734dbe9 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1464,7 +1464,7 @@  const char *reg_initiator_name(enum nl80211_reg_initiator initiator)
        case NL80211_REGDOM_SET_BY_DRIVER:
                return "driver";
        case NL80211_REGDOM_SET_BY_COUNTRY_IE:
-               return "country IE";
+               return "country information element";
        default:
                WARN_ON(1);
                return "bug";