Commit graph

52 commits

Author SHA1 Message Date
Dmitry Shmidt
ec0576034b wifi: Use global control socket
Change-Id: I11e4438ec0b36575e1b5a563ac4da57303d028c7
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-06-03 17:57:30 -07:00
Dmitry Shmidt
77cc5e2925 wifi: Add command buffer length parameter to wifi_command()
Change-Id: I832bc51279e0fb7d3002298f87a35b816b666ad5
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-05-30 10:49:15 -07:00
Dmitry Shmidt
de9abffc38 wifi: Use wpa_ctrl_cleanup() function from wpa_supplicant
Change-Id: I24af9ec380e138f24864cd9359c6901b8b29e5ee
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-05-22 16:47:40 -07:00
Irfan Sheriff
a776ffd243 Rewrite an invalid config file
We saw a case of config file being corrupted. Add a mechanism to
recover from this when wifi is toggled off and on.

Bug: 8569820
Change-Id: If2baceb065838d2adb5cde61772d25a05455fc90
2013-04-12 15:47:39 -07:00
Dmitry Shmidt
2c52037dd4 wifi: Remove obsolete variables
Change-Id: I4759c26bf59f593650374ae4b205e8a1f83a8d68
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-02-27 17:45:59 -08:00
Irfan Sheriff
745e7fd4e0 Fix stop supplicant api
Bug: 7227463
Change-Id: I4576e223c69dd67bd714fefecf0a1047770362fd
2012-11-06 15:55:30 -08:00
Irfan Sheriff
943574a822 Fix native crash when driver commands time out
Bug: 7361130
Change-Id: Ia076b4ec84a4a0e05ba9eaa53ed732fa041fca6a
2012-10-18 16:16:21 -07:00
Irfan Sheriff
897f6dd642 Fix native crash
Bug: 6404766
Change-Id: I8d2199fe2f4d48840a237b1ec2d085fe40c06517
2012-10-11 11:03:12 -07:00
Paul Drews
24ffafedc8 Restore the ability to use ctrl_interface directory
lihardware_legacy was ALWAYS re-writing the
wpa_supplicant.conf file's "ctrl_interface" entry to the
value specified as the property wifi.interface, whose value
was typically "wlan0".  This was designed to allow the
wpa_supplicant service to be started with a "socket"
directive in its service description in an init.rc file.
Under these circumstances, the socket name is exchanged
between wpa_supplicant and its WifiService client through an
environment variable whose name is derived from
wifi.interface and a standard prefix.

However, since the "ctrl_interface" entry was always
re-written in this way, it broke the ability to use
"ctrl_interface" in its standard usage as a directory where
the (unix-domain) socket will be exchanged.

This change restores the ability to use the standard
directory-form ctrl_interface usage by limiting the
re-writing of the ctrl_interface entry to cases where it
does not look like an absolute path or the "DIR=" form of
directory.

Change-Id: I96c8656d144c1ea41e25ab0eb0807f7b49193b49
Signed-off-by: Paul Drews <paul.drews@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2012-08-23 14:01:37 -07:00
Kenny Root
cf449e1408 Add support for EINTR to wifi.c
Some system calls can be interrupted. wifi.c in particular was getting
into error conditions during bugreport because it doesn't handle EINTR
at all.

Change-Id: I7bec432a0b3dca7dcc5c03c5e9f5e9ed73fa3c4b
2012-03-15 13:12:41 -07:00
Irfan Sheriff
096e49c869 Fixes for concurrency support
Change-Id: Ia7251dc86184fff710234c70a8ad54a6b245809a
2012-01-20 15:33:52 -08:00
Irfan Sheriff
c6e7b3d9e6 Fix monitor socket poll
Bug: 5534039

Change-Id: I28c41f896347963b0ded8415d1a51ff95cbf4b2d
2012-01-11 16:53:28 -08:00
Steve Block
5efbd421e0 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Idfcd2f2269080d92a621dc432c65f7cf244588af
2012-01-08 10:18:02 +00:00
Steve Block
64cca04dcb Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I86e4ce26d8fba68584d0a7fc17111b53c56d2932
2012-01-05 23:27:53 +00:00
Steve Block
b381b932ac Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I9dfdc3f00a5f4f5b6ef4c75280ce2594ab018577
2012-01-03 22:31:20 +00:00
Irfan Sheriff
da52930b89 Add support for p2p socket communication
Right now, everything goes over the primary interface socket connection.
Add support for a seperate connection over the p2p interface.

Change-Id: I09118f88cfaa201b2d62d27add410cfd441d4454
2011-12-28 13:16:24 -08:00
Steve Block
6a70518b93 Rename LOGV(_IF) to ALOGV(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I953e5eabaf5023a4dcd76339c336d9132f257f8c
2011-10-25 18:16:13 +01:00
Dmitry Shmidt
07a629e27c wifi: Fix entropy file size
BUG: b/5321709

Change-Id: Iff4692f1f35b63136297261d1565bc16c854ede3
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-10-06 13:28:59 -07:00
Dmitry Shmidt
45bf8a6f0b wifi: Change pipe to socket pair in termination of monitor thread code
Change-Id: Id08c211102dabccff3e7d5a1373507f8d63ec70d
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-09-27 17:35:20 -07:00
Irfan Sheriff
025321a09d Add support to terminate monitor thread
Create a local pipe to track when socket connection times out
and send a terminate on the monitor thread

Bug: 5337272
Change-Id: I80ed3f8450b4d54d1b9e2bbc3cc84f10d0ae7a04
2011-09-19 16:52:32 -07:00
Irfan Sheriff
67ba2276b9 Add support seperate p2p config file
Also, fixed a bug with config overwrite with ctrl_interface update

Bug: 5002384
Change-Id: I870c12ee58d60f696512c27deb4b9d35b4dc3b2a
2011-08-26 14:39:38 -07:00
Dmitry Shmidt
953c114065 wifi: Increase wait for card removal
Change-Id: Ia9f5bf2a905c89126535a6c01c3af67189df6c32
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-08-23 15:44:23 -07:00
Irfan Sheriff
5a8a2d2b13 Fix system property race at supplicant stop
We stop supplicant by sending a "terminate" control command. init then
updates the system property init.svc.wpa_supplicant when the supplicant has stopped. The
framework gets notified of a successful supplicant stop through a supplicant event.

It can happen that the framework has been notified of a supplicant stop, but the init
process has not set the system property and thus when the framework tries to connect
to the supplicant again, it can immediately return saying the supplicant is already running.

Avoid this race, by ensuring the call from framework to close supplicant connection polls
for the update by init process that the system property indicates supplicant has stopped.

Bug: 5166494
Change-Id: Ie74a8cf39fa56ae557ea6bbbcba7865301620c42
2011-08-22 13:35:48 -07:00
Dmitry Shmidt
1881331298 wifi: Wait for sdio card removal
Change-Id: I3fdbd27e45536b9142e0ca88692270bac543177a
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-08-12 12:14:15 -07:00
Dmitry Shmidt
3ab3e66967 wifi: Add entropy file support
Change-Id: Iee92ee9fee15037cffde86b9cd2c9407afb8d2ca
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-07-25 10:48:45 -07:00
Dmitry Shmidt
29a4d4d74b wifi: Add wifi_change_fw_path()
Change-Id: I1c4afe43457a295c0ffe0a865c6c331109dce614
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-07-19 15:59:13 -07:00
Dmitry Shmidt
4b7ffa08be wifi: Add wifi_get_fw_path() call
Change-Id: Ib9dc8ce84febb2fba045ee527838653d0d1ad11b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-07-01 11:03:43 -07:00
Dmitry Shmidt
d301cb7a5e wifi: Assume built-in wlan driver if WIFI_DRIVER_MODULE_PATH is not set
Change-Id: Ic63381fe037cd5aa1f3d419d7c253c2b17961a24
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-29 16:22:28 -07:00
Dmitry Shmidt
4c1a1fedd6 wifi: Allow to finish interface down
Change-Id: I249646845f0837c7cbf6c118d08aecb5b3ccaba5
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-13 10:32:08 -07:00
Dmitry Shmidt
eea19f1d85 Move wpa_ctrl_cleanup() function to wifi_wpa_ctrl_cleanup()
Change-Id: I557a2ac10ebb226508ffccfbfeca7f326912ed04
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-03-25 13:37:18 -07:00
Dmitry Shmidt
89ae703cd6 wifi: Ensure RW for wpa_supplicant.conf
Change-Id: Icaeac0ee2239333be5f3be10024824ada6da18d5
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-03-07 15:30:53 -08:00
Dmitry Shmidt
0e9f488e67 wifi: Update wpa_supplicant.conf interface in case of mismatch
Change-Id: Iea7432bd96df2c1474e5af1788225322c9b78307
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-01-05 11:32:03 -08:00
Irfan Sheriff
8a5b197b3d rewrite wpa_supplicant.conf when it is too small
Bug: 2850497
Change-Id: Ifce2055212f78519f2cac8f73ee86b0b7a9ee0ee
2010-12-17 09:39:05 -08:00
Dmitry Shmidt
8fb5f74df7 wifi: Remove unnecessary delay after loading the driver
Change-Id: I371d262a5bf5da989c0c7beabb9fcb8d440375e4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-09-14 15:11:22 -07:00
Chih-Wei Huang
a738e38d44 am c875bb38: am 709a302e: wifi: pass interface to wpa_supplicant
Merge commit 'c875bb384f1c17aa198262acd72b18825f7d8152'

* commit 'c875bb384f1c17aa198262acd72b18825f7d8152':
  wifi: pass interface to wpa_supplicant
2010-09-09 15:53:02 -07:00
Chih-Wei Huang
c875bb384f am 709a302e: wifi: pass interface to wpa_supplicant
Merge commit '709a302e77c44a3e3ee8359be3f2c9361f05d02c' into gingerbread-plus-aosp

* commit '709a302e77c44a3e3ee8359be3f2c9361f05d02c':
  wifi: pass interface to wpa_supplicant
2010-09-09 15:19:56 -07:00
Chih-Wei Huang
709a302e77 wifi: pass interface to wpa_supplicant
Change-Id: I577d0e7a0c6cbf7c1ddb025c01519a30bb7997b3
2010-09-03 11:28:57 +08:00
Jean-Baptiste Queru
548af73955 Revert "remove libnetutils dependency"
This reverts commit 7c6051a499.
2010-08-18 11:16:25 -07:00
Dmitry Shmidt
24bf7fc4e0 Fix wpa_supplicant.conf permissions (0660)
Change-Id: I62e6711f706af88d4447f2885f7a0ce3f30a8a2e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-08-09 11:23:45 -07:00
Irfan Sheriff
2bb990bfd2 Add is_wifi_driver_loaded
Change-Id: I73600a11891b1380d8bc1bfbc24494410a989fcb
2010-07-27 12:17:08 -07:00
Jean-Baptiste Queru
445591dded Undo previous merge
Change-Id: I74fd5ae2634b0c7909b7ab332d174f98a9c8aee5
2010-06-21 13:15:01 -07:00
The Android Open Source Project
edfaa7eca9 merge from open-source master
Change-Id: Iff5f59c3bf645911730bfa7defee848e5b54a4a1
2010-06-15 11:38:05 -07:00
Szymon Jakubczak
7c6051a499 remove libnetutils dependency
Change-Id: I2b10ec7b9c8392bf9e64153406264a56b0ecbe30
2010-06-09 16:08:42 -04:00
Dmitry Shmidt
ed8487244b Increase delay after driver loading if FW loader is not used
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-02-25 12:34:42 -08:00
Dmitry Shmidt
007404c68f Add additional logging
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-02-08 09:30:59 -08:00
Irfan Sheriff
2631f99375 Return failures as strings to monitor
Bug: 2399119
Change-Id: I17bcb86e002cd520f4275f3786cf54c82aaf59b7
2010-01-28 09:39:50 -08:00
Dmitry Shmidt
7b43699180 Fix possible race condition in wlan driver loading
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2009-07-28 11:03:31 -07:00
Dmitry Shmidt
243af8b849 AI 146930: am: CL 146929 Make TI Wifi driver choice framework-independent - part 2
Original author: dimitrysh

Automated import of CL 146930
2009-04-20 09:06:40 -07:00
The Android Open Source Project
cc490161f6 auto import from //depot/cupcake/@135843 2009-03-03 19:32:14 -08:00
The Android Open Source Project
3bbe5328cd auto import from //depot/cupcake/@135843 2009-03-03 18:28:48 -08:00