From patchwork Mon Jan 20 14:21:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 3513021 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 7C90E9F2E9 for ; Mon, 20 Jan 2014 14:25:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C29920161 for ; Mon, 20 Jan 2014 14:25:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0C04320173 for ; Mon, 20 Jan 2014 14:25:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753394AbaATOZo (ORCPT ); Mon, 20 Jan 2014 09:25:44 -0500 Received: from mail-ee0-f50.google.com ([74.125.83.50]:60829 "EHLO mail-ee0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753236AbaATOZm (ORCPT ); Mon, 20 Jan 2014 09:25:42 -0500 Received: by mail-ee0-f50.google.com with SMTP id d17so3543018eek.9 for ; Mon, 20 Jan 2014 06:25:41 -0800 (PST) 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=/pxKeBgmgsPQnjQcGSdn53usFGi35AZLcgry0FQrroQ=; b=KLHqtZZ+YfFakQadNyav4wjcj2JVgEqbjk/vIhHcBaqtSjNIJNV73byrdHn+upmwBe R5ilnjMmUEhwI15n7wMKrtzVWSnlD9QUcm7Zz5wolgr7xqb5YgbI4B6ASDKtdVWBrqJL NfZA0K3J6F53w28mkOImKjkzHpgEc++1UqvXM= 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=/pxKeBgmgsPQnjQcGSdn53usFGi35AZLcgry0FQrroQ=; b=Fx+AHp4c/wQSQeP+ty0Ch4XTDwxCQdyIFTzScYId1VVggiXFEn3FahaXJlo9S+CliW kCdbt5N2KpDi9dPkVsmPVGRi+V53YeSCt+ZlR3Whw34wlj+xWq94VxzptUJtt9K75bKf WdOTc15HDk4FnsfXHq5EDsnd2yqNIgD/efxI7MQlS92N2NcDoe3F6Ktzie7TPAy6BRGG oXfKzvgGY8kNcVSKbmUAyzua2DjUPoeSeZsW5m3CgtgZscSiZn4QCi3iZCkQYhSqoHey 7uFhioE+7/jGAWRXtjSgjrk8U6pkYZXqyu5AisXK0mxLIWL808XDIr572A8pP6XQv49u 0OWg== X-Gm-Message-State: ALoCoQmETO33IcuCePiW6C3MZfM5ln3KWhf2MIq/vBPkrQ4XuSII1KqLh9dy0+BMlUaPDSxBXAhiklqQe0vE/nKgie1EEWLlUFCUVFKBAS0Mpvo23jkuFjw= X-Received: by 10.14.0.201 with SMTP id 49mr18297402eeb.38.1390227941039; Mon, 20 Jan 2014 06:25:41 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id 46sm3702597ees.4.2014.01.20.06.25.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jan 2014 06:25:40 -0800 (PST) From: Michal Kazior To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Michal Kazior Subject: [PATCH 3/7] mac80211: move csa_active setting in STA CSA Date: Mon, 20 Jan 2014 15:21:06 +0100 Message-Id: <1390227670-19030-4-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1390227670-19030-1-git-send-email-michal.kazior@tieto.com> References: <1390227670-19030-1-git-send-email-michal.kazior@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=-7.3 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 The sdata->vif.csa_active could be left set after, e.g. channel context constraints check fail in STA mode leaving the interface in a strange state for a brief period of time until it is disconnected. This was harmless but ugly. Signed-off-by: Michal Kazior --- net/mac80211/mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index fc1d824..bfb81cb 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1001,7 +1001,6 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, } ifmgd->flags |= IEEE80211_STA_CSA_RECEIVED; - sdata->vif.csa_active = true; mutex_lock(&local->chanctx_mtx); if (local->use_chanctx) { @@ -1039,6 +1038,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, mutex_unlock(&local->chanctx_mtx); sdata->csa_chandef = csa_ie.chandef; + sdata->vif.csa_active = true; if (csa_ie.mode) ieee80211_stop_queues_by_reason(&local->hw,