d4854eb632
I did the research: the commit times and authors are as correct as an afternoon of internet spelunking can make them.
116 lines
4.1 KiB
Diff
116 lines
4.1 KiB
Diff
From 99b1bbc01ea0611e93cb94c2a2532aef96676976 Mon Sep 17 00:00:00 2001
|
|
From: X9VoiD <oscar.silvestrexx@gmail.com>
|
|
Date: Wed, 19 Oct 2022 00:29:28 +0800
|
|
Subject: [PATCH 15/16] linuxPackages.broadcom_sta: fix build issues with
|
|
kernel 6.0+
|
|
|
|
---
|
|
src/shared/linux_osl.c | 2 +-
|
|
src/wl/sys/wl_cfg80211_hybrid.c | 17 ++++++++---------
|
|
src/wl/sys/wl_iw.h | 1 -
|
|
src/wl/sys/wl_linux.c | 17 +++++++++--------
|
|
4 files changed, 18 insertions(+), 19 deletions(-)
|
|
|
|
diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
|
|
index 5a25b82..18bacb6 100644
|
|
--- a/src/shared/linux_osl.c
|
|
+++ b/src/shared/linux_osl.c
|
|
@@ -1101,7 +1101,7 @@ osl_os_get_image_block(char *buf, int len, void *image)
|
|
if (!image)
|
|
return 0;
|
|
|
|
- rdlen = kernel_read(fp, fp->f_pos, buf, len);
|
|
+ rdlen = kernel_read(fp, (void *)fp->f_pos, (size_t)len, (loff_t *)buf);
|
|
if (rdlen > 0)
|
|
fp->f_pos += rdlen;
|
|
|
|
diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
|
|
index 9ae56a1..a6b2ca2 100644
|
|
--- a/src/wl/sys/wl_cfg80211_hybrid.c
|
|
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
|
|
@@ -790,6 +790,7 @@ wl_set_auth_type(struct net_device *dev, struct cfg80211_connect_params *sme)
|
|
break;
|
|
case NL80211_AUTHTYPE_NETWORK_EAP:
|
|
WL_DBG(("network eap\n"));
|
|
+ break;
|
|
default:
|
|
val = 2;
|
|
WL_ERR(("invalid auth type (%d)\n", sme->auth_type));
|
|
@@ -2347,26 +2348,24 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
|
|
const wl_event_msg_t *e, void *data)
|
|
{
|
|
struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
|
|
+ s32 err = 0;
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
|
struct cfg80211_bss *bss;
|
|
struct wlc_ssid *ssid;
|
|
+ struct cfg80211_roam_info roam_info;
|
|
ssid = &wl->profile->ssid;
|
|
bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
|
|
ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
|
|
- struct cfg80211_roam_info roam_info = {
|
|
// Rel. commit "cfg80211: Indicate MLO connection info in connect and roam callbacks" (Veerendranath Jakkam, Wed Jun 8)
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
|
|
- .bss = bss,
|
|
+ roam_info.bss = bss;
|
|
#else
|
|
- .links[0].bss = bss,
|
|
+ roam_info.links[0].bss = bss;
|
|
#endif
|
|
- .req_ie = conn_info->req_ie,
|
|
- .req_ie_len = conn_info->req_ie_len,
|
|
- .resp_ie = conn_info->resp_ie,
|
|
- .resp_ie_len = conn_info->resp_ie_len,
|
|
- };
|
|
+ roam_info.req_ie = conn_info->req_ie;
|
|
+ roam_info.req_ie_len = conn_info->req_ie_len;
|
|
+ roam_info.resp_ie = conn_info->resp_ie;
|
|
#endif
|
|
- s32 err = 0;
|
|
|
|
wl_get_assoc_ies(wl);
|
|
memcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);
|
|
diff --git a/src/wl/sys/wl_iw.h b/src/wl/sys/wl_iw.h
|
|
index 3ab084f..471d11f 100644
|
|
--- a/src/wl/sys/wl_iw.h
|
|
+++ b/src/wl/sys/wl_iw.h
|
|
@@ -70,7 +70,6 @@ struct cntry_locales_custom {
|
|
#define WL_IW_RSSI_EXCELLENT -57
|
|
#define WL_IW_RSSI_INVALID 0
|
|
#define MAX_WX_STRING 80
|
|
-#define isprint(c) bcm_isprint(c)
|
|
#define WL_IW_SET_ACTIVE_SCAN (SIOCIWFIRSTPRIV+1)
|
|
#define WL_IW_GET_RSSI (SIOCIWFIRSTPRIV+3)
|
|
#define WL_IW_SET_PASSIVE_SCAN (SIOCIWFIRSTPRIV+5)
|
|
diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
|
|
index 25c4706..4c7e238 100644
|
|
--- a/src/wl/sys/wl_linux.c
|
|
+++ b/src/wl/sys/wl_linux.c
|
|
@@ -791,14 +791,15 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
pci_read_config_dword(pdev, 0x40, &val);
|
|
if ((val & 0x0000ff00) != 0)
|
|
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
|
|
- bar1_size = pci_resource_len(pdev, 2);
|
|
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
|
|
- bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
|
|
- bar1_size);
|
|
- #else
|
|
- bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
|
|
- bar1_size);
|
|
- #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
|
|
+
|
|
+ bar1_size = pci_resource_len(pdev, 2);
|
|
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
|
|
+ bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
|
|
+ bar1_size);
|
|
+ #else
|
|
+ bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
|
|
+ bar1_size);
|
|
+ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) */
|
|
wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
|
|
pdev->irq, bar1_addr, bar1_size);
|
|
|
|
--
|
|
2.45.1
|
|
|