Linux wireless drivers development
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Wright Feng <wright.feng@cypress.com>
Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list@broadcom.com,
	brcm80211-dev-list@cypress.com,
	Arend van Spriel <arend.vanspriel@broadcom.com>,
	Franky Lin <franky.lin@broadcom.com>,
	Hante Meuleman <hante.meuleman@broadcom.com>,
	chi-hsien.lin@cypress.com, Kurt Lee <kurt.lee@cypress.com>
Subject: Re: [PATCH v2 2/3] brcmfmac: set net carrier on via test tool for AP mode
Date: Mon, 14 Sep 2020 11:20:46 +0300	[thread overview]
Message-ID: <87v9ggojkx.fsf@codeaurora.org> (raw)
In-Reply-To: <20200914031634.190721-3-wright.feng@cypress.com> (Wright Feng's message of "Sun, 13 Sep 2020 22:16:33 -0500")

Wright Feng <wright.feng@cypress.com> writes:

> From: Kurt Lee <kurt.lee@cypress.com>
>
> 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.


-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2020-09-14  8:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14  3:16 [PATCH v2 0/3] brcmfmac: SoftAP creation and dcmd buffer size changes Wright Feng
2020-09-14  3:16 ` [PATCH v2 1/3] brcmfmac: support virtual interface creation from firmware Wright Feng
2020-09-14  3:16 ` [PATCH v2 2/3] brcmfmac: set net carrier on via test tool for AP mode Wright Feng
2020-09-14  8:20   ` Kalle Valo [this message]
2020-09-14  8:42     ` Arend Van Spriel
2020-09-14  3:16 ` [PATCH v2 3/3] brcmfmac: increase dcmd max control buffer size Wright Feng

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=87v9ggojkx.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=brcm80211-dev-list@cypress.com \
    --cc=chi-hsien.lin@cypress.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=kurt.lee@cypress.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wright.feng@cypress.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