mirror of
https://github.com/ps5-linux/ps5-linux-mwifiex.git
synced 2026-07-16 05:50:39 +00:00
* mwifiex: rebase PS5 IW620 patch for linux 7.1 - Rebase ps5-iw620.patch onto nxp-imx/mwifiex lf-6.18.20_2.0.0, which carries the cfg80211 API updates needed by Linux 7.1. - Restore PS5 IW620 Wi-Fi module builds on the linux-7.1.y kernel by avoiding the net_device versus wireless_dev API mismatch. - Target the PS5 IW620 PCIe path and disable unrelated SDIO/USB targets so the build does not pull unresolved sdio_* symbols. - Export the PCI module alias so the PS5 IW620 module can autoload when the device is present. - Keep the PS5 connected-state scan workaround, which fake-completes scans while associated to reduce firmware/driver instability. - Preserve the legacy scan option behavior used by the PS5 load parameters. - Update README fresh-build instructions to use the new NXP base ref. * mwifiex: avoid IW620 scan and regulatory firmware quirks The PS5 IW620 firmware accepts the core STA path but rejects the channel-attribute regulatory download with CHAN_REGION_CFG status 0x3. That shows up at boot as sub_id=0x200046 action=1 [FW_CMDRESP], even though the interface can still scan and associate. Skip the channel attribute download for the PCIEIW620/PCIE9097 card type used by PS5 so the driver does not send the firmware command that fails on this platform. Also treat a scan response with exactly zero optional TLV bytes as valid. NXP used a strict greater-than check, so normal scan responses without trailing TLVs were logged as scan_resp_size: Incorrect size of TLV buff size even when AP parsing completed successfully. Keep the existing PS5 behavior that forces legacy scan mode and fake-completes connected-state scans for stability. * Fix mwifiex installer ref --------- Co-authored-by: Anderson <22428720+buzzer-re@users.noreply.github.com>
148 lines
4.2 KiB
Diff
148 lines
4.2 KiB
Diff
diff --git a/Makefile b/Makefile
|
|
index ff0d7dc..b963d85 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -35,23 +35,23 @@ CONFIG_SD8897=n
|
|
CONFIG_USB8897=n
|
|
CONFIG_PCIE8897=n
|
|
CONFIG_SD8977=n
|
|
-CONFIG_SD8978=y
|
|
+CONFIG_SD8978=n
|
|
CONFIG_USB8978=n
|
|
-CONFIG_SD8987=y
|
|
+CONFIG_SD8987=n
|
|
CONFIG_SD9097=n
|
|
-CONFIG_SD9177=y
|
|
+CONFIG_SD9177=n
|
|
CONFIG_USB9097=n
|
|
-CONFIG_PCIE9097=n
|
|
-CONFIG_SD9098=y
|
|
+CONFIG_PCIE9097=y
|
|
+CONFIG_SD9098=n
|
|
CONFIG_USB9098=n
|
|
-CONFIG_PCIE9098=y
|
|
-CONFIG_SDIW610=y
|
|
-CONFIG_USBIW610=y
|
|
+CONFIG_PCIE9098=n
|
|
+CONFIG_SDIW610=n
|
|
+CONFIG_USBIW610=n
|
|
CONFIG_SDIW624=n
|
|
-CONFIG_SDAW693=y
|
|
+CONFIG_SDAW693=n
|
|
CONFIG_PCIEIW624=n
|
|
CONFIG_USBIW624=n
|
|
-CONFIG_PCIEAW693=y
|
|
+CONFIG_PCIEAW693=n
|
|
|
|
|
|
# Debug Option
|
|
@@ -161,7 +161,8 @@ ccflags-y += -DLINUX
|
|
|
|
|
|
|
|
-ARCH ?= arm64
|
|
+ARCH ?= x86
|
|
+KERNELDIR ?= /lib/modules/$(shell uname -r)/build
|
|
CONFIG_IMX_SUPPORT=y
|
|
ifeq ($(CONFIG_IMX_SUPPORT),y)
|
|
ccflags-y += -DIMX_SUPPORT
|
|
@@ -649,7 +650,7 @@ moal-objs := $(MOALOBJS)
|
|
else
|
|
|
|
default:
|
|
- $(MAKE) -C $(KERNELDIR) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
|
|
+ $(MAKE) -C $(KERNELDIR) M=$(CURDIR) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
|
|
|
|
endif
|
|
|
|
diff --git a/mlan/mlan_init.c b/mlan/mlan_init.c
|
|
index 3db5448..c574f96 100644
|
|
--- a/mlan/mlan_init.c
|
|
+++ b/mlan/mlan_init.c
|
|
@@ -782,6 +782,8 @@ t_void wlan_init_adapter(pmlan_adapter pmadapter)
|
|
pmadapter->active_scan_triggered = MFALSE;
|
|
if (!pmadapter->init_para.ext_scan)
|
|
pmadapter->ext_scan = EXT_SCAN_TYPE_ENH;
|
|
+ else if (pmadapter->init_para.ext_scan == MLAN_LEGACY_SCAN)
|
|
+ pmadapter->ext_scan = MFALSE;
|
|
else if (pmadapter->init_para.ext_scan == EXT_SCAN_TYPE_ENH)
|
|
pmadapter->ext_scan = EXT_SCAN_TYPE_ENH;
|
|
else
|
|
diff --git a/mlan/mlan_scan.c b/mlan/mlan_scan.c
|
|
index 75105c4..40a4bab 100644
|
|
--- a/mlan/mlan_scan.c
|
|
+++ b/mlan/mlan_scan.c
|
|
@@ -5761,7 +5761,7 @@ mlan_status wlan_ret_802_11_scan(mlan_private *pmpriv, HostCmd_DS_COMMAND *resp,
|
|
* BSS Descriptions (bss_descript_size as bytesLef) and the command
|
|
* response header (S_DS_GEN)
|
|
*/
|
|
- if (scan_resp_size >
|
|
+ if (scan_resp_size >=
|
|
(bytes_left + sizeof(pscan_rsp->bss_descript_size) +
|
|
sizeof(pscan_rsp->number_of_sets) + S_DS_GEN)) {
|
|
tlv_buf_size =
|
|
diff --git a/mlinux/moal_init.c b/mlinux/moal_init.c
|
|
index a8ece12..e244de9 100644
|
|
--- a/mlinux/moal_init.c
|
|
+++ b/mlinux/moal_init.c
|
|
@@ -3521,7 +3521,7 @@ MODULE_PARM_DESC(
|
|
module_param(ext_scan, int, 0660);
|
|
MODULE_PARM_DESC(
|
|
ext_scan,
|
|
- "0: MLAN default; 1: Enable Extended Scan; 2: Enable Enhanced Extended Scan");
|
|
+ "0: MLAN default; 1: Legacy Scan; 2: Enable Extended Scan; 3: Enable Enhanced Extended Scan");
|
|
module_param(bootup_cal_ctrl, int, 0660);
|
|
MODULE_PARM_DESC(
|
|
bootup_cal_ctrl,
|
|
diff --git a/mlinux/moal_pcie.c b/mlinux/moal_pcie.c
|
|
index 5beade4..9661285 100644
|
|
--- a/mlinux/moal_pcie.c
|
|
+++ b/mlinux/moal_pcie.c
|
|
@@ -135,6 +135,7 @@ static const struct pci_device_id wlan_ids[] = {
|
|
|
|
{},
|
|
};
|
|
+MODULE_DEVICE_TABLE(pci, wlan_ids);
|
|
/* moal interface ops */
|
|
static moal_if_ops pcie_ops;
|
|
|
|
diff --git a/mlinux/moal_sta_cfg80211.c b/mlinux/moal_sta_cfg80211.c
|
|
index 23ffe02..57e54ed 100644
|
|
--- a/mlinux/moal_sta_cfg80211.c
|
|
+++ b/mlinux/moal_sta_cfg80211.c
|
|
@@ -1622,6 +1622,14 @@ static mlan_status woal_dnld_chan_attr(moal_private *priv, t_bool is6g,
|
|
#endif
|
|
wiphy = priv->wdev->wiphy;
|
|
|
|
+#if defined(PCIE9097)
|
|
+ if (IS_PCIE9097(priv->phandle->card_type)) {
|
|
+ PRINTM(MMSG,
|
|
+ "Skip channel attribute download for PS5 IW620\n");
|
|
+ goto done;
|
|
+ }
|
|
+#endif
|
|
+
|
|
/* Allocate an IOCTL request buffer */
|
|
req = woal_alloc_mlan_ioctl_req(sizeof(mlan_ds_misc_cfg));
|
|
if (req == NULL) {
|
|
@@ -5778,6 +5786,19 @@ static int woal_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev,
|
|
}
|
|
#endif
|
|
|
|
+ if (priv->media_connected == MTRUE) {
|
|
+ PRINTM(MMSG,
|
|
+ "Fake-complete connected-state scan on %s for PS5 IW620 stability\n",
|
|
+ dev->name);
|
|
+ spin_lock_irqsave(&priv->phandle->scan_req_lock, flags);
|
|
+ priv->phandle->fake_scan_complete = MTRUE;
|
|
+ priv->phandle->scan_request = request;
|
|
+ spin_unlock_irqrestore(&priv->phandle->scan_req_lock, flags);
|
|
+ queue_delayed_work(priv->phandle->evt_workqueue,
|
|
+ &priv->phandle->scan_timeout_work,
|
|
+ msecs_to_jiffies(1000));
|
|
+ return ret;
|
|
+ }
|
|
/** Cance remain on channel */
|
|
woal_cancel_remain_on_channel(priv);
|
|
|