Re: AX201 Surface Pro 7

2021-03-17 Thread Stefan Sperling
On Fri, Mar 05, 2021 at 07:15:11PM +0100, Stefan Sperling wrote:
> On Fri, Mar 05, 2021 at 04:25:53PM +0100, Fredrik Engberg wrote:
> > Hey, 
> > 
> > I had no luck with the "Qu-b0-hr-b0-48" firmware. But I had to change to 
> > "Qu-c0-hr-b0-48" and that seems to work.  Here it is the changes I had to 
> > do to get it working. I might have done something wrong here so please 
> > point it out to me. 
> > 
> 
> Great! Thank for you doing this :)
> 
> Your patch looks fine.

This has now been committed. Thanks again for your help!



Re: AX201 Surface Pro 7

2021-03-05 Thread Stefan Sperling
On Fri, Mar 05, 2021 at 04:25:53PM +0100, Fredrik Engberg wrote:
> Hey, 
> 
> I had no luck with the "Qu-b0-hr-b0-48" firmware. But I had to change to 
> "Qu-c0-hr-b0-48" and that seems to work.  Here it is the changes I had to do 
> to get it working. I might have done something wrong here so please point it 
> out to me. 
> 

Great! Thank for you doing this :)

Your patch looks fine.

Now we are only missing a patch for the sysutils/firmware/iwx port
such that this new firmware file can be installed with fw_update.
Ideally, the firmware port should be updated before support for
this new device is added to the driver.

And fw_update will need an updated and signed firmware package on
the mirrors. The person who currently takes care of uploading the
official firmware packages is sthen@ so please get in touch with
him if you want to finish the job.

Regards,
Stefan



Re: AX201 Surface Pro 7

2021-03-05 Thread Fredrik Engberg
Hey, 

I had no luck with the "Qu-b0-hr-b0-48" firmware. But I had to change to 
"Qu-c0-hr-b0-48" and that seems to work.  Here it is the changes I had to do to 
get it working. I might have done something wrong here so please point it out 
to me. 

Index: if_iwx.c
===
RCS file: /cvs/src/sys/dev/pci/if_iwx.c,v
retrieving revision 1.49
diff -u -p -u -p -r1.49 if_iwx.c
--- if_iwx.c17 Jan 2021 14:24:00 -  1.49
+++ if_iwx.c28 Feb 2021 07:18:44 -
@@ -7710,6 +7710,7 @@ static const struct pci_matchid iwx_devi
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_1 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_2 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_3 },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_4,},
 };

 static const struct pci_matchid iwx_subsystem_id_ax201[] = {
@@ -7749,6 +7750,7 @@ iwx_match(struct device *parent, iwx_mat
return 1; /* match any device */
case PCI_PRODUCT_INTEL_WL_22500_2: /* AX201 */
case PCI_PRODUCT_INTEL_WL_22500_3: /* AX201 */
+   case PCI_PRODUCT_INTEL_WL_22500_4: /* AX201 */
for (i = 0; i < nitems(iwx_subsystem_id_ax201); i++) {
if (svid == iwx_subsystem_id_ax201[i].pm_vid &&
spid == iwx_subsystem_id_ax201[i].pm_pid)
@@ -7951,6 +7953,17 @@ iwx_attach(struct device *parent, struct
sc->sc_tx_with_siso_diversity = 0;
sc->sc_uhb_supported = 0;
break;
+   case PCI_PRODUCT_INTEL_WL_22500_4:
+   sc->sc_fwname = "iwx-Qu-c0-hr-b0-48";
+   sc->sc_device_family = IWX_DEVICE_FAMILY_22000;
+   sc->sc_fwdmasegsz = IWX_FWDMASEGSZ_8000;
+   sc->sc_integrated = 1;
+   sc->sc_ltr_delay = IWX_SOC_FLAGS_LTR_APPLY_DELAY_200;
+   sc->sc_low_latency_xtal = 0;
+   sc->sc_xtal_latency = 5000;
+   sc->sc_tx_with_siso_diversity = 0;
+   sc->sc_uhb_supported = 0;
+   break;
default:
printf("%s: unknown adapter type\n", DEVNAME(sc));
return;
Index: pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1959
diff -u -p -u -p -r1.1959 pcidevs
--- pcidevs 27 Feb 2021 03:00:54 -  1.1959
+++ pcidevs 28 Feb 2021 07:18:44 -
@@ -5942,6 +5942,7 @@ product INTEL 500SERIES_LP_XHCI   0xa0ed  5
 product INTEL 500SERIES_LP_XDCI0xa0ee  500 Series xDCI
 product INTEL 500SERIES_LP_SRAM0xa0ef  500 Series Shared SRAM
 product INTEL WL_22500_3   0xa0f0  Wi-Fi 6 AX201
+product INTEL WL_22500_4   0x34f0  Killer Wi-Fi AX1650i (201NGW)
 product INTEL 500SERIES_LP_GSPI_3  0xa0fb  500 Series GSPI
 product INTEL 500SERIES_LP_ISH 0xa0fc  500 Series ISH
 product INTEL 500SERIES_LP_GSPI_4  0xa0fd  500 Series GSPI
Index: pcidevs.h
===
RCS file: /cvs/src/sys/dev/pci/pcidevs.h,v
retrieving revision 1.1953
diff -u -p -u -p -r1.1953 pcidevs.h
--- pcidevs.h   27 Feb 2021 03:01:25 -  1.1953
+++ pcidevs.h   28 Feb 2021 07:18:44 -
@@ -5947,6 +5947,7 @@
 #definePCI_PRODUCT_INTEL_500SERIES_LP_XDCI 0xa0ee  /* 500 
Series xDCI */
 #definePCI_PRODUCT_INTEL_500SERIES_LP_SRAM 0xa0ef  /* 500 
Series Shared SRAM */
 #definePCI_PRODUCT_INTEL_WL_22500_30xa0f0  /* Wi-Fi 6 
AX201 */
+#definePCI_PRODUCT_INTEL_WL_22500_40x34f0  /* Killer Wi-Fi 
6 AX16501i (201NGW) */
 #definePCI_PRODUCT_INTEL_500SERIES_LP_GSPI_3   0xa0fb  /* 500 
Series GSPI */
 #definePCI_PRODUCT_INTEL_500SERIES_LP_ISH  0xa0fc  /* 500 
Series ISH */
 #definePCI_PRODUCT_INTEL_500SERIES_LP_GSPI_4   0xa0fd  /* 500 
Series GSPI */
Index: pcidevs_data.h
===
RCS file: /cvs/src/sys/dev/pci/pcidevs_data.h,v
retrieving revision 1.1948
diff -u -p -u -p -r1.1948 pcidevs_data.h
--- pcidevs_data.h  27 Feb 2021 03:01:25 -  1.1948
+++ pcidevs_data.h  28 Feb 2021 07:18:45 -
@@ -21208,6 +21208,10 @@ static const struct pci_known_product pc
"500 Series Shared SRAM",
},
{
+   PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_4,
+   "Killer Wi-Fi 6 AX1650i (201NGW)",
+   },
+   {
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_3,
"Wi-Fi 6 AX201",
},




On Fri, Feb 5, 2021 at 3:12 PM Stefan Sperling  wrote:
On Fri, Feb 05, 2021 at 11:38:24AM +0100, Fredrik Engberg wrote:
> Hey 
> 
> I got myself a Surface Pro 7 and thought it had a supported AX201 wifi chip 
> in it but after some looking around in the source I couldn’t find the device 
> ID in there so I tried myself to add it to pcidevs and pcidevs.h. 
> I also added the 

Re: AX201 Surface Pro 7

2021-03-05 Thread Fredrik Engberg
Hey, 

I had no luck with the "Qu-b0-hr-b0-48" firmware. But if I changed to 
"Qu-c0-hr-b0-48" and that seems to work.  Here it is the changes I had to do to 
get it working. I might have done something wrong here so please point it out 
to me. 

Index: if_iwx.c
===
RCS file: /cvs/src/sys/dev/pci/if_iwx.c,v
retrieving revision 1.49
diff -u -p -u -p -r1.49 if_iwx.c
--- if_iwx.c17 Jan 2021 14:24:00 -  1.49
+++ if_iwx.c28 Feb 2021 07:18:44 -
@@ -7710,6 +7710,7 @@ static const struct pci_matchid iwx_devi
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_1 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_2 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_3 },
+   { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_4,},
 };

 static const struct pci_matchid iwx_subsystem_id_ax201[] = {
@@ -7749,6 +7750,7 @@ iwx_match(struct device *parent, iwx_mat
return 1; /* match any device */
case PCI_PRODUCT_INTEL_WL_22500_2: /* AX201 */
case PCI_PRODUCT_INTEL_WL_22500_3: /* AX201 */
+   case PCI_PRODUCT_INTEL_WL_22500_4: /* AX201 */
for (i = 0; i < nitems(iwx_subsystem_id_ax201); i++) {
if (svid == iwx_subsystem_id_ax201[i].pm_vid &&
spid == iwx_subsystem_id_ax201[i].pm_pid)
@@ -7951,6 +7953,17 @@ iwx_attach(struct device *parent, struct
sc->sc_tx_with_siso_diversity = 0;
sc->sc_uhb_supported = 0;
break;
+   case PCI_PRODUCT_INTEL_WL_22500_4:
+   sc->sc_fwname = "iwx-Qu-c0-hr-b0-48";
+   sc->sc_device_family = IWX_DEVICE_FAMILY_22000;
+   sc->sc_fwdmasegsz = IWX_FWDMASEGSZ_8000;
+   sc->sc_integrated = 1;
+   sc->sc_ltr_delay = IWX_SOC_FLAGS_LTR_APPLY_DELAY_200;
+   sc->sc_low_latency_xtal = 0;
+   sc->sc_xtal_latency = 5000;
+   sc->sc_tx_with_siso_diversity = 0;
+   sc->sc_uhb_supported = 0;
+   break;
default:
printf("%s: unknown adapter type\n", DEVNAME(sc));
return;
Index: pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1959
diff -u -p -u -p -r1.1959 pcidevs
--- pcidevs 27 Feb 2021 03:00:54 -  1.1959
+++ pcidevs 28 Feb 2021 07:18:44 -
@@ -5942,6 +5942,7 @@ product INTEL 500SERIES_LP_XHCI   0xa0ed  5
 product INTEL 500SERIES_LP_XDCI0xa0ee  500 Series xDCI
 product INTEL 500SERIES_LP_SRAM0xa0ef  500 Series Shared SRAM
 product INTEL WL_22500_3   0xa0f0  Wi-Fi 6 AX201
+product INTEL WL_22500_4   0x34f0  Killer Wi-Fi AX1650i (201NGW)
 product INTEL 500SERIES_LP_GSPI_3  0xa0fb  500 Series GSPI
 product INTEL 500SERIES_LP_ISH 0xa0fc  500 Series ISH
 product INTEL 500SERIES_LP_GSPI_4  0xa0fd  500 Series GSPI
Index: pcidevs.h
===
RCS file: /cvs/src/sys/dev/pci/pcidevs.h,v
retrieving revision 1.1953
diff -u -p -u -p -r1.1953 pcidevs.h
--- pcidevs.h   27 Feb 2021 03:01:25 -  1.1953
+++ pcidevs.h   28 Feb 2021 07:18:44 -
@@ -5947,6 +5947,7 @@
 #definePCI_PRODUCT_INTEL_500SERIES_LP_XDCI 0xa0ee  /* 500 
Series xDCI */
 #definePCI_PRODUCT_INTEL_500SERIES_LP_SRAM 0xa0ef  /* 500 
Series Shared SRAM */
 #definePCI_PRODUCT_INTEL_WL_22500_30xa0f0  /* Wi-Fi 6 
AX201 */
+#definePCI_PRODUCT_INTEL_WL_22500_40x34f0  /* Killer Wi-Fi 
6 AX16501i (201NGW) */
 #definePCI_PRODUCT_INTEL_500SERIES_LP_GSPI_3   0xa0fb  /* 500 
Series GSPI */
 #definePCI_PRODUCT_INTEL_500SERIES_LP_ISH  0xa0fc  /* 500 
Series ISH */
 #definePCI_PRODUCT_INTEL_500SERIES_LP_GSPI_4   0xa0fd  /* 500 
Series GSPI */
Index: pcidevs_data.h
===
RCS file: /cvs/src/sys/dev/pci/pcidevs_data.h,v
retrieving revision 1.1948
diff -u -p -u -p -r1.1948 pcidevs_data.h
--- pcidevs_data.h  27 Feb 2021 03:01:25 -  1.1948
+++ pcidevs_data.h  28 Feb 2021 07:18:45 -
@@ -21208,6 +21208,10 @@ static const struct pci_known_product pc
"500 Series Shared SRAM",
},
{
+   PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_4,
+   "Killer Wi-Fi 6 AX1650i (201NGW)",
+   },
+   {
PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_22500_3,
"Wi-Fi 6 AX201",
},




On Fri, Feb 5, 2021 at 3:12 PM Stefan Sperling  wrote:
On Fri, Feb 05, 2021 at 11:38:24AM +0100, Fredrik Engberg wrote:
> Hey 
> 
> I got myself a Surface Pro 7 and thought it had a supported AX201 wifi chip 
> in it but after some looking around in the source I couldn’t find the device 
> ID in there so I tried myself to add it to pcidevs and pcidevs.h. 
> I also added the 

Re: AX201 Surface Pro 7

2021-02-05 Thread Stefan Sperling
On Fri, Feb 05, 2021 at 11:38:24AM +0100, Fredrik Engberg wrote:
> Hey 
> 
> I got myself a Surface Pro 7 and thought it had a supported AX201 wifi chip 
> in it but after some looking around in the source I couldn’t find the device 
> ID in there so I tried myself to add it to pcidevs and pcidevs.h. 
> I also added the pci_products to if_iwx.c and pcidevs_data.h. I got it to 
> show up in dmesg. But I get “iwx0: unsupported AX201 adapter". I think Im in 
> a bit of deep water here and my knowledge is to low for it. Im wondering if 
> someone else has gotten this AX1650 card to work? 
> 
> Here is pcidump from the machine: 
> 
>  0:20:3: Intel unknown
>   0x: Vendor ID: 8086, Product ID: 34f0
>   0x0004: Command: 0006, Status: 0010
>   0x0008: Class: 02 Network, Subclass: 80 Miscellaneous,
>   Interface: 00, Revision: 30
>   0x000c: BIST: 00, Header Type: 80, Latency Timer: 00,
>   Cache Line Size: 00
>   0x0010: BAR mem 64bit addr: 0x006002134000/0x4000
>   0x0018: BAR empty ()
>   0x001c: BAR empty ()
>   0x0020: BAR empty ()
>   0x0024: BAR empty ()
>   0x0028: Cardbus CIS: 
>   0x002c: Subsystem Vendor ID: 8086 Product ID: 0074
>   0x0030: Expansion ROM Base Address: 
>   0x0038: 
>   0x003c: Interrupt Pin: 01 Line: ff Min Gnt: 00 Max Lat: 00
>   0x00c8: Capability 0x01: Power Management
>   State: D0
>   0x00d0: Capability 0x05: Message Signalled Interrupts (MSI)
>   Enabled: no
>   0x0040: Capability 0x10: PCI Express
>   Max Payload Size: 128 / 128 bytes
>   Max Read Request Size: 128 bytes
>   0x0100: Enhanced Capability 0x18: Latency Tolerance Reporting
>   0x0164: Enhanced Capability 0x0b: Vendor-Specific
>   0x0080: Capability 0x11: Extended Message Signalled Interrupts (MSI-X)
>   Enabled: yes; table size 16 (BAR 0:8192)
> 
> 
> //Fredrik Engberg 
> 
> 

This device needs firmware "Qu-b0-hr-b0-48"
You can find the firmware image here:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git 

The iwx driver will need corresponding changes to detect your device
and load this specific firmware image. Then it will hopefully work.



AX201 Surface Pro 7

2021-02-05 Thread Fredrik Engberg
Hey 

I got myself a Surface Pro 7 and thought it had a supported AX201 wifi chip in 
it but after some looking around in the source I couldn’t find the device ID in 
there so I tried myself to add it to pcidevs and pcidevs.h. 
I also added the pci_products to if_iwx.c and pcidevs_data.h. I got it to show 
up in dmesg. But I get “iwx0: unsupported AX201 adapter". I think Im in a bit 
of deep water here and my knowledge is to low for it. Im wondering if someone 
else has gotten this AX1650 card to work? 

Here is pcidump from the machine: 

 0:20:3: Intel unknown
0x: Vendor ID: 8086, Product ID: 34f0
0x0004: Command: 0006, Status: 0010
0x0008: Class: 02 Network, Subclass: 80 Miscellaneous,
Interface: 00, Revision: 30
0x000c: BIST: 00, Header Type: 80, Latency Timer: 00,
Cache Line Size: 00
0x0010: BAR mem 64bit addr: 0x006002134000/0x4000
0x0018: BAR empty ()
0x001c: BAR empty ()
0x0020: BAR empty ()
0x0024: BAR empty ()
0x0028: Cardbus CIS: 
0x002c: Subsystem Vendor ID: 8086 Product ID: 0074
0x0030: Expansion ROM Base Address: 
0x0038: 
0x003c: Interrupt Pin: 01 Line: ff Min Gnt: 00 Max Lat: 00
0x00c8: Capability 0x01: Power Management
State: D0
0x00d0: Capability 0x05: Message Signalled Interrupts (MSI)
Enabled: no
0x0040: Capability 0x10: PCI Express
Max Payload Size: 128 / 128 bytes
Max Read Request Size: 128 bytes
0x0100: Enhanced Capability 0x18: Latency Tolerance Reporting
0x0164: Enhanced Capability 0x0b: Vendor-Specific
0x0080: Capability 0x11: Extended Message Signalled Interrupts (MSI-X)
Enabled: yes; table size 16 (BAR 0:8192)


//Fredrik Engberg