Professional Documents
Culture Documents
Agenda
WIFIDriveronAndroid
AndroidArchitectureaboutWLAN TheDifferencesforWIFIDriver betweenAndroidandLinux b A d id d Li HowtoCompileWIFIDriverfor AndroidEnvironment Android Environment HowtoVerifyWIFIDriverManually WIFIDriverArchitecture AndroidWIFIFlows
CONFIDENTIAL
Agenda
LinuxMMCStack
WorkingModel BusDriver:MMC,SD,SDIO TheInterfacebetweenBusDriverand HostControllerDriver TheInterfaceBetweenBusDriverand The Interface Between Bus Driver and FunctionDriver BusDriverCardPollingMechanism SDIOCardInitialization InterruptProcess
CONFIDENTIAL
Agenda IntegrationforAndroid
Chipdetection,WoW,etc. wpa_supplicant HotspotAPmode bluetooth.cforBTCOEX Bluetoothclocksharing Bl t th l k h i GoogleCTSprogram
CONFIDENTIAL
Native Process
TCP/IP
Linux Kernel
CONFIDENTIAL
JAVA Applications Supplicants control interface wpa_supplicant Kernel-defined IOCTL Kernel WLAN Subsystem (Wireless Extension) Kernel-defined IOCTL WIFI Driver
CONFIDENTIAL
ThedifferencesforWIFIDriverbetweenAndroidandLinux
Androidhasitownuserspacelibrary.
Buildourwlantools,wmiconfig,bmiloader,eeprominAndroidSDKtreewith Android.mkfile A d id k fil OrwecancompileWIFIdriversapplicationtoolsbystaticlink.
Androiddoesntsupportacomprehensivescript.
Addtest.cpatchintoandroidshtosupport[]functioninscript
Westillhaveproblemtoreloadthefirmwareafterresume p
Implementallthescriptfunctionintodriver,likeWinCE
PassdrivermoduleparametersbyandroidpropertyAPI
FocusonLinuxMMCstack
Mostcustomerrequesttouselinuxmmcstack
CONFIDENTIAL
HowtoCompileWIFIDriverforAndroidEnvironment
Modify<WIFIDriver>/host/localmake.linux.inc
ATH_ANDROID_ENV:=yes y
BuildforAndroidsystem
ATH_SOFTMAC_FILE_USED:=yes
UseMACaddresswhichisstoredin/system/wifi/softmac
ATH_HTC_RAW_INT_ENV:=yes
TCMDsupport
ATH_AR6K_OTA_TEST_MODE:=no
DontenablepowersavingforOTAmode
Typemaketomakethedriver
host/.output/$(ATH_BUILD)$(ATH_BUS_TYPE)/image/ar6000.ko
CONFIDENTIAL
HowtoVerifyWIFIDriverManually
Putfirmwareanddrivermoduleinthefolder
/system/wifi
ar6000.ko athwlan.bin.z77 data.patch.hw2_0.bin
LoadWIFImodule
insmod /system/wifi/ar6000.ko
CONFIDENTIAL
HowtoCompileWIFIDriverwithinAndroidSDK
1. CopyAR6kSDK.xxx/androidintoyourandroid/
android/system/wlan/atheros/AR6kSDK.xxxx android/system/wlan/atheros/AR6kSDK xxxx android/external/ath_supplicant0.6.10 android/external/hostapd 0.6.8 android/external/hostapd0.6.8
HowtoVerifyWIFIDriverManually
ConnecttoanAPbyiwconfig
iwconfigi<interface>essid<ESSID> iwconfig i <interface> essid <ESSID>
CONFIDENTIAL
WIFIDriverArchitecture:SomeImportantFiles
host/include/ar6000_api.h
ar6000_drv.cheaderfile ar6000 drv.c header file
host/os/linux/include/osapi_linux.h / / / / p_
IncludesOSAPIdefinitions(osapi_linux.h)
host/os/linux/include/wlan_config.h
Configurationforwifidriver
host/os/linux/include/athdrv_linux.h
IOCTLassignmentanddescriptions IOCTL assignment and descriptions
CONFIDENTIAL
WIFIDriverArchitecture:SomeImportantFiles
host/os/linux/include/ar6000_drv.h
Variousdatastructures Various data structures
host/os/linux/include/osapi_linux.h
OSdependentfunctionremapping(printk,locks,etc) OSdependentfunction remapping (printk locks etc)
host/os/linux/ar6000_drv.c / / /
Maindriverfunctions(start/stop,TX/RX)
CONFIDENTIAL
WIFIDriverArchitecture:SomeImportantFiles
host/os/linux/ar6000_android.c
MaindriverfunctionsforAndroid
host/os/linux/ar6000_pm.c
Powermanagementforwifi driver
host/os/linux/ioctl.c
IOCTLrelatedfunctions
host/os/linux/wireless.c
Thefunctionsforthekernelwirelessextension
CONFIDENTIAL
ar6000_drv.c
Startup/Shutdownfunctions Startup/Shutdown functions
Initialization/destructionof WLANstates Bufferallocationandbuffer free
wireless_ext.c /ioctl.c
Driver Driver Interface Application Application
ar6000_pm.c 6000
Powermanagementforwifi on/off,suspend/resume on/off, suspend/resume
ar6000_android.c
Androidrelatedhelper p functions
CONFIDENTIAL
WIFIDriverArchitecture:Startup/Shutdownfunctions
ar6000_init_module()
InitializeHTC/Dataset/GPIOstates Initialize HTC/Dataset/GPIO states Registerar6000_avail_ev()andar6000_unavail_ev() RegisterWIFIdrivertokernelnetworksubsystemvia Register WIFI driver to kernel network subsystem via module_init()
ar6000_cleanup_module()
CleanupHTCstates UnregisterWIFIdriverviamodule_exit()
CONFIDENTIAL
WIFIDriverArchitecture:Startup/Shutdownfunctions
ar6000_avail_ev()
HTCcallsthiswhenTargetisready HTC calls this when Target is ready Registersdevicedriverfunctioncalls
netdev>hard_start_xmit ar6000_data_tx() netdev>open ar6000_open() Netdev>stop ar6000_close() netdev>do_ioctl ar6000_ioctl() () netdev>get_stats ar6000_get_stats()
ar6000_unavail_ev()
CleanupHTCandremoveallocateddevices
CONFIDENTIAL
WIFIDriverArchitecture:Startup/Shutdownfunctions
ar6000_open()
ExecuteBMIsequence Execute BMI sequence RegistereventstoHTC(send,receive,hasdata,etc.)forall endpoints ProvideHTCwithRxbuffers StartHTC(enabletargetandinterrupts)
ar6000_close()
BlockfurtherincomingbufferstoTxfromupperlayer Bl k f th i i b ff t T f l DisconnectSTAfromAPandclearWLANstates StopHTC Stop HTC
CONFIDENTIAL
WIFIDriverArchitecture:TX/RXInterfaces
ar6000_data_tx() calledfromnetworklayer
Fortransmittingdataframes PrepareWMIandHTCheaders Enqueuetothecorrespondingendpoint
IfQoSisenabled,useIPTOSformapping
ar6000_control_tx() calledfromWMI
Fortransmittingcontrolmessages
ar6000_tx_complete()
CalledbyHTCevent(scheduledbyinterrupt)
CONFIDENTIAL
WIFIDriverArchitecture:TX/RXInterfaces
ar6000_rx()
CalledbyHTCevent(scheduledbyinterrupt) y ( y p) RemoveWMIandHTCheaders 802.3conversion
ar6000_data_rx_data_refill()
PrepareWMIandHTCheaders EnqueuebufferstoHTCqueue
CONFIDENTIAL
WIFIDriverArchitecture:Androidrelated
android_ioctl_siwpriv()
DoAndroidcustomDRIVERcommand(RSSI,ComboScan)
android_ar6k_check_wow_status()
Holdwakelockifwehavewowpatternbeforesuspend
android_readwrite_file()
Loadfirmware Loadsoftwaremacaddress Writedriverdebugmessagetologcat
android_send_reload_event() d id d l d ()
SendHANGeventtosupplicanttorecoveryerror
21
CONFIDENTIAL
WIFIDriverArchitecture:Powerrelated
ar6000_suspend_ev()/ar6000_resume_ev()
Suspend/Resumefunction
ar6000_set_wlan_state()
SetupWifi On/Offstate
ar6000_set_bt_hw_state()
SetupBluetoothstateforclocksharing
ar6000_setup_cut_power_state()
SetupstateofcutpowermodeforWiFi
ar6000_setup_deep_sleep_state() 6000 d l ()
SetupstateofdeepsleepforWiFi
AndroidWIFIFlows:Background
CONFIDENTIAL
AndroidWIFIFlows:FileArchitecture
ApplicationFramework:
Folder:base/wifi/java/android/net/wifi Folder: base/wifi/java/android/net/wifi Files:WifiManager,WifiMonitor,WifiConfiguration,etc
ServiceFramework:
Folder:base/services/java/com/android/server/ Folder: base/services/java/com/android/server/ Files:WifiService,WifiWatchdogService,etc
JNI(JavaNativeInterface)
j / jni/android_net_wifi_Wifi.cpp pp
CONFIDENTIAL
AndroidWIFIFlows:FileArchitecture
HAL(HardwareAbstractLayer)
hardware/libhardware/wifi/wifi.c h d /l bh d / f/ f wpa_supplicant
WIFIdriver:ar6000.ko
CONFIDENTIAL
AndroidWIFIFlows:WIFITurnOnFlow
ApplicationFramework:WifiManager
setWifiEnabled() ()
Service:WifiService
setWifiEnabled() handleMessage()withMESSAGE_ENABLE_WIFI
JNI:android_net_wifi_Wifi.cpp :
JNINativeMethod:loadDriver JNINati eMethod loadDri er android_net_wifi_loadDriver()
Kernel:insmodar6000.ko
CONFIDENTIAL
AndroidWIFIFlows:WIFIScanFlow
ApplicationFramework:WifiManager
startScan() ()
Service:
WifiService::startScan() WifiNative::scanCommand()
JNI:android_net_wifi_Wifi.cpp
scanCommand C d android_net_wifi_scanCommand d id t ifi C d scanResultsCommand android_net_wifi_scanResultsCommand
CONFIDENTIAL
AndroidWIFIFlows:WIFIScanFlow
HAL:hardware/libhardware/wifi/wifi.c
wifi_send_command:SCAN/SCAN_RESULTS wifi send command : SCAN / SCAN RESULTS wpa_supplicant/driver_wext.c wpa_driver_wext_scan():SIOCSIWSCAN
Kernel:WIFIdriverhandlesthecommandsofwireless extensioninterface
CONFIDENTIAL
Addonsfuncitonsinandroidwpa_supplicant
Invoke by driver_cmd callback of wpa_supplicant driver_ops which will call android_ioctl_siwpriv() in ar6000_android.c eventually.
RSSI
Gettherssi
SCANCHANNELS
Setuptheregulardomain
LINKSPEED
Getthecurrenttx/rxrate
CSCAN(comboscan)
SetupscanParameters
Channels,dwell,passivesettings
MACADDR
Getthemacaddressofwlancard
SETSUSPENDOPT
Suspendmodeoptions
START
Enablethewlanbasedonwifisleep policy
BTCOEXMODE
Btcoex fordhcp obtaining
STOP
Disablethewlanbasedonwifisleep policy
RXFILTERSTART
Multicastfilter
POWERMODE
Enable/Disablepowersaving,mainlyfor dhcprequest
CONFIDENTIAL
Configuration
Androidpropertysystem
Networkinterfacename
SQLITE3database
Wifi parametersusedforJavacode Settings.Secure.getInt(cr, Settings.Secure.WIFI_NUM_ALLO WED_CHANNELS)
wpa_supplicant.conf
Networkprofiles
Certificate
Keystore system
30
CONFIDENTIAL
AndroidWIFIFlows:APScanList
CONFIDENTIAL
AndroidWIFIFlows:APconnected
CONFIDENTIAL
Androidevolution
Donut Date Kernel K l MMC Stack Supplicant Hotspot NAT DRIVER CMD 15 Sep 09 2.6.29 2 6 29 Suspend unsupported 0.5.11 No No
RSSI LINKSPEED MACADDR START/STOP
POWERMODE
Gingerbread
Honycomb 22 Feb 11 2.6.35 2 6 35 Combo card 8 bits mode 0.6.10+ CSCAN Yes Yes
+CSCAN (parameters)
0.5.11 No No
+COUNTRY
DRIVER EVENT
START STOP S O
+HANGED
Enhance HANGED G
33
CONFIDENTIAL
Questions
WhichAndroidversionsupportcomboscan?
A. Froyo B. Donut C. Gingerbread
WhichfiledoIneedtomodifytobuildAR600xdriverwithAndroidSDK? y
A. BoardConfig.mk B. init.rc C. bluetooth.c
WhichmodulesdoAndroidcalltheWEXTIOCTL?
A. A WifiManager B. wpa_supplicant B wpa supplicant C. C JNI
34
CONFIDENTIAL
Agenda
LinuxMMCStack
WorkingModel BusDriver:MMC,SD,SDIO TheInterfacebetweenBusDriverand HostControllerDriver TheInterfaceBetweenBusDriverand The Interface Between Bus Driver and FunctionDriver BusDriverCardPollingMechanism SDIOCardInitialization InterruptProcess
CONFIDENTIAL
Working Model
CONFIDENTIAL
WorkingModel
Application File System SD Memory y Function Driver Application Network N t k Stack SDIO WLAN Function Driver SDIO Bus Driver Host Controller Driver Host Controller SDIO Card
CONFIDENTIAL
Hardware
BusDriver:MMC,SD,SDIO
1busdriverkernelmodule
core.ko
RelationshipbetweeneachSDIOmodule
Linux BUS device
SDIO CORE
sdio_bus_type sdio_op
SDIOCardDetection
mmc_rescan() will be called based on host controller platform device
mmc_rescan() <ifhost>bus_ops==NULL> p mmc_go_idle() CMD0 mmc_send_if_cond() /*sdio?*/ mmc_send_if_cond() CMD5 d if d() <ifok> mmc_attach_sdio() /*normalSD?*/ mmc_send_app_op_cond() CMD41 <ifok> mmc_attach_sd() / MMC? / /*MMC?*/ mmc_send_op_cond() CMD1 <ifok> mmc_attach_mmc() <else> host>bus_ops>detect() CMD7
CONFIDENTIAL
3. Card Initialization
1. Card Inserted
SDIO Card
1 bit, low clock rate bus mode OCR Assignment (CMD5) Card Type Detection RCA Assignment (CMD3) Card Selection (CMD7) Start CMD52 Read the common registers Common CIS Query Function CIS Query Switch to high speed Change to the cards maximum speed Switch to wider bus Initialize all present functions Final Bus Mode
CONFIDENTIAL
TheInterfacebetweenBusDriverandHostControllerDriver
mmc_alloc_host()
Allocatememoryforhostcontrollerstructure
mmc_add_host()
Registerthehost g Thehostmustbereadytoserverequestsbeforeit Cardpollingatleast1time
mmc_signal_sdio_irq()
InformbusdriverofanIOIRQevent
structuremmc_host_ops
request,set_ios,enable_sdio_irq t t i bl di i
CONFIDENTIAL
TheInterfacebetweenBusDriverandFunctionDriver
sdio_register_driver()
Registerafunctiondriver
structuresdio_driver
probe,remove drv.pm.suspend,drv.pm.resume
sdio_claim_irq() _ _ q
ClaimtheIRQ
CONFIDENTIAL
TheInterfacebetweenBusDriverandFunctionDriver
sdio_writesb()
WritetoaFIFO
sdio_readsb()
ReadfromaFIFO
sdio_memcpy_toio() di t i ()
Writeachunkofmemory
sdio_memcpy_fromio()
Readachunkofmemory ead a c u o e o y
CONFIDENTIAL
Therequirementofclaimandrelease
EveryMMC(SDIO)APIneedtobelockedbymmcclaimfunction Noasynchronouscommandisallowed lowerthroughput
Example
sdio_claim_host()
sdio_writesb() sdio_memcpy_toio() sdio memcpy toio()
sdio_release_host()
Asynchronoussupportinolca y pp
Wecreateaasync_task()bykernel_thread WequeueallHIF(SDIO)requestintolinkedlistwithoutclaimmmchost async_task()willcheckthependingdatainlinked listandcallmmc(sdio)commandin async task() will check the pending data in linkedlist and call mmc (sdio) command in itscontext Onlyasync_task()willcallsdio_claim_host()andsdio_release_host()inthiscase
45
CONFIDENTIAL
sdio_release_host(mmc_host)
46 CONFIDENTIAL
MMCAPIInternals CompleteCallback
voidmmc_wait_doen(mmc_request*mrq) { /*DMAtaskletorPIOIRQcontext*/ complete(mrq>done_data); }
47
CONFIDENTIAL
48
CONFIDENTIAL
InterruptProcess
Busdrivercreatesakernelthreadforinterruptprocess: ksdioirqd Hostcontrollerdrivercanwakeupthiskernelthreadforthe bottomhalfprocessofanIOinterruptevent b tt h lf f IO i t t t mmc_signal_sdio_irq() Hostcontrollerdriverindicatesinterruptsupportbythe belowflag mmc>caps|=MMC_CAP_SDIO_IRQ
CONFIDENTIAL
Interrupt Process
Interrupt on SD interface
CONFIDENTIAL
SDIOAPIintegrationforHIFlayer
AllSDIOread/writeoperationsaredonebyHIFasync_task SDIOhostwillbeclaimedinsideasync_task Herearethekerneltaskrelationshipinsidekernel
Driver context HIFReadWrite Linux ksdioirqd dsrHandler() HIFReadWrite HIF async task __HIFReadWrite HIFR dW it SDIO API Host driver
51 CONFIDENTIAL
LinuxMMCSuspendandResume
Linuxversion<2.6.32(Android<2.2)
NonativeMMCsuspendandresumemethod
Linuxversion==2.6.32(Android2.2Froyo) Li i 2 6 32 (A d id 2 2 F )
Cutpowermodeissupported Clock,highspeedmodeandbuswidthneedtoberesetafterresume
Linuxversion>2.6.34(Android>2.2)
Deepsleepmodeissupport
MMC_PM_KEEP_POWER
WoWissupported
MMC_PM_WAKE_SDIO_IRQandMMC_PM_KEEP_POWER Buswidthwilltoswitchto1bitmodeaftersuspendandrestoreto4bitsmodeafterresume
52
CONFIDENTIAL
PMflagsformmchost
MMC_PM_KEEP_POWER _ _ _
DeepsleeporWoWmode
MMC_PM_WAKE_SDIO_IRQ
WakeonWoWviaSDIObus W k W W i SDIO b
53
CONFIDENTIAL
SuspendandResumeFlow SuspendFlow
core.c,mmc_host_suspend() host>bus_ops>suspend()
sdio.c ,mmc_sdio_suspend() func>pmops>suspend()
hif.c,hifDeviceSuspend() deviceSuspendHandler() ar6000_pm.c,ar6000_suspend_ev() _p _ p _ () host>pm_flags |=MMC_PM_KEEP_POWER WoW/Deepsleep host>pm_flags =0 Cutpowermode
ResumeFlow
core.c,mmc_host_resume() host>bus_ops>resume()
sdio.c ,mmc_sdio_resume() f di di () func>pmops>resume() () hif.c,hifDeviceResume() deviceResumeHandler ()
ar6000_pm.c,ar6000_resume_ev()
54
CONFIDENTIAL
Questions
WhichLinuxversionsupportWoWsuspendmode?
A. 2.6.27 B. 2.6.32 C. 2.6.34
WhichonebelowisNOTMMCbustype? yp
A. SDIO B. UART C. MMC
WhichonebelowisNOTsupportedbyLinuxmmcstack?
A. A WoW B. B SDIO C. C Asynchronous request
55
CONFIDENTIAL
Agenda IntegrationforAndroid
Chipdetection,WoW,etc. wpa_supplicant HotspotAPmode bluetooth.cforBTCOEX Bluetoothclocksharing Bl t th l k h i GoogleCTSprogram
56
CONFIDENTIAL
CarddetectionandWoW
Detectionmode
Polling
mmc>caps&MMC_CAP_NEEDS_POLL mmc >caps & MMC CAP NEEDS POLL
HWIRQ
Configuration
host/os/linux/include/wlan_config.h
#definePLAT_WOW_GPIO_PIN 0 #definePLAT_WLAN_CHIP_PWD_PIN0 #define PLAT WLAN CHIP PWD PIN 0
Implementation
voidplat_setup_power(AR_SOFTC*dev,int on,int detect){
1. SetupWLANpowerwithWLAN_CHIP_PWD_PIN 1 Setup WLAN power with WLAN CHIP PWD PIN 2. Callplatformdevicecallbackfunctiontodothedetection
}
57 CONFIDENTIAL
wpa_supplicant
AndroidsupplicantisNOTwpa_supplicant
0.5.11whenAndroid<2.2 0.6.10afterAndroid>=2.2 0 6 10 after Android > 2 2 supplcaintwithcustomizefeature
DRIVERcmdsincecupcake Twoctrl_ifacesocketssincecupcake Two ctrl iface sockets since cupcake SpecialcertificateRead/WritewithoutusingfilesinceDonut keystoreforcertificateread/writesinceclair NewkeystoreAPIafterFroyo ComboScansinceGingerbread
Knownissues
Unicodedisplayissue UnabletoconnectifAPdoesnotsupportPMKforRSN WPAconnectionissuewhenproberesponseandbeaconIEarenotsame GUIwillbependingonobtainingscreenafterWPArekey Longconnectiontimeafteraddinganewnonexistingnetwork Long connection time after adding a new non existing network
Theknownissuesneedeitherpatchorusingathsupplicant0.6.10
58 CONFIDENTIAL
Configurationofwpa_supplicant
Filledevice/<vendor>/<device>/BoardConfig.mk Usingath_supplicant0.6.10
WPA_SUPPLICANT_VERSION:=VER_0_6_ATHEROS BOARD_WPA_SUPPLICANT_DRIVER:=WEXT
UsingAndroidsupplicant
WPA_SUPPLICANT_VERSION:=VER_0_6_X BOARD_WPA_SUPPLICANT_DRIVER:=WEXT
59
CONFIDENTIAL
Commandlineforwpa_supplicant
wpa_cliiwlan0p/data/misc/wifi/ Scan
scan
Scanresutls
scan_results
Drivercommand
DRIVERRSSI
60
CONFIDENTIAL
Hotspotmode
WirelessRoutermodetethering3Gnetwork
OPEN/WPA2PSKonly
61
CONFIDENTIAL
Hotspotmodeimplemenation
frameworks/base/core/res/res/values/config.xml Change<tether>aswlan1 Change<upstream>as3GorEthernetport Change <upstream> as 3G or Ethernet port
android/system/netd/SoftApController.cpp
NeedtochangeBRCMproprietaryIOCTLintohostapd daemon
SoftapController::setSoftap()
Writenewhostapd.conf basedonsetSoftap()parameters ChangestationintoAPmodebyIOCTL Changewlan interfacenamefromwlan0towlan1 Starthostapd daemon SimulateNetlink eventtonotifystation(wlan0)interfaceisdownwhileAP(wlan1)isup Simulate Netlink event to notify station(wlan0) interface is down while AP(wlan1) is up
SoftapController::stopSoftap()
Stophostapd daemon Changebacktostationmode Change back to station mode Changewlan interfacenamebacktowlan0 SimulateNetlink eventtonotifyAPinterfaceisdownwhilestationisup
62 CONFIDENTIAL
TestingforHotspotmode
Configurebycommandline
Startwifidriver
ndcsoftapstart ndc softap start
StartAPmode
ndcsoftapstartap
63
CONFIDENTIAL
BTCOEX
BTfilter
BtfilterwillconfigureAR6003automaticallybasedonDBUSandHCIevents
Patchfile P t h fil
android/system/bluetooth/bluedroid/bluetooth.c
Startbtfilterserviceinbt_on() Stopbtfilterserviceinbt_off() St btfilt i i bt ff()
Debugbtfilterinhostsideusinglogcat
logcatabtfilt:**:s
HCIUTILSlibrary
AddonlibraryprovidebybluetoothvendorwhenthereisnotHCIdevice Mainfeatures
EventforthebeginningandendofBTInqury,SCO. EDRandroleinfomationoftheA2DPdevices
Notes
EventforbeginningandendofA2DPcanbeobtainedbyDBUS
64 CONFIDENTIAL
Bluetoothclocksharing
Sharewificlocksourcetobluetoothchip
Wififirmwareneedtobeloadedbeforebluetoothturningon.
Basicconfiguration B i fi ti
host/os/linux/include/wlan_config.h
#defineWLAN_CONFIG_BT_SHARING1 #defineWLAN_CONFIG_PM_SUSPEND3(Cutpowerifbtisoff) #d fi WLAN CONFIG PM SUSPEND 3 (C t if bt i ff)
host/tools/wlan_tool/wlan_tool
CLK_HELPER=1
Patchfile P t h fil
android/system/bluetooth/bluedroid/bluetooth.c
CallIOCTLtoar6000toindicatebluetoothnewON/OFFstate
65
CONFIDENTIAL
GoogleCTSprogram
BasicruletopassGoogleCTS(CompatibilityTestSuite)program
Noprogramwhichisrunningwithrootpermissionforalongtime.
Solution S l ti
Avoidrootserviceforwlanininit.rc
E.g.servicewpa_supplicant/system/bin/wlan_toolwpa_supplicant
userwifi ifi groupwifisysteminetnet_adminnet_rawkeystore
Rootservicewillnotforkanybackgroundprogram Rootservicewillswitchbacktonormalpermissionafterlaunched. Root service will switch back to normal permission after launched.
E.g.dhcpcd
66
CONFIDENTIAL
Questions
WhichoneisnecessaryforBTCOEX
A. hostapd B. abtfilt C. wpa_supplicant
Whichoneisrelatedtohotspotmode? p
A. SoftApController.cpp B. WifiManager.java C. bluetooth.c
Whichprogramcancontrolsupplicant?
A. wpa_cli A wpa cli B. B ndc C. C svc wifi
67
CONFIDENTIAL
THANKYOU Q&A
68
CONFIDENTIAL