| 1 | /*
|
|---|
| 2 | * SPDX-FileCopyrightText: 2015 Jan Kolarik
|
|---|
| 3 | *
|
|---|
| 4 | * SPDX-License-Identifier: BSD-3-Clause
|
|---|
| 5 | */
|
|---|
| 6 |
|
|---|
| 7 | /** @addtogroup libdrv
|
|---|
| 8 | * @{
|
|---|
| 9 | */
|
|---|
| 10 | /** @file ieee80211.h
|
|---|
| 11 | * @brief IEEE 802.11 WiFi interface definition
|
|---|
| 12 | */
|
|---|
| 13 |
|
|---|
| 14 | #ifndef LIBDRV_OPS_IEEE80211_H_
|
|---|
| 15 | #define LIBDRV_OPS_IEEE80211_H_
|
|---|
| 16 |
|
|---|
| 17 | #include <ddf/driver.h>
|
|---|
| 18 | #include <ieee80211/ieee80211.h>
|
|---|
| 19 |
|
|---|
| 20 | /** IEEE 802.11 interface functions definition. */
|
|---|
| 21 | typedef struct ieee80211_iface {
|
|---|
| 22 | /** Fetch scan results from IEEE 802.11 device.
|
|---|
| 23 | *
|
|---|
| 24 | * @param fun IEEE 802.11 function.
|
|---|
| 25 | * @param results Structure where to put scan results.
|
|---|
| 26 | * @param now Whether to initiate scan immediately.
|
|---|
| 27 | *
|
|---|
| 28 | * @return EOK if succeed, error code otherwise.
|
|---|
| 29 | *
|
|---|
| 30 | */
|
|---|
| 31 | errno_t (*get_scan_results)(ddf_fun_t *, ieee80211_scan_results_t *, bool);
|
|---|
| 32 |
|
|---|
| 33 | /** Connect IEEE 802.11 device to specified network.
|
|---|
| 34 | *
|
|---|
| 35 | * @param fun IEEE 802.11 function.
|
|---|
| 36 | * @param ssid Network SSID.
|
|---|
| 37 | * @param password Network password (empty string if not needed).
|
|---|
| 38 | *
|
|---|
| 39 | * @return EOK if succeed, error code otherwise.
|
|---|
| 40 | *
|
|---|
| 41 | */
|
|---|
| 42 | errno_t (*connect)(ddf_fun_t *, char *, char *);
|
|---|
| 43 |
|
|---|
| 44 | /** Disconnect IEEE 802.11 device from network.
|
|---|
| 45 | *
|
|---|
| 46 | * @param fun IEEE 802.11 function.
|
|---|
| 47 | *
|
|---|
| 48 | * @return EOK if succeed, error code otherwise.
|
|---|
| 49 | *
|
|---|
| 50 | */
|
|---|
| 51 | errno_t (*disconnect)(ddf_fun_t *);
|
|---|
| 52 | } ieee80211_iface_t;
|
|---|
| 53 |
|
|---|
| 54 | #endif
|
|---|
| 55 |
|
|---|
| 56 | /**
|
|---|
| 57 | * @}
|
|---|
| 58 | */
|
|---|