Patch "wifi: iwlwifi: abort scan when rfkill on but device enabled" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: iwlwifi: abort scan when rfkill on but device enabled

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-iwlwifi-abort-scan-when-rfkill-on-but-device-en.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 770446dd0bb0367183171e67a592e570bcb67d90
Author: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
Date:   Wed Oct 4 12:36:28 2023 +0300

    wifi: iwlwifi: abort scan when rfkill on but device enabled
    
    [ Upstream commit 3c6a0b1f0add72e7f522bc9145222b86d0a7712a ]
    
    In RFKILL we first set the RFKILL bit, then we abort scan
    (if one exists) by waiting for the notification from FW
    and notifying mac80211. And then we stop the device.
    But in case we have a scan ongoing in the period of time between
    rfkill on and before the device is stopped - we will not wait for the
    FW notification because of the iwl_mvm_is_radio_killed() condition,
    and then the scan_status and uid_status are misconfigured,
    (scan_status is cleared but uid_status not)
    and when the notification suddenly arrives (before stopping the device)
    we will get into the assert about scan_status and uid_status mismatch.
    Fix this by waiting for FW notif when rfkill is on but the device isn't
    disabled yet.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
    Signed-off-by: Gregory Greenman <gregory.greenman@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20231004123422.c43b69aa2c77.Icc7b5efb47974d6f499156ff7510b786e177993b@changeid
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
index 3a58267d3d710..3bce3b59a12b1 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
@@ -2140,7 +2140,7 @@ int iwl_mvm_scan_stop(struct iwl_mvm *mvm, int type, bool notify)
 	if (!(mvm->scan_status & type))
 		return 0;
 
-	if (iwl_mvm_is_radio_killed(mvm)) {
+	if (!test_bit(STATUS_DEVICE_ENABLED, &mvm->trans->status)) {
 		ret = 0;
 		goto out;
 	}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux