From patchwork Tue Oct 29 22:11:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Copeland X-Patchwork-Id: 3111861 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DA44ABF924 for ; Tue, 29 Oct 2013 22:14:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 705A7201F5 for ; Tue, 29 Oct 2013 22:14:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7A6C2201F4 for ; Tue, 29 Oct 2013 22:14:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751495Ab3J2WOV (ORCPT ); Tue, 29 Oct 2013 18:14:21 -0400 Received: from mail-qa0-f51.google.com ([209.85.216.51]:50789 "EHLO mail-qa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750974Ab3J2WOU (ORCPT ); Tue, 29 Oct 2013 18:14:20 -0400 Received: by mail-qa0-f51.google.com with SMTP id ii20so412973qab.17 for ; Tue, 29 Oct 2013 15:14:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=i3A3wS7/scNQC0JQacUdJePvrE1cj2CoD+cJ4caZctQ=; b=J5qJc5lnq8nJlnbec4nVToQt61xuFOKJFiy4+wMoQBahOkw4NEqYCOFmJxS0FfWWCs 0j8Ue9YvXX+shmpSDH1aP998IIaR+otPyHay/jv+VC9MneJiKt5ciozeCxPfquMHz2jf IOfgbEH0bOktOtKKB3HeGsht340p4mf4Xs8E+X8OS3QU9d+qicLwaj0psHnY9yt7my4P smimpIwLo1UDCdRE3RoGW9PEiIFUeoTRgEA/oFBByXQrtwUlRYG/wjREFkTOvclDfl+7 OrBwvsZagMpyuRA0RVov0bxL1DgeLe0h9+Vcofc0xlBRinusTV5+qKh3SRI6u7sP9qmh GzJw== X-Gm-Message-State: ALoCoQl5IZZvq4K7QYCHzj3FH2C19iy5GGdcrR6KVCXtff1VXonbumkscFUBloNmyOc+0u8/vTNP X-Received: by 10.49.109.194 with SMTP id hu2mr2547275qeb.13.1383084860340; Tue, 29 Oct 2013 15:14:20 -0700 (PDT) Received: from hash (CPE0018e7fe5281-CM78cd8ec60a0d.cpe.net.cable.rogers.com. [99.242.215.162]) by mx.google.com with ESMTPSA id 5sm69877529qao.3.2013.10.29.15.14.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 29 Oct 2013 15:14:19 -0700 (PDT) Received: from bob by hash with local (Exim 4.80) (envelope-from ) id 1VbHWY-0006vk-Q1; Tue, 29 Oct 2013 18:12:30 -0400 From: Bob Copeland To: johannes@sipsolutions.net, Chun-Yeow Yeoh Cc: linux-wireless@vger.kernel.org, Bob Copeland Subject: [PATCH] Revert "mac80211: allow disable power save in mesh" Date: Tue, 29 Oct 2013 18:11:59 -0400 Message-Id: <1383084719-26610-1-git-send-email-me@bobcopeland.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit ee1f668136b2fb6640ee2d54c2a525ea41f98211. The aformentioned commit added a check to allow 'iw wlan0 set power_save off' to work for mesh interfaces. However, this is problematic because it also allows 'iw wlan0 set power_save on', which will crash in short order because all of the subsequent code manipulates sdata->u.mgd. The power-saving states for mesh interfaces can be manipulated through the mesh config, e.g: 'iw wlan0 set mesh_param mesh_power_save=active' (which, despite the name, actualy disables power saving since the setting refers to the type of sleep the interface undergoes). Signed-off-by: Bob Copeland --- Chun-Yeow, I ran into the above mentioned crash when playing with mesh PS. Can you clarify how the original patch helped? net/mac80211/cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index ed1e9a8..478211c 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2488,8 +2488,7 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); - if (sdata->vif.type != NL80211_IFTYPE_STATION && - sdata->vif.type != NL80211_IFTYPE_MESH_POINT) + if (sdata->vif.type != NL80211_IFTYPE_STATION) return -EOPNOTSUPP; if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS))