module-broadcom_wl fix build in 4.0.5
thanks @dewil
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
diff -urN a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
|
||||
--- a/src/wl/sys/wl_linux.c 2015-01-06 12:33:42.981659618 +0100
|
||||
+++ b/src/wl/sys/wl_linux.c 2015-01-06 12:34:05.647395418 +0100
|
||||
@@ -2157,8 +2157,8 @@
|
||||
wlif = WL_DEV_IF(dev);
|
||||
wl = WL_INFO(dev);
|
||||
|
||||
+ skb->prev = NULL;
|
||||
if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {
|
||||
- skb->prev = NULL;
|
||||
|
||||
TXQ_LOCK(wl);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/Makefile 2014-06-26 10:42:08.000000000 +0000
|
||||
+++ b/Makefile 2014-07-17 22:44:01.662297228 +0000
|
||||
@@ -126,6 +126,8 @@
|
||||
EXTRA_CFLAGS += -I$(src)/src/shared/bcmwifi/include
|
||||
#EXTRA_CFLAGS += -DBCMDBG_ASSERT -DBCMDBG_ERR
|
||||
|
||||
+EXTRA_CFLAGS += -Wno-date-time
|
||||
+
|
||||
EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped
|
||||
|
||||
KBASE ?= /lib/modules/`uname -r`
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/src/wl/sys/wl_linux.c 2014-06-26 10:42:08.000000000 +0000
|
||||
+++ b/src/wl/sys/wl_linux.c 2014-07-17 22:44:26.254759666 +0000
|
||||
@@ -205,6 +205,7 @@
|
||||
|
||||
static int nompc = 0;
|
||||
module_param(nompc, int, 0);
|
||||
+MODULE_LICENSE("Mixed/Proprietary");
|
||||
|
||||
#ifdef quote_str
|
||||
#undef quote_str
|
||||
@@ -0,0 +1,26 @@
|
||||
--- a/src/wl/sys/wl_cfg80211_hybrid.c 2015-03-16 14:39:29.899350026 +0100
|
||||
+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2015-03-16 14:39:06.732682365 +0100
|
||||
@@ -1452,7 +1452,11 @@
|
||||
WL_DBG(("Could not get rate (%d)\n", err));
|
||||
} else {
|
||||
rate = dtoh32(rate);
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
|
||||
+ sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
|
||||
+ #else
|
||||
sinfo->filled |= STATION_INFO_TX_BITRATE;
|
||||
+ #endif
|
||||
sinfo->txrate.legacy = rate * 5;
|
||||
WL_DBG(("Rate %d Mbps\n", (rate / 2)));
|
||||
}
|
||||
@@ -1465,7 +1469,11 @@
|
||||
return err;
|
||||
}
|
||||
rssi = dtoh32(scb_val.val);
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
|
||||
+ sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
|
||||
+ #else
|
||||
sinfo->filled |= STATION_INFO_SIGNAL;
|
||||
+ #endif
|
||||
sinfo->signal = rssi;
|
||||
WL_DBG(("RSSI %d dBm\n", rssi));
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
--- a/src/wl/sys/wl_cfg80211_hybrid.c 2014-06-26 12:42:08.000000000 +0200
|
||||
+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2014-10-08 18:47:07.549476082 +0200
|
||||
@@ -2071,7 +2071,22 @@
|
||||
wl_get_assoc_ies(wl);
|
||||
memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
|
||||
wl_update_bss_info(wl);
|
||||
- cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
|
||||
+ {
|
||||
+ struct wl_bss_info *bi;
|
||||
+ u16 bss_info_channel;
|
||||
+ struct ieee80211_channel *channel;
|
||||
+ u32 freq;
|
||||
+
|
||||
+ bi = (struct wl_bss_info *)(wl->extra_buf + 4);
|
||||
+ bss_info_channel = bi->ctl_ch ? bi->ctl_ch : CHSPEC_CHANNEL(bi->chanspec);
|
||||
+
|
||||
+ freq = ieee80211_channel_to_frequency(bss_info_channel,
|
||||
+ (bss_info_channel <= CH_MAX_2G_CHANNEL) ?
|
||||
+ IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
|
||||
+
|
||||
+ channel = ieee80211_get_channel(wl_to_wiphy(wl), freq);
|
||||
+ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
|
||||
+ }
|
||||
set_bit(WL_STATUS_CONNECTED, &wl->status);
|
||||
wl->profile->active = true;
|
||||
}
|
||||
--- a/src/wl/sys/wl_linux.c 2014-06-26 12:42:08.000000000 +0200
|
||||
+++ b/src/wl/sys/wl_linux.c 2014-10-08 18:47:19.526693719 +0200
|
||||
@@ -878,7 +878,7 @@
|
||||
static SIMPLE_DEV_PM_OPS(wl_pm_ops, wl_suspend, wl_resume);
|
||||
#endif
|
||||
|
||||
-static struct pci_driver wl_pci_driver = {
|
||||
+static struct pci_driver wl_pci_driver __refdata = {
|
||||
.name = "wl",
|
||||
.probe = wl_pci_probe,
|
||||
.remove = __devexit_p(wl_remove),
|
||||
@@ -1307,7 +1307,12 @@
|
||||
dev->priv = priv_link;
|
||||
#else
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0))
|
||||
dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup);
|
||||
+#else
|
||||
+ dev = alloc_netdev(sizeof(priv_link_t), intf_name, NET_NAME_UNKNOWN,
|
||||
+ ether_setup);
|
||||
+#endif
|
||||
if (!dev) {
|
||||
WL_ERROR(("wl%d: %s: alloc_netdev failed\n",
|
||||
(wl->pub)?wl->pub->unit:wlif->subunit, __FUNCTION__));
|
||||
--- a/src/wl/sys/wl_cfg80211_hybrid.c 2014-12-10 03:43:11.145810000 +0000
|
||||
+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2014-12-10 03:44:37.700680960 +0000
|
||||
@@ -2010,7 +2010,7 @@
|
||||
|
||||
notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
|
||||
notify_ielen = le32_to_cpu(bi->ie_length);
|
||||
- cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
|
||||
+ cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet),
|
||||
0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
|
||||
(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
|
||||
@@ -0,0 +1,11 @@
|
||||
diff -urN a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
|
||||
--- a/src/wl/sys/wl_linux.c 2013-08-01 09:52:22.000000000 +0300
|
||||
+++ b/src/wl/sys/wl_linux.c 2013-09-27 09:20:11.495023471 +0300
|
||||
@@ -235,7 +235,7 @@
|
||||
#define to_str(s) #s
|
||||
#define quote_str(s) to_str(s)
|
||||
|
||||
-#define BRCM_WLAN_IFNAME eth%d
|
||||
+#define BRCM_WLAN_IFNAME wlan%d
|
||||
|
||||
static char intf_name[IFNAMSIZ] = quote_str(BRCM_WLAN_IFNAME);
|
||||
Reference in New Issue
Block a user