M7350v3_en_gpl

This commit is contained in:
T
2024-09-09 08:55:19 +00:00
parent 801e6d2ad8
commit 2d95e8761a
2791 changed files with 89608 additions and 390711 deletions

52
external/hostap/hostapd/Makefile vendored Executable file → Normal file
View File

@ -862,68 +862,18 @@ verify_config:
fi
install: all
ifndef CONFIG_TP_WLAN_MODULE_BCM
mkdir -p $(DESTDIR)/usr/bin
for i in $(ALL); do cp -f $$i $(DESTDIR)/usr/bin/$$i; done
endif
mkdir -p $(DESTDIR)/etc
ifdef CONFIG_DRIVER_AR6000
install -m 0644 config/ar6k-ap-all.conf $(DESTDIR)/etc/AR6003_hostapd.conf
install -m 0644 config/ar6k-ap1-all.conf $(DESTDIR)/etc/AR6003_AP1_hostapd.conf
endif
ifdef CONFIG_TP_WLAN_MODULE_BCM
ifdef CONFIG_WIRELESS_ACL_TYPE_BLACK
#[liyuan start] M7350 series enable acl deny list in default
install -m 0644 -d $(DESTDIR)/etc/config
install -m 0644 config/tp-bcm-ap-all-7350-series.conf $(DESTDIR)/etc/AR6004_hostapd.conf
install -m 0644 config/tp-bcm-ap-all-7350-series.deny $(DESTDIR)/etc/config/hostapd.deny
ln -s /etc/AR6004_hostapd.conf $(DESTDIR)/etc/hostapd.conf
install -m 0644 -d $(DESTDIR)/etc/default_config
install -m 0644 config/tp-bcm-ap-all-7350-series.conf $(DESTDIR)/etc/default_config/AR6004_hostapd.conf
install -m 0644 config/tp-bcm-ap-all-7350-series.deny $(DESTDIR)/etc/default_config/hostapd.deny
#[liyuan end]
else
#[lixiangkui start] install wifi default config
install -m 0644 config/tp-bcm-ap-all.conf $(DESTDIR)/etc/AR6004_hostapd.conf
ln -s /etc/AR6004_hostapd.conf $(DESTDIR)/etc/hostapd.conf
install -m 0644 -d $(DESTDIR)/etc/default_config
install -m 0644 config/tp-bcm-ap-all.conf $(DESTDIR)/etc/default_config/AR6004_hostapd.conf
#[lixiangkui end]
endif
else
ifdef CONFIG_DRIVER_NL80211
ifdef CONFIG_WIRELESS_ACL_TYPE_BLACK
#[liyuan start] M7350 series enable acl deny list in default
install -m 0644 -d $(DESTDIR)/etc/config
install -m 0644 config/tp-ath6kl-ap-all-7350-series.conf $(DESTDIR)/etc/AR6004_hostapd.conf
install -m 0644 config/tp-ath6kl-ap-all-7350-series.deny $(DESTDIR)/etc/config/hostapd.deny
install -m 0644 config/ath6kl-ap-all.conf $(DESTDIR)/etc/AR6004_hostapd.conf
install -m 0644 config/ath6kl-ap1-all.conf $(DESTDIR)/etc/AR6004_AP1_hostapd.conf
ln -s /etc/AR6004_hostapd.conf $(DESTDIR)/etc/hostapd.conf
install -m 0644 -d $(DESTDIR)/etc/default_config
install -m 0644 config/tp-ath6kl-ap-all-7350-series.conf $(DESTDIR)/etc/default_config/AR6004_hostapd.conf
install -m 0644 config/tp-ath6kl-ap-all-7350-series.deny $(DESTDIR)/etc/default_config/hostapd.deny
#[liyuan end]
else
#[lixiangkui start] install wifi default config
#install -m 0644 config/ath6kl-ap-all.conf $(DESTDIR)/etc/AR6004_hostapd.conf
install -m 0644 config/tp-ath6kl-ap-all.conf $(DESTDIR)/etc/AR6004_hostapd.conf
install -m 0644 config/ath6kl-ap1-all.conf $(DESTDIR)/etc/AR6004_AP1_hostapd.conf
ln -s /etc/AR6004_hostapd.conf $(DESTDIR)/etc/hostapd.conf
install -m 0644 -d $(DESTDIR)/etc/default_config
install -m 0644 config/tp-ath6kl-ap-all.conf $(DESTDIR)/etc/default_config/AR6004_hostapd.conf
#[lixiangkui end]
endif
endif
endif
../src/drivers/build.hostapd:

View File

@ -1,15 +0,0 @@
interface=wlan0
bridge=bridge0
driver=nl80211
ctrl_interface=/var/run/hostapd
wmode=2
channel=0
auto_chan_select=2
auth_algs=1
ignore_broadcast_ssid=0
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-20][SHORT-GI-40]
require_ht=0
max_num_sta=15
macaddr_acl=3
deny_mac_file=/etc/config/hostapd.deny

View File

@ -1,13 +0,0 @@
interface=wlan0
bridge=bridge0
driver=nl80211
ctrl_interface=/var/run/hostapd
wmode=2
channel=0
auto_chan_select=2
auth_algs=1
ignore_broadcast_ssid=0
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-20][SHORT-GI-40]
require_ht=0
max_num_sta=15

View File

@ -1,15 +0,0 @@
interface=wlan0
bridge=br0
driver=nl80211
ctrl_interface=/var/run/hostapd
wmode=2
channel=0
auto_chan_select=2
auth_algs=1
ignore_broadcast_ssid=0
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-20][SHORT-GI-40]
require_ht=0
max_num_sta=15
macaddr_acl=3
deny_mac_file=/etc/config/hostapd.deny

View File

@ -1,13 +0,0 @@
interface=wlan0
bridge=br0
driver=nl80211
ctrl_interface=/var/run/hostapd
wmode=2
channel=0
auto_chan_select=2
auth_algs=1
ignore_broadcast_ssid=0
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-20][SHORT-GI-40]
require_ht=0
max_num_sta=15

View File

@ -115,7 +115,7 @@ static int hostapd_config_read_vlan_file(struct hostapd_bss_config *bss,
}
#endif /* CONFIG_NO_VLAN */
int hostapd_config_read_maclist(const char *fname,
static int hostapd_config_read_maclist(const char *fname,
struct mac_acl_entry **acl, int *num)
{
FILE *f;
@ -157,16 +157,6 @@ int hostapd_config_read_maclist(const char *fname,
fclose(f);
return -1;
}
/*
* Ignore entire list if multicast address present
*/
if (addr[0] & 0x01) {
wpa_printf(MSG_INFO, "Multicast address %s present "
"in conf file, Entire list will be "
"ignored", buf);
fclose(f);
return -1;
}
vlan_id = 0;
pos = buf;
@ -190,10 +180,7 @@ int hostapd_config_read_maclist(const char *fname,
(*acl)[*num].wildcard = wild;
(*num)++;
}
if (*num > MAX_ACL_MAC_ADDRS)
wpa_printf(MSG_INFO, "\n ACL list has (%d) more than allowed "
"mac-addresses, Limiting ACL list to max "
"entries:%d\n", *num, MAX_ACL_MAC_ADDRS);
fclose(f);
return 0;
@ -1274,12 +1261,6 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss,
"allowed, disabling HT capabilites");
}
if (conf->ieee80211n && conf->ap_capab_wmode == AP_CAP_WMODE_11GONLY) {
bss->disable_11n = 1;
wpa_printf(MSG_ERROR, "HT (IEEE 802.11n) in 11gonly mode is not "
"allowed, disabling HT capabilites");
}
if (conf->ieee80211n &&
bss->ssid.security_policy == SECURITY_STATIC_WEP) {
bss->disable_11n = 1;
@ -1300,13 +1281,6 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss,
conf->ieee80211n = 0;
conf->ht_capab = 0;
}
if ((conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET) &&
(conf->hw_mode == HOSTAPD_MODE_IEEE80211G) &&
!conf->obss_scan_interval) {
conf->obss_scan_interval =
OVERLAPPING_BSS_TRIGGER_SCAN_INTERVAL;
}
#endif /* CONFIG_IEEE80211N */
#ifdef CONFIG_WPS2

View File

@ -831,41 +831,6 @@ static int hostapd_ctrl_iface_enable(struct hostapd_iface *iface)
return 0;
}
static int hostapd_ctrl_iface_update_acl(struct hostapd_data *hapd,
const char *params)
{
if (os_strncmp(params, "accept ", 7) == 0) {
hapd->conf->macaddr_acl = ACCEPT_UNLESS_DENIED;
params += 7;
os_memset(&hapd->conf->accept_mac, 0,
sizeof(hapd->conf->accept_mac));
hapd->conf->num_accept_mac = 0;
if (hostapd_config_read_maclist(params, &hapd->conf->accept_mac,
&hapd->conf->num_accept_mac)) {
wpa_printf(MSG_ERROR,
"read-acl(accept) %s failed", params);
return -1;
}
hapd->conf->num_deny_mac = 0;
} else if (os_strncmp(params, "deny ", 5) == 0) {
hapd->conf->macaddr_acl = DENY_UNLESS_ACCEPTED;
params += 5;
os_memset(&hapd->conf->deny_mac, 0,
sizeof(hapd->conf->deny_mac));
hapd->conf->num_deny_mac = 0;
if (hostapd_config_read_maclist(params, &hapd->conf->deny_mac,
&hapd->conf->num_deny_mac)) {
wpa_printf(MSG_ERROR,
"read-acl(deny) %s failed", params);
return -1;
}
hapd->conf->num_accept_mac = 0;
} else {
return -1;
}
hostapd_set_acl(hapd);
return 0;
}
static int hostapd_ctrl_iface_reload(struct hostapd_iface *iface)
{
@ -978,9 +943,6 @@ static void hostapd_ctrl_iface_receive(int sock, void *eloop_ctx,
} else if (os_strncmp(buf, "NEW_STA ", 8) == 0) {
if (hostapd_ctrl_iface_new_sta(hapd, buf + 8))
reply_len = -1;
} else if (os_strncmp(buf, "UPDATE_ACL ", 11) == 0) {
if (hostapd_ctrl_iface_update_acl(hapd, buf + 11))
reply_len = -1;
} else if (os_strncmp(buf, "DEAUTHENTICATE ", 15) == 0) {
if (hostapd_ctrl_iface_deauthenticate(hapd, buf + 15))
reply_len = -1;

View File

@ -89,7 +89,6 @@ static const char *commands_help =
" level <debug level> change debug level\n"
" license show full hostapd_cli license\n"
" vendorie <set/clr> [ie] set or clear vendor ie\n"
" update_acl <accept/deny> <acl file name> update acl either to accept/deny from the given file\n"
" quit exit hostapd_cli\n";
static struct wpa_ctrl *ctrl_conn;
@ -829,28 +828,6 @@ static int hostapd_cli_cmd_get(struct wpa_ctrl *ctrl, int argc, char *argv[])
return wpa_ctrl_command(ctrl, cmd);
}
static int hostapd_cli_cmd_update_acl(struct wpa_ctrl *ctrl, int argc,
char *argv[])
{
char cmd[256];
int res;
if (argc != 2) {
printf("Too few arguments: hostapd_cli -iifname update_acl"
" <accept/deny> <acl file name>\n");
return -1;
}
res = os_snprintf(cmd, sizeof(cmd), "UPDATE_ACL %s %s", argv[0],
argv[1]);
if (res < 0 || (size_t) res >= sizeof(cmd) - 1) {
printf("Too long UPDATE_ACL command.\n");
return -1;
}
return wpa_ctrl_command(ctrl, cmd);
}
static int hostapd_cli_cmd_setvendorie(struct wpa_ctrl *ctrl, int argc, char *argv[])
{
char cmd[256];
@ -918,7 +895,6 @@ static struct hostapd_cli_cmd hostapd_cli_commands[] = {
{ "set", hostapd_cli_cmd_set },
{ "get", hostapd_cli_cmd_get },
{ "vendorie", hostapd_cli_cmd_setvendorie },
{ "update_acl", hostapd_cli_cmd_update_acl },
{ NULL, NULL }
};

View File

@ -16,7 +16,7 @@
#include "wps/wps.h"
#define MAX_VLAN_ID 4094
#define MAX_ACL_MAC_ADDRS 10
typedef u8 macaddr[ETH_ALEN];
struct mac_acl_entry {

View File

@ -715,18 +715,6 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd)
params.ht_opmode = -1;
else
params.ht_opmode = hapd->iface->ht_op_mode;
#ifdef CONFIG_IEEE80211N
int sec_chan = hapd->iconf->secondary_channel ?
hapd->iconf->secondary_channel : hapd->secondary_ch ?
hapd->secondary_ch : 0;
if (sec_chan == 1) /* if sec_chan 1 means, HT40+ */
params.ht40_sec_choff = HOSTAPD_HT40_SEC_CH_ABOVE;
if (sec_chan == -1) /* if sec_chan -1 means, HT40- */
params.ht40_sec_choff = HOSTAPD_HT40_SEC_CH_BELOW;
#endif /* CONFIG_IEEE80211N */
#endif /* NEED_AP_MLME */
params.interworking = hapd->conf->interworking;
if (hapd->conf->interworking &&

View File

@ -29,9 +29,6 @@
#include "ap_config.h"
#include "hw_features.h"
// [liyuan] (DIS)ASSOC event support for Open System Authentication
#include "common/wpa_ctrl.h"
int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
const u8 *req_ies, size_t req_ies_len, int reassoc)
{
@ -854,12 +851,6 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
#endif /* CONFIG_NO_STDOUT_DEBUG */
switch (event) {
case EVENT_AP_START_FAILURE:
wpa_msg(hapd->msg_ctx, MSG_INFO, "%s", AP_START_FAILURE);
break;
case EVENT_AP_FW_ERROR:
wpa_msg(hapd->msg_ctx, MSG_INFO, "%s", AP_FW_ERROR);
break;
case EVENT_MICHAEL_MIC_FAILURE:
michael_mic_failure(hapd, data->michael_mic_failure.src, 1);
break;
@ -935,53 +926,10 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
data->assoc_info.req_ies,
data->assoc_info.req_ies_len,
data->assoc_info.reassoc);
/* [liyuan start]
Send an assoc event that HA can
be aware of for Open System Authentication.
*/
if (data != NULL){
if (hapd->conf->wpa == 0){
/* TODO
If it is Shared Key, you need to do some bla bla here...
if (hapd->conf->auth_alg == WLAN_AUTH_SHARED_KEY){
bla bla
}
*/
wpa_msg(hapd->msg_ctx, MSG_INFO, "%s "MACSTR,
AP_STA_CONNECTED, MAC2STR(data->assoc_info.addr));
}
}
/* [liyuan end] */
break;
case EVENT_DISASSOC:
if (data){
if (data)
hostapd_notif_disassoc(hapd, data->disassoc_info.addr);
/* [liyuan start]
Send a disassoc event that HA can
be aware of for Open System Authentication.
*/
if (hapd->conf->wpa == 0){
/* TODO
If it is Shared Key, you need to do some bla bla here...
if (hapd->conf->auth_alg == WLAN_AUTH_SHARED_KEY){
bla bla
}
*/
wpa_msg(hapd->msg_ctx, MSG_INFO, "%s "MACSTR,
AP_STA_DISCONNECTED, MAC2STR(data->disassoc_info.addr));
}
/* [liyuan end] */
}
break;
case EVENT_DEAUTH:
if (data)

View File

@ -396,6 +396,12 @@ int hostapd_flush_old_stations(struct hostapd_data *hapd, u16 reason)
if (hostapd_drv_none(hapd) || hapd->drv_priv == NULL)
return 0;
wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "Flushing old station entries");
if (hostapd_flush(hapd)) {
wpa_msg(hapd->msg_ctx, MSG_WARNING, "Could not connect to "
"kernel driver");
ret = -1;
}
wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "Deauthenticate all stations");
os_memset(addr, 0xff, ETH_ALEN);
hostapd_drv_sta_deauth(hapd, addr, reason);
@ -849,17 +855,17 @@ static int hostapd_set_acl_list(struct hostapd_data *hapd,
return err;
}
void hostapd_set_acl(struct hostapd_data *hapd)
static void hostapd_set_acl(struct hostapd_data *hapd)
{
struct hostapd_config *conf = hapd->iconf;
int err;
u8 accept_acl;
if (hapd->conf->macaddr_acl <= DISABLE_MAC_ACL)
return;
if (!(conf->bss->num_accept_mac || conf->bss->num_deny_mac))
return;
if (hapd->conf->macaddr_acl == ACCEPT_UNLESS_DENIED) {
accept_acl = 1;
if (conf->bss->num_accept_mac) {
accept_acl = 1;
err = hostapd_set_acl_list(hapd, conf->bss->accept_mac,
conf->bss->num_accept_mac,
accept_acl);
@ -869,14 +875,14 @@ void hostapd_set_acl(struct hostapd_data *hapd)
}
}
if (hapd->conf->macaddr_acl == DENY_UNLESS_ACCEPTED) {
accept_acl = 0;
err = hostapd_set_acl_list(hapd, conf->bss->deny_mac,
conf->bss->num_deny_mac, accept_acl);
if (err) {
wpa_printf(MSG_DEBUG, "Failed to set deny acl");
return;
}
if (conf->bss->num_deny_mac) {
accept_acl = 0;
err = hostapd_set_acl_list(hapd, conf->bss->deny_mac,
conf->bss->num_deny_mac, accept_acl);
if (err) {
wpa_printf(MSG_DEBUG, "Failed to set deny acl");
return;
}
}
}

View File

@ -11,7 +11,6 @@
#include "common/defs.h"
#include "ap/ap_config.h"
struct wpa_driver_ops;
struct wpa_ctrl_dst;
struct radius_server_data;
@ -307,9 +306,5 @@ int hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa, const u8 *da,
int ssi_signal);
void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
int offset);
int hostapd_config_read_maclist(const char *fname,
struct mac_acl_entry **acl, int *num);
void hostapd_set_acl(struct hostapd_data *hapd);
#endif /* HOSTAPD_H */

View File

@ -308,8 +308,6 @@ static int is_40_allowed(struct hostapd_iface *iface, int channel)
void ap_ht2040_timeout(void *eloop_data, void *user_data)
{
//[lixiangkui 20150417] Fix Bug#74496, don't switch to 40MHz
#if 0
struct hostapd_data *hapd = eloop_data;
wpa_printf(MSG_INFO, "Switching to 40MHz operation");
@ -318,9 +316,7 @@ void ap_ht2040_timeout(void *eloop_data, void *user_data)
HT_OPMODE_SWITCH_TO_40);
hapd->ht_40 = TRUE;
hapd->iconf->secondary_channel = hapd->secondary_ch;
#else
wpa_printf(MSG_INFO, "Don't switching to 40MHz!");
#endif
}
void hostapd_2040_coex_action(struct hostapd_data *hapd,
const struct ieee80211_mgmt *mgmt, size_t len)

View File

@ -24,7 +24,6 @@
#include "pmksa_cache_auth.h"
#include "wpa_auth_i.h"
#include "wpa_auth_ie.h"
#include "common/wpa_ctrl.h"
#define STATE_MACHINE_DATA struct wpa_state_machine
#define STATE_MACHINE_DEBUG_PREFIX "WPA"
@ -1781,14 +1780,6 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
if (!ok) {
wpa_auth_logger(sm->wpa_auth, sm->addr, LOGGER_DEBUG,
"invalid MIC in msg 2/4 of 4-Way Handshake");
/* [liyuan start] */
if (sm->wpa_auth->cb.ctx != NULL) {
wpa_msg(sm->wpa_auth->cb.ctx, MSG_INFO, "%s "MACSTR,
WPA_AUTH_FAILURE, MAC2STR(sm->addr));
}
/* [liyuan end] */
return;
}

View File

@ -672,13 +672,6 @@ static void hostapd_wps_event_cb(void *ctx, enum wps_event event,
case WPS_EV_PBC_TIMEOUT:
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_TIMEOUT);
break;
/* [liyuan start] */
case WPS_EV_PIN_TIMEOUT:
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_TIMEOUT);
break;
/* [liyuan end] */
case WPS_EV_ER_AP_ADD:
break;
case WPS_EV_ER_AP_REMOVE:

View File

@ -264,8 +264,6 @@
#endif
#define HT_OPMODE_SWITCH_TO_20 1
#define HT_OPMODE_SWITCH_TO_40 2
#define HOSTAPD_HT40_SEC_CH_ABOVE 0x04
#define HOSTAPD_HT40_SEC_CH_BELOW 0x08
/* Action frame categories (IEEE 802.11-2007, 7.3.1.11, Table 7-24) */
#define WLAN_ACTION_SPECTRUM_MGMT 0
#define WLAN_ACTION_QOS 1

View File

@ -508,27 +508,6 @@ int wpa_ctrl_recv(struct wpa_ctrl *ctrl, char *reply, size_t *reply_len)
}
int wpa_ctrl_pending_block(struct wpa_ctrl *ctrl, void *tv)
{
struct timeval *t = (struct timeval *)tv;
struct timeval _t;
if (t == NULL) {
_t.tv_sec = 0;
_t.tv_usec = 0;
} else {
_t.tv_sec = t->tv_sec;
_t.tv_usec = t->tv_usec;
}
fd_set rfds;
FD_ZERO(&rfds);
FD_SET(ctrl->s, &rfds);
select(ctrl->s + 1, &rfds, NULL, NULL, &_t);
return FD_ISSET(ctrl->s, &rfds);
}
int wpa_ctrl_pending(struct wpa_ctrl *ctrl)
{
struct timeval tv;
@ -653,12 +632,6 @@ int wpa_ctrl_recv(struct wpa_ctrl *ctrl, char *reply, size_t *reply_len)
}
int wpa_ctrl_pending_block(struct wpa_ctrl *ctrl, void *tv)
{
return wpa_ctrl_pending(ctrl);
}
int wpa_ctrl_pending(struct wpa_ctrl *ctrl)
{
DWORD left;

View File

@ -146,11 +146,6 @@ extern "C" {
#define AP_STA_CONNECTED "AP-STA-CONNECTED "
#define AP_STA_DISCONNECTED "AP-STA-DISCONNECTED "
/* [liyuan start] */
#define WPA_AUTH_FAILURE "WPA-AUTH-FAILURE "
#define AP_START_FAILURE "AP-START-FAILURE"
#define AP_FW_ERROR "AP-FW-ERROR"
/* [liyuan end]*/
/* BSS command information masks */
@ -282,27 +277,6 @@ int wpa_ctrl_recv(struct wpa_ctrl *ctrl, char *reply, size_t *reply_len);
*/
int wpa_ctrl_pending(struct wpa_ctrl *ctrl);
/**
* wpa_ctrl_pending_block - Check whether there are pending event messages
* @ctrl :Control interface data from wpa_ctrl_open()
* @tv: Time how long it would block the caller thread, must be pointer to
* struct timeval. If it is NULL, it returns immediately.
*
* Returns: 1 if there are pending messages, 0 if no, or -1 on error
*
* This function do nearly the same thing as wpa_ctrl_pending() does, except
* that wpa_ctrl_pending() check and return immediately while this one blocks
* caller thread until any one of the following occurs:
* 1: one message comes and available for receiving by wpa_ctrl_recv()
* 2: Block time specified by @tv expires
*
* On WINDOWS:
* The block behavior not implemented on WINDOWS named pipe, so that the
* @tv will be ignored, ie it won't block caller thread and returns
* immediately, totally the same as wpa_ctrl_pending().
*/
int wpa_ctrl_pending_block(struct wpa_ctrl *ctrl, void *tv);
/**
* wpa_ctrl_get_fd - Get file descriptor used by the control interface

View File

@ -773,7 +773,6 @@ struct wpa_driver_ap_params {
u8 require_ht;
u32 max_num_sta;
u32 acs_chan_mask;
u8 ht40_sec_choff;
};
/**
@ -3145,16 +3144,6 @@ enum wpa_event_type {
* */
EVENT_CH_SWITCH,
/**
* EVENT_AP_START_FAILURE - AP start failure
*/
EVENT_AP_START_FAILURE,
/**
* EVENT_AP_FW_ERROR - AP firmware error
*/
EVENT_AP_FW_ERROR,
/**
* EVENT_WNM - Request WNM operation
*

View File

@ -2103,12 +2103,6 @@ static void do_process_drv_event(struct wpa_driver_nl80211_data *drv,
}
switch (cmd) {
case NL80211_CMD_AP_START_FAILURE_NOTIFY:
wpa_supplicant_event(drv->ctx, EVENT_AP_START_FAILURE, NULL);
break;
case NL80211_CMD_AP_FW_ERROR_NOTIFY:
wpa_supplicant_event(drv->ctx, EVENT_AP_FW_ERROR, NULL);
break;
case NL80211_CMD_TRIGGER_SCAN:
wpa_printf(MSG_DEBUG, "nl80211: Scan trigger");
break;
@ -5587,11 +5581,6 @@ static int wpa_driver_nl80211_set_ap(void *priv,
ht_capabilities.ht_capabilities_info = params->ht_capab;
NLA_PUT(msg, NL80211_ATTR_HT_CAPABILITY,
sizeof(struct ieee80211_ht_capabilities), &ht_capabilities);
if (params->ht40_sec_choff) {
NLA_PUT_U8(msg, NL80211_ATTR_HT40_SEC_CHOFF,
params->ht40_sec_choff);
}
}
switch (params->ap_capab_wmode) {

View File

@ -720,10 +720,6 @@ enum nl80211_commands {
NL80211_CMD_SET_MAC_ACL,
NL80211_CMD_AP_START_FAILURE_NOTIFY,
NL80211_CMD_AP_FW_ERROR_NOTIFY,
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@ -1550,8 +1546,6 @@ enum nl80211_attrs {
NL80211_ATTR_REQUIRE_HT,
NL80211_ATTR_ACS_CHAN_MASK,
NL80211_ATTR_HT40_SEC_CHOFF,
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,

View File

@ -428,13 +428,6 @@ enum wps_event {
*/
WPS_EV_PBC_TIMEOUT,
/* [liyuan start] Add a time out event for PIN method */
/**
* WPS_EV_PIN_TIMEOUT - PIN time expired before protocol run start
*/
WPS_EV_PIN_TIMEOUT,
/* [liyuan end] */
/**
* WPS_EV_ER_AP_ADD - ER: AP added
*/

View File

@ -322,19 +322,6 @@ void wps_pbc_timeout_event(struct wps_context *wps)
}
/* [liyuan start]
Issue a time out event for PIN method.
*/
void wps_pin_timeout_event(struct wps_context *wps)
{
if (wps->event_cb == NULL)
return;
wps->event_cb(wps->cb_ctx, WPS_EV_PIN_TIMEOUT, NULL);
}
/* [liyuan end] */
#ifdef CONFIG_WPS_OOB
struct wpabuf * wps_get_oob_cred(struct wps_context *wps)

View File

@ -1025,11 +1025,6 @@ int wps_registrar_wps_cancel(struct wps_registrar *reg)
wpa_printf(MSG_DEBUG, "WPS: PIN is set - cancelling it");
wps_registrar_pin_completed(reg);
wps_registrar_invalidate_wildcard_pin(reg, NULL, 0);
/* [liyuan start] */
wps_pin_timeout_event(reg->wps);
/* [liyuan end] */
return 1;
}
return 0;
@ -3271,10 +3266,6 @@ static void wps_registrar_set_selected_timeout(void *eloop_ctx,
reg->selected_registrar = 0;
reg->pbc = 0;
wps_registrar_selected_registrar_changed(reg);
/* [liyuan start] */
wps_pin_timeout_event(reg->wps);
/* [liyuan end] */
}