From f84ecea53f9feee77e369d2e80402d471c3388c4 Mon Sep 17 00:00:00 2001 From: yunjie Date: Thu, 4 May 2023 15:29:23 +0000 Subject: [PATCH] MA-21171-1 mxm_wifiex: Fix kernel update build errors this is to fix the build error after integrate Q2 CF patch After kernel merge aosp/android14-6.1, the following error is encountered: nxp-mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c:5006:54: error: too few arguments to function call, expected 4, have 3 cfg80211_ch_switch_notify(priv->netdev, &chandef, 0); This is caused by kernel patch 541c3b73ddf0("UPSTREAM: wifi: cfg80211: include puncturing bitmap in channel switch events"), now cfg80211_ch_switch_notify() needs four parameters. Change-Id: I55ec827d696562d644f99adebc6b92b103be06ca Signed-off-by: yunjie --- mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c | 2 ++ mxm_wifiex/wlan_src/mlinux/moal_shim.c | 2 ++ mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c b/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c index 32e41bf..de24a92 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c @@ -5044,6 +5044,8 @@ void woal_cfg80211_notify_channel(moal_private *priv, #endif #if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) cfg80211_ch_switch_notify(priv->netdev, &chandef, 0, 0); +#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && IMX_ANDROID_13)) + cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0, 0); #elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13) cfg80211_ch_switch_notify(priv->netdev, &chandef, 0); #else diff --git a/mxm_wifiex/wlan_src/mlinux/moal_shim.c b/mxm_wifiex/wlan_src/mlinux/moal_shim.c index ec5395b..59192c0 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_shim.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_shim.c @@ -3741,6 +3741,8 @@ mlan_status moal_recv_event(t_void *pmoal, pmlan_event pmevent) #if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0, 0); +#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && IMX_ANDROID_13)) + cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0, 0); #elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13) cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0); #else diff --git a/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c b/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c index 798a8b9..34cade2 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_uap_cfg80211.c @@ -3500,6 +3500,8 @@ static void woal_switch_uap_channel(moal_private *priv, t_u8 wait_option) sizeof(struct cfg80211_chan_def), sizeof(priv->chan)); #if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0, 0); +#elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && IMX_ANDROID_13)) + cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0, 0); #elif ((CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || IMX_ANDROID_13) cfg80211_ch_switch_notify(priv->netdev, &priv->chan, 0); #else