From patchwork Fri Jun 22 18:43:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 10482829 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 72DE960383 for ; Fri, 22 Jun 2018 18:43:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BF5628695 for ; Fri, 22 Jun 2018 18:43:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6062B286A7; Fri, 22 Jun 2018 18:43:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28738286A1 for ; Fri, 22 Jun 2018 18:43:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934348AbeFVSnf (ORCPT ); Fri, 22 Jun 2018 14:43:35 -0400 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:35538 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934313AbeFVSnd (ORCPT ); Fri, 22 Jun 2018 14:43:33 -0400 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 19BCC30C05D; Fri, 22 Jun 2018 11:43:33 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 19BCC30C05D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1529693013; bh=ojVjhzQ5XjCX8rvcmf8Wt2dTrqaiQWm6OPGpyS0Nwc0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wv/7FFfzEc5WtA0CFiSyZdaFo8CoWaUNt5cd2l0Lp/ovQ6oW7fko6El0n4IYsBw0b 4p0oiZlFOfULj03Hz6oAm2KBFCD4iMBC/nw5A4f8vxtDs5Opq04hkFzBwt72vLmFWM ekIzeXVND+BmbMJDZKGTOew9MP8hkE6d+jNFiSlM= Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id B111181EC5; Fri, 22 Jun 2018 11:43:32 -0700 (PDT) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id 835B2B0520D; Fri, 22 Jun 2018 20:43:27 +0200 (CEST) From: Arend van Spriel To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Arend van Spriel Subject: [PATCH 1/6] brcmfmac: remove fallback mechanism for BRCMF_FEAT_MONITOR Date: Fri, 22 Jun 2018 20:43:19 +0200 Message-Id: <1529693004-20569-2-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1529693004-20569-1-git-send-email-arend.vanspriel@broadcom.com> References: <1529693004-20569-1-git-send-email-arend.vanspriel@broadcom.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 19f505aa3ae0 ("brcmfmac: detect firmware support for monitor interface") introduced a fallback mechanism attempting BRCMF_C_MONITOR command. However, that does not indicate firmware support. Unfortunately, it only indicates the core part of the stack supports it, but not whether it is supported in full-dongle mode, ie. firmware has means to transfer the monitor packets to the host. Firmwares that return the "monitor" flag in the "cap" iovar are able to send the packets to the host. Signed-off-by: Arend van Spriel --- .../wireless/broadcom/brcm80211/brcmfmac/feature.c | 25 ---------------------- 1 file changed, 25 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c index 48d7978..a78b9ba 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c @@ -92,26 +92,6 @@ static int brcmf_feat_debugfs_read(struct seq_file *seq, void *data) } #endif /* DEBUG */ -static void brcmf_feat_cmd_int_get(struct brcmf_if *ifp, enum brcmf_feat_id id, - u32 cmd) -{ - u32 data; - int err; - - ifp->fwil_fwerr = true; - - err = brcmf_fil_cmd_int_get(ifp, cmd, &data); - if (err == 0) { - brcmf_dbg(INFO, "enabling feature: %s\n", brcmf_feat_names[id]); - ifp->drvr->feat_flags |= BIT(id); - } else { - brcmf_dbg(TRACE, "%s feature check failed: %d\n", - brcmf_feat_names[id], err); - } - - ifp->fwil_fwerr = false; -} - /** * brcmf_feat_iovar_int_get() - determine feature through iovar query. * @@ -272,11 +252,6 @@ void brcmf_feat_attach(struct brcmf_pub *drvr) } brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_FWSUP, "sup_wpa"); - /* Fallback detection for older firmwares */ - if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MONITOR)) - brcmf_feat_cmd_int_get(ifp, BRCMF_FEAT_MONITOR, - BRCMF_C_GET_MONITOR); - /* set chip related quirks */ switch (drvr->bus_if->chip) { case BRCM_CC_43236_CHIP_ID: