Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6277207pxb; Mon, 8 Nov 2021 06:09:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/YVeAnxjNF0JlVq/U/64LExbOq0wiS3Pln8E0OJLFIHrVCpRBLx2hl9c8AmqVRAEtj7DG X-Received: by 2002:a05:6e02:1847:: with SMTP id b7mr165497ilv.102.1636380554514; Mon, 08 Nov 2021 06:09:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636380554; cv=none; d=google.com; s=arc-20160816; b=lq3BPArJ+r3FPDVGv6BbK9B5sQU+HAAt4YKDKyF2hfHr8g49bl0r2OSBvjrwdf1UuB HObxWh74vhtNBP8DiEu0DavYwQOqAq4pu9wtRBNVBBEYXu49ghq7pn1jgOIzoAgufbG3 0Cp9dGjQ5QWWlULVpXB+CjxZx9fKqg1m0Ko+nltqcEo7e552skQiZ9d/n/T0AAHk8GCg eLKaVbDqSnpucQJIeC+I1yFPWvPdUS/CQDlqk7A6sUojdhvaWEBYPva/bD65GYi6xEx8 pY3R1qcN3ueAQvHZlarf2MUOEsf6v8AuW6+5kfp9GI9eGzurTaaSJCFemNTrm5MMuNO9 y1Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=GDEZw6qRbFwx4jDzMjiteaTSJ5z5ycAJ+tsFRHBqx3w=; b=I+GORB5uwYOvtOXHOt8hjuS2KymfAsKoGiVPqFNXhFJ1Ou8dOZliEPqXbgSVPIyQUG K/BMZAvI9USL4BfCLjdecxCWN1v8uiIDpcbo9CaCNv2tdYo0FEd3rtgCKaxUO5RWyr5/ gSLhM56nNZAeaBD6JEcoSipBFgPyelrKUT0SNT8pEKpU7S8nhkFFJPtuIHu/b0j37kZ7 gkmFaEcG1nRgDzf8jE+QGoiyBOft9/5zNc/VwKzWXa0ImOBKhk+cE5EOsad3rkL8O2JH bLgfHTdTbdo5qUGbe3EAYY9hMtVAcn3PijUKB1r01d2o0eeaKNEG5C3zjk4oBs8DMHoH dybQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x6si34758808iow.47.2021.11.08.06.08.34; Mon, 08 Nov 2021 06:09:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238882AbhKHK6v convert rfc822-to-8bit (ORCPT + 99 others); Mon, 8 Nov 2021 05:58:51 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:26557 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236942AbhKHK6m (ORCPT ); Mon, 8 Nov 2021 05:58:42 -0500 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-187-MTx5LVPGM4S4GiBqox-4vw-1; Mon, 08 Nov 2021 10:55:52 +0000 X-MC-Unique: MTx5LVPGM4S4GiBqox-4vw-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.24; Mon, 8 Nov 2021 10:55:48 +0000 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.024; Mon, 8 Nov 2021 10:55:48 +0000 From: David Laight To: 'Larry Finger' , "gregkh@linuxfoundation.org" CC: "phil@philpotter.co.uk" , "linux-staging@lists.linux.dev" , "linux-kernel@vger.kernel.org" , Zameer Manji , kernel test robot , Stable Subject: RE: [PATCH v2] staging: r8188eu: Fix breakage introduced when 5G code was removed Thread-Topic: [PATCH v2] staging: r8188eu: Fix breakage introduced when 5G code was removed Thread-Index: AQHX0/3oe+k3iU2vCUKwt3hlkWjVnqv5dSlg Date: Mon, 8 Nov 2021 10:55:48 +0000 Message-ID: <8e4dd863ae894c8488a3d3d0f6a11f66@AcuMS.aculab.com> References: <20211107173543.7486-1-Larry.Finger@lwfinger.net> In-Reply-To: <20211107173543.7486-1-Larry.Finger@lwfinger.net> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)