All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reg: Rename confusing 'country IE' in log output
@ 2018-04-19  9:17 Toke Høiland-Jørgensen
  2018-04-19 22:32 ` Bernhard Gabler
  0 siblings, 1 reply; 5+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-04-19  9:17 UTC (permalink / raw)
  To: linux-wireless; +Cc: Bernhard_Gabler, Toke Høiland-Jørgensen

The 'country IE' messages in the log can be confusing and make people think
that the country code has been set to Ireland. Fix this by changing the
log messages to use 'country element' instead (as they are no longer called
'information element' in the spec anyway).

Reported-by: Bernhard Gabler <Bernhard_Gabler@web.de>
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
---
 net/wireless/reg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 16c7e4ef5820..ecfee5f06c76 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1652,7 +1652,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 element";
 	default:
 		WARN_ON(1);
 		return "bug";
@@ -2618,7 +2618,7 @@ reg_process_hint_country_ie(struct wiphy *wiphy,
 		 * This doesn't happen yet, not sure we
 		 * ever want to support it for this case.
 		 */
-		WARN_ONCE(1, "Unexpected intersection for country IEs");
+		WARN_ONCE(1, "Unexpected intersection for country elements");
 		return REG_REQ_IGNORE;
 	}
 
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] reg: Rename confusing 'country IE' in log output
  2018-04-19  9:17 [PATCH] reg: Rename confusing 'country IE' in log output Toke Høiland-Jørgensen
@ 2018-04-19 22:32 ` Bernhard Gabler
  2018-04-20  6:55   ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Bernhard Gabler @ 2018-04-19 22:32 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen, linux-wireless, johannes

Hello Toke & all,

looking at the patch, I see more occurences of the outdated "IE" in a 
constant name and function name:

         case NL80211_REGDOM_SET_BY_COUNTRY_IE:
or
         reg_process_hint_country_ie()

Would it make sense to likewise fix these (and possibly more) 
occurrences too, to match the spec from 2016?
For the sake of readability and consistency of code ...

Bernhard


Am 19.04.2018 um 11:17 schrieb Toke Høiland-Jørgensen:

> The 'country IE' messages in the log can be confusing and make people think
> that the country code has been set to Ireland. Fix this by changing the
> log messages to use 'country element' instead (as they are no longer called
> 'information element' in the spec anyway).
>
> Reported-by: Bernhard Gabler <Bernhard_Gabler@web.de>
> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
> ---
>   net/wireless/reg.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/wireless/reg.c b/net/wireless/reg.c
> index 16c7e4ef5820..ecfee5f06c76 100644
> --- a/net/wireless/reg.c
> +++ b/net/wireless/reg.c
> @@ -1652,7 +1652,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 element";
>   	default:
>   		WARN_ON(1);
>   		return "bug";
> @@ -2618,7 +2618,7 @@ reg_process_hint_country_ie(struct wiphy *wiphy,
>   		 * This doesn't happen yet, not sure we
>   		 * ever want to support it for this case.
>   		 */
> -		WARN_ONCE(1, "Unexpected intersection for country IEs");
> +		WARN_ONCE(1, "Unexpected intersection for country elements");
>   		return REG_REQ_IGNORE;
>   	}
>   

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] reg: Rename confusing 'country IE' in log output
  2018-04-19 22:32 ` Bernhard Gabler
@ 2018-04-20  6:55   ` Johannes Berg
  2018-04-20  9:12     ` Toke Høiland-Jørgensen
  2018-04-23 19:10     ` mac80211: db3bdcb9c3ffc628c5284d7ed03a704295ba1214 breaks wds operation Sebastian Gottschall
  0 siblings, 2 replies; 5+ messages in thread
From: Johannes Berg @ 2018-04-20  6:55 UTC (permalink / raw)
  To: Bernhard Gabler, Toke Høiland-Jørgensen, linux-wireless

On Fri, 2018-04-20 at 00:32 +0200, Bernhard Gabler wrote:

> looking at the patch, I see more occurences of the outdated "IE" in a 
> constant name and function name:
> 
>          case NL80211_REGDOM_SET_BY_COUNTRY_IE:
> or
>          reg_process_hint_country_ie()


Right. I searched for further strings that would show up to the user,
but didn't see any, but the code still refers to it in many places.

> Would it make sense to likewise fix these (and possibly more) 
> occurrences too, to match the spec from 2016?
> For the sake of readability and consistency of code ...

I dunno. Country IE isn't the only place where "IE" is used, it's even
used in struct names (struct ieee80211_tim_ie, and many others), so I
would think that people who actually work on the code will have to be
aware of the previous wording of "Information Element" (and the
abbreviation IE) anyway. Changing *everything* here to be just _element
instead of _ie or then probably the shorter _elem would IMHO be too much
code churn.

johannes

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] reg: Rename confusing 'country IE' in log output
  2018-04-20  6:55   ` Johannes Berg
@ 2018-04-20  9:12     ` Toke Høiland-Jørgensen
  2018-04-23 19:10     ` mac80211: db3bdcb9c3ffc628c5284d7ed03a704295ba1214 breaks wds operation Sebastian Gottschall
  1 sibling, 0 replies; 5+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-04-20  9:12 UTC (permalink / raw)
  To: Johannes Berg, Bernhard Gabler, linux-wireless

Johannes Berg <johannes@sipsolutions.net> writes:

> On Fri, 2018-04-20 at 00:32 +0200, Bernhard Gabler wrote:
>
>> looking at the patch, I see more occurences of the outdated "IE" in a 
>> constant name and function name:
>> 
>>          case NL80211_REGDOM_SET_BY_COUNTRY_IE:
>> or
>>          reg_process_hint_country_ie()
>
>
> Right. I searched for further strings that would show up to the user,
> but didn't see any, but the code still refers to it in many places.
>
>> Would it make sense to likewise fix these (and possibly more) 
>> occurrences too, to match the spec from 2016?
>> For the sake of readability and consistency of code ...
>
> I dunno. Country IE isn't the only place where "IE" is used, it's even
> used in struct names (struct ieee80211_tim_ie, and many others), so I
> would think that people who actually work on the code will have to be
> aware of the previous wording of "Information Element" (and the
> abbreviation IE) anyway. Changing *everything* here to be just _element
> instead of _ie or then probably the shorter _elem would IMHO be too much
> code churn.

Also, no one is going to think that reg_process_hint_country_ie() has
anything to do with Ireland. So it's just a matter of outdated
terminology...

-Toke

^ permalink raw reply	[flat|nested] 5+ messages in thread

* mac80211: db3bdcb9c3ffc628c5284d7ed03a704295ba1214 breaks wds operation
  2018-04-20  6:55   ` Johannes Berg
  2018-04-20  9:12     ` Toke Høiland-Jørgensen
@ 2018-04-23 19:10     ` Sebastian Gottschall
  1 sibling, 0 replies; 5+ messages in thread
From: Sebastian Gottschall @ 2018-04-23 19:10 UTC (permalink / raw)
  To: Johannes Berg, linux-wireless

just for your information. while testing your latest mac80211 tree i 
found out that
db3bdcb9c3ffc628c5284d7ed03a704295ba1214
will break wds sta / ap support (tested in ath10k)
i understand what this patch does. but this patch should not find its 
way into mac80211 without a patch to all affected drivers
i'm pretty sure that problem will not just belong to ath10k. basicly all 
SW_CRYPTO_CONTROL enabled devices wont support wds anymore with that patch
beside this your patch description is wrong. ap_vlan which is used for 
wds sta / ap operation works with encryption in ath10k and is not 
related in any way to sw_crypto support

Sebastian



Am 20.04.2018 um 08:55 schrieb Johannes Berg:
> On Fri, 2018-04-20 at 00:32 +0200, Bernhard Gabler wrote:
>
>> looking at the patch, I see more occurences of the outdated "IE" in a
>> constant name and function name:
>>
>>           case NL80211_REGDOM_SET_BY_COUNTRY_IE:
>> or
>>           reg_process_hint_country_ie()
>
> Right. I searched for further strings that would show up to the user,
> but didn't see any, but the code still refers to it in many places.
>
>> Would it make sense to likewise fix these (and possibly more)
>> occurrences too, to match the spec from 2016?
>> For the sake of readability and consistency of code ...
> I dunno. Country IE isn't the only place where "IE" is used, it's even
> used in struct names (struct ieee80211_tim_ie, and many others), so I
> would think that people who actually work on the code will have to be
> aware of the previous wording of "Information Element" (and the
> abbreviation IE) anyway. Changing *everything* here to be just _element
> instead of _ie or then probably the shorter _elem would IMHO be too much
> code churn.
>
> johannes
>

-- 
Mit freundlichen Grüssen / Regards

Sebastian Gottschall / CTO

NewMedia-NET GmbH - DD-WRT
Firmensitz:  Stubenwaldallee 21a, 64625 Bensheim
Registergericht: Amtsgericht Darmstadt, HRB 25473
Geschäftsführer: Peter Steinhäuser, Christian Scheele
http://www.dd-wrt.com
email: s.gottschall@dd-wrt.com
Tel.: +496251-582650 / Fax: +496251-5826565

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-23 19:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19  9:17 [PATCH] reg: Rename confusing 'country IE' in log output Toke Høiland-Jørgensen
2018-04-19 22:32 ` Bernhard Gabler
2018-04-20  6:55   ` Johannes Berg
2018-04-20  9:12     ` Toke Høiland-Jørgensen
2018-04-23 19:10     ` mac80211: db3bdcb9c3ffc628c5284d7ed03a704295ba1214 breaks wds operation Sebastian Gottschall

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.