Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp916014lqp; Thu, 21 Mar 2024 22:33:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqtUlTNL063bFUHBsAa2nphZLPeQ4x3yNcUazTAEtclxDCpmgB8W2zeMxk3bRYnOE8S4P5hRuInKPtzT22EZeNM1EVJ31WuzJ/4eS+CQ== X-Google-Smtp-Source: AGHT+IGRvB7H3JydMDnY/gH8KO1rTeuRN7XCdf2FAViXlsHTVKSMZXIfhTL+YjCjpdcFjQVarxwz X-Received: by 2002:a0d:e307:0:b0:610:f669:b72c with SMTP id m7-20020a0de307000000b00610f669b72cmr1321919ywe.2.1711085628986; Thu, 21 Mar 2024 22:33:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711085628; cv=pass; d=google.com; s=arc-20160816; b=Yr8jOSYlai+KBP2xs0Z6pt3jUUr+a8Wx3cexUfkpWQC0//HNtxMdlfhoOPg3eGT3Sw 1z2NI2M5IlZw5fMXqNX6LfWlJGOPCLLqyO1CG/x/hvKOIJxwte049qpAKI70Lnqw98Es dWxyvG4e5pnUJtmRTJrwd89d/8em9KOalbldnG63tDEM0DMfiLL+xRfCOO5ZJ3eyfy0V EAUZKmyjHOIz3zjkTtrReUSY7wlILjGfnpV4WBySZtQUOHNd3eUzgnHawQXGvdNoHKtn 6Dcjv9ZcgPhaujcP6fZeqmMuCWY+ard2+073wPKe9g3JA8EgZmZEVvEbpd6TVAkwJc/d +HYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-id:user-agent:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=btoWmNqBOv7OBVr4EKCpTULD5F9tLT+TzleFep7I8bA=; fh=h6GWTeCiRfn07iCP1/x4d3jenmB/0yOIo6BM2boD+Uo=; b=InM9FHONA/Bol59k785qATbxrIYal8LcrsWtBOCVotIHcx6pMBN5BEufi63GLXUfqc o2vknt9Ks4oCsOGzsDVxxU22UPgLkOaFOTgxSinFYVtD5mNEsL/JphilbKAy6uwaMAwO 3MEqfGhjmqSStJt/v21kMQV6c3Y/GuZfprf6FEPY9zpRad9E5PEFmeEt9yDc5bU+MRKJ jlT5+aUx1ezcqrAme0nIzf6VnNKbDjD7z7JEMWKEQBN0AXS+xv1+0rKF6S3INErv66lq vjenrz/PxZDD8nTzorFjAyZWULGgxJahDs/eWN/YeFpVSTWJncTJ5t8/YJ8HNOYkYsx2 tUgw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-5135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5135-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x8-20020a05622a000800b00431257303bbsi1261356qtw.78.2024.03.21.22.33.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 22:33:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-5135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5135-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 83A371C236AE for ; Fri, 22 Mar 2024 05:33:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E60F1946B; Fri, 22 Mar 2024 05:32:27 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22508C8FF for ; Fri, 22 Mar 2024 05:32:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711085547; cv=none; b=Y2/oWUenH4rdL+02eOfXtqQaibdlqVnHbFtffro/rcagDh73fcbWd70S8gRRJXVMMxLsuSeNrqVfsNQNB0/OzQFtNtf7t+UqHT6S9++D8qZJMXY5n8lkkhbKS7H6EyOw+hPOT8QGb78uDw9AI/6ftUNx6udL4j/Y9JUB39k9znw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711085547; c=relaxed/simple; bh=btoWmNqBOv7OBVr4EKCpTULD5F9tLT+TzleFep7I8bA=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=fkP34MC6nUHCE1y/uGOQUbLO7c9XY3CEkuZj3yjUL92EOGvyDChUI6nbDSFFZ5EYu1J0a/ocog0+Npyd4z2vKN1IQIsmwPdwxRG+uTHj7HcyHQySG9HeSxpdNN3NQdTWSDR4ZTVW2GOKqy26E9fO4z2XpNrGYTwVg8CpF+Rbgk4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 42M5W3zD41484559, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 42M5W3zD41484559 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Mar 2024 13:32:03 +0800 Received: from RTEXMBS02.realtek.com.tw (172.21.6.95) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 22 Mar 2024 13:32:03 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS02.realtek.com.tw (172.21.6.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 22 Mar 2024 13:32:03 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::4c42:f80:bcc2:d00f]) by RTEXMBS04.realtek.com.tw ([fe80::4c42:f80:bcc2:d00f%5]) with mapi id 15.01.2507.035; Fri, 22 Mar 2024 13:32:03 +0800 From: Ping-Ke Shih To: "linux-wireless@vger.kernel.org" , "rtl8821cerfe2@gmail.com" CC: "Larry.Finger@lwfinger.net" , "s.l-h@gmx.de" , "chewitt@libreelec.tv" Subject: Re: [PATCH v3 07/12] wifi: rtlwifi: Add rtl8192du/trx.{c,h} Thread-Topic: [PATCH v3 07/12] wifi: rtlwifi: Add rtl8192du/trx.{c,h} Thread-Index: AQHaev5W1aVGvLtoi0OCafDnHIoGi7FCuCSA Date: Fri, 22 Mar 2024 05:32:03 +0000 Message-ID: <8ec17360777a4fcdafaada93501ba166bb381f5d.camel@realtek.com> References: <7f4b3309-1580-48f3-9426-29f1eb4052fd@gmail.com> In-Reply-To: Accept-Language: en-US, zh-TW Content-Language: zh-TW user-agent: Evolution 3.36.1-2 x-kse-serverinfo: RTEXMBS02.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback T24gV2VkLCAyMDI0LTAzLTIwIGF0IDIxOjM5ICswMjAwLCBCaXR0ZXJibHVlIFNtaXRoIHdyb3Rl Og0KDQo+IA0KPiBUaGVzZSBjb250YWluIHJvdXRpbmVzIHJlbGF0ZWQgdG8gc2VuZGluZyBmcmFt ZXMgdG8gdGhlIGNoaXAuDQo+IA0KPiBTaWduZWQtb2ZmLWJ5OiBCaXR0ZXJibHVlIFNtaXRoIDxy dGw4ODIxY2VyZmUyQGdtYWlsLmNvbT4NCj4gLS0tDQo+IHYzOg0KPiAgLSBObyBjaGFuZ2UuDQo+ IA0KPiB2MjoNCj4gIC0gUGF0Y2ggaXMgbmV3IGluIHYyLCBzcGxpdCBmcm9tIHBhdGNoIDMvMyBp biB2MS4NCj4gLS0tDQo+ICAuLi4vd2lyZWxlc3MvcmVhbHRlay9ydGx3aWZpL3J0bDgxOTJkdS90 cnguYyAgfCAzODAgKysrKysrKysrKysrKysrKysrDQo+ICAuLi4vd2lyZWxlc3MvcmVhbHRlay9y dGx3aWZpL3J0bDgxOTJkdS90cnguaCAgfCAgNjAgKysrDQo+ICAyIGZpbGVzIGNoYW5nZWQsIDQ0 MCBpbnNlcnRpb25zKCspDQo+ICBjcmVhdGUgbW9kZ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Y190eCwNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICB1OCAqcGJk X2Rlc2NfdHgsIHN0cnVjdCBpZWVlODAyMTFfdHhfaW5mbyAqaW5mbywNCj4gKyAgICAgICAgICAg ICAgICAgICAgICAgICBzdHJ1Y3QgaWVlZTgwMjExX3N0YSAqc3RhLA0KPiArICAgICAgICAgICAg ICAgICAgICAgICAgIHN0cnVjdCBza19idWZmICpza2IsDQo+ICsgICAgICAgICAgICAgICAgICAg ICAgICAgdTggcXVldWVfaW5kZXgsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0 IHJ0bF90Y2JfZGVzYyAqdGNiX2Rlc2MpDQo+ICt7DQo+ICsgICAgICAgc3RydWN0IHJ0bF9wcml2 ICpydGxwcml2ID0gcnRsX3ByaXYoaHcpOw0KPiArICAgICAgIHN0cnVjdCBydGxfcHNfY3RsICpw cHNjID0gcnRsX3BzYyhydGxwcml2KTsNCj4gKyAgICAgICBzdHJ1Y3QgcnRsX2hhbCAqcnRsaGFs ID0gcnRsX2hhbChydGxwcml2KTsNCj4gKyAgICAgICBzdHJ1Y3QgcnRsX21hYyAqbWFjID0gcnRs X21hYyhydGxwcml2KTsNCj4gKyAgICAgICBzdHJ1Y3QgcnRsX3N0YV9pbmZvICpzdGFfZW50cnk7 DQo+ICsgICAgICAgX19sZTE2IGZjID0gaGRyLT5mcmFtZV9jb250cm9sOw0KPiArICAgICAgIHU4 IGFnZ19zdGF0ZSA9IFJUTF9BR0dfU1RPUDsNCj4gKyAgICAgICB1MTYgcGt0bGVuID0gc2tiLT5s ZW47DQo+ICsgICAgICAgdTggYW1wZHVfZGVuc2l0eSA9IDA7DQo+ICsgICAgICAgdTE2IHNlcV9u dW1iZXI7DQo+ICsgICAgICAgX19sZTMyICp0eGRlc2M7DQo+ICsgICAgICAgdTggcmF0ZV9mbGFn Ow0KPiArICAgICAgIHU4IHRpZDsNCj4gKw0KPiArICAgICAgIHJ0bF9nZXRfdGNiX2Rlc2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Qo+ICsgICAgICAgaWYgKGluZm8tPmNvbnRyb2wuaHdfa2V5 KSB7DQo+ICsgICAgICAgICAgICAgICBzdHJ1Y3QgaWVlZTgwMjExX2tleV9jb25mICprZXljb25m ID0gaW5mby0+Y29udHJvbC5od19rZXk7DQo+ICsNCj4gKyAgICAgICAgICAgICAgIHN3aXRjaCAo a2V5Y29uZi0+Y2lwaGVyKSB7DQo+ICsgICAgICAgICAgICAgICBjYXNlIFdMQU5fQ0lQSEVSX1NV SVRFX1dFUDQwOg0KPiArICAgICAgICAgICAgICAgY2FzZSBXTEFOX0NJUEhFUl9TVUlURV9XRVAx MDQ6DQo+ICsgICAgICAgICAgICAgICBjYXNlIFdMQU5fQ0lQSEVSX1NVSVRFX1RLSVA6DQo+ICsg ICAgICAgICAgICAgICAgICAgICAgIHNldF90eF9kZXNjX3NlY190eXBlKHR4ZGVzYywgMHgxKTsN Cj4gKyAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQo+ICsgICAgICAgICAgICAgICBjYXNl IFdMQU5fQ0lQSEVSX1NVSVRFX0NDTVA6DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIHNldF90 eF9kZXNjX3NlY190eXBlKHR4ZGVzYywgMHgzKTsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAg YnJlYWs7DQo+ICsgICAgICAgICAgICAgICBkZWZhdWx0Og0KPiArICAgICAgICAgICAgICAgICAg ICAgICBzZXRfdHhfZGVzY19zZWNfdHlwZSh0eGRlc2MsIDB4MCk7DQo+ICsgICAgICAgICAgICAg ICAgICAgICAgIGJyZWFrOw0KPiArICAgICAgICAgICAgICAgfQ0KPiArICAgICAgIH0NCg0KYmxh bmsgbGluZQ0KDQo+ICsgICAgICAgc2V0X3R4X2Rlc2NfcGt0X2lkKHR4ZGVzYywgMCk7DQo+ICsg ICAgICAgc2V0X3R4X2Rlc2NfcXVldWVfc2VsKHR4ZGVzYywgX3J0bDkyZHVfaHdxX3RvX2Rlc2Nx KHF1ZXVlX2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cnRsOTJkdV90eF9kZXNjX2NoZWNrc3VtKHR4ZGVzYyk7DQo+ICsNCj4gKyAgICAgICBy dGxfZGJnKHJ0bHByaXYsIENPTVBfU0VORCwgREJHX1RSQUNFLCAiPT0+XG4iKTsNCj4gK30NCj4g Kw0KDQoNClsuLi5dDQoNCg0KPiArDQo+ICtzdGF0aWMgaW50IF9ydGw5MmR1X291dF9lcF9tYXBw aW5nKHN0cnVjdCBpZWVlODAyMTFfaHcgKmh3KQ0KPiArew0KPiArICAgICAgIHN0cnVjdCBydGxf dXNiICpydGx1c2IgPSBydGxfdXNiZGV2KHJ0bF91c2Jwcml2KGh3KSk7DQo+ICsgICAgICAgc3Ry dWN0IHJ0bF9lcF9tYXAgKmVwX21hcCA9ICZydGx1c2ItPmVwX21hcDsNCj4gKyAgICAgICBpbnQg ZXJyID0gMDsNCj4gKw0KPiArICAgICAgIHN3aXRjaCAocnRsdXNiLT5vdXRfZXBfbnVtcykgew0K PiArICAgICAgIGNhc2UgMToNCj4gKyAgICAgICAgICAgICAgIF9ydGw5MmR1X29uZV9vdXRfZXBf bWFwcGluZyhydGx1c2IsIGVwX21hcCk7DQo+ICsgICAgICAgICAgICAgICBicmVhazsNCj4gKyAg ICAgICBjYXNlIDI6DQo+ICsgICAgICAgICAgICAgICBfcnRsOTJkdV90d29fb3V0X2VwX21hcHBp bmcocnRsdXNiLCBlcF9tYXApOw0KPiArICAgICAgICAgICAgICAgYnJlYWs7DQo+ICsgICAgICAg Y2FzZSAzOg0KPiArICAgICAgICAgICAgICAgX3J0bDkyZHVfdGhyZWVfb3V0X2VwX21hcHBpbmco cnRsdXNiLCBlcF9tYXApOw0KPiArICAgICAgICAgICAgICAgYnJlYWs7DQo+ICsgICAgICAgZGVm YXVsdDoNCj4gKyAgICAgICAgICAgICAgIGVyciA9IC1FSU5WQUw7DQoNCnJldHVybiAtRUlOVkFM Ow0KDQo+ICsgICAgICAgICAgICAgICBicmVhazsNCj4gKyAgICAgICB9DQo+ICsNCj4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