mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 09:32:34 +00:00
ipq95xx: make the ucentral-schema data model work
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -251,7 +251,7 @@ hostapd_prepare_device_config() {
|
||||
[ -n "$maxassoc" ] && append base_cfg "iface_max_num_sta=$maxassoc" "$N"
|
||||
[ "$maxassoc_ignore_probe" -gt 0 ] && append base_cfg "no_probe_resp_if_max_sta=1" "$N"
|
||||
[ "$rnr_beacon" -gt 0 ] && append base_cfg "rnr_beacon=$rnr_beacon" "$N"
|
||||
[ "$he_co_locate" -gt 0 ] && append base_cfg "he_co_locate=$he_co_locate" "$N"
|
||||
# [ "$he_co_locate" -gt 0 ] && append base_cfg "he_co_locate=$he_co_locate" "$N"
|
||||
[ "$multiple_bssid" -gt 0 ] && append base_cfg "multiple_bssid=$multiple_bssid" "$N"
|
||||
[ "$ema" -gt 0 ] && append base_cfg "ema=$ema" "$N"
|
||||
[ "$mlo" -gt 0 ] && append base_cfg "mlo=1" "$N"
|
||||
|
||||
37
feeds/ipq95xx/hostapd/patches/901-cfg-section.patch
Normal file
37
feeds/ipq95xx/hostapd/patches/901-cfg-section.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
Index: hostapd-2023-02-21-ath12.3-cs/hostapd/config_file.c
|
||||
===================================================================
|
||||
--- hostapd-2023-02-21-ath12.3-cs.orig/hostapd/config_file.c
|
||||
+++ hostapd-2023-02-21-ath12.3-cs/hostapd/config_file.c
|
||||
@@ -2271,6 +2271,8 @@ static int hostapd_config_fill(struct ho
|
||||
return 1;
|
||||
}
|
||||
conf->driver = driver;
|
||||
+ } else if (os_strcmp(buf, "uci_section") == 0) {
|
||||
+ bss->uci_section = os_strdup(pos);
|
||||
} else if (os_strcmp(buf, "driver_params") == 0) {
|
||||
os_free(conf->driver_params);
|
||||
conf->driver_params = os_strdup(pos);
|
||||
Index: hostapd-2023-02-21-ath12.3-cs/src/ap/ap_config.h
|
||||
===================================================================
|
||||
--- hostapd-2023-02-21-ath12.3-cs.orig/src/ap/ap_config.h
|
||||
+++ hostapd-2023-02-21-ath12.3-cs/src/ap/ap_config.h
|
||||
@@ -287,6 +287,7 @@ struct hostapd_bss_config {
|
||||
char snoop_iface[IFNAMSIZ + 1];
|
||||
char vlan_bridge[IFNAMSIZ + 1];
|
||||
char wds_bridge[IFNAMSIZ + 1];
|
||||
+ char *uci_section;
|
||||
|
||||
#ifdef CONFIG_IEEE80211BE
|
||||
unsigned int mlo_link_id;
|
||||
Index: hostapd-2023-02-21-ath12.3-cs/src/ap/ap_config.c
|
||||
===================================================================
|
||||
--- hostapd-2023-02-21-ath12.3-cs.orig/src/ap/ap_config.c
|
||||
+++ hostapd-2023-02-21-ath12.3-cs/src/ap/ap_config.c
|
||||
@@ -825,6 +825,7 @@ void hostapd_config_free_bss(struct host
|
||||
os_free(conf->radius_server_clients);
|
||||
os_free(conf->radius);
|
||||
os_free(conf->radius_das_shared_secret);
|
||||
+ os_free(conf->uci_section);
|
||||
hostapd_config_free_vlan(conf);
|
||||
os_free(conf->time_zone);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -3337,6 +3337,8 @@ static int hostapd_config_fill(struct ho
|
||||
Index: hostapd-2023-02-21-ath12.3-cs/hostapd/config_file.c
|
||||
===================================================================
|
||||
--- hostapd-2023-02-21-ath12.3-cs.orig/hostapd/config_file.c
|
||||
+++ hostapd-2023-02-21-ath12.3-cs/hostapd/config_file.c
|
||||
@@ -3286,6 +3286,8 @@ static int hostapd_config_fill(struct ho
|
||||
bss->ignore_broadcast_ssid = atoi(pos);
|
||||
} else if (os_strcmp(buf, "no_probe_resp_if_max_sta") == 0) {
|
||||
bss->no_probe_resp_if_max_sta = atoi(pos);
|
||||
@@ -9,9 +11,11 @@
|
||||
#ifdef CONFIG_WEP
|
||||
} else if (os_strcmp(buf, "wep_default_key") == 0) {
|
||||
bss->ssid.wep.idx = atoi(pos);
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -459,6 +459,7 @@ struct hostapd_bss_config {
|
||||
Index: hostapd-2023-02-21-ath12.3-cs/src/ap/ap_config.h
|
||||
===================================================================
|
||||
--- hostapd-2023-02-21-ath12.3-cs.orig/src/ap/ap_config.h
|
||||
+++ hostapd-2023-02-21-ath12.3-cs/src/ap/ap_config.h
|
||||
@@ -473,6 +473,7 @@ struct hostapd_bss_config {
|
||||
int ap_max_inactivity;
|
||||
int ignore_broadcast_ssid;
|
||||
int no_probe_resp_if_max_sta;
|
||||
@@ -19,9 +23,11 @@
|
||||
|
||||
int wmm_enabled;
|
||||
int wmm_uapsd;
|
||||
--- a/src/ap/beacon.c
|
||||
+++ b/src/ap/beacon.c
|
||||
@@ -920,7 +920,8 @@ void handle_probe_req(struct hostapd_dat
|
||||
Index: hostapd-2023-02-21-ath12.3-cs/src/ap/beacon.c
|
||||
===================================================================
|
||||
--- hostapd-2023-02-21-ath12.3-cs.orig/src/ap/beacon.c
|
||||
+++ hostapd-2023-02-21-ath12.3-cs/src/ap/beacon.c
|
||||
@@ -1523,7 +1523,8 @@ void handle_probe_req(struct hostapd_dat
|
||||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
@@ -31,7 +37,7 @@
|
||||
elems.ssid_list_len == 0 && elems.short_ssid_list_len == 0) {
|
||||
wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR " for "
|
||||
"broadcast SSID ignored", MAC2STR(mgmt->sa));
|
||||
@@ -967,7 +968,8 @@ void handle_probe_req(struct hostapd_dat
|
||||
@@ -1570,7 +1571,8 @@ void handle_probe_req(struct hostapd_dat
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
9
feeds/ipq95xx/ipq53xx/base-files/etc/init.d/ath12k
Executable file
9
feeds/ipq95xx/ipq53xx/base-files/etc/init.d/ath12k
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=98
|
||||
|
||||
boot() {
|
||||
rm /etc/config/wireless
|
||||
wifi config
|
||||
cp /etc/config/wireless /etc/config-shadow
|
||||
}
|
||||
@@ -16,6 +16,8 @@ platform_do_upgrade() {
|
||||
|
||||
board=$(board_name)
|
||||
case $board in
|
||||
cig,wf198|\
|
||||
sercomm,ap72tip|\
|
||||
qcom,ipq9574-ap-al02-c4|\
|
||||
qcom,ipq9574-ap-al02-c15)
|
||||
nand_upgrade_tar "$1"
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
serial1 = &blsp1_uart1;
|
||||
ethernet0 = "/soc/dp1";
|
||||
ethernet1 = "/soc/dp2";
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -357,8 +361,8 @@
|
||||
pwms = <&pwm 0 10000>;
|
||||
max-brightness = <255>;
|
||||
};
|
||||
led2 {
|
||||
label = "led2";
|
||||
led_power: led2 {
|
||||
label = "green:status";
|
||||
pwms = <&pwm 1 10000>;
|
||||
max-brightness = <255>;
|
||||
};
|
||||
|
||||
@@ -262,8 +262,6 @@ define KernelPackage/cfg80211/install
|
||||
$(INSTALL_DIR) $(1)/lib/wifi $(1)/lib/netifd/wireless
|
||||
$(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
|
||||
$(INSTALL_BIN) ./files/lib/netifd/wireless/mac80211.sh $(1)/lib/netifd/wireless
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/ieee80211
|
||||
$(INSTALL_DATA) ./files/mac80211.hotplug $(1)/etc/hotplug.d/ieee80211/10-wifi-detect
|
||||
endef
|
||||
|
||||
$(eval $(foreach drv,$(PKG_DRIVERS),$(call KernelPackage,$(drv))))
|
||||
|
||||
@@ -1142,9 +1142,9 @@ drv_mac80211_setup() {
|
||||
[ "$rxantenna" = "$prev_rxantenna" -a "$txantenna" = "$prev_txantenna" ] || mac80211_reset_config "$phy"
|
||||
wireless_set_data phy="$phy" txantenna="$txantenna" rxantenna="$rxantenna"
|
||||
|
||||
iw phy "$phy" set antenna $txantenna $rxantenna >/dev/null 2>&1
|
||||
iw phy "$phy" set antenna_gain $antenna_gain >/dev/null 2>&1
|
||||
iw phy "$phy" set distance "$distance" >/dev/null 2>&1
|
||||
# iw phy "$phy" set antenna $txantenna $rxantenna >/dev/null 2>&1
|
||||
# iw phy "$phy" set antenna_gain $antenna_gain >/dev/null 2>&1
|
||||
# iw phy "$phy" set distance "$distance" >/dev/null 2>&1
|
||||
|
||||
if [ -n "$txpower" ]; then
|
||||
iw phy "$phy" set txpower fixed "${txpower%%.*}00"
|
||||
|
||||
@@ -188,12 +188,12 @@ detect_mac80211() {
|
||||
${scanning}
|
||||
set wireless.radio${devidx}.disabled=1
|
||||
|
||||
set wireless.default_radio${devidx}=wifi-iface
|
||||
set wireless.default_radio${devidx}.device=radio${devidx}
|
||||
set wireless.default_radio${devidx}.network=lan
|
||||
set wireless.default_radio${devidx}.mode=ap
|
||||
set wireless.default_radio${devidx}.ssid=OpenWrt
|
||||
set wireless.default_radio${devidx}.encryption=none
|
||||
#set wireless.default_radio${devidx}=wifi-iface
|
||||
#set wireless.default_radio${devidx}.device=radio${devidx}
|
||||
#set wireless.default_radio${devidx}.network=lan
|
||||
#set wireless.default_radio${devidx}.mode=ap
|
||||
#set wireless.default_radio${devidx}.ssid=OpenWrt
|
||||
#set wireless.default_radio${devidx}.encryption=none
|
||||
EOF
|
||||
uci -q commit wireless
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "${ACTION}" = "add" ] && {
|
||||
/sbin/wifi config
|
||||
}
|
||||
@@ -9,5 +9,7 @@ feeds:
|
||||
path: ../../feeds/ipq95xx
|
||||
packages:
|
||||
- ipq53xx
|
||||
include:
|
||||
- ucentral-ap
|
||||
diffconfig: |
|
||||
CONFIG_KERNEL_IPQ_MEM_PROFILE=0
|
||||
|
||||
@@ -9,5 +9,7 @@ feeds:
|
||||
path: ../../feeds/ipq95xx
|
||||
packages:
|
||||
- ipq53xx
|
||||
include:
|
||||
- ucentral-ap
|
||||
diffconfig: |
|
||||
CONFIG_KERNEL_IPQ_MEM_PROFILE=0
|
||||
|
||||
Reference in New Issue
Block a user