Wifi master mode not working on 8265 NGW on Xavier AGX

How can I get my Intel AC 8265 NGW (M2) to work in master mode (running as access point with hostapd) on a Xavier AGX?

I’m running Jetpack 4.4. I’m hitting the exact same problems described in this thread:

The solution in this thread was to swap the wifi card for another one that works. Well, I bought one that doesn’t work, and how can I tell the next one I buy will be working?
I have the same issue that country code says “00” for the physical device, instead of “US”.

iw reg get
global
country 00: DFS-UNSET
	(2402 - 2472 @ 40), (N/A, 20), (N/A)
	(2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, NO-IR
	(2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, NO-IR
	(5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, NO-IR
	(5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, NO-IR
	(5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, NO-IR
	(5735 - 5835 @ 80), (N/A, 20), (N/A), NO-IR
	(57240 - 63720 @ 2160), (N/A, 0), (N/A)

phy#0 (self-managed)
country 00: DFS-UNSET
	(2402 - 2482 @ 40), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS, NO-80MHZ, NO-160MHZ
	(5170 - 5250 @ 80), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
	(5250 - 5330 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
	(5490 - 5730 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
	(5735 - 5815 @ 80), (6, 22), (N/A), AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
	(5815 - 5835 @ 20), (6, 22), (N/A), AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, NO-HT40PLUS, NO-80MHZ, NO-160MHZ, PASSIVE-SCAN

and the card cannot be set into master mode, meaning I cannot use it as an access point

sudo iwconfig wlan0 mode master
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Invalid argument.

dmesg | grep iwlwifi shows this that the driver looks for fairly old firmware versions, and eventually loads version 22. Is that firmware supposed to work?

[ 6.974895] iwlwifi 0003:01:00.0: enabling device (0000 → 0002)
[ 6.982675] iwlwifi 0003:01:00.0: Direct firmware load for iwlwifi-8265-26.ucode failed with error -2
[ 6.982870] iwlwifi 0003:01:00.0: Falling back to user helper
[ 8.083088] iwlwifi 0003:01:00.0: Direct firmware load for iwlwifi-8265-25.ucode failed with error -2
[ 8.083286] iwlwifi 0003:01:00.0: Falling back to user helper
[ 8.226086] iwlwifi 0003:01:00.0: Direct firmware load for iwlwifi-8265-24.ucode failed with error -2
[ 8.226285] iwlwifi 0003:01:00.0: Falling back to user helper
[ 8.229095] iwlwifi 0003:01:00.0: Direct firmware load for iwlwifi-8265-23.ucode failed with error -2
[ 8.229272] iwlwifi 0003:01:00.0: Falling back to user helper
[ 8.459747] iwlwifi 0003:01:00.0: loaded firmware version 22.361476.0 op_mode iwlmvm
[ 8.498024] iwlwifi 0003:01:00.0: Detected Intel(R) Dual Band Wireless AC 8265, REV=0x230

Hi,

  1. If you have question about the firmware, please remember that the vendor of this card is Intel. Thus, you may contact Intel for this info.

  2. Will your AC8265 work in mater mode if you use the ubuntu GUI to configure it?

  1. The firmware that the driver is loading is pretty old, so I suspect the first thing they will ask me is to use newer firmware, but I believe this will require a driver upgrade first.
  2. Indeed, if I set it up with the GUI (sudo nm-connection-editor) and configure it as hot spot, it actually works. Since I wanted to use network manager anyways (from the cli, but whatever gets the job done) this solves the issue. Thanks!