1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-06-30 22:09:48 +03:00

add sierra-directip, a package based on the latest DirectIP capable sierra wireless drivers + some fixes

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28635 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2011-10-27 20:29:05 +00:00
parent 6f48b8ea55
commit 572aafcdcf
6 changed files with 2610 additions and 0 deletions

View File

@ -0,0 +1,41 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=sierra-directip
PKG_RELEASE:=10
include $(INCLUDE_DIR)/package.mk
define KernelPackage/usb-sierrawireless-directip
SUBMENU:=USB Support
DEPENDS:=+kmod-usb-serial +kmod-usb-net
TITLE:=Updated Sierra Wireless drivers for DirectIP
FILES:= \
$(PKG_BUILD_DIR)/sierra.ko \
$(PKG_BUILD_DIR)/sierra_net.ko
AUTOLOAD:=$(call AutoLoad,60,sierra sierra_net)
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
$(Build/Patch)
endef
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules
endef
$(eval $(call KernelPackage,usb-sierrawireless-directip))

View File

@ -0,0 +1,22 @@
--- a/sierra_net.c
+++ b/sierra_net.c
@@ -840,8 +840,8 @@ static int sierra_net_bind(struct usbnet
init_timer(&priv->sync_timer);
/* verify fw attributes */
status = sierra_net_get_fw_attr(dev, &fwattr);
- dev_dbg(&dev->udev->dev, "Fw attr: %x\n", fwattr);
- if (status == sizeof(fwattr) && (fwattr & SWI_GET_FW_ATTR_APM)) {
+ dev_dbg(&dev->udev->dev, "Fw attr: %x\n", cpu_to_le16(fwattr));
+ if (status == sizeof(fwattr) && (cpu_to_le16(fwattr) & SWI_GET_FW_ATTR_APM)) {
/*******************************************************************************
* If you want the default /sys/bus/usb/devices/.../.../power/level to be forced
* to auto, the following needs to be compiled in.
@@ -856,7 +856,7 @@ static int sierra_net_bind(struct usbnet
usb_disable_autosuspend(dev->udev);
}
/* test whether firmware supports DHCP */
- if (!(status == sizeof(fwattr) && (fwattr & SWI_GET_FW_ATTR_MASK))) {
+ if (!(status == sizeof(fwattr) && (cpu_to_le16(fwattr) & SWI_GET_FW_ATTR_MASK))) {
/* found incompatible firmware version */
dev_err(&dev->udev->dev, "Incompatible driver and firmware"
" versions\n");

View File

@ -0,0 +1,14 @@
--- a/sierra_net.c
+++ b/sierra_net.c
@@ -858,10 +858,7 @@ static int sierra_net_bind(struct usbnet
/* test whether firmware supports DHCP */
if (!(status == sizeof(fwattr) && (cpu_to_le16(fwattr) & SWI_GET_FW_ATTR_MASK))) {
/* found incompatible firmware version */
- dev_err(&dev->udev->dev, "Incompatible driver and firmware"
- " versions\n");
- kfree(priv);
- return -ENODEV;
+ dev_err(&dev->udev->dev, "Warning: Firmware does not have DHCP support\n");
}
/* prepare sync message from template */
memcpy(priv->sync_msg, sync_tmplate, sizeof(priv->sync_msg));

View File

@ -0,0 +1 @@
obj-m := sierra.o sierra_net.o

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff