]> git.itanic.dy.fi Git - linux-stable/commitdiff
wifi: rtlwifi: rtl8821ae: Remove unnecessary PME_Status bit set
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 24 Nov 2023 08:47:19 +0000 (10:47 +0200)
committerKalle Valo <kvalo@kernel.org>
Fri, 1 Dec 2023 12:41:04 +0000 (14:41 +0200)
BIT(7) (PME_Status) is first checked and then set unnecessarily. Remove
the unnecessary setting for the bit that is already on and adjust the
comment related to it.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231124084725.12738-5-ilpo.jarvinen@linux.intel.com
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c

index 1633328bc3d1ddd26f8d7263426eb5cdfe196eeb..6ae37d61a2a2164a588d926c7d2a57aa618def08 100644 (file)
@@ -2312,9 +2312,7 @@ static void _rtl8821ae_clear_pci_pme_status(struct ieee80211_hw *hw)
                pci_read_config_byte(rtlpci->pdev, cap_pointer + 5, &pmcs_reg);
 
                if (pmcs_reg & BIT(7)) {
-                       /* PME event occured, clear the PM_Status by write 1 */
-                       pmcs_reg = pmcs_reg | BIT(7);
-
+                       /* Clear PME_Status with write */
                        pci_write_config_byte(rtlpci->pdev, cap_pointer + 5,
                                              pmcs_reg);
                        /* Read it back to check */