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 }
};