From patchwork Thu Sep 8 12:37:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivo van Doorn X-Patchwork-Id: 1129462 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p88CdUIn026435 for ; Thu, 8 Sep 2011 12:39:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932658Ab1IHMjd (ORCPT ); Thu, 8 Sep 2011 08:39:33 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:38572 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932621Ab1IHMjb (ORCPT ); Thu, 8 Sep 2011 08:39:31 -0400 Received: by mail-ew0-f46.google.com with SMTP id 4so268175ewy.19 for ; Thu, 08 Sep 2011 05:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=GnsmjpXGVs357A6VQ7VfkWxF3cKXplkkg1/lyh1xZkY=; b=povyf8I+tobKvoehwwncMZZCr8KkrzbrWSC6fq1MomBmbtOz7FOMO/37fzIp9i4Cr1 CcJqV1rNkvzMQA1WXgjOtaQrMQUwkXs3v01elLMfZ8x+j78EdZDbhivzKUL4QzZVO3id Z6VNSrtJ4sRRLN0UY4oJZWU3NopNRM2sx4Jjo= Received: by 10.213.112.200 with SMTP id x8mr271500ebp.43.1315485570887; Thu, 08 Sep 2011 05:39:30 -0700 (PDT) Received: from localhost.localdomain (g121037.upc-g.chello.nl [80.57.121.37]) by mx.google.com with ESMTPS id d12sm6401406eeb.8.2011.09.08.05.39.29 (version=SSLv3 cipher=OTHER); Thu, 08 Sep 2011 05:39:30 -0700 (PDT) From: Ivo van Doorn To: "John W. Linville" Subject: [PATCH 4/7] rt2x00: Add WCID to HT TX descriptor Date: Thu, 8 Sep 2011 14:37:19 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.x86_64; KDE/4.4.5; x86_64; ; ) Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com References: <201109081434.23635.IvDoorn@gmail.com> <201109081436.05113.IvDoorn@gmail.com> <201109081436.46401.IvDoorn@gmail.com> In-Reply-To: <201109081436.46401.IvDoorn@gmail.com> MIME-Version: 1.0 Message-Id: <201109081437.20667.IvDoorn@gmail.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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 08 Sep 2011 12:39:42 +0000 (UTC) From: Helmut Schaa When sending an unencrypted frame to a STA the driver might want to pass a suitable WCID since we don't have a key index to allow tx status reports to get properly assigned to the correct STA. Signed-off-by: Helmut Schaa Signed-off-by: Ivo van Doorn --- drivers/net/wireless/rt2x00/rt2x00queue.c | 7 ++++++- drivers/net/wireless/rt2x00/rt2x00queue.h | 1 + 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index c44adb1..ba0d7e6 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c @@ -288,11 +288,16 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev, struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); struct ieee80211_tx_rate *txrate = &tx_info->control.rates[0]; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; + struct rt2x00_sta *sta_priv = NULL; - if (tx_info->control.sta) + if (tx_info->control.sta) { txdesc->u.ht.mpdu_density = tx_info->control.sta->ht_cap.ampdu_density; + sta_priv = sta_to_rt2x00_sta(tx_info->control.sta); + txdesc->u.ht.wcid = sta_priv->wcid; + } + txdesc->u.ht.ba_size = 7; /* FIXME: What value is needed? */ /* diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index f22aa86..349008d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h @@ -321,6 +321,7 @@ struct txentry_desc { u8 ba_size; u8 mpdu_density; enum txop txop; + int wcid; } ht; } u;