From patchwork Mon Jun 30 16:18:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Merello X-Patchwork-Id: 4452891 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 9E8ECBEEAA for ; Mon, 30 Jun 2014 16:19:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB565202F8 for ; Mon, 30 Jun 2014 16:19:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F223C202DD for ; Mon, 30 Jun 2014 16:19:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932125AbaF3QTM (ORCPT ); Mon, 30 Jun 2014 12:19:12 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:52965 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932114AbaF3QTK (ORCPT ); Mon, 30 Jun 2014 12:19:10 -0400 Received: by mail-we0-f174.google.com with SMTP id u57so8240730wes.5 for ; Mon, 30 Jun 2014 09:19:09 -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=iP0yxaM4kEUuULxkvU8rUCD5XnbWt4wFpcIgPODYPL4=; b=Dt1OC5CTQQBIb92Ejf5hfPZSVrREtwj/WG5h8u56O8V8a6bxdlBT7l0OQDgIBMFHhw n+UWc0I0Y+iCAutpd53BafVTpFhcUcIyK7SAvzpoStG40jspoS01CDM+63oim4C3G/mj 0kDv683prHGpgwlwmswoSODuzfdxGL4U2Cx7QIZ3uawuqxcJZDFJOyTAWtS82xS3ko4A KhAyesWq6ndXoR2aoXpAw5+rcktZ+ve2fV1xmjS/06udy5FmH8KPzJb/vWj+0fc5Rv0/ 1N4/Vr8LnB+4r3FXJsSqMe47YEHDeJu3luSKwMKn/iOWwJriX0pJleK3uFcT519AWBSi rrsQ== X-Received: by 10.180.74.9 with SMTP id p9mr30639307wiv.39.1404145149204; Mon, 30 Jun 2014 09:19:09 -0700 (PDT) Received: from localhost.localdomain (host174-123-dynamic.6-79-r.retail.telecomitalia.it. [79.6.123.174]) by mx.google.com with ESMTPSA id v17sm42228402wjr.33.2014.06.30.09.19.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Jun 2014 09:19:08 -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 4/7] rtl8180: fix incorrect TX retry. Date: Mon, 30 Jun 2014 18:18:55 +0200 Message-Id: <1404145135-16076-1-git-send-email-andrea.merello@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 HW is programmed with wrong retry count value for TX: Mac80211 passes to driver the number of times the TX should be attempted. The HW, instead, wants the number of time the TX should be retried if it fails the first time (assuming we have to TX it at least one time). This patch correct this. Signed-off-by: Andrea Merello --- drivers/net/wireless/rtl818x/rtl8180/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c index 8a64bc1..4f4fcf8 100644 --- a/drivers/net/wireless/rtl818x/rtl8180/dev.c +++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c @@ -542,7 +542,7 @@ static void rtl8180_tx(struct ieee80211_hw *dev, entry->flags2 = info->control.rates[1].idx >= 0 ? ieee80211_get_alt_retry_rate(dev, info, 0)->bitrate << 4 : 0; - entry->retry_limit = info->control.rates[0].count; + entry->retry_limit = info->control.rates[0].count - 1; /* We must be sure that tx_flags is written last because the HW * looks at it to check if the rest of data is valid or not