diff options
-rwxr-xr-x | dhd_linux_exportfs.c | 16 | ||||
-rw-r--r-- | dhd_pno.c | 10 | ||||
-rw-r--r-- | include/linux_osl.h | 10 | ||||
-rw-r--r-- | include/linuxver.h | 4 | ||||
-rwxr-xr-x | wl_cfg80211.c | 4 | ||||
-rw-r--r-- | wl_cfg80211.h | 5 |
6 files changed, 38 insertions, 11 deletions
diff --git a/dhd_linux_exportfs.c b/dhd_linux_exportfs.c index 36eed8b..8c0e0ee 100755 --- a/dhd_linux_exportfs.c +++ b/dhd_linux_exportfs.c @@ -42,11 +42,19 @@ extern dhd_pub_t* g_dhd_pub; static int dhd_ring_proc_open(struct inode *inode, struct file *file); ssize_t dhd_ring_proc_read(struct file *file, char *buffer, size_t tt, loff_t *loff); -static const struct file_operations dhd_ring_proc_fops = { +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)) +static const struct file_operations dhd_ring_proc_ops = { .open = dhd_ring_proc_open, .read = dhd_ring_proc_read, .release = single_release, }; +#else +static const struct proc_ops dhd_ring_proc_ops = { + .proc_open = dhd_ring_proc_open, + .proc_read = dhd_ring_proc_read, + .proc_release = single_release, +}; +#endif static int dhd_ring_proc_open(struct inode *inode, struct file *file) @@ -109,7 +117,7 @@ dhd_dbg_ring_proc_create(dhd_pub_t *dhdp) dbg_verbose_ring = dhd_dbg_get_ring_from_ring_id(dhdp, FW_VERBOSE_RING_ID); if (dbg_verbose_ring) { - if (!proc_create_data("dhd_trace", S_IRUSR, NULL, &dhd_ring_proc_fops, + if (!proc_create_data("dhd_trace", S_IRUSR, NULL, &dhd_ring_proc_ops, dbg_verbose_ring)) { DHD_ERROR(("Failed to create /proc/dhd_trace procfs interface\n")); } else { @@ -121,7 +129,7 @@ dhd_dbg_ring_proc_create(dhd_pub_t *dhdp) #endif /* DEBUGABILITY */ #ifdef EWP_ECNTRS_LOGGING - if (!proc_create_data("dhd_ecounters", S_IRUSR, NULL, &dhd_ring_proc_fops, + if (!proc_create_data("dhd_ecounters", S_IRUSR, NULL, &dhd_ring_proc_ops, dhdp->ecntr_dbg_ring)) { DHD_ERROR(("Failed to create /proc/dhd_ecounters procfs interface\n")); } else { @@ -130,7 +138,7 @@ dhd_dbg_ring_proc_create(dhd_pub_t *dhdp) #endif /* EWP_ECNTRS_LOGGING */ #ifdef EWP_RTT_LOGGING - if (!proc_create_data("dhd_rtt", S_IRUSR, NULL, &dhd_ring_proc_fops, + if (!proc_create_data("dhd_rtt", S_IRUSR, NULL, &dhd_ring_proc_ops, dhdp->rtt_dbg_ring)) { DHD_ERROR(("Failed to create /proc/dhd_rtt procfs interface\n")); } else { @@ -72,6 +72,12 @@ #define dtohchanspec(i) (i) #endif /* IL_BIGENDINA */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) +#define COMPLETION_WAIT_QUEUE_ACTIVE swait_active +#else +#define COMPLETION_WAIT_QUEUE_ACTIVE waitqueue_active +#endif + #define NULL_CHECK(p, s, err) \ do { \ if (!(p)) { \ @@ -3438,7 +3444,7 @@ exit: } mutex_unlock(&_pno_state->pno_mutex); exit_no_unlock: - if (waitqueue_active(&_pno_state->get_batch_done.wait)) + if (COMPLETION_WAIT_QUEUE_ACTIVE(&_pno_state->get_batch_done.wait)) complete(&_pno_state->get_batch_done); return err; } @@ -4317,7 +4323,7 @@ dhd_pno_event_handler(dhd_pub_t *dhd, wl_event_msg_t *event, void *event_data) { struct dhd_pno_batch_params *params_batch; params_batch = &_pno_state->pno_params_arr[INDEX_OF_BATCH_PARAMS].params_batch; - if (!waitqueue_active(&_pno_state->get_batch_done.wait)) { + if (!COMPLETION_WAIT_QUEUE_ACTIVE(&_pno_state->get_batch_done.wait)) { DHD_PNO(("%s : WLC_E_PFN_BEST_BATCHING\n", __FUNCTION__)); params_batch->get_batch.buf = NULL; params_batch->get_batch.bufsize = 0; diff --git a/include/linux_osl.h b/include/linux_osl.h index d58cfe9..7e7d787 100644 --- a/include/linux_osl.h +++ b/include/linux_osl.h @@ -446,9 +446,17 @@ extern int exynos_pcie_l1_exit(int ch_num); /* dereference an address that may cause a bus exception */ #define BUSPROBE(val, addr) ({ (val) = R_REG(NULL, (addr)); 0; }) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) + /* 'ioremap_nocache' was deprecated in kernels >= 5.6, so instead we use 'ioremap' which + is no-cache by default since kernels 2.6.25. */ +#define IOREMAP_NO_CACHE(address, size) ioremap(address, size) +#else /* KERNEL_VERSION < 2.6.25 */ +#define IOREMAP_NO_CACHE(address, size) ioremap_nocache(address, size) +#endif + /* map/unmap physical to virtual I/O */ #if !defined(CONFIG_MMC_MSM7X00A) -#define REG_MAP(pa, size) ioremap_nocache((unsigned long)(pa), (unsigned long)(size)) +#define REG_MAP(pa, size) IOREMAP_NO_CACHE((unsigned long)(pa), (unsigned long)(size)) #else #define REG_MAP(pa, size) (void *)(0) #endif /* !defined(CONFIG_MMC_MSM7X00A */ diff --git a/include/linuxver.h b/include/linuxver.h index 2388f36..ecd2211 100644 --- a/include/linuxver.h +++ b/include/linuxver.h @@ -666,7 +666,9 @@ static inline bool binary_sema_up(tsk_ctl_t *tsk) return sem_up; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)) +#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 6, 0)) +#define SMP_RD_BARRIER_DEPENDS(x) +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)) #define SMP_RD_BARRIER_DEPENDS(x) smp_read_barrier_depends(x) #else #define SMP_RD_BARRIER_DEPENDS(x) smp_rmb(x) diff --git a/wl_cfg80211.c b/wl_cfg80211.c index 6123d69..86e0c10 100755 --- a/wl_cfg80211.c +++ b/wl_cfg80211.c @@ -9885,6 +9885,7 @@ exit: return err; } +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) static void wl_cfg80211_mgmt_frame_register(struct wiphy *wiphy, bcm_struct_cfgdev *cfgdev, u16 frame, bool reg) @@ -9897,6 +9898,7 @@ wl_cfg80211_mgmt_frame_register(struct wiphy *wiphy, bcm_struct_cfgdev *cfgdev, return; } +#endif static s32 wl_cfg80211_change_bss(struct wiphy *wiphy, @@ -13045,7 +13047,9 @@ static struct cfg80211_ops wl_cfg80211_ops = { .remain_on_channel = wl_cfgscan_remain_on_channel, .cancel_remain_on_channel = wl_cfgscan_cancel_remain_on_channel, .mgmt_tx = wl_cfg80211_mgmt_tx, +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) .mgmt_frame_register = wl_cfg80211_mgmt_frame_register, +#endif .change_bss = wl_cfg80211_change_bss, #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)) || defined(WL_COMPAT_WIRELESS) .set_channel = wl_cfg80211_set_channel, diff --git a/wl_cfg80211.h b/wl_cfg80211.h index b0f0f3a..fe7d7ae 100644 --- a/wl_cfg80211.h +++ b/wl_cfg80211.h @@ -501,10 +501,9 @@ do { \ #define WLAN_AKM_SUITE_8021X_SUITE_B_192 0x000FAC0C #endif /* WLAN_AKM_SUITE_8021X_SUITE_B */ -/* TODO: even in upstream linux(v5.0), FT-1X-SHA384 isn't defined and supported yet. - * need to revisit here to sync correct name later. - */ +#ifndef WLAN_AKM_SUITE_FT_8021X_SHA384 #define WLAN_AKM_SUITE_FT_8021X_SHA384 0x000FAC0D +#endif #define WL_AKM_SUITE_SHA256_1X 0x000FAC05 #define WL_AKM_SUITE_SHA256_PSK 0x000FAC06 |