]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: btintel: Replace CNVi id with hardware variant
authorKiran K <kiran.k@intel.com>
Sat, 28 Feb 2026 09:12:32 +0000 (14:42 +0530)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 10 Apr 2026 14:27:27 +0000 (10:27 -0400)
Use hardware variant instead of CNVi to send dsbr command.

Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btintel.c
drivers/bluetooth/btintel.h

index 39e16dcca0ce41fd84b87ccd3dd4e17f2f4f8b6a..7313bd101588fb3aaf9daa0336e795db6f4a0b16 100644 (file)
@@ -2818,31 +2818,31 @@ static int btintel_set_dsbr(struct hci_dev *hdev, struct intel_version_tlv *ver)
 
        struct btintel_dsbr_cmd cmd;
        struct sk_buff *skb;
-       u32 dsbr, cnvi;
-       u8 status;
+       u32 dsbr;
+       u8 status, hw_variant;
        int err;
 
-       cnvi = ver->cnvi_top & 0xfff;
+       hw_variant = INTEL_HW_VARIANT(ver->cnvi_bt);
        /* DSBR command needs to be sent for,
         * 1. BlazarI or BlazarIW + B0 step product in IML image.
         * 2. Gale Peak2 or BlazarU in OP image.
         * 3. Scorpious Peak in IML image.
         */
 
-       switch (cnvi) {
-       case BTINTEL_CNVI_BLAZARI:
-       case BTINTEL_CNVI_BLAZARIW:
+       switch (hw_variant) {
+       case BTINTEL_HWID_BZRI:
+       case BTINTEL_HWID_BZRIW:
                if (ver->img_type == BTINTEL_IMG_IML &&
                    INTEL_CNVX_TOP_STEP(ver->cnvi_top) == 0x01)
                        break;
                return 0;
-       case BTINTEL_CNVI_GAP:
-       case BTINTEL_CNVI_BLAZARU:
+       case BTINTEL_HWID_GAP:
+       case BTINTEL_HWID_BZRU:
                if (ver->img_type == BTINTEL_IMG_OP &&
                    hdev->bus == HCI_USB)
                        break;
                return 0;
-       case BTINTEL_CNVI_SCP:
+       case BTINTEL_HWID_SCP:
                if (ver->img_type == BTINTEL_IMG_IML)
                        break;
                return 0;
index 431998049e686bffba98e6a0dd433a8aa2835206..b7ff183f88864ba44cade66a698451f4516d2f03 100644 (file)
@@ -69,6 +69,13 @@ struct intel_tlv {
 
 #define BTINTEL_FWID_MAXLEN 64
 
+/* CNVi Hardware variant */
+#define BTINTEL_HWID_GAP       0x1c    /* Gale Peak2 - Meteor Lake */
+#define BTINTEL_HWID_BZRI      0x1e    /* BlazarI - Lunar Lake */
+#define BTINTEL_HWID_BZRU      0x1d    /* BlazarU - Meteor Lake */
+#define BTINTEL_HWID_SCP       0x1f    /* Scorpius Peak - Panther Lake */
+#define BTINTEL_HWID_BZRIW     0x22    /* BlazarIW - Wildcat Lake */
+
 struct intel_version_tlv {
        u32     cnvi_top;
        u32     cnvr_top;