Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2335467imm; Mon, 28 May 2018 06:16:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqrSapKC6piuJGhTI8QvLBUiw06XOPV4Q2IJC/T5DXSxZhm4nEnm9wqhTsWgI7pLqfo9Nrr X-Received: by 2002:a63:a05d:: with SMTP id u29-v6mr10629003pgn.80.1527513396078; Mon, 28 May 2018 06:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527513396; cv=none; d=google.com; s=arc-20160816; b=TXPjmWOvyqHg13+qp+xls4UUTS6WNRfQzJRPD6oavHn14Yeev96rm6TD5TNgCP9thy rS1X2Nis9dUsqVA15xrMVLEsUUJ4yvsROzQ3gbaxMwYOOjM4f2RpdoxOwNe1A4w0lJsH fYnEnGlFqG69AbkLhhOVTbpRxROoojNYo+vhzM3WMr60/5MV8hAMzxJ2GECSm650gFlI KDJnAM/Sud+pEVrpCh+VaHg8ywHdx/mR7D4i2c7aNwftiJUClLSm/llzrmzbWEsHmFJl dVd9Qqk6jhOY8FnSG1CxeXbyI57OYrErmZ31BvfGyuekPADOhSUGCYyPbXs9KZkzuCgP +BcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=hgMgWpzxXbsSjukeR1ViTomRoG5eXaHXxfKgEnqA9Nk=; b=D8GO5n6nsMyW+8tausWZYcH6hxeeCOMEX8ECnbC225UlbNlJCsw5hvHuoYNGiXBegl enMyx7xi/PKbKdb+XHx2HFng7OdFk8cz4eQ67sUj91UuaAGRz+LIvqqf2uHCQv6mRNuf I/4XFZft4VgCW0eEjTBBcG5HqEO/8/YIvbq6flPIX9CFVOKNzO1fdSeEaO+NdgehTTLH fE5PK5clbqzwpnXXRe5DnKDOSadbiymue4ESMFgReGzFhcwUUpRp34hSLpXMiF8fUNZA /iEyQObSevxdwKQ+OtiLNI0Rk5U7VtluFnzsR0qLD4B1CY0vbuO94RitZjhz3wqol8Fs Sz7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hJO8676X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10-v6si30753140pfn.87.2018.05.28.06.16.21; Mon, 28 May 2018 06:16:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hJO8676X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165225AbeE1NPu (ORCPT + 99 others); Mon, 28 May 2018 09:15:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:39716 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163270AbeE1KuP (ORCPT ); Mon, 28 May 2018 06:50:15 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 76969206B7; Mon, 28 May 2018 10:50:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504615; bh=bNOLwnN2paJiMtZuPh25iTBdHTVUxCYSNz2+eqf4KL4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hJO8676X74c8hZY1Tns3NdUein+77Ts3JVUfQ7HRvFLi8xNbSgs/DHEtlm7XsNLnS nlCZJsy7drZdkf9q21zQg5z5ZfYKIaCboam4qN6QwF5js9KZem4SADQf3OAHVpQ6S2 PffdYJ2HIfOp0smeb08fBa6RC1S09q6BT3EYdDtQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrei Otcheretianski , Luca Coelho , Sasha Levin Subject: [PATCH 4.14 202/496] iwlwifi: mvm: Fix channel switch for count 0 and 1 Date: Mon, 28 May 2018 11:59:47 +0200 Message-Id: <20180528100328.442738092@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andrei Otcheretianski [ Upstream commit 40d53f4a60c9eb10d4fa58066c23ba1af8a59e39 ] It was assumed that apply_time==0 implies immediate scheduling, which is wrong. Instead, the fw expects the START_IMMEDIATELY flag to be set. Otherwise, this resulted in 0x3063 assert. Fix that. While at it rename the T2_V2_START_IMMEDIATELY to TE_V2_START_IMMEDIATELY. Fixes: f5d8f50f271d ("iwlwifi: mvm: Fix channel switch in case of count <= 1") Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/fw/api/time-event.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/fw/api/time-event.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/time-event.h @@ -211,7 +211,7 @@ enum { * @TE_V2_NOTIF_HOST_FRAG_END:request/receive notification on frag end * @TE_V2_NOTIF_INTERNAL_FRAG_START: internal FW use. * @TE_V2_NOTIF_INTERNAL_FRAG_END: internal FW use. - * @T2_V2_START_IMMEDIATELY: start time event immediately + * @TE_V2_START_IMMEDIATELY: start time event immediately * @TE_V2_DEP_OTHER: depends on another time event * @TE_V2_DEP_TSF: depends on a specific time * @TE_V2_EVENT_SOCIOPATHIC: can't co-exist with other events of tha same MAC @@ -230,7 +230,7 @@ enum iwl_time_event_policy { TE_V2_NOTIF_HOST_FRAG_END = BIT(5), TE_V2_NOTIF_INTERNAL_FRAG_START = BIT(6), TE_V2_NOTIF_INTERNAL_FRAG_END = BIT(7), - T2_V2_START_IMMEDIATELY = BIT(11), + TE_V2_START_IMMEDIATELY = BIT(11), /* placement characteristics */ TE_V2_DEP_OTHER = BIT(TE_V2_PLACEMENT_POS), --- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c @@ -621,7 +621,7 @@ void iwl_mvm_protect_session(struct iwl_ time_cmd.repeat = 1; time_cmd.policy = cpu_to_le16(TE_V2_NOTIF_HOST_EVENT_START | TE_V2_NOTIF_HOST_EVENT_END | - T2_V2_START_IMMEDIATELY); + TE_V2_START_IMMEDIATELY); if (!wait_for_notif) { iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); @@ -814,7 +814,7 @@ int iwl_mvm_start_p2p_roc(struct iwl_mvm time_cmd.repeat = 1; time_cmd.policy = cpu_to_le16(TE_V2_NOTIF_HOST_EVENT_START | TE_V2_NOTIF_HOST_EVENT_END | - T2_V2_START_IMMEDIATELY); + TE_V2_START_IMMEDIATELY); return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); } @@ -924,6 +924,8 @@ int iwl_mvm_schedule_csa_period(struct i time_cmd.interval = cpu_to_le32(1); time_cmd.policy = cpu_to_le16(TE_V2_NOTIF_HOST_EVENT_START | TE_V2_ABSENCE); + if (!apply_time) + time_cmd.policy |= cpu_to_le16(TE_V2_START_IMMEDIATELY); return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd); }