These functions are used to configure and control the WiFi connetion manager.
Data Structures | |
struct | cm |
struct | cm_candidate |
Functions | |
static struct wl_network_t * | find_best_candidate (struct cm *cm) |
This function can be modified to pick a network based on application specific criteria. More... | |
static void | select_net (struct cm *cm) |
wl_err_t | wl_cm_set_network (struct wl_ssid_t *ssid, struct wl_mac_addr_t *bssid) |
Set the desired network which the connection manager should try to connect to. More... | |
wl_err_t | wl_cm_start (cm_scan_cb_t scan_cb, cm_conn_cb_t conn_cb, cm_disconn_cb_t disconn_cb, void *ctx) |
Doesn't actually start the CM, just initializing. More... | |
static void | wl_conn_failure_cb (void *ctx) |
static void | wl_conn_lost_cb (void *ctx) |
static void | wl_event_cb (struct wl_event_t event, void *ctx) |
static void | wl_media_connected_cb (void *ctx) |
static void | wl_scan_complete_cb (void *ctx) |
Variables | |
struct wl_mac_addr_t | cm_candidate::bssid |
struct cm_candidate | cm::candidate |
static struct cm * | cm = NULL |
cm_conn_cb_t * | cm::conn_cb |
void * | cm::ctx |
cm_disconn_cb_t * | cm::disconn_cb |
cm_scan_cb_t * | cm::scan_cb |
struct wl_ssid_t | cm_candidate::ssid |
|
static |
This function can be modified to pick a network based on application specific criteria.
If the SSID can not be found in the scan list it will be assumed to be a hidden SSID and the wl_connect() command will be called to attempt to probe for the network and connect to it.
References cm_candidate::bssid, cm::candidate, equal_bssid(), equal_ssid(), i, NULL, and cm_candidate::ssid.
Referenced by select_net().
|
static |
References cm::candidate, CM_DPRINTF, equal_ssid(), find_best_candidate(), ROAMING_RSSI_DIFF, ROAMING_RSSI_THRESHOLD, cm_candidate::ssid, and ssid2str().
Referenced by wl_scan_complete_cb().
wl_err_t wl_cm_set_network | ( | struct wl_ssid_t * | ssid, |
struct wl_mac_addr_t * | bssid | ||
) |
Set the desired network which the connection manager should try to connect to.
The ssid and bssid of the desired network should be specified. The ssid and bssid will be matched against the networks found during scan. If any parameter is null, it will always match. If both parameters are null, the first found network will be chosen.
ssid | The ssid of the desired network. If null, any ssid will match. |
bssid | The bssid of the desired network. If null, any bssid will match. |
References cm_candidate::bssid, cm::candidate, NULL, and cm_candidate::ssid.
Referenced by cmd_connect().
wl_err_t wl_cm_start | ( | cm_scan_cb_t | scan_cb, |
cm_conn_cb_t | conn_cb, | ||
cm_disconn_cb_t | disconn_cb, | ||
void * | ctx | ||
) |
Doesn't actually start the CM, just initializing.
CM will run whenever an valid ssid is set through wl_cm_set_network().
References CM_DPRINTF, cm::conn_cb, ctx, cm::ctx, cm::disconn_cb, NULL, cm::scan_cb, and wl_event_cb().
Referenced by wl_init_complete_cb().
|
static |
References CM_DPRINTF.
Referenced by wl_event_cb().
|
static |
References CM_DPRINTF, ctx, cm::ctx, and cm::disconn_cb.
Referenced by wl_event_cb().
|
static |
References CM_DPRINTF, ctx, wl_conn_failure_cb(), wl_conn_lost_cb(), wl_media_connected_cb(), and wl_scan_complete_cb().
Referenced by wl_cm_start().
|
static |
References CM_DPRINTF, cm::conn_cb, ctx, cm::ctx, and ssid2str().
Referenced by wl_event_cb().
|
static |
References CM_DPRINTF, ctx, cm::ctx, cm::scan_cb, and select_net().
Referenced by wl_event_cb().
struct wl_mac_addr_t cm_candidate::bssid |
Referenced by find_best_candidate(), and wl_cm_set_network().
struct cm_candidate cm::candidate |
Referenced by find_best_candidate(), select_net(), and wl_cm_set_network().
cm_conn_cb_t* cm::conn_cb |
Referenced by wl_cm_start(), and wl_media_connected_cb().
void* cm::ctx |
Referenced by wl_cm_start(), wl_conn_lost_cb(), wl_media_connected_cb(), and wl_scan_complete_cb().
cm_disconn_cb_t* cm::disconn_cb |
Referenced by wl_cm_start(), and wl_conn_lost_cb().
cm_scan_cb_t* cm::scan_cb |
Referenced by wl_cm_start(), and wl_scan_complete_cb().
struct wl_ssid_t cm_candidate::ssid |
Referenced by find_best_candidate(), select_net(), and wl_cm_set_network().