From patchwork Wed Dec 1 11:18:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 370971 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 oB1BIdIk025009 for ; Wed, 1 Dec 2010 11:18:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752905Ab0LALSi (ORCPT ); Wed, 1 Dec 2010 06:18:38 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:34802 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752745Ab0LALSh (ORCPT ); Wed, 1 Dec 2010 06:18:37 -0500 Received: by bwz15 with SMTP id 15so5996245bwz.19 for ; Wed, 01 Dec 2010 03:18:36 -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; bh=QmJjuEuAHsVFVblWnJU70DQr5pvG+zPv2t3SrjDbkm8=; b=FeFimwCSvQw0ByRSp8fktXNTVFzLfhbeSXMd5tz7ydDW0d8X827Fn29D9I2UodWCkF hMcrSksnxRYf4VC1VwrDbBRdFsz3BBYW+6cj1VmniSCWmHxKDpFVi+daQ7EEq5emoS+d Dr4xsQyk8hf9z52SXRHOtAlpXTdDOlae6tbMU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=iyL+PDLWEEub4QdDrNrDm5y/oSRjDh4RVGJ4LaKFAkhxRPk7Eg2RrUM6H2cgwvLMp5 GdZCX0vLeBoSiiiLbBclII9dn5ivkk5QocBviCWMLjWwy1t10i4fEeBpiPGpUFrEraCC sPtk/Q+IbRc/2tgp4jcKch45GTwVPeWC1Rv6I= Received: by 10.204.72.207 with SMTP id n15mr8301032bkj.70.1291202315784; Wed, 01 Dec 2010 03:18:35 -0800 (PST) Received: from localhost.localdomain (p5495FE7F.dip.t-dialin.net [84.149.254.127]) by mx.google.com with ESMTPS id b17sm3316958bku.8.2010.12.01.03.18.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 01 Dec 2010 03:18:35 -0800 (PST) From: Helmut Schaa To: "John W. Linville" Cc: linux-wireless@vger.kernel.org, Helmut Schaa , Johannes Berg Subject: [PATCH] mac80211: Update last_tx_rate only for data frames Date: Wed, 1 Dec 2010 12:18:22 +0100 Message-Id: <1291202302-9698-1-git-send-email-helmut.schaa@googlemail.com> X-Mailer: git-send-email 1.7.1 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 11:18:40 +0000 (UTC) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index e694836..f753081 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -669,7 +669,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) 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; if (unlikely(!info->control.rates[0].count))