From patchwork Thu Nov 19 15:04:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Copeland X-Patchwork-Id: 7658151 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A101A9F2EC for ; Thu, 19 Nov 2015 15:05:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F314520652 for ; Thu, 19 Nov 2015 15:05:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E7AD620648 for ; Thu, 19 Nov 2015 15:05:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030194AbbKSPE7 (ORCPT ); Thu, 19 Nov 2015 10:04:59 -0500 Received: from mail-qg0-f50.google.com ([209.85.192.50]:35430 "EHLO mail-qg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934331AbbKSPE6 (ORCPT ); Thu, 19 Nov 2015 10:04:58 -0500 Received: by qgec40 with SMTP id c40so52462707qge.2 for ; Thu, 19 Nov 2015 07:04:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bobcopeland-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=uVMQuA5AT1MNxAx46Ts0iAJJWzby3m8p7Y2rNXK06vk=; b=uyO/f6oQ98tiUFjGLJmJhBxm93BNp3J+Q21TsESZtA1eBpHkEBQgBSpuy9+ZHtzDUm nf53lSs5bLE27UX3gCuQJaXtCSUq+zVtdvTibBaWVFiwZvOVPXSx5l4uLPBTi80XJMrE IJeUcTWlj46WTrjnKFAja2P+AHRSFoEpqvSLu+SII4IXxWbjZJePNLGjkCvh6PmoFbqV KXUwBKxB92TeSR0yVIitNv0nLuykdkOEvtMt/urcT2aYnzvHU24oqDmFwxdfoNdyKOCE niuCYnwn91xbgd3ba6jKAj8jsvt2M0x+yH+WxarTxAzSFFr4FiUlHiyv2lm/P+EgpVwZ oHfA== 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=uVMQuA5AT1MNxAx46Ts0iAJJWzby3m8p7Y2rNXK06vk=; b=TjA6c46jws/RrZXfOkBkl/0luc/avxCOJK4+qgxYfCbHzQKUryQjV2V9aQGUegs+g2 axMkNohjNNqIxV9Pq+akl7GyYKycDGNv/rSZSQKalGGQi8pUb2mqwBGPjUpdxOEOWHmc G83DCHZrBwSvETxSrE5Es+hB3K0ExcdRJuOxsX3BhPRvtDPkprfrM4Jrs5Ty0KrkKdsb h1uoS4H0k8R7uwdiVjVUdFhsvw39gbLysUxFmuvQ4zsMgcf/iVyWPvK5vYnQlY6kYLFF Wb5o7sx4Nlyh1p9tEJ3b+3gP34C4Hi3BW0zeSD2stUBxH9HHg7/e+4OhomUmtKi8PGi7 8jHg== X-Gm-Message-State: ALoCoQkLmSRR7uVi1Mjb//zvzMlK8RtEVf4s49OG9mH8byUOcNLUSYSuLB+db0VA0wxxAeaQ+e5O X-Received: by 10.140.141.136 with SMTP id 130mr7801603qhn.74.1447945497551; Thu, 19 Nov 2015 07:04:57 -0800 (PST) Received: from hash ([2001:470:1d:6db:230:48ff:fe9d:9c89]) by smtp.gmail.com with ESMTPSA id c185sm2435123qka.44.2015.11.19.07.04.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Nov 2015 07:04:56 -0800 (PST) Received: from bob by hash with local (Exim 4.84) (envelope-from ) id 1ZzQlb-0003Z6-Rx; Thu, 19 Nov 2015 10:04:55 -0500 From: Bob Copeland To: linux-wireless@vger.kernel.org Cc: Bob Copeland Subject: [PATCH] ath5k: fix RTS/CTS by using proper rate flags Date: Thu, 19 Nov 2015 10:04:48 -0500 Message-Id: <1447945488-13665-1-git-send-email-me@bobcopeland.com> X-Mailer: git-send-email 2.1.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.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 The rates in the tx control rateset do not have the protection flags applied, so RTS/CTS would never get enabled if requested. Fix by using the rate flags in the rates returned by ieee80211_get_tx_rates(). Signed-off-by: Bob Copeland Acked-by: Felix Fietkau --- drivers/net/wireless/ath/ath5k/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 342563a..3d946d8 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -767,7 +767,7 @@ ath5k_txbuf_setup(struct ath5k_hw *ah, struct ath5k_buf *bf, if (info->flags & IEEE80211_TX_CTL_NO_ACK) flags |= AR5K_TXDESC_NOACK; - rc_flags = info->control.rates[0].flags; + rc_flags = bf->rates[0].flags; hw_rate = ath5k_get_rate_hw_value(ah->hw, info, bf, 0);