From patchwork Sun Jan 30 19:11:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gnedt X-Patchwork-Id: 518241 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0UNUCQY007293 for ; Sun, 30 Jan 2011 23:32:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752806Ab1A3TLu (ORCPT ); Sun, 30 Jan 2011 14:11:50 -0500 Received: from mail.platinumzone24.at ([88.198.159.93]:38722 "EHLO mail.platinumzone24.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752771Ab1A3TLt (ORCPT ); Sun, 30 Jan 2011 14:11:49 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.platinumzone24.at (Postfix) with ESMTP id 77A4685004A; Sun, 30 Jan 2011 20:11:49 +0100 (CET) X-Virus-Scanned: amavisd-new at platinumzone24.at Received: from mail.platinumzone24.at ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6HWja4nZsB5n; Sun, 30 Jan 2011 20:11:40 +0100 (CET) Received: from [192.168.10.2] (212-183-124-82.adsl.highway.telekom.at [212.183.124.82]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: david.gnedt@platinumzone24.at) by mail.platinumzone24.at (Postfix) with ESMTP id BE1B1850050; Sun, 30 Jan 2011 20:11:28 +0100 (CET) Message-ID: <4D45B7DF.1030703@davizone.at> Date: Sun, 30 Jan 2011 20:11:27 +0100 From: David Gnedt User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: "John W. Linville" CC: linux-wireless@vger.kernel.org, Kalle Valo , Grazvydas Ignotas , "Denis 'GNUtoo' Carikli" Subject: [PATCH 18/18] wl1251: disable retry and ACK policy for injected packets References: <4D45A7BD.705@davizone.at> In-Reply-To: <4D45A7BD.705@davizone.at> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 30 Jan 2011 23:32:01 +0000 (UTC) diff --git a/drivers/net/wireless/wl1251/acx.c b/drivers/net/wireless/wl1251/acx.c index 38d33f0..435ed08 100644 --- a/drivers/net/wireless/wl1251/acx.c +++ b/drivers/net/wireless/wl1251/acx.c @@ -947,12 +947,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/wl1251/tx.c b/drivers/net/wireless/wl1251/tx.c index 1de4ccb..e559bc4 100644 --- a/drivers/net/wireless/wl1251/tx.c +++ b/drivers/net/wireless/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; @@ -414,6 +418,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;