bcm_sta: remove old patches

This commit is contained in:
Stefan Saraev 2013-07-01 23:14:55 +03:00 committed by Stephan Raue
parent 4a837a3358
commit 9ad1d9ebde
6 changed files with 0 additions and 451 deletions

View File

@ -1,21 +0,0 @@
--- 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-25 18:15:43.356676382 +0100
@@ -240,6 +240,7 @@
static int nompc = 0;
module_param(nompc, int, 0);
+MODULE_LICENSE("MIXED/Proprietary");
#ifdef quote_str
#undef quote_str
--- a/x86-64/src/wl/sys/wl_linux.c 2010-12-15 02:58:07.000000000 +0100
+++ b/x86-64/src/wl/sys/wl_linux.c 2010-12-25 18:15:43.356676382 +0100
@@ -240,6 +240,7 @@
static int nompc = 0;
module_param(nompc, int, 0);
+MODULE_LICENSE("MIXED/Proprietary");
#ifdef quote_str
#undef quote_str

View File

@ -1,58 +0,0 @@
--- 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

@ -1,162 +0,0 @@
--- 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

@ -1,22 +0,0 @@
--- 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,158 +0,0 @@
From 00da4982e9175921cfb26d1377bf49ece3bb41cb Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Tue, 26 Mar 2013 23:10:17 +0200
Subject: [PATCH] linux 3.8 support
---
x86-32/src/include/bcmutils.h | 5 +++++
x86-32/src/wl/sys/wl_cfg80211.c | 25 ++++++++++++++++++++++++-
x86-64/src/include/bcmutils.h | 4 ++++
x86-64/src/wl/sys/wl_cfg80211.c | 25 ++++++++++++++++++++++++-
4 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/x86-32/src/include/bcmutils.h b/x86-32/src/include/bcmutils.h
index fa6df04..9a8cab4 100644
--- a/x86-32/src/include/bcmutils.h
+++ b/x86-32/src/include/bcmutils.h
@@ -555,7 +555,12 @@ extern void printbig(char *buf);
extern void prhex(const char *msg, uchar *buf, uint len);
extern bcm_tlv_t *BCMROMFN(bcm_next_tlv)(bcm_tlv_t *elt, int *buflen);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(void *buf, int buflen, uint key);
+#else
+extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(const void *buf, int buflen, uint key);
+#endif
+
extern bcm_tlv_t *BCMROMFN(bcm_parse_ordered_tlvs)(void *buf, int buflen, uint key);
extern const char *bcmerrorstr(int bcmerror);
diff --git a/x86-32/src/wl/sys/wl_cfg80211.c b/x86-32/src/wl/sys/wl_cfg80211.c
index 09d04ed..698b004 100644
--- a/x86-32/src/wl/sys/wl_cfg80211.c
+++ b/x86-32/src/wl/sys/wl_cfg80211.c
@@ -744,7 +744,11 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
else
memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
+#else
+ wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size);
+#endif
err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size);
if (err) {
@@ -2047,9 +2051,14 @@ static s32 wl_update_bss_info(struct wl_priv *wl)
struct bcm_tlv *tim;
u16 beacon_interval;
s32 dtim_period;
+ s32 err = 0;
size_t ie_len;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
u8 *ie;
- s32 err = 0;
+#else
+ const u8 *ie;
+ const struct cfg80211_bss_ies *ies;
+#endif
ssid = &wl->profile->ssid;
bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
@@ -2079,8 +2088,22 @@ static s32 wl_update_bss_info(struct wl_priv *wl)
beacon_interval = cpu_to_le16(bi->beacon_period);
} else {
WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
ie = bss->information_elements;
ie_len = bss->len_information_elements;
+#else
+ rcu_read_lock();
+ ies = (const struct cfg80211_bss_ies*)rcu_dereference(bss->ies);
+ if (!ies) {
+ /* This should never happen */
+ rcu_read_unlock();
+ err = -EIO;
+ goto update_bss_info_out;
+ }
+ ie = ies->data;
+ ie_len = (size_t)(ies->len);
+ rcu_read_unlock();
+#endif
beacon_interval = bss->beacon_interval;
cfg80211_put_bss(bss);
}
diff --git a/x86-64/src/include/bcmutils.h b/x86-64/src/include/bcmutils.h
index fa6df04..1200bf0 100644
--- a/x86-64/src/include/bcmutils.h
+++ b/x86-64/src/include/bcmutils.h
@@ -555,7 +555,11 @@ extern void printbig(char *buf);
extern void prhex(const char *msg, uchar *buf, uint len);
extern bcm_tlv_t *BCMROMFN(bcm_next_tlv)(bcm_tlv_t *elt, int *buflen);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(void *buf, int buflen, uint key);
+#else
+extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(const void *buf, int buflen, uint key);
+#endif
extern bcm_tlv_t *BCMROMFN(bcm_parse_ordered_tlvs)(void *buf, int buflen, uint key);
extern const char *bcmerrorstr(int bcmerror);
diff --git a/x86-64/src/wl/sys/wl_cfg80211.c b/x86-64/src/wl/sys/wl_cfg80211.c
index 94aac25..244243f 100644
--- a/x86-64/src/wl/sys/wl_cfg80211.c
+++ b/x86-64/src/wl/sys/wl_cfg80211.c
@@ -744,7 +744,11 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
else
memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
+#else
+ wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size);
+#endif
err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size);
if (err) {
@@ -2047,9 +2051,14 @@ static s32 wl_update_bss_info(struct wl_priv *wl)
struct bcm_tlv *tim;
u16 beacon_interval;
s32 dtim_period;
+ s32 err = 0;
size_t ie_len;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
u8 *ie;
- s32 err = 0;
+#else
+ const u8 *ie;
+ const struct cfg80211_bss_ies *ies;
+#endif
ssid = &wl->profile->ssid;
bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
@@ -2079,8 +2088,22 @@ static s32 wl_update_bss_info(struct wl_priv *wl)
beacon_interval = cpu_to_le16(bi->beacon_period);
} else {
WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
ie = bss->information_elements;
ie_len = bss->len_information_elements;
+#else
+ rcu_read_lock();
+ ies = (const struct cfg80211_bss_ies*)rcu_dereference(bss->ies);
+ if (!ies) {
+ /* This should never happen */
+ rcu_read_unlock();
+ err = -EIO;
+ goto update_bss_info_out;
+ }
+ ie = ies->data;
+ ie_len = (size_t)(ies->len);
+ rcu_read_unlock();
+#endif
beacon_interval = bss->beacon_interval;
cfg80211_put_bss(bss);
}
--
1.7.2.5

View File

@ -1,30 +0,0 @@
diff -Naur bcm_sta-5.100.82.112/x86-32/src/wl/sys/wl_cfg80211.c bcm_sta-5.100.82.112.patch/x86-32/src/wl/sys/wl_cfg80211.c
--- bcm_sta-5.100.82.112/x86-32/src/wl/sys/wl_cfg80211.c 2011-10-22 18:55:54.000000000 +0200
+++ bcm_sta-5.100.82.112.patch/x86-32/src/wl/sys/wl_cfg80211.c 2013-05-06 07:03:19.146764181 +0200
@@ -2077,7 +2077,11 @@
ie = bss->information_elements;
ie_len = bss->len_information_elements;
beacon_interval = bss->beacon_interval;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
cfg80211_put_bss(bss);
+#else
+ cfg80211_put_bss(wl_to_wiphy(wl), bss);
+#endif
}
tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
diff -Naur bcm_sta-5.100.82.112/x86-64/src/wl/sys/wl_cfg80211.c bcm_sta-5.100.82.112.patch/x86-64/src/wl/sys/wl_cfg80211.c
--- bcm_sta-5.100.82.112/x86-64/src/wl/sys/wl_cfg80211.c 2011-10-22 18:56:55.000000000 +0200
+++ bcm_sta-5.100.82.112.patch/x86-64/src/wl/sys/wl_cfg80211.c 2013-05-06 07:03:55.443652962 +0200
@@ -2077,7 +2077,11 @@
ie = bss->information_elements;
ie_len = bss->len_information_elements;
beacon_interval = bss->beacon_interval;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
cfg80211_put_bss(bss);
+#else
+ cfg80211_put_bss(wl_to_wiphy(wl), bss);
+#endif
}
tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);