bcm_sta: update patches

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-02-01 16:27:57 +01:00
parent af534fc7a9
commit 564d8cf1b4
7 changed files with 242 additions and 134 deletions

View File

@ -0,0 +1,58 @@
--- a/x86-32/src/wl/sys/wl_cfg80211.c 2013-01-25 13:59:21.000000000 +0100
+++ b/x86-32/src/wl/sys/wl_cfg80211.c 2013-01-31 07:47:40.000000000 +0100
@@ -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);
--- a/x86-32/src/wl/sys/wl_linux.c 2013-01-25 13:59:21.000000000 +0100
+++ b/x86-32/src/wl/sys/wl_linux.c 2013-01-31 07:47:40.000000000 +0100
@@ -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:
--- a/x86-64/src/wl/sys/wl_cfg80211.c 2013-01-25 13:59:21.000000000 +0100
+++ b/x86-64/src/wl/sys/wl_cfg80211.c 2013-01-31 07:49:06.000000000 +0100
@@ -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);
--- a/x86-64/src/wl/sys/wl_linux.c 2013-01-25 13:59:21.000000000 +0100
+++ b/x86-64/src/wl/sys/wl_linux.c 2013-01-31 07:50:03.000000000 +0100
@@ -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:

View File

@ -0,0 +1,162 @@
--- a/x86-32/Makefile 2013-01-25 13:59:21.000000000 +0100
+++ b/x86-32/Makefile 2013-01-31 10:00:10.000000000 +0100
@@ -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_WEXT_ONLY:=$(strip $(shell \
- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \
- echo FALSE; \
- else \
- echo TRUE; \
- fi \
- ))
+ LINUXVER_GOODFOR_CFG80211:=TRUE
+
+ LINUXVER_WEXT_ONLY:=FALSE
ifneq ($(API),)
ifeq ($(API), CFG80211)
--- a/x86-32/src/wl/sys/wl_cfg80211.c 2013-01-25 13:59:21.000000000 +0100
+++ b/x86-32/src/wl/sys/wl_cfg80211.c 2013-01-31 10:00:10.000000000 +0100
@@ -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);
--- a/x86-32/src/wl/sys/wl_iw.h 2013-01-25 13:59:21.000000000 +0100
+++ b/x86-32/src/wl/sys/wl_iw.h 2013-01-31 10:00:10.000000000 +0100
@@ -15,6 +15,7 @@
#ifndef _wl_iw_h_
#define _wl_iw_h_
+#include <linux/semaphore.h>
#include <linux/wireless.h>
#include <typedefs.h>
--- a/x86-32/src/wl/sys/wl_linux.c 2013-01-25 13:59:21.000000000 +0100
+++ b/x86-32/src/wl/sys/wl_linux.c 2013-01-31 10:00:10.000000000 +0100
@@ -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
};
--- a/x86-64/Makefile 2013-01-25 13:59:21.000000000 +0100
+++ b/x86-64/Makefile 2013-01-31 10:06:20.000000000 +0100
@@ -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_WEXT_ONLY:=$(strip $(shell \
- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \
- echo FALSE; \
- else \
- echo TRUE; \
- fi \
- ))
+ LINUXVER_GOODFOR_CFG80211:=TRUE
+
+ LINUXVER_WEXT_ONLY:=FALSE
ifneq ($(API),)
ifeq ($(API), CFG80211)
--- a/x86-64/src/wl/sys/wl_cfg80211.c 2013-01-25 13:59:21.000000000 +0100
+++ b/x86-64/src/wl/sys/wl_cfg80211.c 2013-01-31 10:07:35.000000000 +0100
@@ -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);
--- a/x86-64/src/wl/sys/wl_iw.h 2013-01-25 13:59:21.000000000 +0100
+++ b/x86-64/src/wl/sys/wl_iw.h 2013-01-31 10:07:58.000000000 +0100
@@ -15,6 +15,7 @@
#ifndef _wl_iw_h_
#define _wl_iw_h_
+#include <linux/semaphore.h>
#include <linux/wireless.h>
#include <typedefs.h>
--- a/x86-64/src/wl/sys/wl_linux.c 2013-01-25 13:59:21.000000000 +0100
+++ b/x86-64/src/wl/sys/wl_linux.c 2013-01-31 10:08:30.000000000 +0100
@@ -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
};

View File

@ -0,0 +1,22 @@
--- a/x86-32/src/wl/sys/wl_linux.c 2010-12-15 02:58:07.000000000 +0100
+++ b/x86-32/src/wl/sys/wl_linux.c 2010-12-27 22:14:38.679428984 +0100
@@ -251,7 +251,7 @@
#define quote_str(s) to_str(s)
#ifndef BRCM_WLAN_IFNAME
-#define BRCM_WLAN_IFNAME eth%d
+#define BRCM_WLAN_IFNAME wlan%d
#endif
static char name[IFNAMSIZ] = quote_str(BRCM_WLAN_IFNAME);
--- a/x86-64/src/wl/sys/wl_linux.c 2010-12-15 03:01:09.000000000 +0100
+++ b/x86-64/src/wl/sys/wl_linux.c 2010-12-27 22:15:18.273865927 +0100
@@ -251,7 +251,7 @@
#define quote_str(s) to_str(s)
#ifndef BRCM_WLAN_IFNAME
-#define BRCM_WLAN_IFNAME eth%d
+#define BRCM_WLAN_IFNAME wlan%d
#endif
static char name[IFNAMSIZ] = quote_str(BRCM_WLAN_IFNAME);

View File

@ -1,29 +0,0 @@
--- a/x86-32/src/wl/sys/wl_cfg80211.c 2011-10-23 03:56:55.000000000 +1100
+++ b/x86-32/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);
--- a/x86-32/src/wl/sys/wl_linux.c 2011-10-23 03:56:55.000000000 +1100
+++ b/x86-32/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:

View File

@ -1,79 +0,0 @@
--- a/x86-32/Makefile 2012-10-15 23:08:11.256904135 +1100
+++ b/x86-32/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)
--- a/x86-32/src/wl/sys/wl_cfg80211.c 2012-10-15 23:08:11.266904352 +1100
+++ b/x86-32/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);
--- a/x86-32/src/wl/sys/wl_iw.h 2012-10-15 23:08:11.266904352 +1100
+++ b/x86-32/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>
--- a/x86-32/src/wl/sys/wl_linux.c 2012-10-15 23:08:11.266904352 +1100
+++ b/x86-32/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
};

View File

@ -1,26 +0,0 @@
diff -Naur bcm_sta-5.100.82.38/x86-32/src/wl/sys/wl_linux.c bcm_sta-5.100.82.38.patch/x86-32/src/wl/sys/wl_linux.c
--- bcm_sta-5.100.82.38/x86-32/src/wl/sys/wl_linux.c 2010-12-15 02:58:07.000000000 +0100
+++ bcm_sta-5.100.82.38.patch/x86-32/src/wl/sys/wl_linux.c 2010-12-27 22:14:38.679428984 +0100
@@ -251,7 +251,7 @@
#define quote_str(s) to_str(s)
#ifndef BRCM_WLAN_IFNAME
-#define BRCM_WLAN_IFNAME eth%d
+#define BRCM_WLAN_IFNAME wlan%d
#endif
static char name[IFNAMSIZ] = quote_str(BRCM_WLAN_IFNAME);
diff -Naur bcm_sta-5.100.82.38/x86-32/src/wl/sys/wl_linux.c.orig bcm_sta-5.100.82.38.patch/x86-32/src/wl/sys/wl_linux.c.orig
diff -Naur bcm_sta-5.100.82.38/x86-64/src/wl/sys/wl_linux.c bcm_sta-5.100.82.38.patch/x86-64/src/wl/sys/wl_linux.c
--- bcm_sta-5.100.82.38/x86-64/src/wl/sys/wl_linux.c 2010-12-15 03:01:09.000000000 +0100
+++ bcm_sta-5.100.82.38.patch/x86-64/src/wl/sys/wl_linux.c 2010-12-27 22:15:18.273865927 +0100
@@ -251,7 +251,7 @@
#define quote_str(s) to_str(s)
#ifndef BRCM_WLAN_IFNAME
-#define BRCM_WLAN_IFNAME eth%d
+#define BRCM_WLAN_IFNAME wlan%d
#endif
static char name[IFNAMSIZ] = quote_str(BRCM_WLAN_IFNAME);
diff -Naur bcm_sta-5.100.82.38/x86-64/src/wl/sys/wl_linux.c.orig bcm_sta-5.100.82.38.patch/x86-64/src/wl/sys/wl_linux.c.orig