From patchwork Sun Dec 8 09:25:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 298763 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 72E332C00D4 for ; Sun, 8 Dec 2013 20:29:10 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758780Ab3LHJ2Y (ORCPT ); Sun, 8 Dec 2013 04:28:24 -0500 Received: from mail-ea0-f179.google.com ([209.85.215.179]:45439 "EHLO mail-ea0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754614Ab3LHJ1a (ORCPT ); Sun, 8 Dec 2013 04:27:30 -0500 Received: by mail-ea0-f179.google.com with SMTP id r15so1009964ead.24 for ; Sun, 08 Dec 2013 01:27:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=wiRX4XiXJBOFFeUduWyI/ddpSRIRHLwgnqnwOFcyAnI=; b=fPdw6WKIh3n46Iyju4CSDJtmNd4qkCwn01DwCscQbZLxR39BH03IJ31OlMVOoxpaE2 ocgfhcQH7jVRXEZkg6SvHB6GuelE96QSdRz3BOy1qkmF0on15kn/z4sARwhxC7afIn+W 4DHKMT5oJmTNDd0vK356aGuNyCbfptirXmsF0+/HpSzYzbA46oOxJacKH3YRueYuPco1 RE8gXt8NYP6nuICvAnGMt/cJZTZ4N6m4RmSb/kGJGU+711uuhkAFfUQnStw5YFlSAPWY tK5K4Ommp3TYlLJKE+3yFJatVSUcmXcHHi+CtsBtN7BBpgfiHt9Tr1ezy+THeZrIYimL W8pw== X-Received: by 10.14.212.69 with SMTP id x45mr23592171eeo.69.1386494849364; Sun, 08 Dec 2013 01:27:29 -0800 (PST) Received: from Pali-EliteBook.kolej.mff.cuni.cz (pali.kolej.mff.cuni.cz. [78.128.193.202]) by mx.google.com with ESMTPSA id m1sm15397623eeg.0.2013.12.08.01.27.28 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Dec 2013 01:27:28 -0800 (PST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Luciano Coelho , "John W. Linville" Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, freemangordon@abv.bg, aaro.koskinen@iki.fi, pavel@ucw.cz, sre@ring0.de, joni.lapilainen@gmail.com, Johannes Berg , Felipe Contreras , David Gnedt , =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH v2 11/16] wl1251: disable retry and ACK policy for injected packets Date: Sun, 8 Dec 2013 10:25:09 +0100 Message-Id: <1386494714-21070-12-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1386494714-21070-1-git-send-email-pali.rohar@gmail.com> References: <1382819655-30430-1-git-send-email-pali.rohar@gmail.com> <1386494714-21070-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: David Gnedt Set the retry limit to 0 and disable the ACK policy for injected packets. Signed-off-by: David Gnedt Signed-off-by: Pali Rohár Reviewed-by: Pavel Machek --- drivers/net/wireless/ti/wl1251/acx.c | 8 +++++++- drivers/net/wireless/ti/wl1251/tx.c | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ti/wl1251/acx.c b/drivers/net/wireless/ti/wl1251/acx.c index f772e62..8f420d0 100644 --- a/drivers/net/wireless/ti/wl1251/acx.c +++ b/drivers/net/wireless/ti/wl1251/acx.c @@ -943,12 +943,18 @@ int wl1251_acx_rate_policies(struct wl1251 *wl) } /* configure one default (one-size-fits-all) rate class */ - acx->rate_class_cnt = 1; + acx->rate_class_cnt = 2; acx->rate_class[0].enabled_rates = ACX_RATE_MASK_UNSPECIFIED; acx->rate_class[0].short_retry_limit = ACX_RATE_RETRY_LIMIT; acx->rate_class[0].long_retry_limit = ACX_RATE_RETRY_LIMIT; acx->rate_class[0].aflags = 0; + /* no-retry rate class */ + acx->rate_class[1].enabled_rates = ACX_RATE_MASK_UNSPECIFIED; + acx->rate_class[1].short_retry_limit = 0; + acx->rate_class[1].long_retry_limit = 0; + acx->rate_class[1].aflags = 0; + ret = wl1251_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx)); if (ret < 0) { wl1251_warning("Setting of rate policies failed: %d", ret); diff --git a/drivers/net/wireless/ti/wl1251/tx.c b/drivers/net/wireless/ti/wl1251/tx.c index 216334d..4516180 100644 --- a/drivers/net/wireless/ti/wl1251/tx.c +++ b/drivers/net/wireless/ti/wl1251/tx.c @@ -90,8 +90,12 @@ static void wl1251_tx_control(struct tx_double_buffer_desc *tx_hdr, /* 802.11 packets */ tx_hdr->control.packet_type = 0; - if (control->flags & IEEE80211_TX_CTL_NO_ACK) + /* Also disable retry and ACK policy for injected packets */ + if ((control->flags & IEEE80211_TX_CTL_NO_ACK) || + (control->flags & IEEE80211_TX_CTL_INJECTED)) { + tx_hdr->control.rate_policy = 1; tx_hdr->control.ack_policy = 1; + } tx_hdr->control.tx_complete = 1; @@ -422,6 +426,7 @@ static void wl1251_tx_packet_cb(struct wl1251 *wl, info = IEEE80211_SKB_CB(skb); if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) && + !(info->flags & IEEE80211_TX_CTL_INJECTED) && (result->status == TX_SUCCESS)) info->flags |= IEEE80211_TX_STAT_ACK;