From patchwork Wed May 7 15:52:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Merello X-Patchwork-Id: 4130131 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B6245BFF02 for ; Wed, 7 May 2014 15:52:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0630A20222 for ; Wed, 7 May 2014 15:52:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 28AAE2024F for ; Wed, 7 May 2014 15:52:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933002AbaEGPw1 (ORCPT ); Wed, 7 May 2014 11:52:27 -0400 Received: from mail-ee0-f41.google.com ([74.125.83.41]:45939 "EHLO mail-ee0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752385AbaEGPwY (ORCPT ); Wed, 7 May 2014 11:52:24 -0400 Received: by mail-ee0-f41.google.com with SMTP id t10so900518eei.14 for ; Wed, 07 May 2014 08:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=IvoF+bPb0hZVaJSrsrQe/4ScB+ugYbaaMC10zaOBL0Y=; b=Oa7lzIpXPC5BUrn9JPjPeaz0CW7WCxE4PN9MITXJNDTspbDw5/uDuLTrPONXhjrlAB kk0Nk2ccPT9qQG+2ah59zfI8Ec9KhpILuCBzAVsU8AnU+a/NvB12wWOpyrUexvo+VOMs 6oVATlXcCZyClzrACk2O4EHaw+D7I+nUMbCuUUnfPl4VWAR1dNVWzbcNMk6jrnf5MJIm OS/Wi+4Iz69Nu0NW5Il3S8W1vagyRk7KgEsfh8FZR0ntyEHoa+pVPG+Lsh9mDfU1JXMc qg2AzdGW9w8hdTSQpVVDNWCsIYFasP1hN+ZFNEuplivCP0sjUvC8wluj4Ag0CoJowhNc +CIA== X-Received: by 10.15.44.3 with SMTP id y3mr17734685eev.58.1399477942991; Wed, 07 May 2014 08:52:22 -0700 (PDT) Received: from localhost.localdomain (host84-126-dynamic.54-82-r.retail.telecomitalia.it. [82.54.126.84]) by mx.google.com with ESMTPSA id t50sm47180814eev.28.2014.05.07.08.52.21 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 May 2014 08:52:22 -0700 (PDT) From: Andrea Merello To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, Larry.Finger@lwfinger.net, bernhard@schiffner-limbach.de, dan.carpenter@oracle.com, Andrea Merello Subject: [PATCH 2/4] rtl8180: report mac80211 short preamble RX flag Date: Wed, 7 May 2014 17:52:16 +0200 Message-Id: <1399477936-26317-1-git-send-email-andrea.merello@gmail.com> X-Mailer: git-send-email 1.8.3.2 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch make it possible to mac80211 to know whether a frame has been received with short preamble. It simply checks for the "splcp" flag in the RX status descriptor, and eventually set RX_FLAG_SHORTPRE in mac80211 rx status structure. Signed-off-by: Andrea Merello --- drivers/net/wireless/rtl818x/rtl8180/dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c index 50d69b1..8d07df2 100644 --- a/drivers/net/wireless/rtl818x/rtl8180/dev.c +++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c @@ -284,6 +284,8 @@ static void rtl8180_handle_rx(struct ieee80211_hw *dev) rx_status.band = dev->conf.chandef.chan->band; rx_status.mactime = tsft; rx_status.flag |= RX_FLAG_MACTIME_START; + if (flags & RTL818X_RX_DESC_FLAG_SPLCP) + rx_status.flag |= RX_FLAG_SHORTPRE; if (flags & RTL818X_RX_DESC_FLAG_CRC32_ERR) rx_status.flag |= RX_FLAG_FAILED_FCS_CRC;