Advertisement
sconosciuto

tethering

Apr 6th, 2013
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.82 KB | None | 0 0
  1. Index: src/com/googlecode/android/wifi/tether/system/Configuration.java
  2. ===================================================================
  3. --- src/com/googlecode/android/wifi/tether/system/Configuration.java    (revisione 555)
  4. +++ src/com/googlecode/android/wifi/tether/system/Configuration.java    (copia locale)
  5. @@ -234,12 +234,11 @@
  6.                  device.equals(DEVICE_SCHR910)) {
  7.             this.setupSoftapSamsung();
  8.         }
  9. -       // LG OMAP3 WiLink6 w/Samsung Galaxy SL
  10. +       // LG OMAP3 WiLink6
  11.         else if (device.equals(DEVICE_LS855) ||
  12.                  device.equals(DEVICE_LU3000) ||
  13.                  device.equals(DEVICE_P970) ||
  14. -                device.equals(DEVICE_P970G) ||
  15. -                device.equals(DEVICE_GALAXYSL)) {
  16. +                device.equals(DEVICE_P970G)) {
  17.             this.setupHostapLGomap3();
  18.         }
  19.         // LG OMAP4 WiLink7
  20. @@ -269,6 +268,10 @@
  21.                  device.equals(DEVICE_UMTSSPYDER)) {
  22.             this.setupHostapMotOMAP4();
  23.         }
  24. +       // Samsung Galaxy SL
  25. +       else if (device.equals(DEVICE_GALAXYSL)) {
  26. +           this.setupHostapGalaxysl();
  27. +       }
  28.         // Generic WiLink
  29.         else if (device.equals(DEVICE_RUBY)) {
  30.             this.setupHostapGenWiLink7();
  31. @@ -1003,6 +1006,51 @@
  32.     }  
  33.    
  34.     /**
  35. +    * Samsung Galaxy SL
  36. +    */
  37. +   private void setupHostapGalaxysl() {
  38. +       this.wextSupported          = false;
  39. +       this.softapSupported        = false;
  40. +       this.softapSamsungSupported = false;
  41. +       this.netdSupported          = false;
  42. +       this.tiadhocSupported       = false;
  43. +       this.frameworkTetherSupported = true;
  44. +      
  45. +       this.wextInterface = "tiwlan0";
  46. +      
  47. +       // hostapd support
  48. +       if (((new File("/system/bin/hostapd")).exists() == true ||
  49. +               (new File("/system/bin/hostap")).exists() == true) &&
  50. +           (new File("/system/bin/tiap_loader")).exists() == true &&
  51. +           (new File("/system/etc/wifi/softap/ap_firmware.bin")).exists() == true &&
  52. +           (new File("/system/etc/wifi/softap/tiwlan_ap.ini")).exists() == true) {
  53. +           this.hostapdSupported = true;
  54. +           this.hostapdPath      = "/system/bin/hostap";
  55. +           this.hostapdInterface = "tiap0";
  56. +           this.hostapdTemplate  = "droi";
  57. +           this.autoSetupMethod  = "hostapd";
  58. +           this.hostapdLoaderCmd = "/system/bin/tiap_loader -f /system/etc/wifi/softap/ap_firmware.bin -i /system/etc/wifi/softap/tiwlan_ap.ini -e /data/misc/wifi/nvs_map.bin";
  59. +       }
  60. +       else {
  61. +           this.hostapdSupported = false;
  62. +           this.autoSetupMethod = "wext";
  63. +       }
  64. +      
  65. +       this.netdInterface         = "tiap0";
  66. +       this.encryptionIdentifier  = "wpa";
  67. +       this.opennetworkIdentifier = "open";
  68. +      
  69. +       // Kernel-Module
  70. +       if ((new File("/system/lib/modules/tiap_drv.ko")).exists() == true)  //Cyanogenmod
  71. +           this.hostapdKernelModulePath = "/system/lib/modules/tiap_drv.ko";
  72. +       else
  73. +           this.hostapdKernelModulePath = "/system/etc/wifi/softap/tiap_drv.ko";
  74. +       this.hostapdKernelModuleName = "tiap_drv";
  75. +      
  76. +       this.genericSetupSection = true;
  77. +   }
  78. +
  79. +   /**
  80.      * GENERIC
  81.      */
  82.     private void setupGeneric() {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement