mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-23 18:14:54 +08:00
broadcom-wl rebuild, clean-up, better patches
This commit is contained in:
parent
a6bcda1ff2
commit
ad4607bb22
@ -9,7 +9,7 @@ _kver="$(cat /lib/modules/${_extramodules}/version)"
|
||||
|
||||
pkgname=broadcom-wl
|
||||
pkgver=5.100.82.112
|
||||
pkgrel=12
|
||||
pkgrel=13
|
||||
pkgdesc='Broadcom 802.11abgn hybrid Linux networking device driver'
|
||||
arch=('x86_64')
|
||||
url='http://www.broadcom.com/support/802.11/linux_sta.php'
|
||||
@ -17,22 +17,16 @@ license=('custom')
|
||||
depends=('linux>=3.6' 'linux<3.7')
|
||||
makedepends=('linux-headers')
|
||||
|
||||
[[ $CARCH = x86_64 ]] && ARCH=x86_64 || ARCH=x86_32
|
||||
source=("http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_${ARCH}-v${pkgver//./_}.tar.gz"
|
||||
source=("http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_x86_64-v${pkgver//./_}.tar.gz"
|
||||
'modprobe.d'
|
||||
'linux3.patch'
|
||||
'linux3.2.patch'
|
||||
'license.patch'
|
||||
'semaphore.patch'
|
||||
'linux3.4.patch')
|
||||
sha1sums=('01aa32f9e85621253a3f15cf4361bb80d41da3e8'
|
||||
'user-ioctl.patch'
|
||||
'linux-recent.patch')
|
||||
sha1sums=('5bd78c20324e6a4aa9f3fafdc6f0155e884d5131'
|
||||
'89bf92286ede30dd85304c6c4e42e89cfdc0f60a'
|
||||
'3e18f905bbe5e8b99a53d6ecb3b80a919f3531f2'
|
||||
'229f41b7c371842bf9c1c81b03f34ee32fcb3310'
|
||||
'ea7b67982ddc0f56fd3becb9914fd4458fe7d373'
|
||||
'105f8e1d48ebe1f25d53859e5ab9326a27435c66'
|
||||
'4f902a8c0da2efd0fe9f6547c8d01f5325ca9fe8')
|
||||
[[ $CARCH = x86_64 ]] && sha1sums[0]='5bd78c20324e6a4aa9f3fafdc6f0155e884d5131'
|
||||
'e0366dd15ea5b25aae0f61bec6be7a203dfca7e4'
|
||||
'df3cd65e24beed349a40abcf476bdaa82bbc57d3')
|
||||
|
||||
backup=('etc/modprobe.d/broadcom-wl.conf')
|
||||
install=install
|
||||
@ -40,11 +34,9 @@ install=install
|
||||
build() {
|
||||
cd "${srcdir}"
|
||||
|
||||
patch -p1 -i linux3.patch
|
||||
patch -p0 src/wl/sys/wl_linux.c < linux3.2.patch
|
||||
patch -p1 -i license.patch
|
||||
patch -p1 -i semaphore.patch
|
||||
patch -p1 -i linux3.4.patch
|
||||
patch -p1 -i linux-recent.patch
|
||||
patch -p1 -i user-ioctl.patch
|
||||
|
||||
make -C /lib/modules/"${_kver}"/build M=`pwd`
|
||||
}
|
||||
|
84
broadcom-wl/linux-recent.patch
Normal file
84
broadcom-wl/linux-recent.patch
Normal file
@ -0,0 +1,84 @@
|
||||
diff -Naur old/Makefile new/Makefile
|
||||
--- old/Makefile 2012-10-15 23:08:11.256904135 +1100
|
||||
+++ new/Makefile 2012-10-15 23:08:18.970262327 +1100
|
||||
@@ -15,21 +15,9 @@
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
|
||||
- LINUXVER_GOODFOR_CFG80211:=$(strip $(shell \
|
||||
- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" ]; then \
|
||||
- echo TRUE; \
|
||||
- else \
|
||||
- echo FALSE; \
|
||||
- fi \
|
||||
- ))
|
||||
+ LINUXVER_GOODFOR_CFG80211:=TRUE
|
||||
|
||||
- LINUXVER_WEXT_ONLY:=$(strip $(shell \
|
||||
- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \
|
||||
- echo FALSE; \
|
||||
- else \
|
||||
- echo TRUE; \
|
||||
- fi \
|
||||
- ))
|
||||
+ LINUXVER_WEXT_ONLY:=FALSE
|
||||
|
||||
ifneq ($(API),)
|
||||
ifeq ($(API), CFG80211)
|
||||
diff -Naur old/src/wl/sys/wl_cfg80211.c new/src/wl/sys/wl_cfg80211.c
|
||||
--- old/src/wl/sys/wl_cfg80211.c 2012-10-15 23:08:11.266904352 +1100
|
||||
+++ new/src/wl/sys/wl_cfg80211.c 2012-10-15 23:08:32.313638398 +1100
|
||||
@@ -42,7 +42,7 @@
|
||||
enum nl80211_iftype type, u32 *flags, struct vif_params *params);
|
||||
static s32 __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
|
||||
struct cfg80211_scan_request *request, struct cfg80211_ssid *this_ssid);
|
||||
-static s32 wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
|
||||
+static s32 wl_cfg80211_scan(struct wiphy *wiphy,
|
||||
struct cfg80211_scan_request *request);
|
||||
static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed);
|
||||
static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
|
||||
@@ -570,10 +570,12 @@
|
||||
}
|
||||
|
||||
static s32
|
||||
-wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
|
||||
+wl_cfg80211_scan(struct wiphy *wiphy,
|
||||
struct cfg80211_scan_request *request)
|
||||
{
|
||||
s32 err = 0;
|
||||
+ struct wl_priv *wl = wiphy_to_wl(wiphy);
|
||||
+ struct net_device *ndev = wl_to_ndev(wl);
|
||||
|
||||
CHECK_SYS_UP();
|
||||
err = __wl_cfg80211_scan(wiphy, ndev, request, NULL);
|
||||
diff -Naur old/src/wl/sys/wl_iw.h new/src/wl/sys/wl_iw.h
|
||||
--- old/src/wl/sys/wl_iw.h 2012-10-15 23:08:11.266904352 +1100
|
||||
+++ new/src/wl/sys/wl_iw.h 2012-10-15 23:08:18.973595675 +1100
|
||||
@@ -15,6 +15,7 @@
|
||||
#ifndef _wl_iw_h_
|
||||
#define _wl_iw_h_
|
||||
|
||||
+#include <linux/semaphore.h>
|
||||
#include <linux/wireless.h>
|
||||
|
||||
#include <typedefs.h>
|
||||
diff -Naur old/src/wl/sys/wl_linux.c new/src/wl/sys/wl_linux.c
|
||||
--- old/src/wl/sys/wl_linux.c 2012-10-15 23:08:11.266904352 +1100
|
||||
+++ new/src/wl/sys/wl_linux.c 2012-10-15 23:08:18.973595675 +1100
|
||||
@@ -40,7 +40,6 @@
|
||||
#include <linux/pci_ids.h>
|
||||
#define WLC_MAXBSSCFG 1
|
||||
|
||||
-#include <asm/system.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/pgtable.h>
|
||||
@@ -385,7 +384,7 @@
|
||||
#endif
|
||||
.ndo_get_stats = wl_get_stats,
|
||||
.ndo_set_mac_address = wl_set_mac_address,
|
||||
- .ndo_set_multicast_list = wl_set_multicast_list,
|
||||
+ .ndo_set_rx_mode = wl_set_multicast_list,
|
||||
.ndo_do_ioctl = wl_ioctl
|
||||
};
|
||||
|
@ -1,4 +0,0 @@
|
||||
332c332
|
||||
< .ndo_set_multicast_list = wl_set_multicast_list,
|
||||
---
|
||||
> .ndo_set_rx_mode = wl_set_multicast_list,
|
@ -1,14 +0,0 @@
|
||||
From: Eugene San (eugenesan) <eugenesan@gmail.com>
|
||||
Subject: [PATCH 1/1] add support for linux 3.4
|
||||
--- a/src/wl/sys/wl_linux.c
|
||||
+++ b/src/wl/sys/wl_linux.c
|
||||
@@ -40,7 +40,9 @@
|
||||
#include <linux/pci_ids.h>
|
||||
#define WLC_MAXBSSCFG 1
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 1)
|
||||
#include <asm/system.h>
|
||||
+#endif
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/pgtable.h>
|
@ -1,21 +0,0 @@
|
||||
diff -Naur broadcom-sta-5.100.82.111.orig/Makefile broadcom-sta-5.100.82.111/Makefile
|
||||
--- broadcom-sta-5.100.82.111.orig/Makefile 2011-10-06 08:16:10.000000000 +0900
|
||||
+++ broadcom-sta-5.100.82.111/Makefile 2011-10-24 08:54:26.000000000 +0900
|
||||
@@ -16,7 +16,7 @@
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
|
||||
LINUXVER_GOODFOR_CFG80211:=$(strip $(shell \
|
||||
- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" ]; then \
|
||||
+ if [ "$(VERSION)" -ge "3" -o "$(VERSION)" -eq "2" -a "$(PATCHLEVEL)" -ge "6" -a "0$(SUBLEVEL)" -ge "32" ]; then \
|
||||
echo TRUE; \
|
||||
else \
|
||||
echo FALSE; \
|
||||
@@ -24,7 +24,7 @@
|
||||
))
|
||||
|
||||
LINUXVER_WEXT_ONLY:=$(strip $(shell \
|
||||
- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \
|
||||
+ if [ "$(VERSION)" -ge "3" -o "$(VERSION)" -eq "2" -a "$(PATCHLEVEL)" -ge "6" -a "0$(SUBLEVEL)" -ge "17" ]; then \
|
||||
echo FALSE; \
|
||||
else \
|
||||
echo TRUE; \
|
@ -1,11 +0,0 @@
|
||||
diff -aur old/src/wl/sys/wl_iw.h new/src/wl/sys/wl_iw.h
|
||||
--- old/src/wl/sys/wl_iw.h 2010-12-15 02:58:07.000000000 +0100
|
||||
+++ new/src/wl/sys/wl_iw.h 2010-12-25 18:17:01.826676379 +0100
|
||||
@@ -15,6 +15,7 @@
|
||||
#ifndef _wl_iw_h_
|
||||
#define _wl_iw_h_
|
||||
|
||||
+#include <linux/semaphore.h>
|
||||
#include <linux/wireless.h>
|
||||
|
||||
#include <typedefs.h>
|
31
broadcom-wl/user-ioctl.patch
Normal file
31
broadcom-wl/user-ioctl.patch
Normal file
@ -0,0 +1,31 @@
|
||||
diff -aur old/src/wl/sys/wl_cfg80211.c new/src/wl/sys/wl_cfg80211.c
|
||||
--- old/src/wl/sys/wl_cfg80211.c 2011-10-23 03:56:55.000000000 +1100
|
||||
+++ new/src/wl/sys/wl_cfg80211.c 2012-05-24 18:43:17.324465658 +1000
|
||||
@@ -1466,7 +1466,10 @@
|
||||
scb_val.val = 0;
|
||||
err = wl_dev_ioctl(dev, WLC_GET_RSSI, &scb_val, sizeof(scb_val_t));
|
||||
if (err) {
|
||||
- WL_ERR(("Could not get rssi (%d)\n", err));
|
||||
+ if (err != -EINVAL) {
|
||||
+ // Don't fill syslog with EINVAL error
|
||||
+ WL_ERR(("Could not get rssi (%d)\n", err));
|
||||
+ }
|
||||
return err;
|
||||
}
|
||||
rssi = dtoh32(scb_val.val);
|
||||
diff -aur old/src/wl/sys/wl_linux.c new/src/wl/sys/wl_linux.c
|
||||
--- old/src/wl/sys/wl_linux.c 2011-10-23 03:56:55.000000000 +1100
|
||||
+++ new/src/wl/sys/wl_linux.c 2012-05-24 18:43:17.324465658 +1000
|
||||
@@ -1579,11 +1579,7 @@
|
||||
}
|
||||
|
||||
WL_LOCK(wl);
|
||||
- if (!capable(CAP_NET_ADMIN)) {
|
||||
- bcmerror = BCME_EPERM;
|
||||
- } else {
|
||||
- bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
|
||||
- }
|
||||
+ bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
|
||||
WL_UNLOCK(wl);
|
||||
|
||||
done1:
|
Loading…
Reference in New Issue
Block a user