From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F315FC433F5 for ; Wed, 9 Mar 2022 23:24:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237605AbiCIXZN (ORCPT ); Wed, 9 Mar 2022 18:25:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbiCIXZN (ORCPT ); Wed, 9 Mar 2022 18:25:13 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ED361527D1 for ; Wed, 9 Mar 2022 15:24:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646868252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=x7ymHsgqFEN86o8611pDZsoSVDfvMkyfUVRqrMffFAo=; b=fOf6Gt301jLcm+cwF+fH94VjW1sSWkBe2qmd15FkLrMSK1HOHUHhHwecKQ8QQSzTTdIuYu r+y8XcKhXOq8438w8L7dLyyYT1FOg+OSiuNg5xNig5YxYDn5mzuprUq6S+1lz9VFlWglxT xbT8PswHvu2QMl4peVOhhPWrp4Nfo+M= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-155-FDW6LY1kMVWxpgBuw2GU_Q-1; Wed, 09 Mar 2022 18:24:11 -0500 X-MC-Unique: FDW6LY1kMVWxpgBuw2GU_Q-1 Received: by mail-ej1-f71.google.com with SMTP id r18-20020a17090609d200b006a6e943d09eso2088734eje.20 for ; Wed, 09 Mar 2022 15:24:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=x7ymHsgqFEN86o8611pDZsoSVDfvMkyfUVRqrMffFAo=; b=O89SXbJXteTp0Shzisdc+YenSWlC2WjKlrNMGwyCh6RDYKt1jRm71AHzxnQRSmSVGx yo+xIRFXzxCJf+hMObYA+ygEPd37NnDL4MrchVo5V1jevryH2EWx7Ap5Bh1hqsV9BzTK 15neVfV8jpdEcI3kUJCiFe+Ao9faIxxLfS9SdANaartgGhhKJtEiU3AoCY2H0DPyod2x sGwoSX7F00XNWbltp/qEVO2Lua1yKwIBFx5N2cVRqWnAQ0xzbGEOPmqpajm4FCbzmd5m n6V1tKd5AVbhUMY7CxszU/J9RICoy4p50B6t/4y7k3NeThwnxym/9EQ6onQtZhW0MxnF 3oEA== X-Gm-Message-State: AOAM53171RX50fIZohVbAVfwqmubIS+g6jISn5m16q4+y6hw83NzdBwT CKn3XS9PAGonOz0zZ+8SgAWtfrEWGs57AXYQzis9e2zQW3WuLXIMT8rcIdMl0LMHw5/c3Vcd8JA DwBOPvnN1Ze/1wM14qrqhjYQEl6g= X-Received: by 2002:a17:906:c151:b0:6db:2b7f:302f with SMTP id dp17-20020a170906c15100b006db2b7f302fmr1957020ejc.4.1646868250009; Wed, 09 Mar 2022 15:24:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0EfvtomTcLzFKRD3f4im90mBpn+xhTpucpI09xBp8ExS1+NKJWAQ4aiF4uahPh9EZViolUw== X-Received: by 2002:a17:906:c151:b0:6db:2b7f:302f with SMTP id dp17-20020a170906c15100b006db2b7f302fmr1957005ejc.4.1646868249579; Wed, 09 Mar 2022 15:24:09 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id y6-20020a056402358600b004166413d27bsm1339194edc.97.2022.03.09.15.24.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Mar 2022 15:24:08 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 22F5D192B84; Thu, 10 Mar 2022 00:24:08 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Wenli Looi , Kalle Valo Cc: ath9k-devel@qca.qualcomm.com, Miaoqing Pan , linux-wireless@vger.kernel.org Subject: Re: QCN5502 support in ath9k In-Reply-To: References: <87r18d1upk.fsf@kernel.org> X-Clacks-Overhead: GNU Terry Pratchett Date: Thu, 10 Mar 2022 00:24:08 +0100 Message-ID: <87mthyvhev.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Wenli Looi writes: > I've managed to get QCN5502 working in ath9k in a very hacky way, by > mainly treating it as QCA956x, including the initvals: > > https://github.com/openwrt/openwrt/pull/9389 > > It would be great if anyone could provide comments on the code, as > well as the ideas for incorporating this cleanly into ath9k (and > whether there would be interest in doing so). I certainly wouldn't mind merging this support if it can be implemented in a clean way; we'd have to be sure it doesn't break anything on existing devices, of course. You'll have to split out the code to co-exist with the ar9003. My immediate thought would be that it would be a mistake to employ too clever tricks to maximise code reuse. By all means, try to reuse as much code as possible, but I'd rather take a bit of code duplication than end up with something that works in non-obvious ways :) Hope that helps! -Toke