From patchwork Thu Nov 3 11:12:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 9410727 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF84860722 for ; Thu, 3 Nov 2016 11:12:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D08AF2A9D4 for ; Thu, 3 Nov 2016 11:12:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1CF72A9D6; Thu, 3 Nov 2016 11:12:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E2DB2A9D6 for ; Thu, 3 Nov 2016 11:12:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757339AbcKCLMv (ORCPT ); Thu, 3 Nov 2016 07:12:51 -0400 Received: from nbd.name ([46.4.11.11]:50187 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757237AbcKCLMu (ORCPT ); Thu, 3 Nov 2016 07:12:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Message-Id:Date:Subject:Cc:To:From; bh=sgGN8wX8sYTazeFga0bmWtsfljvYqtVX+KVZ4sOOdLQ=; b=r4Y2MHLII6G1TgUb/ke4VrbPmNdE1LpuR4AIxeZLiGLHengMD7DAxzrgFssDJYxNky72/Y04tMJDxbSy1ZjgEGbv+P/eevCQOGyzpUTwCnn1T/GIjONaVTtc5i0fRFi1qEbf8bFtoF2VpTv/83l+TGDAXjmXYfA44OKTYbpNtNs=; Received: by nf-4.local (Postfix, from userid 501) id C6EC1169629FF; Thu, 3 Nov 2016 12:12:47 +0100 (CET) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, emmanuel.grumbach@intel.com Subject: [PATCH] Revert "mac80211: allow using AP_LINK_PS with mac80211-generated TIM IE" Date: Thu, 3 Nov 2016 12:12:47 +0100 Message-Id: <20161103111247.18086-1-nbd@nbd.name> X-Mailer: git-send-email 2.10.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit c68df2e7be0c1238ea3c281fd744a204ef3b15a0. __sta_info_recalc_tim turns into a no-op if local->ops->set_tim is not set. This prevents the beacon TIM bit from being set for all drivers that do not implement this op (almost all of them), thus thoroughly essential AP mode powersave functionality. Cc: Emmanuel Grumbach Fixes: c68df2e7be0c ("mac80211: allow using AP_LINK_PS with mac80211-generated TIM IE") Signed-off-by: Felix Fietkau --- net/mac80211/sta_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 236d47e..1711bae 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -688,7 +688,7 @@ static void __sta_info_recalc_tim(struct sta_info *sta, bool ignore_pending) } /* No need to do anything if the driver does all */ - if (!local->ops->set_tim) + if (ieee80211_hw_check(&local->hw, AP_LINK_PS)) return; if (sta->dead)