From patchwork Tue Nov 19 16:12:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karl Beldan X-Patchwork-Id: 3203231 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 D39979F3A0 for ; Tue, 19 Nov 2013 16:13:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 36829202EA for ; Tue, 19 Nov 2013 16:13:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0931E202DD for ; Tue, 19 Nov 2013 16:13:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751624Ab3KSQND (ORCPT ); Tue, 19 Nov 2013 11:13:03 -0500 Received: from mail-we0-f170.google.com ([74.125.82.170]:51797 "EHLO mail-we0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751421Ab3KSQNB (ORCPT ); Tue, 19 Nov 2013 11:13:01 -0500 Received: by mail-we0-f170.google.com with SMTP id w61so4264612wes.15 for ; Tue, 19 Nov 2013 08:12:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=jttbeoknicqKkOT6Z6ImKJtV/AXZ//vlPcTTX3LdmgM=; b=YQ7jjUxZdW0agYvZWnmvVryjyHEBv+8eh+5bFW+luNjHIhBgmbg5xBMWEX7KvIns+1 mc0RQ17MVyCFxQ354LHpPFp1Cx+c9CWSssqM5OR3Gg0rUBhDrUAIWVLzI5m7wDJ1N0bB NpwrtOyl5wM6XuBeamLsbcljmNjmFO3JCZZ3BauyQ8HPFUeRz6Rz+QcLRGGH/YTbYlGm JZA8opDspfYkDJiNrLKS2WP+UDUZ3IwYLIEIwCubLX6654q9afXI6BlQvxykUpkeVqwy CzXp4AnAXGQ4RXSAEtMSe4xkCSvRTmAiu8F7r685NHzezfsEeVXmzQOLuXuJa8HvyVal kr7g== X-Received: by 10.180.183.72 with SMTP id ek8mr21945428wic.49.1384877578530; Tue, 19 Nov 2013 08:12:58 -0800 (PST) Received: from magnum.frso.rivierawaves.com (ppp-seco11pa2-46-193-143.43.wb.wifirst.net. [46.193.143.43]) by mx.google.com with ESMTPSA id f15sm22295778wik.6.2013.11.19.08.12.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2013 08:12:58 -0800 (PST) From: Karl Beldan To: Johannes Berg Cc: linux-wireless , Karl Beldan Subject: [PATCH] mac80211: set hw initial idle state Date: Tue, 19 Nov 2013 17:12:05 +0100 Message-Id: <1384877525-23221-1-git-send-email-karl.beldan@gmail.com> X-Mailer: git-send-email 1.8.2 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.3 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 From: Karl Beldan ATM, the first call of ieee80211_do_open will configure the hw as non-idle, even if the interface being brought up is not a monitor, and this leads to inconsistent sequences like: register_hw() do_open(sta) hw_config(non-idle) (.. sta is non-idle ..) scan(sta) hw_config(idle) (after scan finishes) do_stop(sta) do_open(sta) (.. sta is idle ..) Signed-off-by: Karl Beldan --- net/mac80211/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac80211/main.c b/net/mac80211/main.c index bdb0b6c..3ef7fc3 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -995,6 +995,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n", result); + local->hw.conf.flags = IEEE80211_CONF_IDLE; + ieee80211_led_init(local); rtnl_lock();