From patchwork Tue Oct 27 15:36:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 56121 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9RFahbp019481 for ; Tue, 27 Oct 2009 15:36:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755625AbZJ0Pgd (ORCPT ); Tue, 27 Oct 2009 11:36:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755601AbZJ0Pgc (ORCPT ); Tue, 27 Oct 2009 11:36:32 -0400 Received: from smtp.nokia.com ([192.100.122.230]:34227 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755559AbZJ0Pgc (ORCPT ); Tue, 27 Oct 2009 11:36:32 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9RFaPFk027390; Tue, 27 Oct 2009 17:36:26 +0200 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 27 Oct 2009 17:36:25 +0200 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 27 Oct 2009 17:36:24 +0200 Received: from [127.0.1.1] (essapo-nirac2531.europe.nokia.com [10.162.253.1]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9RFaKa4031493; Tue, 27 Oct 2009 17:36:21 +0200 From: Kalle Valo Subject: [PATCH v2 2/3] mac80211: fix dynamic power save for devices with nullfunc support in hw To: linville@tuxdriver.com Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org Date: Tue, 27 Oct 2009 17:36:17 +0200 Message-ID: <20091027153616.27827.46490.stgit@tikku> In-Reply-To: <20091027153608.27827.70629.stgit@tikku> References: <20091027153608.27827.70629.stgit@tikku> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 X-OriginalArrivalTime: 27 Oct 2009 15:36:24.0602 (UTC) FILETIME=[3DCC67A0:01CA571B] X-Nokia-AV: Clean Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index c59ed84..66dab40 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1390,7 +1390,11 @@ static int ieee80211_skb_resize(struct ieee80211_local *local, static bool need_dynamic_ps(struct ieee80211_local *local) { /* driver doesn't support power save */ - if (!(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)) + if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS)) + return false; + + /* hardware does dynamic power save */ + if (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS) return false; /* dynamic power save disabled */