From patchwork Wed May 7 15:51:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Merello X-Patchwork-Id: 4130111 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7713A9F23C for ; Wed, 7 May 2014 15:52:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 828CB20254 for ; Wed, 7 May 2014 15:52:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9259A20222 for ; Wed, 7 May 2014 15:52:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933908AbaEGPwB (ORCPT ); Wed, 7 May 2014 11:52:01 -0400 Received: from mail-ee0-f50.google.com ([74.125.83.50]:51585 "EHLO mail-ee0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933350AbaEGPv7 (ORCPT ); Wed, 7 May 2014 11:51:59 -0400 Received: by mail-ee0-f50.google.com with SMTP id e51so919969eek.9 for ; Wed, 07 May 2014 08:51:58 -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=b2fODpEZqHa5KNUa74wRjLOORUsoLm2XSBL+nDVV/Sg=; b=kctnOEEns226+t2s1TfqfZV/IQa4TLHep3L7ICcgq4uUWXj4Q74hVnEECK65Z/oY3S dt9b9M3CyBYNEicZujTubbntp0wNaOL09SRq+1vKAWumGKQxymeMRaep+IjDbgY1WuBX W2o6Pi/N39PXmkeHdYDqzUi1xVfHR+E+OgSAMX/5eI3TvFPkZUwcABT3peBYESORS9rE 3jqo3TYm/CzKRhgFhNx02tLW92gE47GLyLtZMNMJOFrztZMqrFnGuO0dJnXR/d7tRUoA wHDYFL65npTB9woCFm0tg/ZWL1yKRka8lcFuKWpcD0cfbcxvWIhT1t5KQxaCCA3wDsu+ W00g== X-Received: by 10.14.198.197 with SMTP id v45mr47266118een.9.1399477917936; Wed, 07 May 2014 08:51:57 -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 bc51sm47186899eeb.22.2014.05.07.08.51.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 May 2014 08:51:57 -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 1/4] rtl8187: report mac80211 short preamble RX flag Date: Wed, 7 May 2014 17:51:43 +0200 Message-Id: <1399477903-26278-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/rtl8187/dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c index 0ca17cd..6e4b177 100644 --- a/drivers/net/wireless/rtl818x/rtl8187/dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c @@ -381,6 +381,8 @@ static void rtl8187_rx_cb(struct urb *urb) rx_status.freq = dev->conf.chandef.chan->center_freq; rx_status.band = dev->conf.chandef.chan->band; 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; memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));