Wright Feng <wright.feng@xxxxxxxxxxx> writes: > From: Kurt Lee <kurt.lee@xxxxxxxxxxx> > > 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