[Feature][ZXW-88]merge P50 version
Only Configure: No
Affected branch: master
Affected module: unknown
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I34667719d9e0e7e29e8e4368848601cde0a48408
diff --git a/ap/app/include/wifi_msg.h b/ap/app/include/wifi_msg.h
index 3cba081..83ae376 100755
--- a/ap/app/include/wifi_msg.h
+++ b/ap/app/include/wifi_msg.h
@@ -110,6 +110,12 @@
MSG_CMD_WIFI_STATION_DEBUG_DUMP,
MSG_CMD_WIFI_STATION_WPA_CMD,
MSG_CMD_WIFI_STATION_CONNECTED_ENABLE_AP_CMD, //apstaÁ¬½ÓÈȵã³É¹¦Æô¶¯ap
+
+ //cap->ap
+ MSG_CMD_CAP_STA_SET_PARAM, //sta ssid auth pw
+ MSG_CMD_CAP_STA_ENABLE, //ap on off
+ MSG_CMD_CAP_STA_SCAN, //scan
+
MSG_CMD_WIFI_STATION_END, //apstationµÄÏûÏ¢·¶Î§end
//timing of sleep wake up
@@ -130,6 +136,29 @@
MSG_CMD_AP_STA_CONNECTED,
MSG_CMD_AP_STA_DISCONNECTED,
+ //cap recv
+ MSG_CMD_CAP_WIFI_STATUS,
+ MSG_CMD_CAP_AP_STATUS,
+ MSG_CMD_CAP_AP_STA_CHANGE,
+ MSG_CMD_CAP_STA_STATUS,
+ MSG_CMD_CAP_STA_SCAN_RES,
+
+ //cap send
+ MSG_CMD_CAP_WIFI_ENABLE, //wifiÇý¶¯³õʼ»¯, wlan up
+ MSG_CMD_CAP_WIFI_DISABLE, //wifiÇý¶¯È¥³õʼ»¯, wlan down
+ MSG_CMD_CAP_WIFI_WORK_MODE, //wifi¹¤×÷ģʽÉèÖÃ
+ MSG_CMD_CAP_WIFI_SET_SSID, //
+ MSG_CMD_CAP_WIFI_SET_HIDESSID, //0 not hide, 1 hide
+ MSG_CMD_CAP_WIFI_SET_MODE, //80211 mode bgn...
+ MSG_CMD_CAP_WIFI_SET_BANDWIDTH, //0 20M, 1 20/40M
+ //MSG_CMD_CAP_WIFI_SET_CHANNEL, //0 - 13
+ MSG_CMD_CAP_WIFI_SET_MAXSTANUM, //0 - 32
+ MSG_CMD_CAP_WIFI_SET_CC_CH, //country code, channel
+ MSG_CMD_CAP_WIFI_SET_ACL,
+ MSG_CMD_CAP_WIFI_SET_AUTH, //wpa
+ MSG_CMD_CAP_WIFI_AP_ENABLE, //ap on off
+
+
};
@@ -478,4 +507,200 @@
} zte_wlan_set_e_flags;
+
+//cap:api->wlan_proxy->ap:wlan_server
+typedef enum
+{
+ IN_WIFI_STATUS_DEV_INIT_FAIL = 0,
+ IN_WIFI_STATUS_INVALID_MAC
+} inner_wifi_status_e;
+
+//nei bu zhuan huan yong
+//same as sc_wifi_ap_index_e
+typedef enum
+{
+ IN_WIFI_AP_INDEX_MIN = -1,
+ IN_WIFI_AP_INDEX_AP0 = 0,
+ //IN_WIFI_AP_INDEX_AP1,
+ IN_WIFI_AP_INDEX_MAX
+} inner_wifi_ap_id_e;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ char ssid[WIFI_SSID_LEN]; //ssid should be less than 32 bytes
+} wlan_ap_ssid_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ int ssid_hide; //0 not hide, 1 hide
+} wlan_ap_ssid_hide_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ int wl_mode; //6 bgnax, 4 bgn
+} wlan_ap_wl_mode_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ int htMode; //1 20/40M, 0 20M
+ //int force_40m;
+} wlan_ap_bandwidth_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ int max_sta_num; //1-32
+} wlan_ap_max_sta_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ char countrycode[3]; //default CN
+ int channel; //0-13
+} wlan_ap_cc_ch_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ int acl_rule; //0 none, 1 white, 2 black
+ char acl_list[360]; //max 10 mac1;mac2...
+} wlan_ap_acl_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ char authmode[WLAN_SECURITY_LEN];
+ char encrypt[WLAN_ENCRYPT_LEN]; //realtek use
+ char pwd[WLAN_PSK_LEN]; //max 64
+} wlan_ap_auth_t;
+
+typedef struct {
+ int idx; //refers to: wlan0,1...
+ int enable; //1 ap on , 0 ap off
+} wlan_ap_enable_t;
+
+//station
+typedef struct {
+ int enable; //1 ap on , 0 ap off
+} wlan_sta_enable_t;
+
+
+//ap->cap:ind
+//½á¹¹Ìå,ºÃÀ©Õ¹
+typedef struct {
+ int wifi_status;
+} wlan_status_t;
+
+//same as sc_wifi_work_mode_e to do: hu huan
+typedef enum
+{
+ IN_WIFI_WORK_MODE_MIN = -1,
+ IN_WIFI_WORK_MODE_AP0 = 0,
+ IN_WIFI_WORK_MODE_AP0_STA,
+ IN_WIFI_WORK_MODE_MAX
+} inner_wifi_work_mode_e;
+
+//same as sc_wifi_ap_status_e
+typedef enum
+{
+ IN_WIFI_AP_STATUS_NONE = 0,
+ IN_WIFI_AP_STATUS_IDLE, //or disable
+ IN_WIFI_AP_STATUS_ENABLING,
+ IN_WIFI_AP_STATUS_ENABLED,
+ IN_WIFI_AP_STATUS_DISABLING,
+ IN_WIFI_AP_STATUS_ERROR
+} inner_wifi_ap_status_e;
+
+typedef struct {
+ int idx;
+ int pre_status; //½öcap×ÔÐи³Öµ
+ int status;
+ char ifname[32];
+ //char bssid[18];
+} wlan_ap_status_t;
+
+//sc_wifi_sta_connect_status_t
+typedef struct {
+ int idx;
+ int is_connected;
+ char macaddr[18];
+} wlan_sta_connect_status_t;
+
+//cap station
+typedef struct {
+ char ssid[WIFI_SSID_LEN]; //ssid should be less than 32 bytes
+ char authmode[WLAN_SECURITY_LEN];
+ char encrypt[WLAN_ENCRYPT_LEN]; //realtek use
+ char pwd[WLAN_PSK_LEN]; //max 64
+} wlan_sta_param_t;
+
+//same as sc_wifi_sta_status_e
+typedef enum
+{
+ IN_WIFI_STA_STATUS_NONE, //close
+ IN_WIFI_STA_STATUS_IDLE,
+ IN_WIFI_STA_STATUS_CONNECTING, //Trying to associate with
+ IN_WIFI_STA_STATUS_ASSOCIATED, //dhcping
+ IN_WIFI_STA_STATUS_CONNECTED,
+ IN_WIFI_STA_STATUS_DISCONNECTED,
+ IN_WIFI_STA_STATUS_ERROR
+} in_wifi_sta_status_e;
+
+//same as sc_wifi_reason_code_e
+typedef enum
+{
+ IN_WIFI_REASON_CODE_NONE,
+ IN_WIFI_REASON_CODE_WRONG_KEY,
+ IN_WIFI_REASON_CODE_AUTH_FAILED,
+ IN_WIFI_REASON_CODE_CONN_FAILED,
+ IN_WIFI_REASON_CODE_SET_FAILED,
+ IN_WIFI_REASON_CODE_DHCP_FAILED
+} in_wifi_reason_code_e;
+
+//same as sc_wifi_sta_status_t
+typedef struct {
+ int pre_status; //proxy record
+
+ int status; //in_wifi_sta_status_e
+ char ifname[32];
+ char ap_bssid[18]; //cur ap mac
+ //int rssi;
+ unsigned char signal_level;
+ unsigned char has_addr;
+ char str_addr[16]; //255.255.255.255 16
+ unsigned char has_addr6;
+ char str_addr6[48]; //0001:0002:0003:0004:0001:0002:0003:0004 40 (+8:, 48)
+ int reason_code; //in_wifi_reason_code_e
+} wlan_sta_status_t;
+
+typedef struct {
+ int result;
+ wlan_sta_status_t status;
+} scwifi_sta_stat_res_t;
+
+
+#define CAP_WIFI_MAX_SCAN_CNT 30
+
+#define CAP_WIFI_AUTH_UNSUP -1 //"not support");
+#define CAP_WIFI_AUTH_OPEN 0 //"OPEN");
+#define CAP_WIFI_AUTH_WPA2 1 //"WPA2PSK");
+#define CAP_WIFI_AUTH_WPA3 2 //"WPA3Personal");
+#define CAP_WIFI_AUTH_WPA12 3 //"WPAPSKWPA2PSK");
+#define CAP_WIFI_AUTH_WPA23 4 //"WPA2WPA3");
+
+//sc_wifi_sta_scan_info_t
+typedef struct
+{
+ char bssid[18];//mac
+ char essid[33];
+ //int signal;
+ unsigned char signal_level; //0-5, max 5
+ //int frequency;
+ unsigned char channel; //1-13
+ unsigned char auth;
+} wlan_sta_scan_info_t;
+
+//sc_wifi_sta_scan_list_t
+typedef struct
+{
+ int cnt;
+ wlan_sta_scan_info_t info[CAP_WIFI_MAX_SCAN_CNT];
+} wlan_sta_scan_list_t;
+
#endif