From patchwork Wed Oct 13 22:20:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Stewart X-Patchwork-Id: 251511 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 o9DMmtvr023576 for ; Wed, 13 Oct 2010 22:49:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753639Ab0JMWs4 (ORCPT ); Wed, 13 Oct 2010 18:48:56 -0400 Received: from smtp-out.google.com ([74.125.121.35]:5190 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753614Ab0JMWsy (ORCPT ); Wed, 13 Oct 2010 18:48:54 -0400 Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id o9DMmrNE012870 for ; Wed, 13 Oct 2010 15:48:53 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1287010133; bh=mdTiA2IhhlGBtyRt1JAWMwHw/n8=; h=From:Date:Subject:To:Message-Id; b=kPTbSs5H1IPhFnEzg3H2/QPMxxXVLRBp0Ux8DAsJ9uC+R/zoVOkTUka9qLWUuiw8D 8gN3yLyCFi9hgmntndqvA== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=from:date:subject:to:message-id:x-system-of-record; b=cN7LZwUCdjPx2OScWkEpj/IRLg2k5ZfB4vj7rZT6OH4il8qZss4T9FR02oMvMR/6+ mZWn6bYdU+VrKbxus7w1g== Received: from glenhelen.mtv.corp.google.com (glenhelen.mtv.corp.google.com [172.22.72.223]) by wpaz33.hot.corp.google.com with ESMTP id o9DMmq0v017360 for ; Wed, 13 Oct 2010 15:48:52 -0700 Received: by glenhelen.mtv.corp.google.com (Postfix, from userid 110058) id C946720664; Wed, 13 Oct 2010 15:48:51 -0700 (PDT) From: Paul Stewart Date: Wed, 13 Oct 2010 15:20:26 -0700 Subject: [PATCH 5/6] Schedule work proc when output bitrate changes To: linux-wireless@vger.kernel.org Message-Id: <20101013224851.C946720664@glenhelen.mtv.corp.google.com> X-System-Of-Record: true 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, 13 Oct 2010 22:49:11 +0000 (UTC) diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 3153c19..0148c50 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -154,6 +154,20 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb) } ieee80211_queue_work(&local->hw, &local->recalc_smps); + } else if (ieee80211_is_data(mgmt->frame_control) && + sdata->vif.type == NL80211_IFTYPE_STATION) { + struct ieee80211_bss_conf *bss_conf; + struct ieee80211_if_managed *ifmgd; + bss_conf = &sta->sdata->vif.bss_conf; + ifmgd = &sta->sdata->u.mgd; + if (bss_conf->cqm_bitrate_thold != 0 && + (memcmp(&ifmgd->last_cqm_tx_rate, &sta->last_tx_rate, + sizeof(ifmgd->last_cqm_tx_rate)) != 0 || + sdata->u.mgd.last_cqm_bitrate == 0)) { + ifmgd->last_cqm_tx_rate = sta->last_tx_rate; + ifmgd->flags |= IEEE80211_STA_TX_RATE_CHANGED; + ieee80211_queue_work(&local->hw, &local->rate_notify); + } } }