WiFi: Vendor HAL function to wait for driver ready
This commit adds a vendor hal function to wait for the driver to be ready. This ensures the driver is ready for operatin before framework starts to use it Bug: 73482286 Test: Manual test (reboot and make sure wifi comes up consistently) Test: The reboot test has been performed more than 10 times in a row Test: Also, tested toggling wifi off/on then rebooted, wifi starts fine Change-Id: I31bc594525762454b0c2f491486ffe575843c858 Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
This commit is contained in:
parent
f0d31da98c
commit
9dfdd473dc
1 changed files with 12 additions and 0 deletions
|
@ -106,6 +106,17 @@ typedef struct wifi_interface_info *wifi_interface_handle;
|
|||
/* Initialize/Cleanup */
|
||||
|
||||
wifi_error wifi_initialize(wifi_handle *handle);
|
||||
|
||||
/**
|
||||
* wifi_wait_for_driver
|
||||
* Function should block until the driver is ready to proceed.
|
||||
* Any errors from this function is considered fatal & will fail the HAL startup sequence.
|
||||
*
|
||||
* on success returns WIFI_SUCCESS
|
||||
* on failure returns WIFI_ERROR_TIMED_OUT
|
||||
*/
|
||||
wifi_error wifi_wait_for_driver_ready(void);
|
||||
|
||||
typedef void (*wifi_cleaned_up_handler) (wifi_handle handle);
|
||||
void wifi_cleanup(wifi_handle handle, wifi_cleaned_up_handler handler);
|
||||
void wifi_event_loop(wifi_handle handle);
|
||||
|
@ -267,6 +278,7 @@ typedef struct wlan_driver_wake_reason_cnt_t {
|
|||
//wifi HAL function pointer table
|
||||
typedef struct {
|
||||
wifi_error (* wifi_initialize) (wifi_handle *);
|
||||
wifi_error (* wifi_wait_for_driver_ready) (void);
|
||||
void (* wifi_cleanup) (wifi_handle, wifi_cleaned_up_handler);
|
||||
void (*wifi_event_loop)(wifi_handle);
|
||||
void (* wifi_get_error_info) (wifi_error , const char **);
|
||||
|
|
Loading…
Reference in a new issue