From patchwork Thu May 6 10:29:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 97331 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o46AfFpG024690 for ; Thu, 6 May 2010 10:46:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753535Ab0EFKaM (ORCPT ); Thu, 6 May 2010 06:30:12 -0400 Received: from mail-bw0-f219.google.com ([209.85.218.219]:52386 "EHLO mail-bw0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753084Ab0EFKaK (ORCPT ); Thu, 6 May 2010 06:30:10 -0400 Received: by mail-bw0-f219.google.com with SMTP id 19so400457bwz.21 for ; Thu, 06 May 2010 03:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:subject:date:user-agent :mime-version:to:cc:content-type:content-transfer-encoding :message-id; bh=jJag+vs9gDPL3++zGRLAe1HAtLy1Kc6rhmNZN4XdRZo=; b=Yh2/S85DHL5QaJC4ltLqrcHISwa88cQ7gj4cjEHILDiLRUEC74xAcfdW9JVNhUbVXx 8j3SX79lt/Zrj7ncHYEjXgkg45DHL5IRVS586X817vo+bN02/g4nFf7GZIYIxnVT3xCq Uh39aeOFo6v8B5naPCpuWihG3MZ6cCWuDVPkY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:subject:date:user-agent:mime-version:to:cc:content-type :content-transfer-encoding:message-id; b=eLBFvaFdAvtFv/lSPpW1isGFBMuCK/J9CcVhPGrk4RXvZ2U5x9wjorma1j8ncQv5mQ 5yZalk4dLHyvnSspzLfF3LMJ8nLFlXrwHSS/Ilf8Vark9wO7z86qREKT+xkdtFrKhm+3 2vtl7sEvsLs5iwyUqLx3VnA4cAFe16D3g55cE= Received: by 10.204.141.133 with SMTP id m5mr1936565bku.91.1273141809927; Thu, 06 May 2010 03:30:09 -0700 (PDT) Received: from helmutmobil.localnet (p5495C929.dip.t-dialin.net [84.149.201.41]) by mx.google.com with ESMTPS id 15sm288045bwz.4.2010.05.06.03.30.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 06 May 2010 03:30:09 -0700 (PDT) From: Helmut Schaa Subject: [PATCH 3/3] rt2x00: rt2800: use correct txop value in tx descriptor Date: Thu, 6 May 2010 12:29:58 +0200 User-Agent: KMail/1.12.4 (Linux/2.6.34-rc5-wl-default; KDE/4.3.5; x86_64; ; ) MIME-Version: 1.0 To: John Linville Cc: linux-wireless@vger.kernel.org, Ivo van Doorn , Gertjan van Wingerde Message-Id: <201005061229.58509.helmut.schaa@googlemail.com> 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.3 (demeter.kernel.org [140.211.167.41]); Thu, 06 May 2010 10:47:07 +0000 (UTC) diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index f08b6a3..df2c3fb 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c @@ -643,7 +643,7 @@ static int rt2800pci_write_tx_data(struct queue_entry* entry, rt2x00_set_field32(&word, TXWI_W0_AMPDU, test_bit(ENTRY_TXD_HT_AMPDU, &txdesc->flags)); rt2x00_set_field32(&word, TXWI_W0_MPDU_DENSITY, txdesc->mpdu_density); - rt2x00_set_field32(&word, TXWI_W0_TX_OP, txdesc->ifs); + rt2x00_set_field32(&word, TXWI_W0_TX_OP, txdesc->txop); rt2x00_set_field32(&word, TXWI_W0_MCS, txdesc->mcs); rt2x00_set_field32(&word, TXWI_W0_BW, test_bit(ENTRY_TXD_HT_BW_40, &txdesc->flags)); diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index e3f3a97..c9e1320 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c @@ -417,7 +417,7 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, rt2x00_set_field32(&word, TXWI_W0_AMPDU, test_bit(ENTRY_TXD_HT_AMPDU, &txdesc->flags)); rt2x00_set_field32(&word, TXWI_W0_MPDU_DENSITY, txdesc->mpdu_density); - rt2x00_set_field32(&word, TXWI_W0_TX_OP, txdesc->ifs); + rt2x00_set_field32(&word, TXWI_W0_TX_OP, txdesc->txop); rt2x00_set_field32(&word, TXWI_W0_MCS, txdesc->mcs); rt2x00_set_field32(&word, TXWI_W0_BW, test_bit(ENTRY_TXD_HT_BW_40, &txdesc->flags)); diff --git a/drivers/net/wireless/rt2x00/rt2x00ht.c b/drivers/net/wireless/rt2x00/rt2x00ht.c index 1056c92..5483fec 100644 --- a/drivers/net/wireless/rt2x00/rt2x00ht.c +++ b/drivers/net/wireless/rt2x00/rt2x00ht.c @@ -66,4 +66,6 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry, __set_bit(ENTRY_TXD_HT_BW_40, &txdesc->flags); if (txrate->flags & IEEE80211_TX_RC_SHORT_GI) __set_bit(ENTRY_TXD_HT_SHORT_GI, &txdesc->flags); + + txdesc->txop = TXOP_HTTXOP; } diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index 94a48c1..36a957a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h @@ -299,6 +299,7 @@ enum txentry_desc_flags { * @retry_limit: Max number of retries. * @aifs: AIFS value. * @ifs: IFS value. + * @txop: IFS value for 11n capable chips. * @cw_min: cwmin value. * @cw_max: cwmax value. * @cipher: Cipher type used for encryption. @@ -328,6 +329,7 @@ struct txentry_desc { short retry_limit; short aifs; short ifs; + short txop; short cw_min; short cw_max; diff --git a/drivers/net/wireless/rt2x00/rt2x00reg.h b/drivers/net/wireless/rt2x00/rt2x00reg.h index 603bfc0..894ff78 100644 --- a/drivers/net/wireless/rt2x00/rt2x00reg.h +++ b/drivers/net/wireless/rt2x00/rt2x00reg.h @@ -101,6 +101,16 @@ enum ifs { }; /* + * IFS values for HT devices + */ +enum txop { + TXOP_HTTXOP = 0, + TXOP_PIFS = 1, + TXOP_SIFS = 2, + TXOP_BACKOFF = 3, +}; + +/* * Cipher types for hardware encryption */ enum cipher {