Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1995757pxk; Mon, 14 Sep 2020 01:42:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+evKBvoIq7yUTrxjw/+tduvrTDwl/ZbDNVgWsRoFT42ELbhuzkepBd1E9a1YaoNs7BQoG X-Received: by 2002:a50:ee10:: with SMTP id g16mr16746191eds.258.1600072965095; Mon, 14 Sep 2020 01:42:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600072965; cv=none; d=google.com; s=arc-20160816; b=Xt1pvjU+CP0F+q+DIJkW455E9B9y9S1g53HTNlhpwXQtGxNDS6kvN1W+UX+mDprBEG cDui6jHJtXm32eFdX1WaBLQqPMsEPlGhYA4+MycbvDEGfbvy20BB1C6u+sWZ2EMq3AFo oQsSFRlPcHaNyaP9HomK0JF7qb0jzIHTEfiOHc2vSCFzZzKagQwXNJz2gqvbvFgcgrUr LCurnifm2MYIJgOqZmmrubffVuo27aw7Pw0k3Zyq7QUbydVY/i5TyPNdodJJ1LEdjV/G q3ztcFnx7HuGusdQguDsUMGQMh/gbWMLlqB95n3u5Agwe8IzicCqV3pWW++29GAn8Hxy 6PGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=SaAFwZvZgNUtU1KGkhtp5aV75CQaABWgmBzc1H1F2jE=; b=XChZPHPLpq+7dfBaNT789UAfx6F1q5U22lZ+dC4U8gRiU6PE+PoqLJJ+0cgmUuHiIY v8uahiEui2EUA6TA2RP/CzD27iiscmphqqafbZnP+CrrPZRQrPtdeBlW3w8Ep5gfrWIQ Ja92Cm8eKezLu/eT9hQ0JyRNKWDTmokI3x16wg5xok1UK5Fy/4MZKPkblC9ZuCvbKbpT vDMd3TJxILCDKPPq5rlHkXbmhNo24AVhUvB0g8oQvxK0r6RuN6AUYemniWQMWgrsvizQ w/7qwPoegtqOBhgYlwxmm6oGvJ7/Ne1wQRaov2ekCVqxNeYKftANnvR9TodCiQ9GRD66 raZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=fO10We3y; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p9si6676636ejw.670.2020.09.14.01.42.15; Mon, 14 Sep 2020 01:42:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=fO10We3y; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726183AbgINImH (ORCPT + 99 others); Mon, 14 Sep 2020 04:42:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726149AbgINImG (ORCPT ); Mon, 14 Sep 2020 04:42:06 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83E10C06174A for ; Mon, 14 Sep 2020 01:42:06 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id u3so4984046pjr.3 for ; Mon, 14 Sep 2020 01:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to; bh=SaAFwZvZgNUtU1KGkhtp5aV75CQaABWgmBzc1H1F2jE=; b=fO10We3y7+W3VdkrRCgpWRh+228tk7UPcrM4EHGSodpW+zX46iGE6c9d058C9EGODK hIE89xRXvDUkSpu9qr+VSgZAX4Q1tTPjFgzoyX7rb+AuwMr2MGbh/5B8eaMZZp27++yJ WHh/6juW3M8ELY4E7qty/FfQilQJqq1J6cfwU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=SaAFwZvZgNUtU1KGkhtp5aV75CQaABWgmBzc1H1F2jE=; b=fmFmJspXikW4zAhTyEFLfIwDg/P1Wv2bUAZJiHwGicPEGDnxDNwDgsrs1XsmuMP9n1 Va15z9YGDaInMzoFOIxJSoOZP6/sTp/Bm4PyICSpcTnyHeBbof4g8uWHsCn9wgkTLSRX bYa27b4eDLBZgN5lKA1nw8/jQ04Mx4Arf/Zb55N5wlzkMst8keNdStyCfGsMTiuTUTL9 zrn880WUIG8NlEL9Lgpa/UvNx04iZjwHihXycPd7zLOVC6txKOtNzzATFf65HxIL6MKd PeSbd39vqk2cJxABz9U1bVe6s762jT/VODvQDrwnkUkL6iF+AXVt3oWZ5mNeTOk4Yzrs K7mg== X-Gm-Message-State: AOAM533DWChbBclsZDBgZGqxnTS00XEUxLrYx6F/Lm31pKqPYX/I7a4C 31iR1+SN0+cnYVa/tLh6DsUNVg== X-Received: by 2002:a17:90b:3852:: with SMTP id nl18mr8569369pjb.78.1600072925924; Mon, 14 Sep 2020 01:42:05 -0700 (PDT) Received: from [10.230.32.194] ([192.19.148.250]) by smtp.gmail.com with ESMTPSA id x19sm7808641pge.22.2020.09.14.01.42.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Sep 2020 01:42:05 -0700 (PDT) Subject: Re: [PATCH v2 2/3] brcmfmac: set net carrier on via test tool for AP mode To: Kalle Valo , Wright Feng Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Franky Lin , Hante Meuleman , chi-hsien.lin@cypress.com, Kurt Lee References: <20200914031634.190721-1-wright.feng@cypress.com> <20200914031634.190721-3-wright.feng@cypress.com> <87v9ggojkx.fsf@codeaurora.org> From: Arend Van Spriel Message-ID: <0813cce5-1833-cad2-ddba-ccdeed8872ab@broadcom.com> Date: Mon, 14 Sep 2020 10:42:01 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <87v9ggojkx.fsf@codeaurora.org> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000637e2f05af4202da" Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --000000000000637e2f05af4202da Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 9/14/2020 10:20 AM, Kalle Valo wrote: > Wright Feng writes: > >> From: Kurt Lee >> >> In manufacturing line, test tool may be used to enable SoftAP. Such >> SoftAP can't pass traffic because netif carrier is off by default. To >> allow such use case, let brcmfmac parse ioctl cmd, and then set iftype >> to ap mode and report netif_carrier_on to upper layer. > > nl80211 does not use ioctl(), so the commit log is misleading. > >> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c >> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c >> @@ -64,6 +64,15 @@ static int brcmf_cfg80211_vndr_cmds_dcmd_handler(struct wiphy *wiphy, >> *(char *)(dcmd_buf + len) = '\0'; >> } >> >> + if (cmdhdr->cmd == BRCMF_C_SET_AP) { >> + if (*(int *)(dcmd_buf) == 1) { >> + ifp->vif->wdev.iftype = NL80211_IFTYPE_AP; >> + brcmf_net_setcarrier(ifp, true); >> + } else { >> + ifp->vif->wdev.iftype = NL80211_IFTYPE_STATION; >> + } >> + } > > We now have rules for the vendor API: > > https://wireless.wiki.kernel.org/en/developers/documentation/nl80211#vendor-specific_api > > As the BRCMF_VNDR_CMDS_DCMD just seems to be a simple pipe between the > user space and the firmware I'm leaning towards that we should just > remove support for that command from brcmfmac. > > And besides, for factory tests you should be using NL80211_CMD_TESTMODE. > The vendor API is meant for normal mode usage. We talked about this API before. This command used to be a TESTMODE command, but with the introduction of vendor commands in cfg80211 I changed that. My reasons being that 1) it helps me in cfg80211 callback development, and 2) (some of) our customers were not accepting the need for a separate driver (build) for manufacturing. My intent has always been to keep this opaque for the driver so I am opposed to patches like this that are interpreting the opaque blob. The firmware could simply generate a CARRIER event and the driver can act on that. Regards, Arend --000000000000637e2f05af4202da Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQTAYJKoZIhvcNAQcCoIIQPTCCEDkCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg2hMIIE6DCCA9CgAwIBAgIOSBtqCRO9gCTKXSLwFPMwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UE CxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMT Ckdsb2JhbFNpZ24wHhcNMTYwNjE1MDAwMDAwWhcNMjQwNjE1MDAwMDAwWjBdMQswCQYDVQQGEwJC RTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEzMDEGA1UEAxMqR2xvYmFsU2lnbiBQZXJzb25h bFNpZ24gMiBDQSAtIFNIQTI1NiAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA tpZok2X9LAHsYqMNVL+Ly6RDkaKar7GD8rVtb9nw6tzPFnvXGeOEA4X5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