From patchwork Wed Apr 16 12:32:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Copeland X-Patchwork-Id: 4000501 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 56BF6BFF02 for ; Wed, 16 Apr 2014 12:33:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7202A2018A for ; Wed, 16 Apr 2014 12:33:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DFB9020142 for ; Wed, 16 Apr 2014 12:33:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756187AbaDPMd1 (ORCPT ); Wed, 16 Apr 2014 08:33:27 -0400 Received: from mail-ig0-f173.google.com ([209.85.213.173]:63755 "EHLO mail-ig0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756173AbaDPMd0 (ORCPT ); Wed, 16 Apr 2014 08:33:26 -0400 Received: by mail-ig0-f173.google.com with SMTP id hl10so949412igb.12 for ; Wed, 16 Apr 2014 05:33:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BtIKkscU19y41QVaIsMgTKrV245uJQckXaubNfhlLVc=; b=Jc4hYfaGZfj8Z8GdrXCM+ZinVvac4Zw7LCB4Xrwo55rVlt/SswtyjaZbhoCsw3dvnZ pzRqs34Y7qBRK3/C1ISjqYIqBTMZWZytbW328kjTEhgLrOiHVzsXwqFMaw2rU3rlEiCA KSQ21n+OeDbH9J9iUzA2dDZJkFFcKTPhZrr8exa67ffrQU3X9XgXWGNG7FfqNae8GPzT 3msv8UmNDRouVgFa0O17VDMdO+s+YB2J5VUxcBhoKHShpDYr/e2lcyR72ufy88M57cya mdvcYAzQ6dZjL9iuYhql1V+W1Ifw1ochx94hqso+cax27OoIsLssJxyTbwbUNIuAS8aK t7DA== X-Gm-Message-State: ALoCoQnsAXW56F8YI5e0ENFr3iOzH1dgj/SmSps8c8gPcS3cIzr/3BEbO9e1YEUJRZwOuP4FghM2 X-Received: by 10.50.62.178 with SMTP id z18mr4376469igr.49.1397651605703; Wed, 16 Apr 2014 05:33:25 -0700 (PDT) Received: from hash ([2001:470:1d:6db:230:48ff:fe9d:9c89]) by mx.google.com with ESMTPSA id vu3sm45740676igc.6.2014.04.16.05.33.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 16 Apr 2014 05:33:24 -0700 (PDT) Received: from bob by hash with local (Exim 4.80) (envelope-from ) id 1WaP1O-0007lb-A8; Wed, 16 Apr 2014 08:32:58 -0400 From: Bob Copeland To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, larrymaxwell@agilemesh.com, Bob Copeland , Bob Copeland Subject: [PATCH] mac80211: fixup radiotap tx flags for RTS/CTS Date: Wed, 16 Apr 2014 08:32:41 -0400 Message-Id: <1397651561-29820-1-git-send-email-me@bobcopeland.com> X-Mailer: git-send-email 1.7.10.4 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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 When using RTS/CTS, the CTS-to-Self bit in radiotap TX flags is getting set instead of the RTS bit. Set the correct one. Reported-by: Larry Maxwell Signed-off-by: Bob Copeland --- net/mac80211/status.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/mac80211/status.c b/net/mac80211/status.c index e6e574a..ea432ca 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -314,10 +314,9 @@ ieee80211_add_tx_radiotap_header(struct ieee80211_local *local, !is_multicast_ether_addr(hdr->addr1)) txflags |= IEEE80211_RADIOTAP_F_TX_FAIL; - if ((info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) || - (info->status.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT)) + if (info->status.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) txflags |= IEEE80211_RADIOTAP_F_TX_CTS; - else if (info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) + if (info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) txflags |= IEEE80211_RADIOTAP_F_TX_RTS; put_unaligned_le16(txflags, pos);