openwrt/package/kernel/mwlwifi/patches/004-mwlwifi-fix-PCIe-DT-node-null-pointer-dereference.patch
Michael Trinidad 9cf5769636 mwlwifi: update to version 10.4.10-20231120
Upstream PR 416 improvements:
 -AMPDU Optimization of priority calculation. (8864/8897)
 -8864/8897 fix wpa3
 -Add cypher suite to driver capabilities (all chip)
 -Alignment of pcie_tx_ctrl* (all chip)
 -"feature" normalization for all chips (all chip)
 -Add modprobe parameters (all chip)
 -fix monitoring (all chip)
 -Code separation by chipset (8864/8897 <=> 8997)
 -dump_prob decommissioning (8864/8897/8997)
 -fix amsdu high ping latency (8864/8897/8997)
 -drop debug info in hostcmd_get_hw_spec() (8864/8897)
 -Add wcb_base in debug info (8864)
 -Rewrite AMSDU packets (8864/8897/8997)
 -debug rewrite output mwl_debugfs_sta_read (all chip)
 -Improved encryption interoperability (8864/8897/8997)
 -factorization encrypted packet test (8864/8897/8997)
 -Change 88W8864 firmware to 7.2.9.27 (8864/8897)
 -Fix the AMPDU session lifecycle (8864/8897/8997)
 -Remove the tx done packets mechanism (8864/8897)

Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
2023-12-14 21:45:18 +01:00

32 lines
1.0 KiB
Diff

From 8e809b241695252e397bf0d7fc5f36e115c38831 Mon Sep 17 00:00:00 2001
From: Robert Marko <robert.marko@sartura.hr>
Date: Fri, 5 Mar 2021 11:47:59 +0100
Subject: [PATCH] mwlwifi: fix PCIe DT node null pointer dereference
pci_bus_to_OF_node() used to get the PCI bus DT node
returns node if found or NULL if none is found.
Since the return of pci_bus_to_OF_node() is not checked in
the DT node name print it will cause a null pointer
dereference and crash the kernel.
So first check whether the node is not NULL and then print.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
hif/pcie/pcie.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/hif/pcie/pcie.c
+++ b/hif/pcie/pcie.c
@@ -685,7 +685,8 @@ static struct device_node *pcie_get_devi
struct device_node *dev_node;
dev_node = pci_bus_to_OF_node(pcie_priv->pdev->bus);
- wiphy_info(priv->hw->wiphy, "device node: %s\n", dev_node->full_name);
+ if (dev_node)
+ wiphy_info(priv->hw->wiphy, "device node: %s\n", dev_node->full_name);
return dev_node;
}