Created
May 8, 2011 16:29
-
-
Save fleger/961478 to your computer and use it in GitHub Desktop.
Fix SD WLAN to compile against new kernels (2.6.35 - 3.1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur a/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/Makefile b/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/Makefile | |
--- a/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/Makefile 2010-07-13 22:08:32.000000000 +0200 | |
+++ b/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/Makefile 2011-11-10 11:11:37.288408994 +0100 | |
@@ -89,7 +89,7 @@ | |
# ARCH specifies the architecture of the target processor, this kernel | |
# module will run. | |
# ARCH can be set on the command line | |
-# make ARCH=<arm/i386> | |
+# make ARCH=<arm/x86> | |
# Alternatively ARCH can be set in the environment | |
# Default values of ARCH for specific platform are set below. | |
ARCH ?= arm | |
diff -Naur a/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_drv.h b/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_drv.h | |
--- a/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_drv.h 2010-07-13 22:08:32.000000000 +0200 | |
+++ b/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_drv.h 2011-11-10 11:11:37.288408994 +0100 | |
@@ -727,11 +727,12 @@ | |
wlan_copy_mcast_addr(wlan_adapter * Adapter, struct net_device *dev) | |
{ | |
int i = 0; | |
- struct dev_mc_list *mcptr = dev->mc_list; | |
+ struct netdev_hw_addr *ha; | |
- for (i = 0; i < dev->mc_count; i++) { | |
- memcpy(&Adapter->MulticastList[i], mcptr->dmi_addr, ETH_ALEN); | |
- mcptr = mcptr->next; | |
+ netdev_for_each_mc_addr(ha, dev) | |
+ { | |
+ memcpy(&Adapter->MulticastList[i], ha->addr, ETH_ALEN); | |
+ i++; | |
} | |
return i; | |
diff -Naur a/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_headers.h b/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_headers.h | |
--- a/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_headers.h 2010-07-13 22:08:32.000000000 +0200 | |
+++ b/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_headers.h 2011-11-10 11:12:58.048412861 +0100 | |
@@ -53,6 +53,7 @@ | |
#include <linux/proc_fs.h> | |
#include <linux/ptrace.h> | |
#include <linux/string.h> | |
+#include <linux/hardirq.h> | |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) | |
#include <linux/config.h> | |
diff -Naur a/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_linux.h b/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_linux.h | |
--- a/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_linux.h 2010-07-13 22:08:32.000000000 +0200 | |
+++ b/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_linux.h 2011-11-10 11:20:28.178434424 +0100 | |
@@ -304,7 +304,11 @@ | |
#define MODULE_PUT module_put(THIS_MODULE) | |
#endif | |
-#define OS_INIT_SEMAPHORE(x) init_MUTEX(x) | |
+#ifndef init_MUTEX | |
+#define OS_INIT_SEMAPHORE(x) sema_init(x, 1) | |
+#else | |
+#define OS_INIT_SEMAPHORE(x) init_MUTEX(x) | |
+#endif | |
#define OS_ACQ_SEMAPHORE_BLOCK(x) down_interruptible(x) | |
#define OS_ACQ_SEMAPHORE_NOBLOCK(x) down_trylock(x) | |
#define OS_REL_SEMAPHORE(x) up(x) | |
diff -Naur a/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_main.c b/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_main.c | |
--- a/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_main.c 2010-07-13 22:08:32.000000000 +0200 | |
+++ b/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_main.c 2011-11-10 11:11:37.288408994 +0100 | |
@@ -663,7 +663,7 @@ | |
/* Multicast */ | |
Adapter->CurrentPacketFilter &= ~HostCmd_ACT_MAC_PROMISCUOUS_ENABLE; | |
- if (dev->flags & IFF_ALLMULTI || dev->mc_count > | |
+ if (dev->flags & IFF_ALLMULTI || netdev_mc_count(dev) > | |
MRVDRV_MAX_MULTICAST_LIST_SIZE) { | |
PRINTM(INFO, "Enabling All Multicast!\n"); | |
Adapter->CurrentPacketFilter |= | |
@@ -672,7 +672,7 @@ | |
Adapter->CurrentPacketFilter &= | |
~HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE; | |
- if (!dev->mc_count) { | |
+ if (!netdev_mc_count(dev)) { | |
PRINTM(INFO, "No multicast addresses - " | |
"disabling multicast!\n"); | |
@@ -684,7 +684,7 @@ | |
PRINTM(INFO, "Multicast addresses: %d\n", dev->mc_count); | |
- for (i = 0; i < dev->mc_count; i++) { | |
+ for (i = 0; i < netdev_mc_count(dev); i++) { | |
PRINTM(INFO, "Multicast address %d:" | |
"%x %x %x %x %x %x\n", i, | |
Adapter->MulticastList[i][0], | |
diff -Naur a/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_proc.c b/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_proc.c | |
--- a/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_proc.c 2010-07-13 22:08:32.000000000 +0200 | |
+++ b/SD_WLAN/SD-WLAN-BT-8688-LINUX2625-SAAR-10.49.3.p70-26609.P64_B1/wlan_src/wlan/wlan_proc.c 2011-11-10 11:11:37.288408994 +0100 | |
@@ -72,7 +72,7 @@ | |
int i; | |
char *p = page; | |
struct net_device *netdev = data; | |
- struct dev_mc_list *mcptr = netdev->mc_list; | |
+ struct netdev_hw_addr *ha; | |
char fmt[64]; | |
wlan_private *priv = (wlan_private *) netdev_priv(netdev); | |
wlan_adapter *Adapter = priv->adapter; | |
@@ -97,7 +97,7 @@ | |
netdev->dev_addr[2], netdev->dev_addr[3], | |
netdev->dev_addr[4], netdev->dev_addr[5]); | |
- p += sprintf(p, "MCCount=\"%d\"\n", netdev->mc_count); | |
+ p += sprintf(p, "MCCount=\"%d\"\n", netdev_mc_count(netdev)); | |
p += sprintf(p, "ESSID=\"%s\"\n", | |
(u8 *) Adapter->CurBssParams.BSSDescriptor.Ssid.Ssid); | |
p += sprintf(p, "Channel=\"%d\"\n", | |
@@ -107,15 +107,16 @@ | |
/* | |
* Put out the multicast list | |
*/ | |
- for (i = 0; i < netdev->mc_count; i++) { | |
+ i = 0; | |
+ netdev_for_each_mc_addr(ha, netdev) { | |
p += sprintf(p, | |
"MCAddr[%d]=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", | |
i, | |
- mcptr->dmi_addr[0], mcptr->dmi_addr[1], | |
- mcptr->dmi_addr[2], mcptr->dmi_addr[3], | |
- mcptr->dmi_addr[4], mcptr->dmi_addr[5]); | |
+ ha->addr[0], ha->addr[1], | |
+ ha->addr[2], ha->addr[3], | |
+ ha->addr[4], ha->addr[5]); | |
- mcptr = mcptr->next; | |
+ i++; | |
} | |
p += sprintf(p, "num_tx_bytes = %lu\n", priv->stats.tx_bytes); | |
p += sprintf(p, "num_rx_bytes = %lu\n", priv->stats.rx_bytes); |
Buggy version of wget - seriously.
Tried it with wget and got different MD5s, tried it with curl and it worked.
For future reference, people with this driver need the following files:
43bbe1c1f003e50f2cb0daccedadbf8f /lib/firmware/mrvl/helper_sd.bin
52cd8f8296b9a7e1d3835d57416256b2 /lib/firmware/mrvl/sd8688_ap.bin
9df502bcc129ac4b453ffeecbcaa9152 /lib/firmware/mrvl/sd8688.bin
…On Wed, Aug 3, 2011 at 3:27 PM, fleger ***@***.*** wrote:
Curious. It works fine here (MD5: 261f11b45e7a9395104bde26ef28fb0b).
Maybe a buggy version of xz?
Alternatively, you can get the firmware from the Debian or Ubuntu image here:
http://code.google.com/p/dreamplug/downloads/list
##
Reply to this email directly or view it on GitHub:
https://gist.github.com/961478
Patch updated to work against linux 3.1. Note that it breaks compatibility with pre 2.6.35 kernels.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Curious. It works fine here (MD5: 261f11b45e7a9395104bde26ef28fb0b).
Maybe a buggy version of xz?
Alternatively, you can get the firmware from the Debian or Ubuntu image here:
http://code.google.com/p/dreamplug/downloads/list