Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2201677imm; Mon, 28 May 2018 03:50:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoYstGTmQbN70vkApBWA8uK+V7Su35YSP2wTFUUp+3Uv80hGJxM5RRnh8ctap8qZB4mQv4t X-Received: by 2002:a17:902:d882:: with SMTP id b2-v6mr12729673plz.220.1527504649151; Mon, 28 May 2018 03:50:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527504649; cv=none; d=google.com; s=arc-20160816; b=y5WoktNtDUeAc8c75vIJQrHlmifiyrB655n5C414vOYs+IKe74HbVAZw9X4d/C4ItS gOmezSKjxOuEb8agwciOFyBQj3K9afX7Ms3XxahJ6W3Nhfdu7oVdyND1P18ZtKJiP2T8 CY6JUAXoPk/d04/HKobY2+G+1P0g8wuS3dny4pUzZlVmg6GnHeaH47wuwR6hXWF+Yiqw aXh1pU4Cv9ODaBqOvkvfjG9q22l8Y4/u4cZtV88AZdKKGYqaAfz1QSqkox7u0Vk4fXga FSBfPvDGmjh8irxctbD+CBDQtxWz9e3q6r+cD63adOndvy6n+RApvkywq6nI1qfBbWBO 8H7Q== 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=apSLi/6G9Gn3Y0zFbLlAny0Ib0xan0oSTdTftUn+6s8=; b=u+HysU8hn00q+r69FJCfJd4gtzcHvjHaWLiOykLjzkh9CDH9oB0ipC1BtSbVz6wR4G 4ZV3rrbMYXHHCHsO+pLEJg8/qv2iD02ueGq9Rg9lRAFfcTFcaCqP7m25zC90hEvOWlkM WaoEArp/IEI73XMuCILbDs/h8be+BWJovaLj57OimGXv7ofSat6uBbQ3kZoN4D310REw NJOyKCF6oZhId7pnwbw/p6kjkb2AEfD1um955AEkgyhVnh/k21S0IkGKtM35J61sztbZ 9jhPzgnFJU+uVUw8IaWKmO4xVBSrdqqxGh+gU/yq0y1EN35+yVBt1ynqjDJ/kAMcwj6f jwuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=khoZ43tF; 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 e1-v6si30787480pln.445.2018.05.28.03.50.34; Mon, 28 May 2018 03:50:49 -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=khoZ43tF; 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 S1163685AbeE1Kua (ORCPT + 99 others); Mon, 28 May 2018 06:50:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:39680 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163660AbeE1KuU (ORCPT ); Mon, 28 May 2018 06:50:20 -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 CE05E204EE; Mon, 28 May 2018 10:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504620; bh=woTS95w52SmZP6M1RzY5zoRxArPNky5EiUlbTy+HpDs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=khoZ43tFkWnj25O78xAGIVHT+vYvN27xN8lgvuUGAY5CxrlQVaMzFes9t28IRFrx5 WssKzGmicvp72gN62ALIrxRN4n7LMLOPTBO5HoawYo2bJgzlntI7+HEZ9rhiLPcCTk CNJXWGIYiUX/G/ttAzTT1cEFImdnAGNQ8Toja+jE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sara Sharon , Luca Coelho , Sasha Levin Subject: [PATCH 4.14 203/496] iwlwifi: mvm: fix assert 0x2B00 on older FWs Date: Mon, 28 May 2018 11:59:48 +0200 Message-Id: <20180528100328.490239029@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: Sara Sharon [ Upstream commit 63dd5d022f4766e6b05ee611124afcc7cbfbb953 ] We should add the multicast station before adding the broadcast station. However, in older FW, the firmware will start beaconing when we add the multicast station, and since the broadcast station is not added at this point so the transmission of the beacon will fail on assert 0x2b00. This is fixed in later firmware, so make the order of addition depend on the TLV. Fixes: 26d6c16bed53 ("iwlwifi: mvm: add multicast station") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 45 +++++++++++++++++----- 1 file changed, 35 insertions(+), 10 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -8,6 +8,7 @@ * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH + * Copyright(c) 2018 Intel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as @@ -2127,15 +2128,40 @@ static int iwl_mvm_start_ap_ibss(struct if (ret) goto out_remove; - ret = iwl_mvm_add_mcast_sta(mvm, vif); - if (ret) - goto out_unbind; - - /* Send the bcast station. At this stage the TBTT and DTIM time events - * are added and applied to the scheduler */ - ret = iwl_mvm_send_add_bcast_sta(mvm, vif); - if (ret) - goto out_rm_mcast; + /* + * This is not very nice, but the simplest: + * For older FWs adding the mcast sta before the bcast station may + * cause assert 0x2b00. + * This is fixed in later FW so make the order of removal depend on + * the TLV + */ + if (fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_STA_TYPE)) { + ret = iwl_mvm_add_mcast_sta(mvm, vif); + if (ret) + goto out_unbind; + /* + * Send the bcast station. At this stage the TBTT and DTIM time + * events are added and applied to the scheduler + */ + ret = iwl_mvm_send_add_bcast_sta(mvm, vif); + if (ret) { + iwl_mvm_rm_mcast_sta(mvm, vif); + goto out_unbind; + } + } else { + /* + * Send the bcast station. At this stage the TBTT and DTIM time + * events are added and applied to the scheduler + */ + iwl_mvm_send_add_bcast_sta(mvm, vif); + if (ret) + goto out_unbind; + iwl_mvm_add_mcast_sta(mvm, vif); + if (ret) { + iwl_mvm_send_rm_bcast_sta(mvm, vif); + goto out_unbind; + } + } /* must be set before quota calculations */ mvmvif->ap_ibss_active = true; @@ -2165,7 +2191,6 @@ out_quota_failed: iwl_mvm_power_update_mac(mvm); mvmvif->ap_ibss_active = false; iwl_mvm_send_rm_bcast_sta(mvm, vif); -out_rm_mcast: iwl_mvm_rm_mcast_sta(mvm, vif); out_unbind: iwl_mvm_binding_remove_vif(mvm, vif);