Created
May 15, 2012 17:23
-
-
Save ivoronin/2703457 to your computer and use it in GitHub Desktop.
GobiNet Patch
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
Index: gobinet-dkms-20110729~1026/GobiUSBNet.c | |
=================================================================== | |
--- gobinet-dkms-20110729~1026.orig/GobiUSBNet.c 2012-05-09 23:11:33.000000000 +0400 | |
+++ gobinet-dkms-20110729~1026/GobiUSBNet.c 2012-05-13 03:22:02.748985833 +0400 | |
@@ -66,11 +66,15 @@ | |
#define DRIVER_AUTHOR "Qualcomm Innovation Center" | |
#define DRIVER_DESC "GobiNet" | |
+#ifdef bool | |
+#undef bool | |
+#endif | |
+ | |
// Debug flag | |
-int debug; | |
+bool debug; | |
// Allow user interrupts | |
-int interruptible = 1; | |
+bool interruptible = true; | |
// Number of IP packets which may be queued up for transmit | |
int txQueueLength = 100; | |
@@ -349,9 +353,8 @@ | |
return -ENODEV; | |
} | |
- // Verify correct interface (0 or 5) | |
- if ( (pIntf->cur_altsetting->desc.bInterfaceNumber != 0) | |
- && (pIntf->cur_altsetting->desc.bInterfaceNumber != 5) ) | |
+ // Verify correct interface | |
+ if ( !test_bit(pIntf->cur_altsetting->desc.bInterfaceNumber, &pDev->driver_info->data) ) | |
{ | |
DBG( "invalid interface %d\n", | |
pIntf->cur_altsetting->desc.bInterfaceNumber ); | |
@@ -1002,13 +1005,31 @@ | |
/*=========================================================================*/ | |
// Struct driver_info | |
/*=========================================================================*/ | |
+static const struct driver_info GobiNetInfo_intf2 = | |
+{ | |
+ .description = "GobiNet Ethernet Device", | |
+ .flags = FLAG_ETHER | FLAG_POINTTOPOINT, | |
+ .bind = GobiNetDriverBind, | |
+ .unbind = GobiNetDriverUnbind, | |
+ .data = BIT(2) | |
+}; | |
+ | |
+static const struct driver_info GobiNetInfo_intf3 = | |
+{ | |
+ .description = "GobiNet Ethernet Device", | |
+ .flags = FLAG_ETHER | FLAG_POINTTOPOINT, | |
+ .bind = GobiNetDriverBind, | |
+ .unbind = GobiNetDriverUnbind, | |
+ .data = BIT(3) | |
+}; | |
+ | |
static const struct driver_info GobiNetInfo = | |
{ | |
.description = "GobiNet Ethernet Device", | |
- .flags = FLAG_ETHER, | |
+ .flags = FLAG_ETHER | FLAG_POINTTOPOINT, | |
.bind = GobiNetDriverBind, | |
.unbind = GobiNetDriverUnbind, | |
- .data = 0, | |
+ .data = BIT(0)|BIT(5) | |
}; | |
/*=========================================================================*/ | |
@@ -1021,6 +1042,16 @@ | |
USB_DEVICE( 0x05c6, 0x920d ), | |
.driver_info = (unsigned long)&GobiNetInfo | |
}, | |
+ // Quanta 1QDLZZZ0ST2 (Yota Router), Old firmware | |
+ { | |
+ USB_DEVICE( 0x0408, 0xd00a ), | |
+ .driver_info = (unsigned long)&GobiNetInfo_intf2 | |
+ }, | |
+ // Quanta 1QDLZZZ0ST2 (Yota Router) | |
+ { | |
+ USB_DEVICE( 0x0408, 0xd009 ), | |
+ .driver_info = (unsigned long)&GobiNetInfo_intf3 | |
+ }, | |
//Terminating entry | |
{ } | |
}; | |
@@ -1242,10 +1273,6 @@ | |
MODULE_LICENSE("Dual BSD/GPL"); | |
-#ifdef bool | |
-#undef bool | |
-#endif | |
- | |
module_param( debug, bool, S_IRUGO | S_IWUSR ); | |
MODULE_PARM_DESC( debug, "Debuging enabled or not" ); | |
Index: gobinet-dkms-20110729~1026/QMI.h | |
=================================================================== | |
--- gobinet-dkms-20110729~1026.orig/QMI.h 2012-05-09 23:11:33.000000000 +0400 | |
+++ gobinet-dkms-20110729~1026/QMI.h 2012-05-13 03:13:22.485007712 +0400 | |
@@ -65,6 +65,7 @@ | |
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
POSSIBILITY OF SUCH DAMAGE. | |
===========================================================================*/ | |
+#include <linux/module.h> | |
#pragma once | |
Index: gobinet-dkms-20110729~1026/QMIDevice.c | |
=================================================================== | |
--- gobinet-dkms-20110729~1026.orig/QMIDevice.c 2012-05-09 23:11:33.000000000 +0400 | |
+++ gobinet-dkms-20110729~1026/QMIDevice.c 2012-05-13 03:13:22.485007712 +0400 | |
@@ -138,6 +138,7 @@ | |
.ioctl = UserspaceIOCTL, | |
#else | |
.unlocked_ioctl = UnlockedUserspaceIOCTL, | |
+ .compat_ioctl = UnlockedUserspaceIOCTL, | |
#endif | |
.open = UserspaceOpen, | |
.flush = UserspaceClose, | |
@@ -2275,7 +2276,7 @@ | |
} | |
// Fallthough. If f_count == 1 no need to do more checks | |
- if (atomic_read( &pFilp->f_count ) != 1) | |
+ if (atomic_read( (const atomic_t*)&pFilp->f_count ) != 1) | |
{ | |
rcu_read_lock(); | |
for_each_process( pEachTask ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment