From patchwork Sun Feb 8 10:36:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliad Peller X-Patchwork-Id: 5797231 X-Patchwork-Delegate: johannes@sipsolutions.net 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 256749F36A for ; Sun, 8 Feb 2015 10:36:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 500742012D for ; Sun, 8 Feb 2015 10:36:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EBB312010F for ; Sun, 8 Feb 2015 10:36:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752902AbbBHKgU (ORCPT ); Sun, 8 Feb 2015 05:36:20 -0500 Received: from mail-wi0-f181.google.com ([209.85.212.181]:32860 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752657AbbBHKgT (ORCPT ); Sun, 8 Feb 2015 05:36:19 -0500 Received: by mail-wi0-f181.google.com with SMTP id fb4so11141659wid.2 for ; Sun, 08 Feb 2015 02:36:18 -0800 (PST) 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; bh=oWx9GsX+hmxoigdbUsNZIHOAJQK2GMk93cqCdLcpuKA=; b=i2nPWF8pZsjUku+n//5eypbYUiqiroZBcqJiaO/mNcToSUD8OBEKlg6geyzQ+TaCBS S3t6pJy6zx3JoYgRWFMPyQmZbFtiM44hMZk5VrxX9WScT0MCTXF/cSXb27iodUYq91fZ ys/R5ioS+mGLgmPCIj3ShjVemKRNnTONfA+yJwFTx/RzYHFFJnCnTMQfbxupcJoG5PWZ 9cnxjhSA959r+xNSAzmL3HmBz0FPF3BXiQOS3r62D4RqKxPvW5i3q+q19Cc30VlwCWMG p3OdLfARF410KjDHH7meUz/jcDBS0NAV4Xh7/XAwxnP2I4YCIaAsHanLOTQDLnJO/uGL x0ng== X-Gm-Message-State: ALoCoQnPw6EoWjHVpSFWImBEqCkITKTYGNmc9tOJ68lky5pVUyAdlQ032la6EvBnuhJRn6WMj6e8 X-Received: by 10.180.103.40 with SMTP id ft8mr14106027wib.68.1423391778163; Sun, 08 Feb 2015 02:36:18 -0800 (PST) Received: from muse.ger.corp.intel.com (46-116-79-40.bb.netvision.net.il. [46.116.79.40]) by mx.google.com with ESMTPSA id q10sm11288792wjr.41.2015.02.08.02.36.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Feb 2015 02:36:17 -0800 (PST) From: Eliad Peller To: Johannes Berg Cc: Subject: [PATCH] mac80211: clear sdata->radar_required Date: Sun, 8 Feb 2015 12:36:07 +0200 Message-Id: <1423391767-1185-1-git-send-email-eliad@wizery.com> X-Mailer: git-send-email 1.8.5.2.229.g4448466.dirty 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 If ieee80211_vif_use_channel() fails, we have to clear sdata->radar_required (which we might have just set). Failing to do it results in stale radar_required field which prevents starting new scan requests. Reported-by: Jouni Malinen Signed-off-by: Eliad Peller --- net/mac80211/chan.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index 35b11e1..f3a8708 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -1508,6 +1508,8 @@ static void __ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata) if (ieee80211_chanctx_refcount(local, ctx) == 0) ieee80211_free_chanctx(local, ctx); + sdata->radar_required = 0; + /* Unreserving may ready an in-place reservation. */ if (use_reserved_switch) ieee80211_vif_use_reserved_switch(local); @@ -1566,6 +1568,9 @@ int ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata, ieee80211_recalc_smps_chanctx(local, ctx); ieee80211_recalc_radar_chanctx(local, ctx); out: + if (ret) + sdata->radar_required = 0; + mutex_unlock(&local->chanctx_mtx); return ret; }