From patchwork Tue Dec 2 18:11:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 5422501 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 C9A199F4DC for ; Tue, 2 Dec 2014 18:11:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01D91202B8 for ; Tue, 2 Dec 2014 18:11:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2958F20254 for ; Tue, 2 Dec 2014 18:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932776AbaLBSLp (ORCPT ); Tue, 2 Dec 2014 13:11:45 -0500 Received: from mail-wg0-f45.google.com ([74.125.82.45]:47187 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932756AbaLBSLn (ORCPT ); Tue, 2 Dec 2014 13:11:43 -0500 Received: by mail-wg0-f45.google.com with SMTP id b13so17797963wgh.4 for ; Tue, 02 Dec 2014 10:11:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6wake0XBG6UKHpDqLncqc4Q4eFiALylj08kpP2mP0yM=; b=vQx4TK0ClSwagQYV0frEQeQDfPmgxz/wlTh85R+A8WcWz2kIpV1GQuVyw83V6i23nB 70K2gNFt+MyE3ihKV1KsGx1Z2keo7IzwKy022KtIspAiVbLLUv3CnEkdaoAK+7kvCwZy zJjyPIuPdKop0dEIBDBy10Qah33OcBmBINi58SItMQq5rVliaa0dMIQnXLPESUoWveO7 W+CTvg1M5V89wHkh+KmpfpjzOUdPIpP6dzhsH2o6LVqwfbiJqdmwy4IzjimetQLAnNQx xhaBbIKuIAhcEkdh2/3uKFZlxyWXwvw/xvwOpVJZGq1Pclm39lndw9aSZIq8p3imwU3h eF2g== X-Received: by 10.194.241.194 with SMTP id wk2mr801372wjc.132.1417543902549; Tue, 02 Dec 2014 10:11:42 -0800 (PST) Received: from localhost.localdomain (46-116-157-79.bb.netvision.net.il. [46.116.157.79]) by mx.google.com with ESMTPSA id j2sm32914384wjs.28.2014.12.02.10.11.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Dec 2014 10:11:41 -0800 (PST) From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Emmanuel Grumbach Subject: [PATCH 14/26] iwlwifi: pcie: claim ownership on the device after stop_device() Date: Tue, 2 Dec 2014 20:11:05 +0200 Message-Id: <1417543877-24193-14-git-send-email-egrumbach@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <0BA3FCBA62E2DC44AF3030971E174FB31B5A7D27@hasmsx107.ger.corp.intel.com> References: <0BA3FCBA62E2DC44AF3030971E174FB31B5A7D27@hasmsx107.ger.corp.intel.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=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 From: Emmanuel Grumbach Not doing so would allow other possible users of the device to take ownership and prevent normal WiFi operation. This fixes the second part of: https://bugzilla.kernel.org/show_bug.cgi?id=87191 Reviewed-by: Moshe Harel Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- drivers/net/wireless/iwlwifi/pcie/trans.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index a3b63b7..7d7f05e 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c @@ -994,6 +994,9 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) clear_bit(STATUS_RFKILL, &trans->status); if (hw_rfkill != was_hw_rfkill) iwl_trans_pcie_rf_kill(trans, hw_rfkill); + + /* re-take ownership to prevent other users from stealing the deivce */ + iwl_pcie_prepare_card_hw(trans); } void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state)