From patchwork Sun Jun 24 19:44:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 10484839 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 D93ED6023A for ; Sun, 24 Jun 2018 19:50:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB44A2886B for ; Sun, 24 Jun 2018 19:50:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A98372888A; Sun, 24 Jun 2018 19:50:20 +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, FREEMAIL_FROM, 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 1ED442886B for ; Sun, 24 Jun 2018 19:50:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751858AbeFXTrA (ORCPT ); Sun, 24 Jun 2018 15:47:00 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:36043 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751730AbeFXTrA (ORCPT ); Sun, 24 Jun 2018 15:47:00 -0400 Received: by mail-lf0-f66.google.com with SMTP id n24-v6so12803848lfh.3 for ; Sun, 24 Jun 2018 12:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WL+ndRmh2+GxduygEhHyUF8vnpQGHCQCZ04rvxosGnc=; b=DEAMc1OBk8j6GI0u/wwlSMrfQBvbGau46e50mu/Wg2U5zF14yIXuMuTLCGafvipbD+ c0xHczvEIBvQRf6UPD+B72iYyfOXGvVRgJJN67gGbrfsdT3eqiGc7eounVquks3LJ+Ou SSFWSDAYwWyzPbjWtGZFAscxOPR7HVq0BV/75mfo7eqty/rkmubRBspW0WJpGUnZTb47 1fNVEsobL65thhgguQnIpEMV/NDpZntE1C1KDKX2VHvGUsWO3ZqNwxFgBPoL1AFhGbT4 ps76QLaJtV9vAjA+qrlNI3b5gITUzGUJSRnars/aLsDB/rW6wsyQvUq/QAjgtlLoDNM4 uRZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WL+ndRmh2+GxduygEhHyUF8vnpQGHCQCZ04rvxosGnc=; b=e8vG5Co01UsOQIES+tFnlgL3hD6Qt2EQZ5VBcU2911jwyC54HGPirIyaom1hBkJy/L 6YRf8yqhViqxfdJkp9w55rIGCSN3alcXhfYWYX/FlReiBxFHYS5QAr6b2cZItCBe3LG0 mlVgKC2k5vAd58Zv7Vq2pi/zX0ghubnMLlUKqangxD9hJLZsjdPjHiThzYk9SMFvLTY8 9uSj24ttuioiJ9Y3Erqz9KrPP51CmWQVZh3M0jiQCZRhaOVTYs1JtaTOF2wIuX9CqEp9 PL/Z5tXliYJpVFNNcS9lcgbgGKZSv1Nq9+KBO3fOj9kbhnV9iLisYlVJfvrF7ve64bcu tpbg== X-Gm-Message-State: APt69E2T5Cx00YnMDiWW9jLKmKDDSGOg4qQbg7Qh5PJZjDdoxRJcCSII +cL4OGmYVEF4/xVetA2bM7DJBA== X-Google-Smtp-Source: ADUXVKJQMvJulQzXon9VUhmew/fIMcusak/+ZRLsBnF0YFTS2JdTMgx1xCGbTI8Rp8qz7Gk7+uYvlg== X-Received: by 2002:a19:9fca:: with SMTP id i193-v6mr4366211lfe.125.1529869618531; Sun, 24 Jun 2018 12:46:58 -0700 (PDT) Received: from linux-veee.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id r77-v6sm1320556lfe.43.2018.06.24.12.46.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 24 Jun 2018 12:46:57 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo , Arend van Spriel Cc: Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Pieter-Paul Giesberts , Chung-Hsien Hsu , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH V4 2/3] brcmfmac: detect firmware support for radiotap monitor frames Date: Sun, 24 Jun 2018 21:44:36 +0200 Message-Id: <20180624194437.28766-2-zajec5@gmail.com> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20180624194437.28766-1-zajec5@gmail.com> References: <20180624194437.28766-1-zajec5@gmail.com> MIME-Version: 1.0 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 From: Rafał Miłecki Depending on used build-time options some firmwares may already include radiotap header in passed monitor frames. Add a new feature flag to store info about it. It's needed for proper handling of received frames before passing them up. Signed-off-by: Rafał Miłecki Signed-off-by: Arend van Spriel --- V4: Patch extracted out of: [PATCH V3 2/2] brcmfmac: handle monitor mode marked msgbuf packets Added mapping for the "rtap" string as reported by Arend Updated new feature flag description as preferred by Arend --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c index a78b9bae44e0..4db4d444407a 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c @@ -49,6 +49,7 @@ static const struct brcmf_feat_fwcap brcmf_fwcap_map[] = { { BRCMF_FEAT_MCHAN, "mchan" }, { BRCMF_FEAT_P2P, "p2p" }, { BRCMF_FEAT_MONITOR, "monitor" }, + { BRCMF_FEAT_MONITOR_FMT_RADIOTAP, "rtap" }, }; #ifdef DEBUG diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h index 3415d5d4d6b5..0b4974df353a 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h @@ -34,6 +34,7 @@ * GSCAN: enhanced scan offload feature. * FWSUP: Firmware supplicant. * MONITOR: firmware can pass monitor packets to host. + * MONITOR_FMT_RADIOTAP: firmware provides monitor packets with radiotap header */ #define BRCMF_FEAT_LIST \ BRCMF_FEAT_DEF(MBSS) \ @@ -50,7 +51,8 @@ BRCMF_FEAT_DEF(MFP) \ BRCMF_FEAT_DEF(GSCAN) \ BRCMF_FEAT_DEF(FWSUP) \ - BRCMF_FEAT_DEF(MONITOR) + BRCMF_FEAT_DEF(MONITOR) \ + BRCMF_FEAT_DEF(MONITOR_FMT_RADIOTAP) /* * Quirks: