wifi: rtw88: mac: Use existing macros in rtw_pwr_seq_parser()
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sat, 4 Feb 2023 23:30:01 +0000 (00:30 +0100)
committerKalle Valo <kvalo@kernel.org>
Mon, 13 Feb 2023 15:15:46 +0000 (17:15 +0200)
Replace the magic numbers for the intf_mask with their existing
RTW_PWR_INTF_PCI_MSK and RTW_PWR_INTF_USB_MSK macros to make the code
easier to understand.

Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230204233001.1511643-5-martin.blumenstingl@googlemail.com
drivers/net/wireless/realtek/rtw88/mac.c

index 98777f294945fe016dc1006c3cc7d97b26ecb8a1..4e5c194aac29916a6531f61f406f0349cfe156fb 100644 (file)
@@ -217,10 +217,10 @@ static int rtw_pwr_seq_parser(struct rtw_dev *rtwdev,
        cut_mask = cut_version_to_mask(cut);
        switch (rtw_hci_type(rtwdev)) {
        case RTW_HCI_TYPE_PCIE:
-               intf_mask = BIT(2);
+               intf_mask = RTW_PWR_INTF_PCI_MSK;
                break;
        case RTW_HCI_TYPE_USB:
-               intf_mask = BIT(1);
+               intf_mask = RTW_PWR_INTF_USB_MSK;
                break;
        default:
                return -EINVAL;