Intel 9260 WiFi on jetson nano / jetbot

I tested it and still get the same result.
I also commented out the quick abort in the trans.c of the iwlwifi driver and as idcrook mentioned before
the memory mapped registers are still broken.

[  275.547363] iwlwifi 0000:01:00.0: iwlwifi device memory mapped registers:
[  275.547400] iwlwifi 0000:01:00.0: 00000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[  275.547406] iwlwifi 0000:01:00.0: 00000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff

All major companies have a procurement process, and it’s not going to be through Amazon. And it’s a slow PITA.

ok, the problem is definitely that the newer driver is incompatible with the kernel.
core34 will actually load and connect when manually probed after boot.
The bluetooth device is not recognized. Not sure why.

core35 will not work anymore.
It seems like we need to compare the pcie driver folder of both versions and find out what is different.
[Edit]
You can actually load newer drivers after loading the core34 driver without rebooting, but i didn’t get them to connect to my wifi.
[Edit2]
Even better, you can load the newer iwlwifi module with remove_when_gone=Y and then do echo 1 > /sys/bus/pci/rescan
[Edit3]
I’m unable to use the backports repo to build the btusb module from the 4.14 tree.
I can’t find a way to get the module to be included into the menuconf the same way it works with the iwlwifi modules.

I just installed a 9260. Added the driver to the /lib/firmware and started the Nano.

lspci -v displays:

01:00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29)
Subsystem: Intel Corporation Device 0014
Flags: fast devsel, IRQ 84
Memory at 13000000 (64-bit, non-prefetchable) [disabled]
Capabilities:

ifconfig -a shows:

dummy0: flags=130<BROADCAST,NOARP> mtu 1500
ether 46:6e:44:60:a9:36 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:e0:4c:68:00:72 txqueuelen 1000 (Ethernet)
RX packets 2029 bytes 1535632 (1.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1999 bytes 344188 (344.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 148 base 0xe000

l4tbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.55.1 netmask 255.255.255.0 broadcast 192.168.55.255
inet6 fe80::ac60:8eff:fe3f:92a7 prefixlen 64 scopeid 0x20
inet6 fe80::1 prefixlen 128 scopeid 0x20
ether 12:b8:5c:d9:78:2d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 9 bytes 760 (760.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1 (Local Loopback)
RX packets 332 bytes 27070 (27.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 332 bytes 27070 (27.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

rndis0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 12:b8:5c:d9:78:2d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 12:b8:5c:d9:78:2f txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

When I look in System Settings, Bluetooth shows nothing and Network shows nothing.
Has anyone made progress in getting this working?

@raspi.three get a 8265.
You installed the firmware not the driver.
You have to build the driver from source and somehow get it to load after boot not during.
Bluetooth will not work until someone backports btusb from 4.14

Hi,

I can access BAR if I disable Gen2. I need to do more debugging to give proper fix for the issue. I am working on multiple issues, so it will 2-3 days to get back on this issue. Meanwhile, try with below patch which disables Gen2.

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 7b6fbd5d90a8..7d2eb40740c6 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -2708,6 +2708,7 @@ static int tegra_pcie_scale_voltage(struct tegra_pcie *pcie)
        return err;
 }

+#if 0
 static void tegra_pcie_change_link_speed(struct tegra_pcie *pcie,
                                struct pci_dev *pdev, bool isGen2)
 {
@@ -2814,16 +2815,21 @@ static void tegra_pcie_change_link_speed(struct tegra_pcie *pcie,
 skip:
        return;
 }
+#endif

 static void tegra_pcie_link_speed(struct tegra_pcie *pcie, bool isGen2)
 {
+#if 0
        struct pci_dev *pdev = NULL;
+#endif

        PR_FUNC_LINE;
        /* Voltage scaling should happen before any device transition */
        /* to Gen2 or after all devices has transitioned to Gen1 */
+#if 0
        for_each_pci_dev(pdev)
                tegra_pcie_change_link_speed(pcie, pdev, isGen2);
+#endif

        tegra_pcie_scale_voltage(pcie);

-Manikanta

Hi,

Below patch is the fix, this will be part of next release.

From d989f4ba5e5819366e25ac19a3dab60713e6780d Mon Sep 17 00:00:00 2001
From: Vidya Sagar <vidyas@nvidia.com>
Date: Wed, 15 May 2019 12:15:24 +0530
Subject: [PATCH 1/1] PCI: tegra: Fix speed change code
X-NVConfidentiality: public

Speed change to Gen-2 should take place when there is no traffic on the
bus and the way software can make sure that is to attempt speed change to
Gen-2 before registering the devices with PCIe sub-system. This patch
does exactly that. It also fixes link retrain timeout value to 100000us.

Bug 200519254

Change-Id: I820a78d907a25e25e1e95e22456793d5e33ad833
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
---
 drivers/pci/host/pci-tegra.c | 178 ++++++++++++-----------------------
 1 file changed, 61 insertions(+), 117 deletions(-)

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index e4249feac226..7d9f376f85ee 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -204,6 +204,7 @@
 #define RP_VEND_XP_PRBS_EN					(1 << 1)
 
 #define RP_LINK_CONTROL_STATUS					0x00000090
+#define RP_LINK_CONTROL_STATUS_BW_MGMT_STATUS	0x40000000
 #define RP_LINK_CONTROL_STATUS_DL_LINK_ACTIVE	0x20000000
 #define RP_LINK_CONTROL_STATUS_LINKSTAT_MASK	0x3fff0000
 #define RP_LINK_CONTROL_STATUS_NEG_LINK_WIDTH	(0x3F << 20)
@@ -374,7 +375,7 @@
 
 #define INT_PCI_MSI_NR			(32 * 8)
 
-#define LINK_RETRAIN_TIMEOUT HZ
+#define LINK_RETRAIN_TIMEOUT 100000
 
 #define PCIE_LANES_X4_X1		0x14
 
@@ -489,6 +490,7 @@ struct tegra_pcie {
 
 static int tegra_pcie_enable_msi(struct tegra_pcie *pcie, bool no_init);
 static void tegra_pcie_check_ports(struct tegra_pcie *pcie);
+static void tegra_pcie_link_speed(struct tegra_pcie *pcie);
 static int tegra_pcie_power_off(struct tegra_pcie *pcie);
 
 #define MAX_PWR_GPIOS 5
@@ -524,7 +526,6 @@ struct tegra_pcie_bus {
 /* used to avoid successive hotplug disconnect or connect */
 static bool hotplug_event;
 /* pcie mselect, xclk and emc rate */
-static bool is_gen2_speed;
 static u16 bdf;
 static u16 config_offset;
 static u32 config_val;
@@ -2532,6 +2533,8 @@ static void tegra_pcie_check_ports(struct tegra_pcie *pcie)
 		dev_info(pcie->dev, "link %u down, ignoring\n", port->index);
 		tegra_pcie_port_disable(port);
 	}
+	/* configure all links to gen2 speed by default */
+	tegra_pcie_link_speed(pcie);
 	if (pcie->soc_data->mbist_war)
 		mbist_war(pcie, false);
 }
@@ -2706,123 +2709,72 @@ static int tegra_pcie_scale_voltage(struct tegra_pcie *pcie)
 	return err;
 }
 
-static void tegra_pcie_change_link_speed(struct tegra_pcie *pcie,
-				struct pci_dev *pdev, bool isGen2)
+static void tegra_pcie_change_link_speed(struct tegra_pcie *pcie)
 {
-	u16 val, link_sts_up_spd, link_sts_dn_spd;
-	u16 link_cap_up_spd, link_cap_dn_spd;
-	u32 rp = 0;
-	unsigned long start_jiffies;
-	struct tegra_pcie_port *port = NULL;
-	struct pci_dev *up_dev, *dn_dev;
+	struct device *dev = pcie->dev;
+	struct tegra_pcie_port *port, *tmp;
+	ktime_t deadline;
+	u32 value;
 
-	PR_FUNC_LINE;
-	/* skip if current device is not PCI express capable */
-	/* or is either a root port or downstream port */
-	if (!pci_is_pcie(pdev))
-		goto skip;
-	if ((pci_pcie_type(pdev) == PCI_EXP_TYPE_DOWNSTREAM) ||
-		(pci_pcie_type(pdev) == PCI_EXP_TYPE_ROOT_PORT))
-		goto skip;
-
-	/* initialize upstream/endpoint and downstream/root port device ptr */
-	up_dev = pdev;
-	dn_dev = pdev->bus->self;
-
-	rp = PCI_SLOT(dn_dev->devfn);
-	list_for_each_entry(port, &pcie->ports, list)
-		if (rp == port->index + 1)
-			break;
-	if (!port->ep_status)
-		goto skip;
-
-	/* read link status register to find current speed */
-	pcie_capability_read_word(up_dev, PCI_EXP_LNKSTA, &link_sts_up_spd);
-	link_sts_up_spd &= PCI_EXP_LNKSTA_CLS;
-	pcie_capability_read_word(dn_dev, PCI_EXP_LNKSTA, &link_sts_dn_spd);
-	link_sts_dn_spd &= PCI_EXP_LNKSTA_CLS;
-	/* read link capability register to find max speed supported */
-	pcie_capability_read_word(up_dev, PCI_EXP_LNKCAP, &link_cap_up_spd);
-	link_cap_up_spd &= PCI_EXP_LNKCAP_SLS;
-	pcie_capability_read_word(dn_dev, PCI_EXP_LNKCAP, &link_cap_dn_spd);
-	link_cap_dn_spd &= PCI_EXP_LNKCAP_SLS;
-	/* skip if both devices across the link are already trained to gen2 */
-	if (isGen2) {
-		if (((link_cap_up_spd >= PCI_EXP_LNKSTA_CLS_5_0GB) &&
-			(link_cap_dn_spd >= PCI_EXP_LNKSTA_CLS_5_0GB)) &&
-			((link_sts_up_spd != PCI_EXP_LNKSTA_CLS_5_0GB) ||
-			 (link_sts_dn_spd != PCI_EXP_LNKSTA_CLS_5_0GB)))
-			goto change;
-		else
-			goto skip;
-	} else {
-		/* gen1 should be supported by default by all pcie cards */
-		if ((link_sts_up_spd != PCI_EXP_LNKSTA_CLS_2_5GB) ||
-			 (link_sts_dn_spd != PCI_EXP_LNKSTA_CLS_2_5GB))
-			goto change;
-		else
-			goto skip;
-	}
+	list_for_each_entry_safe(port, tmp, &pcie->ports, list) {
+		/*
+		 * "Supported Link Speeds Vector" in "Link Capabilities 2"
+		 * is not supported by Tegra. tegra_pcie_change_link_speed()
+		 * is called only for Tegra chips which support Gen2.
+		 * So there no harm if supported link speed is not verified.
+		 */
+		value = readl(port->base + RP_LINK_CONTROL_STATUS_2);
+		value &= ~PCI_EXP_LNKSTA_CLS;
+		value |= PCI_EXP_LNKSTA_CLS_5_0GB;
+		writel(value, port->base + RP_LINK_CONTROL_STATUS_2);
+
+		/*
+		 * Poll until link comes back from recovery to avoid race
+		 * condition.
+		 */
+		deadline = ktime_add_us(ktime_get(), LINK_RETRAIN_TIMEOUT);
 
-change:
-	/* Set Link Speed */
-	pcie_capability_read_word(dn_dev, PCI_EXP_LNKCTL2, &val);
-	val &= ~PCI_EXP_LNKSTA_CLS;
-	if (isGen2) {
-		dev_info(pcie->dev, "speed change : Gen-1 -> Gen-2\n");
-		val |= PCI_EXP_LNKSTA_CLS_5_0GB;
-	} else {
-		dev_info(pcie->dev, "speed change : Gen-2 -> Gen-1\n");
-		val |= PCI_EXP_LNKSTA_CLS_2_5GB;
-	}
-	pcie_capability_write_word(dn_dev, PCI_EXP_LNKCTL2, val);
+		while (ktime_before(ktime_get(), deadline)) {
+			value = readl(port->base + RP_LINK_CONTROL_STATUS);
+			if ((value & PCI_EXP_LNKSTA_LT) == 0)
+				break;
 
-	/* LTSSM might be in recovery or configuration, so wait for current
-	 * link training to end. Break out after waiting for timeout */
-	start_jiffies = jiffies;
-	for (;;) {
-		pcie_capability_read_word(dn_dev, PCI_EXP_LNKSTA, &val);
-		if (!(val & PCI_EXP_LNKSTA_LT))
-			break;
-		if (time_after(jiffies, start_jiffies + LINK_RETRAIN_TIMEOUT))
-			break;
-		usleep_range(1000, 1100);
-	}
-	if (val & PCI_EXP_LNKSTA_LT)
-		dev_err(pcie->dev, "Link training failed before speed change\n");
+			usleep_range(2000, 3000);
+		}
+		if (value & PCI_EXP_LNKSTA_LT)
+			dev_warn(dev, "PCIe port %u link is in recovery\n",
+				 port->index);
 
-	/* Retrain the link */
-	pcie_capability_read_word(dn_dev, PCI_EXP_LNKCTL, &val);
-	val |= PCI_EXP_LNKCTL_RL;
-	pcie_capability_write_word(dn_dev, PCI_EXP_LNKCTL, val);
+		/* Clear BW Management Status */
+		value = readl(port->base + RP_LINK_CONTROL_STATUS);
+		value |= RP_LINK_CONTROL_STATUS_BW_MGMT_STATUS;
+		writel(value, port->base + RP_LINK_CONTROL_STATUS);
 
-	/* Wait for link training end. Break out after waiting for timeout */
-	start_jiffies = jiffies;
-	for (;;) {
-		pcie_capability_read_word(dn_dev, PCI_EXP_LNKSTA, &val);
-		if (!(val & PCI_EXP_LNKSTA_LT))
-			break;
-		if (time_after(jiffies, start_jiffies + LINK_RETRAIN_TIMEOUT))
-			break;
-		usleep_range(1000, 1100);
-	}
-	if (val & PCI_EXP_LNKSTA_LT)
-		dev_err(pcie->dev, "Link Re-training failed after speed change\n");
+		/* Retrain the link */
+		value = readl(port->base + RP_LINK_CONTROL_STATUS);
+		value |= PCI_EXP_LNKCTL_RL;
+		writel(value, port->base + RP_LINK_CONTROL_STATUS);
 
-skip:
-	return;
+		deadline = ktime_add_us(ktime_get(), LINK_RETRAIN_TIMEOUT);
+
+		while (ktime_before(ktime_get(), deadline)) {
+			value = readl(port->base + RP_LINK_CONTROL_STATUS);
+			if (value & RP_LINK_CONTROL_STATUS_BW_MGMT_STATUS)
+				break;
+
+			usleep_range(2000, 3000);
+		}
+		if (value & PCI_EXP_LNKSTA_LT)
+			dev_err(dev, "failed to retrain link of port %u\n",
+				port->index);
+	}
 }
 
-static void tegra_pcie_link_speed(struct tegra_pcie *pcie, bool isGen2)
+static void tegra_pcie_link_speed(struct tegra_pcie *pcie)
 {
-	struct pci_dev *pdev = NULL;
-
 	PR_FUNC_LINE;
-	/* Voltage scaling should happen before any device transition */
-	/* to Gen2 or after all devices has transitioned to Gen1 */
-	for_each_pci_dev(pdev)
-		tegra_pcie_change_link_speed(pcie, pdev, isGen2);
 
+	tegra_pcie_change_link_speed(pcie);
 	tegra_pcie_scale_voltage(pcie);
 
 	return;
@@ -2833,8 +2785,6 @@ static void tegra_pcie_enable_features(struct tegra_pcie *pcie)
 	struct tegra_pcie_port *port;
 
 	PR_FUNC_LINE;
-	/* configure all links to gen2 speed by default */
-	tegra_pcie_link_speed(pcie, true);
 	list_for_each_entry(port, &pcie->ports, list) {
 		if (port->status)
 			tegra_pcie_apply_sw_war(port, true);
@@ -3662,9 +3612,8 @@ static int apply_link_speed(struct seq_file *s, void *data)
 {
 	struct tegra_pcie *pcie = (struct tegra_pcie *)(s->private);
 
-	seq_printf(s, "Changing link speed to %s... ",
-		(is_gen2_speed) ? "Gen2" : "Gen1");
-	tegra_pcie_link_speed(pcie, is_gen2_speed);
+	seq_puts(s, "Changing link speed to Gen2\n");
+	tegra_pcie_link_speed(pcie);
 	seq_printf(s, "Done\n");
 	return 0;
 }
@@ -4591,11 +4540,6 @@ static int tegra_pcie_debugfs_init(struct tegra_pcie *pcie)
 	if (!d)
 		goto remove;
 
-	d = debugfs_create_bool("is_gen2_speed(WO)", S_IWUSR, pcie->debugfs,
-					&is_gen2_speed);
-	if (!d)
-		goto remove;
-
 	d = create_tegra_pcie_debufs_file("apply_link_speed",
 					&apply_link_speed_fops, pcie->debugfs,
 					(void *)pcie);
-- 
2.17.1
1 Like

@Manikanta Thank u very much!

However I’m new in the Linux world so I don’t know if your patch is a general solution to Intel 3168. 3165 too…but I will try my best to try…

Also could you take a look at Killer 1550, which based on Intel 9260?[url]Intel Support

Thank u very much… I noticed that 3168 has a different pin out than 9260(1550) too, so I don’t know if that makes a difference too.

Also everyone’s question, when will next release come out?

.Thanks for the replay @kirstein.rico. guess I will just wait for the release.

@mikusama, for the 3168 and 3165 you will need to build very old drivers as both are not supported in iwlwifi mainline.
The version that is shipped with the jetson sd image should be around core33.

the killer 1550 should work with the newest iwlwifi backports build and Manikantas patch, except bluetooth, which has to be backported from 4.14 seperately.

you can see the respective versions of iwlwifi for different cards here:
[url]en:users:drivers:iwlwifi:core_release:url [Linux Wireless]

Okay thanks…so how do I apply the patch though…

Well so I decide to backport core26 which is the last one support 3168 after already backported the newest iwlwifi…I don’t know how to remove it so I just try to do the core26 anyway here’s the error messages I got (错误 just means error

miku@jetson-nano:~/iwlwificore26$ make -j4
make[5]: “conf”已是最新。
#
# configuration written to .config
#
Building backport-include/backport/autoconf.h ... done.
  CC [M]  /home/miku/iwlwificore26/compat/main.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/core.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-io.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/main.o
  LD [M]  /home/miku/iwlwificore26/compat/compat.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-drv.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/status.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/sysfs.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-debug.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-notif-wait.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/radiotap.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/driver-ops.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/util.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.o
/home/miku/iwlwificore26/net/wireless/util.c: In function ‘ieee80211_amsdu_to_8023s’:
/home/miku/iwlwificore26/net/wireless/util.c:664:27: warning: array subscript -1 is below array bounds of ‘skb_frag_t[17]’ {aka ‘struct skb_frag_struct[17]’} [-Warray-bounds]
  const skb_frag_t *frag = &sh->frags[-1];
                           ^~~~~~~~~~~~~~
  CC [M]  /home/miku/iwlwificore26/net/mac80211/sta_info.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/wep.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-trans.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/reg.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/scan.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-7000.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-8000.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-9000.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/wpa.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/scan.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/nl80211.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-a000.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/pcie/drv.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/offchannel.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/pcie/rx.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/pcie/tx.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/ht.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/agg-tx.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/pcie/trans.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/agg-rx.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/trans_slave/sdio_drv.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/trans_slave/sdio_trans.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/trans_slave/sdio_rx.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/vht.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/ibss.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/trans_slave/sdio_tx_policy.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/trans_slave/sdio_tx.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-dbg-cfg.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/iface.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-tm-gnl.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/mlme.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/ibss.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/rate.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-dnt-cfg.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/sme.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-dnt-dispatch.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/michael.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/tkip.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/iwl-dnt-dev-if.o
  CC [M]  /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/mvm/fw.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/chan.o
In file included from /home/miku/iwlwificore26/backport-include/linux/compiler.h:3,
                 from ./include/asm-generic/bug.h:4,
                 from /home/miku/iwlwificore26/backport-include/asm-generic/bug.h:3,
                 from ./arch/arm64/include/asm/bug.h:67,
                 from ./include/linux/bug.h:4,
                 from /home/miku/iwlwificore26/include/net/mac80211.h:18,
                 from /home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/mvm/fw.c:66:
/home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/mvm/fw.c: In function ‘iwl_mvm_sar_select_profile’:
/home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/mvm/fw.c:1327:8: error: ‘IWL_MVM_SAR_TABLE_SIZE’ undeclared (first use in this function); did you mean ‘IWL_DNT_ARRAY_SIZE’?
        IWL_MVM_SAR_TABLE_SIZE);
        ^~~~~~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:510:19: note: in definition of macro ‘__compiletime_assert’
   bool __cond = !(condition);    \
                   ^~~~~~~~~
./include/linux/compiler.h:530:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/bug.h:54:37: note: in expansion of macro ‘compiletime_assert’
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~
./include/linux/bug.h:78:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
  ^~~~~~~~~~~~~~~~
/home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/mvm/fw.c:1326:2: note: in expansion of macro ‘BUILD_BUG_ON’
  BUILD_BUG_ON(IWL_NUM_CHAIN_LIMITS * IWL_NUM_SUB_BANDS !=
  ^~~~~~~~~~~~
/home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/mvm/fw.c:1327:8: note: each undeclared identifier is reported only once for each function it appears in
        IWL_MVM_SAR_TABLE_SIZE);
        ^~~~~~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:510:19: note: in definition of macro ‘__compiletime_assert’
   bool __cond = !(condition);    \
                   ^~~~~~~~~
./include/linux/compiler.h:530:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/bug.h:54:37: note: in expansion of macro ‘compiletime_assert’
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~
./include/linux/bug.h:78:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
  ^~~~~~~~~~~~~~~~
/home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/mvm/fw.c:1326:2: note: in expansion of macro ‘BUILD_BUG_ON’
  BUILD_BUG_ON(IWL_NUM_CHAIN_LIMITS * IWL_NUM_SUB_BANDS !=
  ^~~~~~~~~~~~
/home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/mvm/fw.c:1335:19: error: ‘IWL_MVM_SAR_PROFILE_NUM’ undeclared (first use in this function); did you mean ‘IWL_MVM_REF_PROTECT_CSA’?
   if (profs[i] >= IWL_MVM_SAR_PROFILE_NUM)
                   ^~~~~~~~~~~~~~~~~~~~~~~
                   IWL_MVM_REF_PROTECT_CSA
/home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/mvm/fw.c:1338:14: error: ‘struct iwl_mvm’ has no member named ‘sar_profiles’
   prof = &mvm->sar_profiles[profs[i]];
              ^~
/home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/mvm/fw.c:1341:12: error: dereferencing pointer to incomplete type ‘struct iwl_mvm_sar_profile’
   if (!prof->enabled) {
            ^~
make[9]: *** [scripts/Makefile.build:335:/home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/mvm/fw.o] 错误 1
make[8]: *** [scripts/Makefile.build:649:/home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi/mvm] 错误 2
make[8]: *** 正在等待未完成的任务....
  CC [M]  /home/miku/iwlwificore26/net/wireless/ethtool.o
make[7]: *** [scripts/Makefile.build:649:/home/miku/iwlwificore26/drivers/net/wireless/intel/iwlwifi] 错误 2
make[6]: *** [scripts/Makefile.build:649:/home/miku/iwlwificore26/drivers/net/wireless/intel] 错误 2
make[5]: *** [scripts/Makefile.build:649:/home/miku/iwlwificore26/drivers/net/wireless] 错误 2
make[5]: *** 正在等待未完成的任务....
  CC [M]  /home/miku/iwlwificore26/net/wireless/mesh.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/aes_ccm.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/aes_gcm.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/ap.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/aes_cmac.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/aes_gmac.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/trace.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/ocb.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/cfg.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/ethtool.o
  CC [M]  /home/miku/iwlwificore26/net/wireless/debugfs.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/rx.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/spectmgmt.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/tx.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/key.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/util.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/wme.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/chan.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/trace.o
  LD [M]  /home/miku/iwlwificore26/net/wireless/cfg80211.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/mlme.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/tdls.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/ocb.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/led.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/debugfs.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/debugfs_sta.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/debugfs_netdev.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/debugfs_key.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/pm.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/rc80211_minstrel.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/rc80211_minstrel_debugfs.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/rc80211_minstrel_ht.o
  CC [M]  /home/miku/iwlwificore26/net/mac80211/rc80211_minstrel_ht_debugfs.o
  LD [M]  /home/miku/iwlwificore26/net/mac80211/mac80211.o
make[4]: *** [Makefile:1629:_module_/home/miku/iwlwificore26] 错误 2
make[3]: *** [Makefile.build:6:modules] 错误 2
make[2]: *** [Makefile.real:100:modules] 错误 2
make[1]: *** [Makefile:43:modules] 错误 2
make: *** [Makefile:30:default] 错误 2

If you downloaded kernel source using git, then copy the above patch and save it as Fix_speed_change_code.patch.
Then apply the patch in kernel source using “git apply Fix_speed_change_code.patch” command.

Hey from which git repository did you pull your kernel? i cant find one on the nvida homepage.
Thank you

you have to download the bsp pack from here
https://developer.nvidia.com/embedded/dlc/l4t-jetson-driver-package-32-1-jetson-nano
and run source_sync.sh
when it asks for a tag tell it tegra-l4t-r32.1 and skip uboot.
I’m building right now…

If you just get their git, you’ll be missing some drivers and it won’t build
[Edit]
Not getting it to work though. Kernel builds but wont boot completely.
not sure if i used an incorrect config or something. My current install is pretty much broken right now.

Thank you for the fast help,
but could someone please post a link to the patch file? i get formatting problems with copy pasting the code from above to all my editors.

Hi,

I attached patch file in comment #47, you can download and apply in the kernel source.

Please follow below link to build kernel Image and flash
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fkernel_custom.html%23

  • Manikanta

I build the Kernel successfully and the wifi part of the 9260 indeed works.
I’m still having problems with Bluetooth. I tried the backports from 4.19 but the bluetooth and sockets headers are too different for it to work. I haven’t had success with the 4.14 backports yet. A lot of patches fail there probably from an incorrect coccinelle version.

That’s what I’m seeing. We’ve only fixed wifi, I really needed this for wifi and bluetooth.

Can someone guide me on how to install the kernel?
I have been following the directions at [url]Welcome — Jetson Linux<br/>Developer Guide 34.1 documentation.

I built the kernel using the instructions above on the Jetson itself. How do I install it on the Jetson itself? I don’t have a way to flash it externally.

Could you also instruct how you got started with the kernel build?
The instructions require to run source_sync.sh script, but it’s not anywhere found on Jetson.
I think the “Kernel Customization” instructions are too vague for beginners, as it’s written for someone who compiles kernels daily.