From patchwork Sun Mar 6 22:28:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliad Peller X-Patchwork-Id: 8514101 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 91EEFC0553 for ; Sun, 6 Mar 2016 22:28:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ADE8A201C0 for ; Sun, 6 Mar 2016 22:28:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0554201BC for ; Sun, 6 Mar 2016 22:28:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751590AbcCFW2T (ORCPT ); Sun, 6 Mar 2016 17:28:19 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35936 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751475AbcCFW2R (ORCPT ); Sun, 6 Mar 2016 17:28:17 -0500 Received: by mail-wm0-f67.google.com with SMTP id l68so7832181wml.3 for ; Sun, 06 Mar 2016 14:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wizery-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=rB/N1V5GyvEJMViLThJ5Yo1hJGI6Q0dRwJajyX8GxAI=; b=QzkvdWUczgtetFRLLw1ZPyAMFLJuyGFB+I3T1RMxZ7Hz3zdfSoiqdfQUow//vEtxry 5eU8KBapg25W4GpWZMkCJAVSfmIdjBfptcXdd+jwzby1qV0LvtAy7syBWYaUOchq1XRa JIJOrzkjbw8ytz/3ogW+G1RvXg2TdyfZHJLIWABSGThcp2PfIIAZCLbxsvyyVejfZEZr LeIO3e4WiiXtiPG1avzz7FgxfwiE0lk66jnbE8tWpxKo9JQYCmBSMJdlVww6u75a23CN 41jYDlSCwc4rAjeKeaxtpA3lKH7DL8ketcikixo61qoaCxvckM50a62yZw6IZXkgHMv4 xE8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=rB/N1V5GyvEJMViLThJ5Yo1hJGI6Q0dRwJajyX8GxAI=; b=GGFtMIY/Mh8gV/mVc+HvWEvW19MmVWykZCrenNR4f2muH/0un2JewFnoWnAz7U5qF3 PIDXDIHaWDzVpTXmSVc528M077XxJ+6B1ziegY3fNGVS6TwpGfpn/nvLfUWnW2Wopq2l 5JrD/5ExJczI8Bvdnvm6OHwjMpdYRncP8SvZclvTkHOvfSWX1BD9FAptGclIbZpM9ehb U6+OC6/fn83ujk1uAHAma1oq9ZeV00/evoENFRIGW02PsIux5nKkk4iA/qzFDicnCwe4 fQbNNkFbGjCuQBA8qAdC3xfOx0mihfkocaB06BjjSkL0X0E8KoDzpiw5qzZL9t7f/1NB QQIw== X-Gm-Message-State: AD7BkJLpIpaaKKOZPLDSnXTGCnPyFmv+F9c0KlNmN5qFl0KBGp++YQeN8VOso/AquEzktg== X-Received: by 10.194.120.229 with SMTP id lf5mr21342325wjb.151.1457303296359; Sun, 06 Mar 2016 14:28:16 -0800 (PST) Received: from localhost.localdomain (93-172-245-144.bb.netvision.net.il. [93.172.245.144]) by smtp.gmail.com with ESMTPSA id e25sm2631678wmi.21.2016.03.06.14.28.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 Mar 2016 14:28:15 -0800 (PST) From: Eliad Peller To: linux-wireless@vger.kernel.org Subject: [PATCH v2 1/2] wlcore: don't WARN_ON in case of existing ROC Date: Mon, 7 Mar 2016 00:28:08 +0200 Message-Id: <1457303289-10401-1-git-send-email-eliad@wizery.com> X-Mailer: git-send-email 2.6.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 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 When working with AP + P2P, it's possible to get into a state when the AP is in ROC (due to assiciating station) while trying to ROC on the P2P interface. Replace the WARN_ON with wl1271_error to avoid warnings in this case. Signed-off-by: Eliad Peller --- v2: fix kbuild warning (printf format) drivers/net/wireless/ti/wlcore/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index d1109c4..5127243 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -5493,7 +5493,7 @@ static int wlcore_op_remain_on_channel(struct ieee80211_hw *hw, { struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); struct wl1271 *wl = hw->priv; - int channel, ret = 0; + int channel, active_roc, ret = 0; channel = ieee80211_frequency_to_channel(chan->center_freq); @@ -5506,9 +5506,9 @@ static int wlcore_op_remain_on_channel(struct ieee80211_hw *hw, goto out; /* return EBUSY if we can't ROC right now */ - if (WARN_ON(wl->roc_vif || - find_first_bit(wl->roc_map, - WL12XX_MAX_ROLES) < WL12XX_MAX_ROLES)) { + active_roc = find_first_bit(wl->roc_map, WL12XX_MAX_ROLES); + if (wl->roc_vif || active_roc < WL12XX_MAX_ROLES) { + wl1271_warning("active roc on role %d", active_roc); ret = -EBUSY; goto out; }