* [PATCH v2] staging: r8188eu: Fix breakage introduced when 5G code was removed
@ 2021-11-07 17:35 Larry Finger
2021-11-07 17:43 ` Phillip Potter
2021-11-08 10:55 ` David Laight
0 siblings, 2 replies; 4+ messages in thread
From: Larry Finger @ 2021-11-07 17:35 UTC (permalink / raw)
To: gregkh
Cc: phil, linux-staging, linux-kernel, Larry Finger, Zameer Manji,
kernel test robot, Stable
In commit 221abd4d478a ("staging: r8188eu: Remove no more necessary definitions
and code"), two entries were removed from RTW_ChannelPlanMap[], but not replaced
with zeros. The position within this table is important, thus the patch broke
systems operating in regulatory domains osted later than entry 0x13 in the table.
Unfortunately, the FCC entry comes before that point and most testers did not see
this problem.
Reported-and-tested-by: Zameer Manji <zmanji@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 221abd4d478a ("staging: r8188eu: Remove no more necessary definitions and code")
Cc: Stable <stable@vger.kernel.org> # v5.5+
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
v2 - fixed use of () rsther than {} - found by kernel test robot
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 55c3d4a6faeb..5b60e6df5f87 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -107,6 +107,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
{0x01}, /* 0x10, RT_CHANNEL_DOMAIN_JAPAN */
{0x02}, /* 0x11, RT_CHANNEL_DOMAIN_FCC_NO_DFS */
{0x01}, /* 0x12, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */
+ {0x00}, /* 0x13 */
{0x02}, /* 0x14, RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS */
{0x00}, /* 0x15, RT_CHANNEL_DOMAIN_ETSI_NO_DFS */
{0x00}, /* 0x16, RT_CHANNEL_DOMAIN_KOREA_NO_DFS */
@@ -118,6 +119,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
{0x00}, /* 0x1C, */
{0x00}, /* 0x1D, */
{0x00}, /* 0x1E, */
+ {0x00}, /* 0x1F, */
/* 0x20 ~ 0x7F , New Define ===== */
{0x00}, /* 0x20, RT_CHANNEL_DOMAIN_WORLD_NULL */
{0x01}, /* 0x21, RT_CHANNEL_DOMAIN_ETSI1_NULL */
--
2.33.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: r8188eu: Fix breakage introduced when 5G code was removed
2021-11-07 17:35 [PATCH v2] staging: r8188eu: Fix breakage introduced when 5G code was removed Larry Finger
@ 2021-11-07 17:43 ` Phillip Potter
2021-11-08 10:55 ` David Laight
1 sibling, 0 replies; 4+ messages in thread
From: Phillip Potter @ 2021-11-07 17:43 UTC (permalink / raw)
To: Larry Finger
Cc: Greg KH, open list:STAGING SUBSYSTEM, Linux Kernel Mailing List,
Zameer Manji, kernel test robot, Stable
On Sun, 7 Nov 2021 at 17:35, Larry Finger <Larry.Finger@lwfinger.net> wrote:
>
> In commit 221abd4d478a ("staging: r8188eu: Remove no more necessary definitions
> and code"), two entries were removed from RTW_ChannelPlanMap[], but not replaced
> with zeros. The position within this table is important, thus the patch broke
> systems operating in regulatory domains osted later than entry 0x13 in the table.
> Unfortunately, the FCC entry comes before that point and most testers did not see
> this problem.
>
> Reported-and-tested-by: Zameer Manji <zmanji@gmail.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 221abd4d478a ("staging: r8188eu: Remove no more necessary definitions and code")
> Cc: Stable <stable@vger.kernel.org> # v5.5+
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>
> v2 - fixed use of () rsther than {} - found by kernel test robot
> ---
> drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> index 55c3d4a6faeb..5b60e6df5f87 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> @@ -107,6 +107,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
> {0x01}, /* 0x10, RT_CHANNEL_DOMAIN_JAPAN */
> {0x02}, /* 0x11, RT_CHANNEL_DOMAIN_FCC_NO_DFS */
> {0x01}, /* 0x12, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */
> + {0x00}, /* 0x13 */
> {0x02}, /* 0x14, RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS */
> {0x00}, /* 0x15, RT_CHANNEL_DOMAIN_ETSI_NO_DFS */
> {0x00}, /* 0x16, RT_CHANNEL_DOMAIN_KOREA_NO_DFS */
> @@ -118,6 +119,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
> {0x00}, /* 0x1C, */
> {0x00}, /* 0x1D, */
> {0x00}, /* 0x1E, */
> + {0x00}, /* 0x1F, */
> /* 0x20 ~ 0x7F , New Define ===== */
> {0x00}, /* 0x20, RT_CHANNEL_DOMAIN_WORLD_NULL */
> {0x01}, /* 0x21, RT_CHANNEL_DOMAIN_ETSI1_NULL */
> --
> 2.33.1
>
Reviewed-by: Phillip Potter <phil@philpotter.co.uk>
Regards,
Phil
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v2] staging: r8188eu: Fix breakage introduced when 5G code was removed
2021-11-07 17:35 [PATCH v2] staging: r8188eu: Fix breakage introduced when 5G code was removed Larry Finger
2021-11-07 17:43 ` Phillip Potter
@ 2021-11-08 10:55 ` David Laight
2021-11-08 15:26 ` Larry Finger
1 sibling, 1 reply; 4+ messages in thread
From: David Laight @ 2021-11-08 10:55 UTC (permalink / raw)
To: 'Larry Finger', gregkh
Cc: phil, linux-staging, linux-kernel, Zameer Manji,
kernel test robot, Stable
From: Larry Finger
> Sent: 07 November 2021 17:36
>
> In commit 221abd4d478a ("staging: r8188eu: Remove no more necessary definitions
> and code"), two entries were removed from RTW_ChannelPlanMap[], but not replaced
> with zeros. The position within this table is important, thus the patch broke
> systems operating in regulatory domains osted later than entry 0x13 in the table.
> Unfortunately, the FCC entry comes before that point and most testers did not see
> this problem.
...
> drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> index 55c3d4a6faeb..5b60e6df5f87 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> @@ -107,6 +107,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
> {0x01}, /* 0x10, RT_CHANNEL_DOMAIN_JAPAN */
> {0x02}, /* 0x11, RT_CHANNEL_DOMAIN_FCC_NO_DFS */
> {0x01}, /* 0x12, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */
> + {0x00}, /* 0x13 */
> {0x02}, /* 0x14, RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS */
> {0x00}, /* 0x15, RT_CHANNEL_DOMAIN_ETSI_NO_DFS */
> {0x00}, /* 0x16, RT_CHANNEL_DOMAIN_KOREA_NO_DFS */
> @@ -118,6 +119,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
> {0x00}, /* 0x1C, */
> {0x00}, /* 0x1D, */
> {0x00}, /* 0x1E, */
> + {0x00}, /* 0x1F, */
> /* 0x20 ~ 0x7F , New Define ===== */
> {0x00}, /* 0x20, RT_CHANNEL_DOMAIN_WORLD_NULL */
> {0x01}, /* 0x21, RT_CHANNEL_DOMAIN_ETSI1_NULL */
Is it worth changing that to use designated array initialisers?
so:
[0x21] = {0x01} /* RT_CHANNEL_DOMAIN_ETS11_NULL */
Then the {0x00} entries can be missed out (or just commented as not used).
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: r8188eu: Fix breakage introduced when 5G code was removed
2021-11-08 10:55 ` David Laight
@ 2021-11-08 15:26 ` Larry Finger
0 siblings, 0 replies; 4+ messages in thread
From: Larry Finger @ 2021-11-08 15:26 UTC (permalink / raw)
To: David Laight, gregkh
Cc: phil, linux-staging, linux-kernel, Zameer Manji,
kernel test robot, Stable
On 11/8/21 04:55, David Laight wrote:
> From: Larry Finger
>> Sent: 07 November 2021 17:36
>>
>> In commit 221abd4d478a ("staging: r8188eu: Remove no more necessary definitions
>> and code"), two entries were removed from RTW_ChannelPlanMap[], but not replaced
>> with zeros. The position within this table is important, thus the patch broke
>> systems operating in regulatory domains osted later than entry 0x13 in the table.
>> Unfortunately, the FCC entry comes before that point and most testers did not see
>> this problem.
> ...
>> drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
>> index 55c3d4a6faeb..5b60e6df5f87 100644
>> --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
>> +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
>> @@ -107,6 +107,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
>> {0x01}, /* 0x10, RT_CHANNEL_DOMAIN_JAPAN */
>> {0x02}, /* 0x11, RT_CHANNEL_DOMAIN_FCC_NO_DFS */
>> {0x01}, /* 0x12, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */
>> + {0x00}, /* 0x13 */
>> {0x02}, /* 0x14, RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS */
>> {0x00}, /* 0x15, RT_CHANNEL_DOMAIN_ETSI_NO_DFS */
>> {0x00}, /* 0x16, RT_CHANNEL_DOMAIN_KOREA_NO_DFS */
>> @@ -118,6 +119,7 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
>> {0x00}, /* 0x1C, */
>> {0x00}, /* 0x1D, */
>> {0x00}, /* 0x1E, */
>> + {0x00}, /* 0x1F, */
>> /* 0x20 ~ 0x7F , New Define ===== */
>> {0x00}, /* 0x20, RT_CHANNEL_DOMAIN_WORLD_NULL */
>> {0x01}, /* 0x21, RT_CHANNEL_DOMAIN_ETSI1_NULL */
>
> Is it worth changing that to use designated array initialisers?
> so:
> [0x21] = {0x01} /* RT_CHANNEL_DOMAIN_ETS11_NULL */
>
> Then the {0x00} entries can be missed out (or just commented as not used).
Yes, we could save a few bytes but risk getting into trouble aligning with some
other array that I have not located. I think it should be left the way it is.
Larry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-08 15:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-07 17:35 [PATCH v2] staging: r8188eu: Fix breakage introduced when 5G code was removed Larry Finger
2021-11-07 17:43 ` Phillip Potter
2021-11-08 10:55 ` David Laight
2021-11-08 15:26 ` Larry Finger
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.