From patchwork Tue Apr 22 00:09:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 4027681 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AAADA9F391 for ; Tue, 22 Apr 2014 00:10:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC685202B8 for ; Tue, 22 Apr 2014 00:10:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D5EA720265 for ; Tue, 22 Apr 2014 00:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754298AbaDVAK2 (ORCPT ); Mon, 21 Apr 2014 20:10:28 -0400 Received: from mail-ee0-f50.google.com ([74.125.83.50]:43433 "EHLO mail-ee0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754083AbaDVAK0 (ORCPT ); Mon, 21 Apr 2014 20:10:26 -0400 Received: by mail-ee0-f50.google.com with SMTP id c13so4070591eek.9 for ; Mon, 21 Apr 2014 17:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=35r3nVNnpw3pVUOoNN83yKL6NhnsY7VUpScdE73AVxc=; b=fDyXEQOA7ZlT0TBnwtlL9fbjVffI5VRQwnncRRHmYPjVpPv5EbEzF2ZceLBdXQqI1v XlFL7a+3Z4YJ9hwKO/ysKz1URkuz7H0gOO7eJVdHJZrbX/99nFBnG2yVR7VQPmE08ar7 ZSU4Kl30ATG9fODleg9Bfn3OJfnoZevp702cd7lscW6xzkmsBD+Lq/bqkVShkPbigrVp xnL5vxn+yhr6q237cVKghao8vWfNJw6cdgNFwESlaV+SE4QKP7WqbxUXmMKo/ekyQvys TDzqQ+cEqSekzmQZk40nOe1nh2+fL0n6mZ9I1I/98ydkgCoVgAvY74RCLzkOkjSDLhfs Xx6Q== X-Received: by 10.14.69.201 with SMTP id n49mr86651eed.106.1398125424905; Mon, 21 Apr 2014 17:10:24 -0700 (PDT) Received: from localhost.localdomain (ip-88-119-226-136.static.b4net.lt. [88.119.226.136]) by mx.google.com with ESMTPSA id x45sm107851788eef.15.2014.04.21.17.10.23 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 17:10:24 -0700 (PDT) From: Grazvydas Ignotas To: linux-wireless@vger.kernel.org, "John W. Linville" Cc: Pavel Machek , =?UTF-8?q?Pali=20Roh=C3=A1r?= , David Gnedt , Grazvydas Ignotas Subject: [PATCH 1/4] Revert "wl1251: enforce changed hw encryption support on monitor state change" Date: Tue, 22 Apr 2014 03:09:52 +0300 Message-Id: <1398125395-5579-2-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398125395-5579-1-git-send-email-notasas@gmail.com> References: <1398125395-5579-1-git-send-email-notasas@gmail.com> 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, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 b90a1165a72fabdc260abaa9eeadcbfd29e267eb. That commit (or rather, hack) triggers a scary WARN in IBSS (ad-hoc) mode. Steps to reproduce: ifconfig wlan0 down iwconfig wlan0 mode ad-hoc ifconfig wlan0 up ------------[ cut here ]------------ WARNING: CPU: 0 PID: 905 at kernel/workqueue.c:1400 __queue_work+0x21c/0x2f4() Modules linked in: wl1251_sdio wl1251 mac80211 cfg80211 CPU: 0 PID: 905 Comm: ifconfig Not tainted 3.15.0-rc2#233 [] (unwind_backtrace) from [] [] (show_stack) from [] [] (dump_stack) from [] [] (warn_slowpath_common) from [] [] (warn_slowpath_null) from [] [] (__queue_work) from [] [] (queue_work_on) from [] [] (wl1251_op_config [wl1251]) [] (ieee80211_hw_config [mac80211]) ... This happens because ieee80211_connection_loss() is not expected to be called in IBSS mode (mac80211 ends up queuing uninitialized work in that case). Signed-off-by: Grazvydas Ignotas --- drivers/net/wireless/ti/wl1251/main.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index 757e257..c22e225 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c @@ -687,16 +687,6 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) wl->power_level = conf->power_level; } - /* - * Tell stack that connection is lost because hw encryption isn't - * supported in monitor mode. - * This requires temporary enabling of the hw connection monitor flag - */ - if ((changed & IEEE80211_CONF_CHANGE_MONITOR) && wl->vif) { - wl->hw->flags |= IEEE80211_HW_CONNECTION_MONITOR; - ieee80211_connection_loss(wl->vif); - } - out_sleep: wl1251_ps_elp_sleep(wl); @@ -1129,9 +1119,6 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, } if (changed & BSS_CHANGED_ASSOC) { - /* Disable temporary enabled hw connection monitor flag */ - wl->hw->flags &= ~IEEE80211_HW_CONNECTION_MONITOR; - if (bss_conf->assoc) { wl->beacon_int = bss_conf->beacon_int;