From: bo.li Date: Thu, 27 Jul 2023 07:15:03 +0000 (+0800) Subject: wifi: fix build error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8b5e7baeb9bcea35e4e2e73cde120bd896bcf063;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_dhd-driver.git wifi: fix build error PD#SWPL-133503 Problem: build error Solution: fix build error Verify: local build Change-Id: I3bf142a28633da46b2a0952ac43c64cc1f36fa12 Signed-off-by: bo.li --- diff --git a/bcmdhd.101.10.361.x/wl_cfg80211.c b/bcmdhd.101.10.361.x/wl_cfg80211.c index f623aed..db46ac7 100755 --- a/bcmdhd.101.10.361.x/wl_cfg80211.c +++ b/bcmdhd.101.10.361.x/wl_cfg80211.c @@ -129,6 +129,10 @@ #include #endif /* CONFIG_WLAN_BEYONDX || defined(CONFIG_SEC_5GMODEL) */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 41) && defined (CONFIG_AMLOGIC_KERNEL_VERSION)) +#include +#endif + #if (defined(WL_FW_OCE_AP_SELECT) || defined(BCMFW_ROAM_ENABLE)) && \ ((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) || defined(WL_COMPAT_WIRELESS)) uint fw_ap_select = true; @@ -22099,7 +22103,12 @@ wl_cfg80211_sup_event_handler(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgde if ((status == WLC_SUP_KEYED || status == WLC_SUP_KEYXCHANGE_WAIT_G1) && reason == WLC_E_SUP_OTHER) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) +#if ((defined (AML_KERNEL_VERSION) && AML_KERNEL_VERSION >= 15) || LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)) + /* NL80211_CMD_PORT_AUTHORIZED supported above >= 4.15 */ + cfg80211_port_authorized(ndev, (u8 *)wl_read_prof(cfg, ndev, WL_PROF_BSSID), + NULL, 0, GFP_KERNEL); + WL_INFORM_MEM(("4way HS finished. port authorized event sent\n")); +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) /* NL80211_CMD_PORT_AUTHORIZED supported above >= 4.15 */ cfg80211_port_authorized(ndev, (u8 *)wl_read_prof(cfg, ndev, WL_PROF_BSSID), GFP_KERNEL); diff --git a/bcmdhd.101.10.361.x/wl_cfgvif.c b/bcmdhd.101.10.361.x/wl_cfgvif.c index 12ce31c..6a43073 100755 --- a/bcmdhd.101.10.361.x/wl_cfgvif.c +++ b/bcmdhd.101.10.361.x/wl_cfgvif.c @@ -94,6 +94,10 @@ #endif /* BIGDATA_SOFTAP || DHD_ENABLE_BIGDATA_LOGGING */ #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 41) && defined (CONFIG_AMLOGIC_KERNEL_VERSION)) +#include +#endif + #define MAX_VIF_OFFSET 15 #define MAX_WAIT_TIME 1500 @@ -5333,7 +5337,9 @@ wl_cfg80211_ch_switch_notify(struct net_device *dev, uint16 chanspec, struct wip #if (LINUX_VERSION_CODE >= KERNEL_VERSION (3, 8, 0)) freq = chandef.chan ? chandef.chan->center_freq : chandef.center_freq1; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(CFG80211_BKPORT_MLO) +#if ((defined (AML_KERNEL_VERSION) && AML_KERNEL_VERSION >= 15) || LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) + cfg80211_ch_switch_notify(dev, &chandef, 0, 0); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(CFG80211_BKPORT_MLO) cfg80211_ch_switch_notify(dev, &chandef, 0); #else cfg80211_ch_switch_notify(dev, &chandef);