未验证 提交 cd0a9c1f 编写于 作者: O openharmony_ci 提交者: Gitee

!144 send suspend mode to driver 0806

Merge pull request !144 from yanxiaotao/master
......@@ -3528,7 +3528,7 @@ struct wpa_driver_ops {
*/
int (*set_authmode)(void *priv, int authmode);
#ifdef ANDROID
#if defined(ANDROID) || defined(CONFIG_DRIVER_NL80211_HISI)
/**
* driver_cmd - Execute driver-specific command
* @priv: Private driver interface data
......
......@@ -11107,11 +11107,11 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.get_noa = wpa_driver_get_p2p_noa,
.set_ap_wps_ie = wpa_driver_set_ap_wps_p2p_ie,
#endif /* ANDROID_P2P || CONFIG_DRIVER_NL80211_HISI */
#ifdef ANDROID
#if defined(ANDROID) || defined(CONFIG_DRIVER_NL80211_HISI)
#ifndef ANDROID_LIB_STUB
.driver_cmd = wpa_driver_nl80211_driver_cmd,
#endif /* !ANDROID_LIB_STUB */
#endif /* ANDROID */
#endif /* ANDROID || CONFIG_DRIVER_NL80211_HISI */
.vendor_cmd = nl80211_vendor_cmd,
.set_qos_map = nl80211_set_qos_map,
.set_wowlan = nl80211_set_wowlan,
......
......@@ -273,7 +273,7 @@ int process_bss_event(struct nl_msg *msg, void *arg);
const char * nl80211_iftype_str(enum nl80211_iftype mode);
#ifdef ANDROID
#if defined(ANDROID) || defined(CONFIG_DRIVER_NL80211_HISI)
int android_nl_socket_set_nonblocking(struct nl_handle *handle);
int android_pno_start(struct i802_bss *bss,
struct wpa_driver_scan_params *params);
......
......@@ -7882,7 +7882,7 @@ static int wpa_supplicant_pktcnt_poll(struct wpa_supplicant *wpa_s, char *buf,
}
#ifdef ANDROID
#if defined(ANDROID) || defined(CONFIG_DRIVER_NL80211_HISI)
static int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd,
char *buf, size_t buflen)
{
......@@ -7906,7 +7906,7 @@ static int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd,
}
return ret;
}
#endif /* ANDROID */
#endif /* ANDROID || CONFIG_DRIVER_NL80211_HISI */
static int wpa_supplicant_vendor_cmd(struct wpa_supplicant *wpa_s, char *cmd,
......@@ -10624,11 +10624,11 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
} else if (os_strcmp(buf, "DRIVER_FLAGS") == 0) {
reply_len = wpas_ctrl_iface_driver_flags(wpa_s, reply,
reply_size);
#ifdef ANDROID
#if defined(ANDROID) || defined(CONFIG_DRIVER_NL80211_HISI)
} else if (os_strncmp(buf, "DRIVER ", 7) == 0) {
reply_len = wpa_supplicant_driver_cmd(wpa_s, buf + 7, reply,
reply_size);
#endif /* ANDROID */
#endif /* ANDROID || CONFIG_DRIVER_NL80211_HISI */
} else if (os_strncmp(buf, "VENDOR ", 7) == 0) {
reply_len = wpa_supplicant_vendor_cmd(wpa_s, buf + 7, reply,
reply_size);
......
......@@ -234,6 +234,7 @@ static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx,
int new_attached = 0;
u8 cookie[COOKIE_LEN];
(void)os_memset(buf, 0, sizeof(buf));
res = recvfrom(sock, buf, sizeof(buf) - 1, 0,
(struct sockaddr *) &from, &fromlen);
if (res < 0) {
......
......@@ -578,7 +578,7 @@ static inline int wpa_drv_tdls_oper(struct wpa_supplicant *wpa_s,
return wpa_s->driver->tdls_oper(wpa_s->drv_priv, oper, peer);
}
#ifdef ANDROID
#if defined(ANDROID) || defined(CONFIG_DRIVER_NL80211_HISI)
static inline int wpa_drv_driver_cmd(struct wpa_supplicant *wpa_s,
char *cmd, char *buf, size_t buf_len)
{
......@@ -586,7 +586,7 @@ static inline int wpa_drv_driver_cmd(struct wpa_supplicant *wpa_s,
return -1;
return wpa_s->driver->driver_cmd(wpa_s->drv_priv, cmd, buf, buf_len);
}
#endif /* ANDROID */
#endif /* ANDROID || CONFIG_DRIVER_NL80211_HISI */
static inline void wpa_drv_set_rekey_info(struct wpa_supplicant *wpa_s,
const u8 *kek, size_t kek_len,
......
......@@ -202,6 +202,10 @@ int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf, size_t buf_l
buf_len = strlen(cmd); /* default driver xxx cmd */
}
ret_s = memset_s(buf, buf_len_tmp, 0, buf_len_tmp);
if (ret_s != EOK) {
wpa_printf(MSG_ERROR, "%s:%d, memset failed, ret=%d", __func__, __LINE__, ret_s);
}
/* Hisi private data structure cmd should use buf_len, rather than strlen(cmd) */
ret_s = memcpy_s(buf, buf_len_tmp, cmd, buf_len);
if (ret_s != EOK) {
......
......@@ -56,8 +56,11 @@
#define MAX_QOS_UP_RANGE 8
#define MAX_DSCP_EXCEPT 21 /* maximum of DSCP Exception fields for QoS Map set */
#ifdef CONFIG_OPEN_HARMONY_PATCH
#define MAX_PRIV_CMD_SIZE (4096 * 10)
#else
#define MAX_PRIV_CMD_SIZE 4096
#endif
#define WLAN_WPS_IE_MAX_SIZE 608
#define MAX_WPSP2PIE_CMD_SIZE (WLAN_WPS_IE_MAX_SIZE + 8 + 32) /* IE body + IE header + cmd length */
//#error duankaiyong 512
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册