Skip to content

Commit 3f246fc

Browse files
mikeNGpcfighter
authored andcommitted
Squashed update to ol_R5.SP5.01
924fc97 WPS: Select only correct AP following provisioning (UPSTREAM) 0225e1b wpa_s/hostapd: add description to version string 96f59d8 hostapd: template function for auto-selection of channel (INTERNAL) c5f4bec hostapd: re-use auto-select scan result for 40Mhz pre-scan (INTERNAL) 8c1b10e hostapd: auto-select AP channel (INTERNAL) 7d2c675 hostapd: auto-select secondary channel (INTERNAL) 586ba7c hostapd: add support for ACS whitelist and blacklist (INTERNAL) 5f65e16 wpa_s: new override_p2p_go_intent conf parameter (INTERNAL) 172d2b2 P2P: accept provision discovery with bcast group ID 7190ff7 P2P: wait on GO negotiation confirm Original commits from: https://github.com/TI-OpenLink/hostap/commits/ol_R5.SP5.01 Change-Id: I2d4fbaee04a0c8785e4c4b8a1333f4aff7204cc9
1 parent 161f26d commit 3f246fc

17 files changed

+412
-31
lines changed

hostapd/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ endif
88

99
CFLAGS += -I../src
1010
CFLAGS += -I../src/utils
11+
CFLAGS += -DVERSION_STR_POSTFIX=\"-$(shell git describe)\"
1112

1213
# Uncomment following line and set the path to your kernel tree include
1314
# directory if your C library does not include all header files.

hostapd/config_file.c

+14
Original file line numberDiff line numberDiff line change
@@ -2016,6 +2016,20 @@ static int hostapd_config_fill(struct hostapd_config *conf,
20162016
"list", line);
20172017
errors++;
20182018
}
2019+
} else if (os_strcmp(buf, "acs_blacklist") == 0) {
2020+
/* these are not rates but the same function will do */
2021+
if (hostapd_parse_rates(&conf->acs_blacklist, pos)) {
2022+
wpa_printf(MSG_ERROR, "Line %d: invalid acs "
2023+
"black list", line);
2024+
errors++;
2025+
}
2026+
} else if (os_strcmp(buf, "acs_whitelist") == 0) {
2027+
/* these are not rates but the same function will do */
2028+
if (hostapd_parse_rates(&conf->acs_whitelist, pos)) {
2029+
wpa_printf(MSG_ERROR, "Line %d: invalid acs "
2030+
"white list", line);
2031+
errors++;
2032+
}
20192033
} else if (os_strcmp(buf, "preamble") == 0) {
20202034
if (atoi(pos))
20212035
conf->preamble = SHORT_PREAMBLE;

hostapd/hostapd.conf

+12
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,20 @@ hw_mode=g
105105
# (default: 0, i.e., not set)
106106
# Please note that some drivers do not use this value from hostapd and the
107107
# channel will need to be configured separately with iwconfig.
108+
# When set to 0, automatic channel selection will be engaged. A channel
109+
# will be selected from the desired hw_mode.
108110
channel=1
109111

112+
# Automatic channel selection (ACS) whitelist
113+
# (default: not set)
114+
# Allow only these channels in automatic channel selection
115+
# acs_whitelist=1 2 3 4 5 6 7 8 9 10 11
116+
117+
# Automatic channel selection (ACS) blacklist
118+
# (default: not set)
119+
# Don't allow these channels in automatic channel selection
120+
# acs_blacklist=1 2 3 4 5 6 7 8 9 10 11
121+
110122
# Beacon interval in kus (1.024 ms) (default: 100; range 15..65535)
111123
beacon_int=100
112124

src/ap/ap_config.h

+3
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,9 @@ struct hostapd_config {
454454
u32 vht_capab;
455455
int ieee80211ac;
456456
u8 vht_oper_chwidth;
457+
458+
int *acs_blacklist;
459+
int *acs_whitelist;
457460
};
458461

459462

src/ap/hostapd.c

+9-1
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,15 @@ static int setup_interface(struct hostapd_iface *iface)
852852
"channel. (%d)", ret);
853853
return -1;
854854
}
855-
ret = hostapd_check_ht_capab(iface);
855+
/* we don't need hostapd_check_ht_capab if the channel is
856+
* selected automatically */
857+
if (ret == 1) {
858+
wpa_printf(MSG_DEBUG, "Interface HW mode selection and "
859+
"initialization be completed in a callback");
860+
return 0;
861+
}
862+
863+
ret = hostapd_check_ht_capab(iface, NULL);
856864
if (ret < 0)
857865
return -1;
858866
if (ret == 1) {

0 commit comments

Comments
 (0)