From patchwork Wed Dec 1 15:34:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 371541 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 oB1FZ4is003104 for ; Wed, 1 Dec 2010 15:35:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752344Ab0LAPfD (ORCPT ); Wed, 1 Dec 2010 10:35:03 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:55250 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992Ab0LAPfC (ORCPT ); Wed, 1 Dec 2010 10:35:02 -0500 Received: by bwz15 with SMTP id 15so6231476bwz.19 for ; Wed, 01 Dec 2010 07:35:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=cmclaixTxh/ecdi56OAMQ68MpqanDOhI5A0oNyOdpLc=; b=FK7+X19PrIxWTdbpfPBhxpRUIQGw091AgLNx/6ku69Aj4+hb+Tc1PLjCDqL6yO3nYS DzugNf3lgISwOJKT9tvab+DOgLIQwDLArhGtFXxdrgwA00PNqTPaesc4+Ui4PQKTdm1w xWLxxPBLPq+nABn+Vv45icgEa5476s57jAQgU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=t417ZGD51SrQHYJGdtSs54fdqNL1ncZwrE51XW9AC3fveBZ5i2isiTGndHfIkvcmXL 0aB8C/OrjxlnwsvntAeu06C8CDxTFkHVMSS83ye7uPaBSb+E4L5nWi/WlO8IV2m8MaDZ eSOe4d5yujUec5F5uAHWTt/+ChiEXyDZo2l+g= Received: by 10.204.100.70 with SMTP id x6mr8580787bkn.64.1291217699660; Wed, 01 Dec 2010 07:34:59 -0800 (PST) Received: from localhost.localdomain (p5495FE7F.dip.t-dialin.net [84.149.254.127]) by mx.google.com with ESMTPS id p22sm3469847bkp.9.2010.12.01.07.34.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 01 Dec 2010 07:34:58 -0800 (PST) From: Helmut Schaa To: "John W. Linville" Cc: linux-wireless@vger.kernel.org, shafi.wireless@gmail.com, Helmut Schaa , Johannes Berg Subject: [PATCHv2] mac80211: Update last_tx_rate only for data frames Date: Wed, 1 Dec 2010 16:34:45 +0100 Message-Id: <1291217685-26755-1-git-send-email-helmut.schaa@googlemail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1291202302-9698-1-git-send-email-helmut.schaa@googlemail.com> References: <1291202302-9698-1-git-send-email-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 (demeter1.kernel.org [140.211.167.41]); Wed, 01 Dec 2010 15:35:05 +0000 (UTC) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index e694836..41bfbbf 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -666,10 +666,11 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) if (unlikely(info->control.rates[0].idx < 0)) return TX_DROP; - if (txrc.reported_rate.idx < 0) + if (txrc.reported_rate.idx < 0) { txrc.reported_rate = info->control.rates[0]; - - if (tx->sta) + if (tx->sta && ieee80211_is_data(hdr->frame_control)) + tx->sta->last_tx_rate = txrc.reported_rate; + } else if (tx->sta) tx->sta->last_tx_rate = txrc.reported_rate; if (unlikely(!info->control.rates[0].count))