* [gentoo-commits] gentoo-x86 commit in net-wireless/broadcom-sta/files: broadcom-sta-5.100.82.112-linux-3.9.patch broadcom-sta-5.100.82.112-linux-3.6.patch broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch broadcom-sta-5.100.82.112-linux-3.8.patch broadcom-sta-5.100.82.112-linux-3.4.patch broadcom-sta-5.100.82.112-remove-rssi-errors.patch
@ 2013-05-12 10:50 Sergey Popov (pinkbyte)
0 siblings, 0 replies; only message in thread
From: Sergey Popov (pinkbyte) @ 2013-05-12 10:50 UTC (permalink / raw
To: gentoo-commits
pinkbyte 13/05/12 10:50:32
Added: broadcom-sta-5.100.82.112-linux-3.9.patch
broadcom-sta-5.100.82.112-linux-3.6.patch
broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch
broadcom-sta-5.100.82.112-linux-3.8.patch
broadcom-sta-5.100.82.112-linux-3.4.patch
broadcom-sta-5.100.82.112-remove-rssi-errors.patch
Log:
Revision bump: add compatibility with more kernel versions, wrt bugs #437898 and #468388, thanks to M. B. <tomboy64 AT sina.cn>
(Portage version: 2.2.0_alpha173/cvs/Linux x86_64, signed Manifest commit with key 0x1F357D42)
Revision Changes Path
1.1 net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.9.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.9.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.9.patch?rev=1.1&content-type=text/plain
Index: broadcom-sta-5.100.82.112-linux-3.9.patch
===================================================================
--- src/wl/sys/wl_cfg80211.c.old 2013-05-02 17:10:36.000000000 +0200
+++ src/wl/sys/wl_cfg80211.c 2013-05-02 17:12:27.000000000 +0200
@@ -2119,7 +2119,11 @@
rcu_read_unlock();
#endif
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);
1.1 net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.6.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.6.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.6.patch?rev=1.1&content-type=text/plain
Index: broadcom-sta-5.100.82.112-linux-3.6.patch
===================================================================
--- work.orig/src/wl/sys/wl_cfg80211.c 2012-11-05 21:12:30.402421835 +0100
+++ work/src/wl/sys/wl_cfg80211.c 2012-11-05 21:21:13.962421835 +0100
@@ -40,9 +40,15 @@ u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_I
static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
enum nl80211_iftype type, u32 *flags, struct vif_params *params);
-static s32 __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
+static s32 __wl_cfg80211_scan(struct wiphy *wiphy,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
+ struct net_device *ndev,
+#endif
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,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
+ struct net_device *ndev,
+#endif
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,
@@ -496,10 +502,16 @@ wl_cfg80211_change_iface(struct wiphy *w
}
static s32
-__wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
+__wl_cfg80211_scan(struct wiphy *wiphy,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
+ struct net_device *ndev,
+#endif
struct cfg80211_scan_request *request,
struct cfg80211_ssid *this_ssid)
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
+ struct net_device *ndev = request->wdev->netdev;
+#endif
struct wl_priv *wl = ndev_to_wl(ndev);
struct cfg80211_ssid *ssids;
struct wl_scan_req *sr = wl_to_sr(wl);
@@ -570,13 +582,20 @@ scan_out:
}
static s32
-wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
+wl_cfg80211_scan(struct wiphy *wiphy,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
+ struct net_device *ndev,
+#endif
struct cfg80211_scan_request *request)
{
s32 err = 0;
CHECK_SYS_UP();
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
err = __wl_cfg80211_scan(wiphy, ndev, request, NULL);
+#else
+ err = __wl_cfg80211_scan(wiphy, request, NULL);
+#endif
if (err) {
WL_DBG(("scan error (%d)\n", err));
return err;
1.1 net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch?rev=1.1&content-type=text/plain
Index: broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch
===================================================================
--- src/wl/sys/wl_linux.c.old 2013-05-02 21:00:51.000000000 +0200
+++ src/wl/sys/wl_linux.c 2013-05-02 21:04:00.000000000 +0200
@@ -385,7 +385,11 @@
#endif
.ndo_get_stats = wl_get_stats,
.ndo_set_mac_address = wl_set_mac_address,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
.ndo_set_multicast_list = wl_set_multicast_list,
+#else
+ .ndo_set_rx_mode = wl_set_multicast_list,
+#endif
.ndo_do_ioctl = wl_ioctl
};
1.1 net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.8.patch?rev=1.1&content-type=text/plain
Index: broadcom-sta-5.100.82.112-linux-3.8.patch
===================================================================
--- /src/include/bcmutils.h~ 2011-10-22 18:55:54.000000000 +0200
+++ /src/include/bcmutils.h 2013-02-21 09:08:19.947034424 +0100
@@ -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);
--- /src/wl/sys/wl_cfg80211.c~ 2013-02-21 09:06:18.971297216 +0100
+++ /src/wl/sys/wl_cfg80211.c 2013-02-21 09:10:56.682019739 +0100
@@ -744,7 +744,11 @@ wl_cfg80211_join_ibss(struct wiphy *wiph
else
memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN);
- wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
+#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_
struct bcm_tlv *tim;
u16 beacon_interval;
s32 dtim_period;
- size_t ie_len;
- u8 *ie;
s32 err = 0;
+ size_t ie_len;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ u8 *ie;
+#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_
beacon_interval = cpu_to_le16(bi->beacon_period);
} else {
WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid));
- ie = bss->information_elements;
- ie_len = bss->len_information_elements;
+#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.1 net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.4.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.4.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.4.patch?rev=1.1&content-type=text/plain
Index: broadcom-sta-5.100.82.112-linux-3.4.patch
===================================================================
--- src/wl/sys/wl_linux.c.old 2013-05-02 14:51:07.000000000 +0200
+++ src/wl/sys/wl_linux.c 2013-05-02 14:51:14.000000000 +0200
@@ -40,7 +40,9 @@
#include <linux/pci_ids.h>
#define WLC_MAXBSSCFG 1
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
#include <asm/system.h>
+#endif
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/pgtable.h>
1.1 net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-remove-rssi-errors.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-remove-rssi-errors.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-remove-rssi-errors.patch?rev=1.1&content-type=text/plain
Index: broadcom-sta-5.100.82.112-remove-rssi-errors.patch
===================================================================
diff -Naur broadcom-sta-5.100.82.112.orig/amd64/src/wl/sys/wl_linux.c broadcom-sta-5.100.82.112/amd64/src/wl/sys/wl_linux.c
--- broadcom-sta-5.100.82.112.orig/amd64/src/wl/sys/wl_linux.c 2012-05-24 09:45:02.520119025 +0400
+++ broadcom-sta-5.100.82.112/amd64/src/wl/sys/wl_linux.c 2012-05-24 09:46:52.116121834 +0400
@@ -1581,11 +1581,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:
diff -Naur broadcom-sta-5.100.82.112.orig/amd64/src/wl/sys/wl_cfg80211.c broadcom-sta-5.100.82.112/amd64/src/wl/sys/wl_cfg80211.c
--- broadcom-sta-5.100.82.112.orig/amd64/src/wl/sys/wl_cfg80211.c 2012-05-24 09:45:33.268119813 +0400
+++ broadcom-sta-5.100.82.112/amd64/src/wl/sys/wl_cfg80211.c 2012-05-24 09:55:30.184135098 +0400
@@ -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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-05-12 10:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-12 10:50 [gentoo-commits] gentoo-x86 commit in net-wireless/broadcom-sta/files: broadcom-sta-5.100.82.112-linux-3.9.patch broadcom-sta-5.100.82.112-linux-3.6.patch broadcom-sta-5.100.82.112-linux-3.2-with-multicast.patch broadcom-sta-5.100.82.112-linux-3.8.patch broadcom-sta-5.100.82.112-linux-3.4.patch broadcom-sta-5.100.82.112-remove-rssi-errors.patch Sergey Popov (pinkbyte)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox