blob: fa021c05b6441fc21d2e055283a034455b35a854 [file] [log] [blame]
b.liu8583dce2024-04-03 13:30:08 +08001/*******************************************************
2*
3* @brief: Add wifi api
4* @details: add liblynq-qser-wifi api
5* @author: wz.wang
6* @date: 2024.3.15
7* @version: V1.0
8* @copyright:Copyright (c) MobileTek
9*
10*********************************************/
11#ifndef LYNQ_QSER_WIFI
12#define LYNQ_QSER_WIFI
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18typedef enum {
19 LYNQ_WIFI_AP_INDEX_AP0 = 0, /* Index 0 of AP/AP-STA/AP-AP Mode */
20 LYNQ_WIFI_AP_INDEX_AP1 /* Index 1 of AP/AP-STA/AP-AP Mode */
21} lynq_wifi_ap_index_e;
22
23typedef enum
24{
25 LYNQ_WIFI_MODE_MIN = -1,
26 LYNQ_WIFI_MODE_80211B = 0,
27 LYNQ_WIFI_MODE_80211BG,
28 LYNQ_WIFI_MODE_80211BGN,
29 LYNQ_WIFI_MODE_80211A,
30 LYNQ_WIFI_MODE_80211AN,
31 LYNQ_WIFI_MODE_80211AC,
32 LYNQ_WIFI_MODE_80211BGNAX_2G,
33 LYNQ_WIFI_AP_MODE_MAX
34} lynq_wifi_mode_type_e;
35
36typedef enum LYNQ_WIFI_BANDWIDTH_ENUM
37{
38 LYNQ_WIFI_BANDWIDTH_MIN = -1,
39 LYNQ_WIFI_BANDWIDTH_HT20 = 0,
40 LYNQ_WIFI_BANDWIDTH_HT40,
41 LYNQ_WIFI_BANDWIDTH_HT80,
42 LYNQ_WIFI_BANDWIDTH_MAX
43} lynq_wifi_bandwidth_type_e;
44
45typedef enum
46{
47 LYNQ_WIFI_AUTH_MIN = -1,
48 LYNQ_WIFI_AUTH_OPEN = 0,
49 LYNQ_WIFI_AUTH_WPA_PSK,
50 LYNQ_WIFI_AUTH_WPA2_PSK, //AES
51 LYNQ_WIFI_AUTH_WPA_WPA2_PSK_BOTH, //TKIP & AES
52 LYNQ_WIFI_AUTH_WPA3_PSK, //AES
53 LYNQ_WIFI_AUTH_WPA2_WPA3_PSK_BOTH, //AES
54 LYNQ_WIFI_AUTH_MAX
55} lynq_wifi_auth_e;
56
57int qser_wifi_enable(void);
58int qser_wifi_disable(void);
59int qser_wifi_ap_ssid_set(lynq_wifi_ap_index_e idx, const char *ssid);
60int qser_wifi_ap_ssid_get(lynq_wifi_ap_index_e idx, char *ssid);
61int qser_wifi_ap_mode_set(lynq_wifi_ap_index_e idx, lynq_wifi_mode_type_e mode);
62int qser_wifi_ap_mode_get(lynq_wifi_ap_index_e idx, lynq_wifi_mode_type_e *mode);
63int qser_wifi_ap_bandwidth_set(lynq_wifi_ap_index_e idx, lynq_wifi_bandwidth_type_e bandwidth);
64int qser_wifi_ap_bandwidth_get(lynq_wifi_ap_index_e idx, lynq_wifi_bandwidth_type_e *bandwidth);
65int qser_wifi_ap_channel_set(lynq_wifi_ap_index_e idx, const char *country_code, int channel);
66int qser_wifi_ap_channel_get(lynq_wifi_ap_index_e idx, char *country_code, int *channel);
67int qser_wifi_ap_auth_set(lynq_wifi_ap_index_e idx, lynq_wifi_auth_e auth_mode, const char * auth_passwd);
68int qser_wifi_ap_auth_get(lynq_wifi_ap_index_e idx, lynq_wifi_auth_e *auth_mode, char * auth_passwd);
69int qser_wifi_ap_max_sta_set(lynq_wifi_ap_index_e idx, int max_sta_num);
70int qser_wifi_ap_max_sta_get(lynq_wifi_ap_index_e idx, int *max_sta_num);
71int qser_wifi_ap_start(lynq_wifi_ap_index_e idx);
72int qser_wifi_ap_stop(lynq_wifi_ap_index_e idx);
73int qser_wifi_ap_restart(lynq_wifi_ap_index_e idx);
74
75
76
77#ifdef __cplusplus
78}
79#endif
80#endif
81