From patchwork Wed Apr 10 22:41:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 2423911 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4C3983FD8C for ; Wed, 10 Apr 2013 22:43:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932544Ab3DJWnP (ORCPT ); Wed, 10 Apr 2013 18:43:15 -0400 Received: from mail-da0-f48.google.com ([209.85.210.48]:35963 "EHLO mail-da0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761650Ab3DJWnO (ORCPT ); Wed, 10 Apr 2013 18:43:14 -0400 Received: by mail-da0-f48.google.com with SMTP id p8so399803dan.35 for ; Wed, 10 Apr 2013 15:43:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=kqt2wHduBC7OZWHpTsUGP2jytOdv+wxkLSbAraPLQCI=; b=MGi/gdpCYNFDml2+pOM4cQpeQdsGeCG3+FqS7u15P5CMGVyyGS2wbXv8S0Wg8/2VYh EaSRoi+RobCTiKEsG+Q5Uvej4TRoRb1u1tjmRyla+Iv0dfdYGBR36E+vLNNWdXdA7M3t D1rz4l2FtVv4qX6DObhmiRbUkA1ZqDakjNQF7EdzUe+qLr9DKjgRCSXNiuGxVEsWHs3b kjosw1Yu2bW1Cmp9C7iuvClV5oMZ15/WI0ueDjCfZ85UJLf4UHRfQ9WbIqTgucinEEsL AsEEzoxQveGQ0LRpoi5QF1lFT/ZlChxAeAqgeacdcdOeXEkYF3Z6hDqjWjs5H6W1p9NR sgmw== X-Received: by 10.68.197.195 with SMTP id iw3mr5344185pbc.177.1365633793979; Wed, 10 Apr 2013 15:43:13 -0700 (PDT) Received: from cable.lan (70-35-43-50.static.wiline.com. [70.35.43.50]) by mx.google.com with ESMTPS id ux10sm2145397pab.1.2013.04.10.15.43.11 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 15:43:12 -0700 (PDT) From: Thomas Pedersen To: Johannes Berg Cc: linux-wirelss , open80211s , Thomas Pedersen Subject: [PATCH] mac80211: fix ieee80211_queue_stopped() Date: Wed, 10 Apr 2013 15:41:40 -0700 Message-Id: <1365633700-16509-1-git-send-email-thomas@cozybit.com> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQkLgka7oZdXg4/C5E0vZs0Sdq7L4XIWbU1RbYUCKW+Qqg851IGIqDeWfh9c16wN5YM5x6XF Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Johannes Berg notes mac80211 drivers which use ieee80211_queue_stopped() really only want to know if they previously requested a queue stop. Signed-off-by: Thomas Pedersen --- net/mac80211/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 447e665..53e9d8a 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -485,7 +485,8 @@ int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue) return true; spin_lock_irqsave(&local->queue_stop_reason_lock, flags); - ret = !!local->queue_stop_reasons[queue]; + ret = !!(local->queue_stop_reasons[queue] & + IEEE80211_QUEUE_STOP_REASON_DRIVER); spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); return ret; }