mirror of
https://gitee.com/openharmony/third_party_wpa_supplicant
synced 2024-11-23 15:50:36 +00:00
HDI通用命令下发与事件上报接口(3/3) Signed-off-by: liuxiyao223 <liuxiyao223@huawei.com> Change-Id: Iac11108e2e122ec7e81245a3862f9d0bb9febbed
This commit is contained in:
parent
ab5c2b029c
commit
350a7b8d02
@ -8384,12 +8384,14 @@ static int wpa_supplicant_pktcnt_poll(struct wpa_supplicant *wpa_s, char *buf,
|
||||
}
|
||||
|
||||
|
||||
#if defined(ANDROID) || defined(CONFIG_DRIVER_NL80211_HISI)
|
||||
|
||||
int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd,
|
||||
char *buf, size_t buflen)
|
||||
{
|
||||
#if defined(ANDROID) || defined(CONFIG_DRIVER_NL80211_HISI)
|
||||
int ret;
|
||||
size_t len = buflen;
|
||||
wpa_printf(MSG_INFO, "CONFIG_DRIVER_NL80211_HISI and enter wpa_supplicant_driver_cmd");
|
||||
|
||||
#ifdef CONFIG_OPEN_HARMONY_PATCH
|
||||
len = buflen > 4096 ? 4096 : buflen;
|
||||
@ -8411,9 +8413,11 @@ int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd,
|
||||
ret = -1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
wpa_printf(MSG_ERROR, "don't CONFIG_DRIVER_NL80211_HISI and enter wpa_supplicant_driver_cmd");
|
||||
return -1;
|
||||
#endif /* ANDROID || CONFIG_DRIVER_NL80211_HISI */
|
||||
|
||||
}
|
||||
|
||||
static int wpa_supplicant_vendor_cmd(struct wpa_supplicant *wpa_s, char *cmd,
|
||||
char *buf, size_t buflen)
|
||||
|
@ -175,9 +175,7 @@ int wpa_supplicant_ctrl_iface_wps_pbc(struct wpa_supplicant *wpa_s, char *cmd);
|
||||
int wpa_supplicant_ctrl_iface_wps_pin(struct wpa_supplicant *wpa_s, char *cmd, char *buf, size_t buflen);
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID) || defined(CONFIG_DRIVER_NL80211_HISI)
|
||||
int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd, char *buf, size_t buflen);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MAGICLINK
|
||||
int hw_magiclink_ctrl_iface_update_network(
|
||||
|
@ -1361,7 +1361,14 @@ static int sme_sae_auth(struct wpa_supplicant *wpa_s, u16 auth_transaction,
|
||||
status_code != WLAN_STATUS_SAE_HASH_TO_ELEMENT &&
|
||||
status_code != WLAN_STATUS_SAE_PK) {
|
||||
const u8 *bssid = sa ? sa : wpa_s->pending_bssid;
|
||||
|
||||
#ifdef CONFIG_LIBWPA_VENDOR
|
||||
struct WpaAuthRejectParam wpaAuthRejectParam;
|
||||
os_memcpy(wpaAuthRejectParam.bssid, bssid, WIFI_BSSID_LEN);
|
||||
wpaAuthRejectParam.authType = WLAN_AUTH_SAE;
|
||||
wpaAuthRejectParam.authTransaction = auth_transaction;
|
||||
wpaAuthRejectParam.statusCode = status_code;
|
||||
WpaEventReport(wpa_s->ifname, WPA_EVENT_STA_AUTH_REJECT, (void *) &wpaAuthRejectParam);
|
||||
#endif
|
||||
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_AUTH_REJECT MACSTR
|
||||
" auth_type=%u auth_transaction=%u status_code=%u",
|
||||
MAC2STR(bssid), WLAN_AUTH_SAE,
|
||||
|
@ -228,7 +228,7 @@ int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf, size_t buf_l
|
||||
ret_len = (ret_len < MAX_PRIV_CMD_SIZE) ? ret_len : (MAX_PRIV_CMD_SIZE - 1);
|
||||
/* SET Command return 0 which means OK, GET Command return string length */
|
||||
if (os_strncasecmp(buf, priv_cmd.buf, ret_len) != 0) {
|
||||
ret = ret_len;
|
||||
ret = 0;
|
||||
}
|
||||
ret_s = memset_s(buf, buf_len, 0, buf_len);
|
||||
if (ret_s != EOK) {
|
||||
|
Loading…
Reference in New Issue
Block a user