From patchwork Tue Apr 8 06:53:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 3947821 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 E890EBFF02 for ; Tue, 8 Apr 2014 06:53:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 271E4202B8 for ; Tue, 8 Apr 2014 06:53:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6835A202E6 for ; Tue, 8 Apr 2014 06:53:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751037AbaDHGxQ (ORCPT ); Tue, 8 Apr 2014 02:53:16 -0400 Received: from sabertooth01.qualcomm.com ([65.197.215.72]:44987 "EHLO sabertooth01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbaDHGxQ (ORCPT ); Tue, 8 Apr 2014 02:53:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1396939996; x=1428475996; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=r7AZaOxK6G32FjPatNU9BQ2pw8F1zJJtTcXyDjVb+R4=; b=YXdivPOycmV7c3vwHds7ka6OsJg63pUTntd2uNMjZ06Zzwx0yknRkmoq NHE8uGnSgJWtXOsqIZdq5B/Y+6IJ9I5yc3YC0aNsO7sJU+VnDoH/C8C1W KKWu+hgXsZ2y8u4cT78vcnt0ONXpCPJt7ubJIrc3NSggoPxKxh8SUIlAi M=; X-IronPort-AV: E=McAfee;i="5400,1158,7401"; a="61646004" Received: from ironmsg04-r.qualcomm.com ([172.30.46.18]) by sabertooth01.qualcomm.com with ESMTP; 07 Apr 2014 23:53:16 -0700 X-IronPort-AV: E=Sophos;i="4.97,816,1389772800"; d="scan'208";a="712236265" Received: from nasanexhc02.na.qualcomm.com ([172.30.48.24]) by Ironmsg04-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 07 Apr 2014 23:53:15 -0700 Received: from nasanexhc05.na.qualcomm.com (172.30.48.2) by NASANEXHC02.na.qualcomm.com (172.30.48.24) with Microsoft SMTP Server (TLS) id 14.3.158.1; Mon, 7 Apr 2014 23:53:15 -0700 Received: from potku.adurom.net.qca.qualcomm.com (172.30.48.1) by qcmail1.qualcomm.com (172.30.48.2) with Microsoft SMTP Server (TLS) id 14.3.158.1; Mon, 7 Apr 2014 23:53:14 -0700 From: Kalle Valo To: Michal Kazior CC: , Subject: Re: [PATCH] ath10k: refactor monitor code References: <1396610305-5229-1-git-send-email-michal.kazior@tieto.com> <87y4zgmifa.fsf@kamboji.qca.qualcomm.com> Date: Tue, 8 Apr 2014 09:53:10 +0300 In-Reply-To: <87y4zgmifa.fsf@kamboji.qca.qualcomm.com> (Kalle Valo's message of "Tue, 08 Apr 2014 09:42:01 +0300") Message-ID: <87ob0cmhwp.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [172.30.48.1] 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.1 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 Kalle Valo writes: > Michal Kazior writes: > >> It was possible to create/delete/start/stop >> monitor vdev from a few places that were not >> exclusively protected against each other. This >> resulted in monitor vdev being stopped/removed by >> one call origin while another one was expecting it >> to continue running. >> >> For example if CAC was started and interface's >> promiscuous mode was toggled monitor vdev was >> removed from the driver meaning no radar would be >> detected. In additional a warning would be printed >> upon CAC completion complaining it tried to stop >> non-running monitor vdev. >> >> The patch simplifies monitor code by removing >> IEEE80211_HW_WANT_MONITOR_VIF (which wasn't really >> ever needed) and improves state tracking. It also >> unifies prints. >> >> Signed-off-by: Michal Kazior > > Thanks, applied. Actually there were two checkpatch warnings which I had missed: drivers/net/wireless/ath/ath10k/mac.c:2587: WARNING: line over 80 characters drivers/net/wireless/ath/ath10k/mac.c:2852: WARNING: line over 80 characters I amended it like this: --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2584,7 +2584,8 @@ static int ath10k_config(struct ieee80211_hw *hw, u32 changed) ar->monitor = true; ret = ath10k_monitor_start(ar); if (ret) { - ath10k_warn("failed to start monitor (config): %d\n", ret); + ath10k_warn("failed to start monitor (config): %d\n", + ret); ar->monitor = false; } } else if (!(conf->flags & IEEE80211_CONF_MONITOR) && @@ -2849,7 +2850,8 @@ static void ath10k_configure_filter(struct ieee80211_hw *hw, ar->promisc = true; ret = ath10k_monitor_start(ar); if (ret) { - ath10k_warn("failed to start monitor (promisc): %d\n", ret); + ath10k_warn("failed to start monitor (promisc): %d\n", + ret); ar->promisc = false; } } else if (!(ar->filter_flags & FIF_PROMISC_IN_BSS) && ar->promisc) {