mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Larry Finger' <Larry.Finger@lwfinger.net>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "phil@philpotter.co.uk" <phil@philpotter.co.uk>,
	"linux-staging@lists.linux.dev" <linux-staging@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Zameer Manji <zmanji@gmail.com>,
	kernel test robot <lkp@intel.com>,
	Stable <stable@vger.kernel.org>
Subject: RE: [PATCH v2] staging: r8188eu: Fix breakage introduced when 5G code was removed
Date: Mon, 8 Nov 2021 10:55:48 +0000	[thread overview]
Message-ID: <8e4dd863ae894c8488a3d3d0f6a11f66@AcuMS.aculab.com> (raw)
In-Reply-To: <20211107173543.7486-1-Larry.Finger@lwfinger.net>

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)


  parent reply	other threads:[~2021-11-08 10:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-07 17:35 Larry Finger
2021-11-07 17:43 ` Phillip Potter
2021-11-08 10:55 ` David Laight [this message]
2021-11-08 15:26   ` Larry Finger

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=8e4dd863ae894c8488a3d3d0f6a11f66@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=lkp@intel.com \
    --cc=phil@philpotter.co.uk \
    --cc=stable@vger.kernel.org \
    --cc=zmanji@gmail.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

all inboxes | Powered by JetHome®