From: Emmanuel Grumbach Date: Sun, 30 Nov 2014 15:06:11 +0000 (+0200) Subject: iwlwifi: pcie: claim ownership on the device after stop_device() X-Git-Tag: firefly_0821_release~176^2~2717^2~28^2~17^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=655e5cf0d51b35e7499ab0ef8ad16dd352c6a791;p=firefly-linux-kernel-4.4.55.git iwlwifi: pcie: claim ownership on the device after stop_device() 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 --- diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index a3b63b77b4ba..7d7f05ebe05d 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)