Advertisement
sconosciuto

tether - 3.0 kernel support

Oct 2nd, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: src/com/googlecode/android/wifi/tether/system/Configuration.java
  2. ===================================================================
  3. --- src/com/googlecode/android/wifi/tether/system/Configuration.java    (revision 575)
  4. +++ src/com/googlecode/android/wifi/tether/system/Configuration.java    (working copy)
  5. @@ -229,6 +229,10 @@
  6.                  device.equals(DEVICE_JFLTEUSC)) {
  7.             this.setupGS4();
  8.         }
  9. +       // Samsung Galaxy SL
  10. +       else if (device.equals(DEVICE_GALAXYSL)) {
  11. +           this.setupGTI9003();
  12. +       }
  13.  
  14.         // LG Optimus S
  15.         else if (device.equals(DEVICE_THUNDERC)) {
  16. @@ -256,12 +260,11 @@
  17.                  device.equals(DEVICE_SCHR910)) {
  18.             this.setupSoftapSamsung();
  19.         }
  20. -       // LG OMAP3 WiLink6 w/Samsung Galaxy SL
  21. +       // LG OMAP3 WiLink6
  22.         else if (device.equals(DEVICE_LS855) ||
  23.                  device.equals(DEVICE_LU3000) ||
  24.                  device.equals(DEVICE_P970) ||
  25. -                device.equals(DEVICE_P970G) ||
  26. -                device.equals(DEVICE_GALAXYSL)) {
  27. +                device.equals(DEVICE_P970G)) {
  28.             this.setupHostapLGomap3();
  29.         }
  30.         // LG OMAP4 WiLink7
  31. @@ -953,6 +956,83 @@
  32.     }
  33.  
  34.     /**
  35. +    * Samsung Galaxy SL - GT-I9003
  36. +    */
  37. +   private void setupGTI9003() {
  38. +       if (new File("/system/lib/modules/wl12xx_sdio.ko").exists()) {
  39. +           // Kernel 3.0
  40. +           this.wextSupported      = true;
  41. +           this.softapSupported        = true;
  42. +           this.softapSamsungSupported = false;
  43. +           this.netdSupported      = true;
  44. +           this.hostapdSupported       = false;
  45. +           this.tiadhocSupported       = false;
  46. +           this.netdNdcSupported       = false;
  47. +           this.frameworkTetherSupported   = true;
  48. +
  49. +           this.wextInterface      = "wlan0";
  50. +
  51. +           this.netdInterface      = "wlan0";
  52. +           this.softapInterface        = "wlan0";
  53. +           this.encryptionIdentifier   = "wpa2-psk";
  54. +           this.opennetworkIdentifier  = "open";
  55. +
  56. +           this.softapFirmwarePath = "/system/etc/firmware/ti-connectivity/wl1271-nvs.bin";
  57. +
  58. +           Configuration.wifiLoadCmd = "/system/bin/insmod /system/lib/modules/wl12xx_sdio.ko";
  59. +           Configuration.wifiUnloadCmd = "/system/bin/rmmod wl12xx_sdio";
  60. +
  61. +           this.autoSetupMethod        = "softap";
  62. +           this.genericSetupSection    = true;
  63. +
  64. +           if (new File("/system/bin/ndc").exists()) {
  65. +               if (android.os.Build.VERSION.SDK_INT >= SDK_JB) {
  66. +                   this.autoSetupMethod = "netdndc";
  67. +               }
  68. +               this.netdNdcSupported = true;
  69. +           }
  70. +       } else if ((new File("/system/lib/modules/tiap_drv.ko").exists() ||
  71. +               new File("/system/etc/wifi/softap/tiap_drv.ko").exists()) &&
  72. +           (new File("/system/lib/modules/tiap_drv.ko").exists() ||
  73. +               new File("/system/lib/modules/tiap_drv.ko").exists())) {
  74. +           // Kernel 2.6.35
  75. +           this.wextSupported      = false;
  76. +           this.softapSupported        = false;
  77. +           this.softapSamsungSupported = false;
  78. +           this.netdSupported      = false;
  79. +           this.hostapdSupported       = false;
  80. +           this.tiadhocSupported       = true;
  81. +           this.netdNdcSupported       = false;
  82. +
  83. +           if (new File("/system/bin/hostap").exists() &&
  84. +                   new File("/system/lib/modules/tiap_drv.ko").exists()) {
  85. +               // CyanogenMod
  86. +               this.hostapdPath = "/system/bin/hostap";
  87. +               this.hostapdKernelModulePath = "/system/lib/modules/tiap_drv.ko";
  88. +               this.frameworkTetherSupported = false;
  89. +           } else if (new File("/system/bin/hostapd").exists() &&
  90. +                   new File("/system/etc/wifi/softap/tiap_drv.ko").exists()) {
  91. +               // Stock
  92. +               this.hostapdPath = "/system/bin/hostapd";
  93. +               this.hostapdKernelModulePath = "/system/etc/wifi/softap/tiap_drv.ko";
  94. +               this.frameworkTetherSupported = true;
  95. +           }
  96. +
  97. +           this.hostapdKernelModuleName = "tiap_drv";
  98. +           this.hostapdInterface = "tiap0";
  99. +           this.hostapdTemplate  = "droi";
  100. +           this.autoSetupMethod  = "hostapd";
  101. +           this.hostapdLoaderCmd = "/system/bin/tiap_loader " +
  102. +                   "-f /system/etc/wifi/softap/ap_firmware.bin " +
  103. +                   "-i /system/etc/wifi/softap/tiwlan_ap.ini " +
  104. +                   "-e /data/misc/wifi/nvs_map.bin";
  105. +           this.encryptionIdentifier  = "wpa";
  106. +           this.opennetworkIdentifier = "open";
  107. +           this.genericSetupSection = true;
  108. +       }
  109. +   }
  110. +
  111. +   /**
  112.      * LG Optimus S - thunderc
  113.      */
  114.     private void setupThunderc() {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement