From patchwork Mon Jun 22 11:43:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 6655151 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5A7A29F536 for ; Mon, 22 Jun 2015 11:43:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F418205E2 for ; Mon, 22 Jun 2015 11:43:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E1978205E4 for ; Mon, 22 Jun 2015 11:43:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755888AbbFVLnf (ORCPT ); Mon, 22 Jun 2015 07:43:35 -0400 Received: from mail-lb0-f177.google.com ([209.85.217.177]:33932 "EHLO mail-lb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754331AbbFVLnd (ORCPT ); Mon, 22 Jun 2015 07:43:33 -0400 Received: by lbnk3 with SMTP id k3so782547lbn.1 for ; Mon, 22 Jun 2015 04:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=d3K6rKLMUty7kN41KGD9VzsaP1IvO6RoBUUPEuohkVs=; b=YanQscfNpdiL8zzCa6pO4XxDyd92IbqGAP815QG85Q1ZI9frPr+8mcq++mSd1uZLi0 zOCzNm7sdl0RLlG0doKmP/wsddo2ISyQwyDC7Azr44RsHQp7plX9N7oAkFnPCxPsvgNB PsQxFlj6MOWcVmdFfVa0SwXJdT7kLvOJsmImo= 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:in-reply-to :references; bh=d3K6rKLMUty7kN41KGD9VzsaP1IvO6RoBUUPEuohkVs=; b=LENGnSz+gVLZLEf/HKenoU0f0f6eGTYFgTUz3FyyLIPfp8ln21ahFhEtZ9GGwqaQBA FZuKaFOGSzmS5f/Ugs345VmAf7NqDuFabOembnsurMuEj0Rin3yeXiq0A6pzqonLd3rC QdWcMxm+xAIWtjpffpliEXBaqyjnU/1iB6WBQy+yJOf8yEaBbXUG+bMh/o+Mf5TBVll5 UN09Wkvm00APNyMEmWVYOjA44AnqZpvFA6YEKJCTjbmMnJlr7VjzMy48Mz0w3npWSXmT 9Q71ptLNqMde72fBLD2vzz+2eqgI4kPBGEd7Cb4knrWWym+m4wv5T1sAf+Ij2qF5Qow2 aRwQ== X-Gm-Message-State: ALoCoQm/ZyIRoV975PIUsW/HL7Wqpfk6wEVflDldFlSjKEEUz4EOqvjDXVce5QNu9Qn5lPcBazM+tzCWHVnsuMpCxRm+UqIw4Nxhb8YVZGNXcZN6H+9MVZmm2oIWTTIw6gNdA9SBlhDRYYCEwRbaa1e0DKoS8r/xH6jY/EzdwuhSo6FESmPaYz0mXFxf+KaLUixyqxPFvGXE X-Received: by 10.112.136.166 with SMTP id qb6mr30136522lbb.54.1434973412273; Mon, 22 Jun 2015 04:43:32 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id cq1sm2442725lad.18.2015.06.22.04.43.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Jun 2015 04:43:31 -0700 (PDT) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: ath9k-devel@venema.h4ckr.net, nbd@openwrt.org, sujith@msujith.org, Janusz Dziedzic Subject: [PATCH 1/3] ath9k: handle RoC abort correctly Date: Mon, 22 Jun 2015 13:43:03 +0200 Message-Id: <1434973385-15865-2-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1434973385-15865-1-git-send-email-janusz.dziedzic@tieto.com> References: <1434973385-15865-1-git-send-email-janusz.dziedzic@tieto.com> X-DomainID: tieto.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=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 In case we will get ROC abort we should not call ieee80211_remain_on_channel_expired(). In other case I hit such warning on MIPS and p2p negotiation failed (tested with use_chanctx=1). ath: phy0: Starting RoC period ath: phy0: Channel definition created: 2412 MHz ath: phy0: Assigned next_chan to 2412 MHz ath: phy0: Offchannel duration for chan 2412 MHz : 506632 ath: phy0: ath_chanctx_set_next: current: 2412 MHz, next: 2412 MHz ath: phy0: Stopping current chanctx: 2412 ath: phy0: Flush timeout: 200 ath: phy0: ath_chanctx_set_next: Set channel 2412 MHz ath: phy0: Set channel: 2412 MHz width: 0 ath: phy0: Reset to 2412 MHz, HT40: 0 fastcc: 0 ath: phy0: cur_chan: 2412 MHz, event: ATH_CHANCTX_EVENT_TSF_TIMER, state: ATH_CHANCTX_STATE_IDLE ath: phy0: ath_offchannel_channel_change: offchannel state: ATH_OFFCHANNEL_ROC_START ath: phy0: cur_chan: 2412 MHz, event: ATH_CHANCTX_EVENT_SWITCH, state: ATH_CHANCTX_STATE_IDLE ath: phy0: Cancel RoC ath: phy0: RoC aborted ath: phy0: RoC request on vif: 00:03:7f:4e:a0:cd, type: 1 duration: 500 ath: phy0: Starting RoC period ath: phy0: Channel definition created: 2412 MHz ath: phy0: Assigned next_chan to 2412 MHz ath: phy0: Offchannel duration for chan 2412 MHz : 506705 ath: phy0: ath_chanctx_set_next: current: 2412 MHz, next: 2412 MHz ath: phy0: ath_offchannel_channel_change: offchannel state: ATH_OFFCHANNEL_ROC_START ath: phy0: cur_chan: 2412 MHz, event: ATH_CHANCTX_EVENT_SWITCH, state: ATH_CHANCTX_STATE_IDLE ------------[ cut here ]------------ WARNING: CPU: 0 PID: 3312 at drivers/net/wireless/ath/ath9k/main.c:2319 Modules linked in: ath9k ath9k_common ath9k_hw ath mac80211 cfg80211 Signed-off-by: Janusz Dziedzic --- drivers/net/wireless/ath/ath9k/channel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 2066650..e211325 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c @@ -926,7 +926,8 @@ void ath_roc_complete(struct ath_softc *sc, bool abort) sc->offchannel.roc_vif = NULL; sc->offchannel.roc_chan = NULL; - ieee80211_remain_on_channel_expired(sc->hw); + if (!abort) + ieee80211_remain_on_channel_expired(sc->hw); ath_offchannel_next(sc); ath9k_ps_restore(sc); }