Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9937339ybi; Wed, 24 Jul 2019 12:39:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0OLZlfLYIWeE8vH0xSJTFCqiLtRus7vCNTs3VCOQbYYVcMSyRUowcbZfs5lb7mjS+OL7v X-Received: by 2002:a62:8745:: with SMTP id i66mr12689105pfe.259.1563997173080; Wed, 24 Jul 2019 12:39:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563997173; cv=none; d=google.com; s=arc-20160816; b=cnq2ZPvQyclCdW8My4c6rTpIhmp2pkWNsMyPilFYqJUvHGCxhQeTRS83GxguaV/oHy SmfAGXANTNF7NAnnI5Wau4nHvqIN0WdiUqIXhVOsXORnDoYgRW68vf+a90MbIPEKsK7u TJI2rltkjvjDaKONZ8VEBsOc99/JiVWO/VAPg2ymehWgTe1sMylKTA0aeP2zzBTboAwt Pzk3c2rMqURLkHLDl0WwxstPKGR5pNMznuFiNtEtXsAhKsX2HZ2i2wLfxhOowO44LHd4 uGitnV1AyggSVtqb8++QiQhhVqRpdA5TX0WxR16uc+bc4/2pHML8t5Lsvtbd2RLmdL87 91rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Bzb8HKmvihIzmN1mlokd+US4At9mk7Z0/cxnIwcH7V0=; b=jfs0ZW7S8DYb+8G45yyS8RL5BnFyHArD5SWofy2t0g5w2Ot6o8Scva4ZrlfB2Ue+/s IbrVLqQL6vX+7XqFg661gOFa9mascaD7ZYwleOr+BqrBKtNCmZ4KgH4eSBfFkLnQD6au bfM9QOJSRwD/zUNSUdRvHBxVe6I1QmdQqOKNvHjMvsmKO+MOnFPf1d/SGL+xivi6dYIW g98AXBzVbkMZhy+SV6CpjZz6Ct8+g4M7Y2Amu3ytA1PDI8nDasWopI3fHx77FW7wBxVK LEz6UeHnRIW2zgTHdicsMlMho8NyMp//80raN00wCgs1M1LspouaNt2aan3TQl0GRy8o Wy6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E+g8qlJI; 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 q8si14727805pfc.155.2019.07.24.12.39.18; Wed, 24 Jul 2019 12:39:33 -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=E+g8qlJI; 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 S2389560AbfGXTiD (ORCPT + 99 others); Wed, 24 Jul 2019 15:38:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:38490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389553AbfGXTiC (ORCPT ); Wed, 24 Jul 2019 15:38:02 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 0F28520665; Wed, 24 Jul 2019 19:38:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997081; bh=oMhK2svDNQZluWMPovVKARVEW6yfUn3Wpof1lc/Qgvs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E+g8qlJIlbscB0DVCa+OM2e5Y/EJZ6GBuJrYtDWuyvoqJvSqgZ4SpxR/eXSwDuFug 0XQZF0yraaOSOTCF6dbhefqDHjnPqk+HAExHS0lhqLatj1TTfpK19bnOGCpDZMifoX f57IDf58hhWAf00CaGa4kGUrUjdkNxqi6Dl6Dkkw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Emmanuel Grumbach , Luca Coelho Subject: [PATCH 5.2 297/413] iwlwifi: dont WARN when calling iwl_get_shared_mem_conf with RF-Kill Date: Wed, 24 Jul 2019 21:19:48 +0200 Message-Id: <20190724191757.306760643@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Emmanuel Grumbach commit 0d53cfd0cca3c729a089c39eef0e7d8ae7662974 upstream. iwl_mvm_send_cmd returns 0 when the command won't be sent because RF-Kill is asserted. Do the same when we call iwl_get_shared_mem_conf since it is not sent through iwl_mvm_send_cmd but directly calls the transport layer. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/fw/smem.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/fw/smem.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/smem.c @@ -8,7 +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 + * Copyright(c) 2018 - 2019 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 @@ -31,7 +31,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 + * Copyright(c) 2018 - 2019 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -134,6 +134,7 @@ void iwl_get_shared_mem_conf(struct iwl_ .len = { 0, }, }; struct iwl_rx_packet *pkt; + int ret; if (fw_has_capa(&fwrt->fw->ucode_capa, IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG)) @@ -141,8 +142,13 @@ void iwl_get_shared_mem_conf(struct iwl_ else cmd.id = SHARED_MEM_CFG; - if (WARN_ON(iwl_trans_send_cmd(fwrt->trans, &cmd))) + ret = iwl_trans_send_cmd(fwrt->trans, &cmd); + + if (ret) { + WARN(ret != -ERFKILL, + "Could not send the SMEM command: %d\n", ret); return; + } pkt = cmd.resp_pkt; if (fwrt->trans->cfg->device_family >= IWL_DEVICE_FAMILY_22000)