mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 02:17:58 +00:00 
			
		
		
		
	Compare commits
	
		
			29 Commits
		
	
	
		
			WIFI-14630
			...
			WIFI-14697
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | cd8294eca0 | ||
|   | e12ecf831e | ||
|   | 1213182012 | ||
|   | d5df71619a | ||
|   | a177884893 | ||
|   | 1f7d8a7bb7 | ||
|   | dc02d2722a | ||
|   | 13ac9166ef | ||
|   | 3d6f360cb6 | ||
|   | 6659e77bd0 | ||
|   | b061cc55ce | ||
|   | b17db16c15 | ||
|   | d36866301f | ||
|   | ffccb65d1b | ||
|   | af165342ed | ||
|   | ed62236d31 | ||
|   | 346bdd9c16 | ||
|   | dc41a0fd0c | ||
|   | 2b26a4e68a | ||
|   | fa96b2b24d | ||
|   | 36f00adc7a | ||
|   | 5314a752bd | ||
|   | 0f6683f31e | ||
|   | 8ee96c36c9 | ||
|   | 89789900f5 | ||
|   | 6add44ae27 | ||
|   | 14a0c2d272 | ||
|   | 9e769c85cb | ||
|   | d6e1008c7a | 
							
								
								
									
										2
									
								
								.github/workflows/build-dev.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/build-dev.yml
									
									
									
									
										vendored
									
									
								
							| @@ -21,7 +21,7 @@ jobs: | |||||||
|     strategy: |     strategy: | ||||||
|       fail-fast: false |       fail-fast: false | ||||||
|       matrix: |       matrix: | ||||||
|         target: [ 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf189', 'cig_wf196', 'cig_wf196', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'sonicfi_rap630w-312g', 'sonicfi_rap63xc-211g', 'sonicfi_rap630c-311g', 'sonicfi_rap630w-311g', 'sonicfi_rap630w-211g', 'sonicfi_rap650c', 'sonicfi_rap7110c-341x', 'sonicfi_rap750e-h', 'sonicfi_rap750e-s', 'sonicfi_rap750w-311a', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap105', 'edgecore_eap111', 'edgecore_eap112', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'edgecore_oap103', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4x_3', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'senao_iap4300m', 'senao_iap2300m', 'senao_jeap6500', 'udaya_a6-id2', 'udaya_a6-od2', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655', 'emplus_wap588m', 'zyxel_nwa130be' ] |         target: [ 'cig_wf189h', 'cig_wf189w', 'cig_wf660a', 'cig_wf672', 'cig_wf186h', 'cig_wf186w', 'cig_wf188n', 'cig_wf189', 'cig_wf196', 'cig_wf196', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'sonicfi_rap630w-312g', 'sonicfi_rap63xc-211g', 'sonicfi_rap630c-311g', 'sonicfi_rap630w-311g', 'sonicfi_rap630w-211g', 'sonicfi_rap650c', 'sonicfi_rap7110c-341x', 'sonicfi_rap750e-h', 'sonicfi_rap750e-s', 'sonicfi_rap750w-311a', 'edgecore_eap101', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap105', 'edgecore_eap111', 'edgecore_eap112', 'edgecore_oap101', 'edgecore_oap101-6e', 'edgecore_oap101e', 'edgecore_oap101e-6e', 'edgecore_oap103', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4x_3', 'hfcl_ion4xi_w', 'hfcl_ion4x_w', 'indio_um-305ax', 'senao_iap4300m', 'senao_iap2300m', 'senao_jeap6500', 'udaya_a6-id2', 'udaya_a6-od2', 'yuncore_ax820', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655', 'emplus_wap588m', 'zyxel_nwa130be', 'sercomm_ap72tip-v4' ] | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v3 |     - uses: actions/checkout@v3 | ||||||
|  |  | ||||||
|   | |||||||
| @@ -117,8 +117,6 @@ hostapd_common_add_device_config() { | |||||||
| 	config_add_boolean legacy_rates | 	config_add_boolean legacy_rates | ||||||
| 	config_add_int cell_density | 	config_add_int cell_density | ||||||
| 	config_add_int rts_threshold | 	config_add_int rts_threshold | ||||||
| 	config_add_int rssi_reject_assoc_rssi |  | ||||||
| 	config_add_int rssi_ignore_probe_request |  | ||||||
| 	config_add_int maxassoc | 	config_add_int maxassoc | ||||||
| 	config_add_boolean maxassoc_ignore_probe | 	config_add_boolean maxassoc_ignore_probe | ||||||
|  |  | ||||||
| @@ -162,7 +160,7 @@ hostapd_prepare_device_config() { | |||||||
|  |  | ||||||
| 	json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \ | 	json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \ | ||||||
| 		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \ | 		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \ | ||||||
| 		rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc \ | 		rts_threshold beacon_rate maxassoc \ | ||||||
| 		multiple_bssid he_co_locate rnr_beacon ema acs_exclude_dfs \ | 		multiple_bssid he_co_locate rnr_beacon ema acs_exclude_dfs \ | ||||||
| 		maxassoc_ignore_probe band | 		maxassoc_ignore_probe band | ||||||
|  |  | ||||||
| @@ -261,8 +259,6 @@ hostapd_prepare_device_config() { | |||||||
| 		hostapd_add_rate brlist "$br" | 		hostapd_add_rate brlist "$br" | ||||||
| 	done | 	done | ||||||
|  |  | ||||||
| 	[ -n "$rssi_reject_assoc_rssi" ] && append base_cfg "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N" |  | ||||||
| 	[ -n "$rssi_ignore_probe_request" ] && append base_cfg "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N" |  | ||||||
| 	[ -n "$beacon_rate" ] && append base_cfg "beacon_rate=$beacon_rate" "$N" | 	[ -n "$beacon_rate" ] && append base_cfg "beacon_rate=$beacon_rate" "$N" | ||||||
| 	[ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N" | 	[ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N" | ||||||
| 	[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" | 	[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" | ||||||
| @@ -471,6 +467,9 @@ hostapd_common_add_bss_config() { | |||||||
| 	config_add_string uci_section | 	config_add_string uci_section | ||||||
|  |  | ||||||
| 	config_add_boolean dynamic_probe_resp | 	config_add_boolean dynamic_probe_resp | ||||||
|  |  | ||||||
|  | 	config_add_int rssi_reject_assoc_rssi | ||||||
|  | 	config_add_int rssi_ignore_probe_request | ||||||
| } | } | ||||||
|  |  | ||||||
| hostapd_set_vlan_file() { | hostapd_set_vlan_file() { | ||||||
| @@ -724,7 +723,8 @@ hostapd_set_bss_options() { | |||||||
| 		airtime_bss_weight airtime_bss_limit airtime_sta_weight \ | 		airtime_bss_weight airtime_bss_limit airtime_sta_weight \ | ||||||
| 		multicast_to_unicast_all proxy_arp per_sta_vif \ | 		multicast_to_unicast_all proxy_arp per_sta_vif \ | ||||||
| 		eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id \ | 		eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id \ | ||||||
| 		vendor_elements fils uci_section dynamic_probe_resp | 		vendor_elements fils uci_section dynamic_probe_resp \ | ||||||
|  | 		rssi_reject_assoc_rssi rssi_ignore_probe_request  | ||||||
|  |  | ||||||
| 	set_default fils 0 | 	set_default fils 0 | ||||||
| 	set_default isolate 0 | 	set_default isolate 0 | ||||||
| @@ -778,6 +778,8 @@ hostapd_set_bss_options() { | |||||||
| 	append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N" | 	append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N" | ||||||
| 	append bss_conf "utf8_ssid=$utf8_ssid" "$N" | 	append bss_conf "utf8_ssid=$utf8_ssid" "$N" | ||||||
| 	append bss_conf "multi_ap=$multi_ap" "$N" | 	append bss_conf "multi_ap=$multi_ap" "$N" | ||||||
|  | 	[ -n "$rssi_reject_assoc_rssi" ] && append bss_conf "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N" | ||||||
|  | 	[ -n "$rssi_ignore_probe_request" ] && append bss_conf "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N" | ||||||
| 	[ -n "$vendor_elements" ] && append bss_conf "vendor_elements=$vendor_elements" "$N" | 	[ -n "$vendor_elements" ] && append bss_conf "vendor_elements=$vendor_elements" "$N" | ||||||
|  |  | ||||||
| 	[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N" | 	[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N" | ||||||
|   | |||||||
							
								
								
									
										14
									
								
								feeds/hostapd/hostapd/patches/zzz-ignore-probe-event.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								feeds/hostapd/hostapd/patches/zzz-ignore-probe-event.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | --- a/src/ap/beacon.c | ||||||
|  | +++ b/src/ap/beacon.c | ||||||
|  | @@ -934,8 +934,10 @@ void handle_probe_req(struct hostapd_dat | ||||||
|  |  	int ubus_response; | ||||||
|  |   | ||||||
|  |  	if (hapd->iconf->rssi_ignore_probe_request && ssi_signal && | ||||||
|  | -	    ssi_signal < hapd->iconf->rssi_ignore_probe_request) | ||||||
|  | +	    ssi_signal < hapd->iconf->rssi_ignore_probe_request) { | ||||||
|  | +		hostapd_ubus_notify_rssi(hapd, "rssi-ignore-probe", mgmt->sa, ssi_signal); | ||||||
|  |  		return; | ||||||
|  | +	} | ||||||
|  |   | ||||||
|  |  	if (len < IEEE80211_HDRLEN) | ||||||
|  |  		return; | ||||||
| @@ -1944,6 +1944,21 @@ void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 * | |||||||
| 	ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1); | 	ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi) | ||||||
|  | { | ||||||
|  | 	if (!hapd->ubus.obj.has_subscribers) | ||||||
|  | 		return; | ||||||
|  |  | ||||||
|  | 	if (!addr) | ||||||
|  | 		return; | ||||||
|  |  | ||||||
|  | 	blob_buf_init(&b, 0); | ||||||
|  | 	blobmsg_add_macaddr(&b, "address", addr); | ||||||
|  | 	blobmsg_add_u32(&b, "rssi", rssi); | ||||||
|  |  | ||||||
|  | 	ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1); | ||||||
|  | } | ||||||
|  |  | ||||||
| void hostapd_ubus_notify_csa(struct hostapd_data *hapd, int freq) | void hostapd_ubus_notify_csa(struct hostapd_data *hapd, int freq) | ||||||
| { | { | ||||||
| 	if (!hapd->ubus.obj.has_subscribers) | 	if (!hapd->ubus.obj.has_subscribers) | ||||||
|   | |||||||
| @@ -56,6 +56,7 @@ void hostapd_ubus_notify_beacon_report(struct hostapd_data *hapd, | |||||||
| 				       size_t len); | 				       size_t len); | ||||||
| void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequency, | void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequency, | ||||||
| 					int chan_width, int cf1, int cf2); | 					int chan_width, int cf1, int cf2); | ||||||
|  | void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi); | ||||||
|  |  | ||||||
| void hostapd_ubus_notify_bss_transition_response( | void hostapd_ubus_notify_bss_transition_response( | ||||||
| 	struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code, | 	struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code, | ||||||
|   | |||||||
| @@ -41,6 +41,8 @@ ALLWIFIBOARDS:= \ | |||||||
| 	edgecore-oap102 \ | 	edgecore-oap102 \ | ||||||
| 	edgecore-oap103 \ | 	edgecore-oap103 \ | ||||||
| 	edgecore-eap104 \ | 	edgecore-eap104 \ | ||||||
|  | 	emplus-wap385c \ | ||||||
|  | 	emplus-wap386v2 \ | ||||||
| 	liteon-wpx8324 \ | 	liteon-wpx8324 \ | ||||||
| 	indio-um-310ax-v1 \ | 	indio-um-310ax-v1 \ | ||||||
| 	indio-um-510axp-v1 \ | 	indio-um-510axp-v1 \ | ||||||
| @@ -404,6 +406,8 @@ $(eval $(call generate-ath11k-wifi-package,edgecore-eap102,Edgecore EAP102)) | |||||||
| $(eval $(call generate-ath11k-wifi-package,edgecore-oap102,Edgecore OAP102)) | $(eval $(call generate-ath11k-wifi-package,edgecore-oap102,Edgecore OAP102)) | ||||||
| $(eval $(call generate-ath11k-wifi-package,edgecore-oap103,Edgecore OAP103)) | $(eval $(call generate-ath11k-wifi-package,edgecore-oap103,Edgecore OAP103)) | ||||||
| $(eval $(call generate-ath11k-wifi-package,edgecore-eap104,Edgecore EAP104)) | $(eval $(call generate-ath11k-wifi-package,edgecore-eap104,Edgecore EAP104)) | ||||||
|  | $(eval $(call generate-ath11k-wifi-package,emplus-wap385c,Emplus WAP385C)) | ||||||
|  | $(eval $(call generate-ath11k-wifi-package,emplus-wap386v2,Emplus WAP386 V2)) | ||||||
| $(eval $(call generate-ath11k-wifi-package,liteon-wpx8324,Liteon WPX8324)) | $(eval $(call generate-ath11k-wifi-package,liteon-wpx8324,Liteon WPX8324)) | ||||||
| $(eval $(call generate-ath11k-wifi-package,indio-um-310ax-v1,Indio UM-310AX V1)) | $(eval $(call generate-ath11k-wifi-package,indio-um-310ax-v1,Indio UM-310AX V1)) | ||||||
| $(eval $(call generate-ath11k-wifi-package,indio-um-510axp-v1,Indio UM-510AXP V1)) | $(eval $(call generate-ath11k-wifi-package,indio-um-510axp-v1,Indio UM-510AXP V1)) | ||||||
|   | |||||||
							
								
								
									
										
											BIN
										
									
								
								feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap385c.bin.IPQ5018
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap385c.bin.IPQ5018
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap385c.bin.QCN6122
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								feeds/ipq807x_v5.4/ath11k-wifi/board-emplus-wap385c.bin.QCN6122
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -18,9 +18,11 @@ start() { | |||||||
| 	[ "$enabled" -gt 0 ] || return 1 | 	[ "$enabled" -gt 0 ] || return 1 | ||||||
|  |  | ||||||
| 	case "$board" in | 	case "$board" in | ||||||
| 	sonicfi,rap630c-311g|\ | 		sonicfi,rap630c-311g) | ||||||
|  | 		service_start /usr/sbin/cooling -c /etc/cooling/sonicfi-rap630c-311g-cooling.conf | ||||||
|  | 		;; | ||||||
| 		sonicfi,rap630w-311g) | 		sonicfi,rap630w-311g) | ||||||
|         service_start /usr/sbin/cooling | 		service_start /usr/sbin/cooling -c /etc/cooling/sonicfi-rap630w-311g-cooling.conf | ||||||
| 		;; | 		;; | ||||||
| 	esac | 	esac | ||||||
|  |  | ||||||
|   | |||||||
| @@ -28,143 +28,270 @@ | |||||||
|  |  | ||||||
| #define CUR_STATE_PATH "/sys/devices/virtual/thermal/cooling_device%i/cur_state" | #define CUR_STATE_PATH "/sys/devices/virtual/thermal/cooling_device%i/cur_state" | ||||||
| #define TEMPER_PATH "/sys/devices/virtual/thermal/thermal_zone%i/temp" | #define TEMPER_PATH "/sys/devices/virtual/thermal/thermal_zone%i/temp" | ||||||
|  | #define CPU_FREQ_PATH "/sys/devices/system/cpu/cpu0/cpufreq/%s" | ||||||
|  |  | ||||||
| #define PATH_MAX 256 | #define PATH_MAX 256 | ||||||
| #define BUF_MAX 8 | #define BUF_MAX 32 | ||||||
| #define THERSHOLD_MAX 20 |  | ||||||
| #define PHY0 0 | #define PHY0 0 | ||||||
| #define PHY1 1 | #define PHY1 1 | ||||||
|  | #define NUM_VALUES 4 | ||||||
|  |  | ||||||
|  | int load_config_file=0; | ||||||
|  |  | ||||||
|  | //#define ULOG_INFO(fmt, ...) ulog(LOG_INFO, fmt, ## __VA_ARGS__) | ||||||
|  |  | ||||||
| typedef unsigned char	u8; | typedef unsigned char	u8; | ||||||
|  | typedef unsigned long	u32; | ||||||
|  |  | ||||||
| u8 w2g_threshold_level=0; | u8 w2g_threshold_level=0; | ||||||
| u8 w5g_threshold_level=0; | u8 w5g_threshold_level=0; | ||||||
| u8 w2g_cur_temper=0; | u8 w2g_cur_temper=0; | ||||||
| u8 w5g_cur_temper=0; | u8 w5g_cur_temper=0; | ||||||
|  | u32 level_cpu_freq=1008000; | ||||||
|  |  | ||||||
|  | /* default value of wifi thresholds*/ | ||||||
| #ifdef PLATFORM_RAP630C_311G | #ifdef PLATFORM_RAP630C_311G | ||||||
| u8 level_2g_lo[4]={0, 105, 110, 115}; | u8 level_2g_high[4]={105, 110, 115, 120}; | ||||||
| u8 level_2g_hi[4]={105, 110, 115, 120}; | u8 level_2g_low[4]={0, 105, 110, 115}; | ||||||
| u8 level_2g_limit[4]={0, 35, 50, 70}; | u8 level_2g_mitigation[4]={0, 35, 50, 70}; | ||||||
| u8 level_5g_lo[4]={0, 105, 110, 115}; | u8 level_5g_high[4]={105, 110, 115, 120}; | ||||||
| u8 level_5g_hi[4]={105, 110, 115, 120}; | u8 level_5g_low[4]={0, 105, 110, 115}; | ||||||
| u8 level_5g_limit[4]={0, 20, 30, 50}; | u8 level_5g_mitigation[4]={0, 20, 30, 50}; | ||||||
|  | u32 level_cpu_frequency[4]={1008000, 800000, 800000, 800000}; | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #ifdef PLATFORM_RAP630W_311G | #ifdef PLATFORM_RAP630W_311G | ||||||
| u8 level_2g_lo[4]={0, 105, 110, 115}; | u8 level_2g_high[4]={105, 110, 115, 120}; | ||||||
| u8 level_2g_hi[4]={105, 110, 115, 120}; | u8 level_2g_low[4]={0, 105, 110, 115}; | ||||||
| u8 level_2g_limit[4]={0, 20, 50, 70}; | u8 level_2g_mitigation[4]={0, 20, 50, 70}; | ||||||
| u8 level_5g_lo[4]={0, 105, 110, 115}; | u8 level_5g_high[4]={105, 110, 115, 120}; | ||||||
| u8 level_5g_hi[4]={105, 110, 115, 120}; | u8 level_5g_low[4]={0, 105, 110, 115}; | ||||||
| u8 level_5g_limit[4]={0, 20, 50, 70}; | u8 level_5g_mitigation[4]={0, 20, 50, 70}; | ||||||
|  | u32 level_cpu_frequency[4]={1008000, 800000, 800000, 800000}; | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| static char *config_file = NULL; | static char *config_file = NULL; | ||||||
| char temp[4][BUF_MAX]; |  | ||||||
|  |  | ||||||
| #define ULOG_DBG(fmt, ...) ulog(LOG_DEBUG, fmt, ## __VA_ARGS__) | typedef struct { | ||||||
|  |     int thresholds_high[NUM_VALUES]; | ||||||
|  |     int thresholds_low[NUM_VALUES]; | ||||||
|  |     int mitigation[NUM_VALUES]; | ||||||
|  |     int cpu_freq[NUM_VALUES]; | ||||||
|  | } WifiConfig; | ||||||
|  |  | ||||||
| static void write_cur_state (char *filename, int state) { | WifiConfig wifi2g = {0}, wifi5g = {0}; | ||||||
|  |  | ||||||
|  | static void set_cpu_freq (int freq) { | ||||||
|  | 	FILE * fp; | ||||||
|  | 	char filename[PATH_MAX]; | ||||||
|  |  | ||||||
|  | 	snprintf(filename, PATH_MAX, CPU_FREQ_PATH, "scaling_governor"); | ||||||
|  |  | ||||||
|  | 	fp = fopen(filename, "w"); | ||||||
|  | 	if (!fp) { | ||||||
|  | 		ULOG_ERR("open scaling_governor error\n"); | ||||||
|  | 	} | ||||||
|  | 	fprintf(fp, "%s", "userspace"); | ||||||
|  | 	fclose(fp); | ||||||
|  |  | ||||||
|  | 	snprintf(filename, PATH_MAX, CPU_FREQ_PATH, "scaling_setspeed"); | ||||||
|  |  | ||||||
|  | 	fp = fopen(filename, "w"); | ||||||
|  | 	if (!fp) { | ||||||
|  | 		ULOG_ERR("open scaling_setspeed error\n"); | ||||||
|  | 	} | ||||||
|  | 	fprintf(fp, "%d", freq); | ||||||
|  | 	fclose(fp); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | void parse_line(const char* line, const char* key, int* array) { | ||||||
|  | 	char label[64]; | ||||||
|  | 	int values[NUM_VALUES]; | ||||||
|  | 	int i; | ||||||
|  |  | ||||||
|  | 	if (sscanf(line, "%s %d %d %d %d %d", label, &values[0], &values[1], &values[2], &values[3], &values[4]) == 5) { | ||||||
|  | 		for (i = 0; i < NUM_VALUES; ++i) { | ||||||
|  | 			array[i] = values[i]; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  |  | ||||||
|  | int load_config() { | ||||||
|  | 	FILE * fp = fopen(config_file, "r"); | ||||||
|  | 	if (!fp) { | ||||||
|  | 		ULOG_ERR("open config file error\n"); | ||||||
|  | 		return 1; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	WifiConfig* current_config = NULL; | ||||||
|  | 	char line[256]; | ||||||
|  |  | ||||||
|  | 	while (fgets(line, sizeof(line), fp)) { | ||||||
|  | 		if (strstr(line, "[wifi2g]")) { | ||||||
|  | 			current_config = &wifi2g; | ||||||
|  | 		} else if (strstr(line, "[wifi5g]")) { | ||||||
|  | 			current_config = &wifi5g; | ||||||
|  | 		} else if (current_config) { | ||||||
|  | 			if (strstr(line, "thresholds_high")) { | ||||||
|  | 				parse_line(line, "thresholds_high", current_config->thresholds_high); | ||||||
|  | 			} else if (strstr(line, "thresholds_low")) { | ||||||
|  | 				parse_line(line, "thresholds_low", current_config->thresholds_low); | ||||||
|  | 			} else if (strstr(line, "mitigation")) { | ||||||
|  | 				parse_line(line, "mitigation", current_config->mitigation); | ||||||
|  | 			} else if (strstr(line, "CPU_freq")) { | ||||||
|  | 				parse_line(line, "CPU_freq", current_config->cpu_freq); | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	fclose(fp); | ||||||
|  | 	set_cpu_freq(wifi5g.cpu_freq[0]); | ||||||
|  |  | ||||||
|  | 	return 0; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | int load_default_config(){ | ||||||
|  | 	int i=0; | ||||||
|  |  | ||||||
|  | 	set_cpu_freq(1008000); | ||||||
|  | 	for (i = 0; i < NUM_VALUES; i++) { | ||||||
|  | 		wifi2g.thresholds_high[i]=level_2g_high[i]; | ||||||
|  | 		wifi2g.thresholds_low[i]=level_2g_low[i]; | ||||||
|  | 		wifi2g.mitigation[i]=level_2g_mitigation[i]; | ||||||
|  | 		wifi2g.cpu_freq[i]=level_cpu_frequency[i]; | ||||||
|  | 		wifi5g.thresholds_high[i]=level_5g_high[i]; | ||||||
|  | 		wifi5g.thresholds_low[i]=level_5g_low[i]; | ||||||
|  | 		wifi5g.mitigation[i]=level_5g_mitigation[i]; | ||||||
|  | 		wifi5g.cpu_freq[i]=level_cpu_frequency[i]; | ||||||
|  | 	} | ||||||
|  | 	return 0; | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | static void write_cur_state (const char *filename, int state) { | ||||||
| 	FILE * fp; | 	FILE * fp; | ||||||
|  |  | ||||||
| 	ULOG_DBG("write_cur_state filename=[%s] [%d]\n", filename, state); |  | ||||||
| 	fp = fopen(filename, "w"); | 	fp = fopen(filename, "w"); | ||||||
| 	if (!fp){ | 	if (!fp){ | ||||||
| 		ULOG_ERR("some kind of error write cur_state\n"); | 		ULOG_ERR("open %s file error\n",filename); | ||||||
| 	} | 	} | ||||||
| 	fprintf(fp, "%d", state); | 	fprintf(fp, "%d", state); | ||||||
| 	fclose(fp); | 	fclose(fp); | ||||||
| } | } | ||||||
|  |  | ||||||
| static void read_cur_state (char *filename, char *buffer) { | int read_cur_state(const char *filename, char *buf, size_t buffer) { | ||||||
| 	FILE * fp; | 	FILE *fp; | ||||||
| 	 | 	 | ||||||
| 	fp = fopen(filename, "r"); | 	fp = fopen(filename, "r"); | ||||||
| 	if (!fp){ | 	if (!fp) { | ||||||
| 		ULOG_ERR("some kind of error write cur_state\n"); | 		ULOG_ERR("open %s file error\n",filename); | ||||||
|  | 		return -1; | ||||||
| 	} | 	} | ||||||
| 	if (0 == fread(buffer, sizeof(char), 3, fp)) { | 	if (!fgets(buf, buffer, fp)) { | ||||||
| 		ULOG_ERR("some kind of error read value\n"); | 		ULOG_ERR("Failed to read %s file\n", filename); | ||||||
|  | 		fclose(fp); | ||||||
|  | 		return -1; | ||||||
| 	} | 	} | ||||||
| 	fclose(fp); | 	fclose(fp); | ||||||
|  | 	return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| static void wifi_get_temperature() { | static void wifi_get_temperature() { | ||||||
| 	char filename[PATH_MAX]; | 	char filename[PATH_MAX]; | ||||||
| 	FILE * fp; |  | ||||||
| 	int i = 0; |  | ||||||
| 	char buffer[BUF_MAX]; | 	char buffer[BUF_MAX]; | ||||||
|  | 	int i = 0; | ||||||
|  |  | ||||||
|  | //	ULOG_INFO("=================================\n"); | ||||||
|  |  | ||||||
|  | 	/* read cpuinfo_cur_freq*/ | ||||||
|  | 	snprintf(filename, PATH_MAX, CPU_FREQ_PATH, "cpuinfo_cur_freq"); | ||||||
|  |  | ||||||
|  | 	memset(buffer, 0, BUF_MAX); | ||||||
|  | 	read_cur_state(filename, buffer, sizeof(buffer)); | ||||||
|  | //	ULOG_INFO("CPU current frequency: %s\n", buffer); | ||||||
|  |  | ||||||
| 	/* get current phy cooling state*/ | 	/* get current phy cooling state*/ | ||||||
| 	for (i=0 ; i <= 1; i++ ) { | 	for (i=0; i <= 1; i++) { | ||||||
| 		memset(buffer, 0, BUF_MAX); | 		memset(buffer, 0, BUF_MAX); | ||||||
| 		snprintf(filename, PATH_MAX, CUR_STATE_PATH, i); | 		snprintf(filename, PATH_MAX, CUR_STATE_PATH, i); | ||||||
| 		read_cur_state(filename, buffer); | 		read_cur_state(filename, buffer, sizeof(buffer)); | ||||||
| 		ULOG_DBG("read from Phy%i cur_state is %s\n", i, buffer); | //		ULOG_INFO("Phy%i cur_state is: %s\n", i, buffer); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	for (i=0 ; i <= 3; i++ ) { | 	for (i=0; i <= 3; i++) { | ||||||
|  | 		memset(buffer, 0, BUF_MAX); | ||||||
| 		snprintf(filename, PATH_MAX, TEMPER_PATH, i); | 		snprintf(filename, PATH_MAX, TEMPER_PATH, i); | ||||||
| 		fp = fopen(filename, "r"); | 		read_cur_state(filename, buffer, sizeof(buffer)); | ||||||
| 		if (!fp) { | //		ULOG_INFO("thermal_zone%i cur_temp is: %s\n", i, buffer); | ||||||
| 			ULOG_ERR("some kind of error open value\n"); |  | ||||||
| 		} | 		if (i == 0) | ||||||
| 		memset(temp[i], 0, BUF_MAX); | 			w2g_cur_temper=atoi(buffer); | ||||||
| 		if (0 == fread(temp[i], sizeof(char), 3, fp)) { | 		else if (i == 3) | ||||||
| 			ULOG_ERR("some kind of error read value\n"); | 			w5g_cur_temper=atoi(buffer); | ||||||
| 		} |  | ||||||
| 		fclose(fp); |  | ||||||
| 		ULOG_DBG("thermal_zone%i cur_temp is %s\n", i, temp[i]); |  | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	w2g_cur_temper=atoi(temp[0]); | 	if (w5g_cur_temper >= 120) | ||||||
| 	w5g_cur_temper=atoi(temp[3]); | 	{ | ||||||
|  | 		ULOG_ERR("!! Temperature is over %d degree, system will reboot\n", w5g_cur_temper); | ||||||
|  | 		sync(); | ||||||
|  | 		if ( -1 != system("reboot &") ){ | ||||||
|  | 			printf("sysyem reboot...\n"); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
| static void wifi_set_cooling() { | static void wifi_set_cooling() { | ||||||
| 	char filename[PATH_MAX]; | 	char filename[PATH_MAX]; | ||||||
| 	int level; | 	int level; | ||||||
|  |  | ||||||
| 	for (level=0 ; level<=3 ; level++) { | 	for (level = 0; level <= 3; level++) { | ||||||
| 		if (w2g_cur_temper >= level_2g_lo[level] && w2g_cur_temper < level_2g_hi[level]) { | 		if (w2g_cur_temper >= wifi2g.thresholds_low[level] && w2g_cur_temper < wifi2g.thresholds_high[level]) { | ||||||
| 			ULOG_DBG("2G at level %d , %d degree\n" ,level, w2g_cur_temper); | //			ULOG_INFO("2G at level %d , %d degree\n" ,level, w2g_cur_temper); | ||||||
| 			if (w2g_threshold_level != level) { | 			if (w2g_threshold_level != level) { | ||||||
| 				ULOG_DBG("setting 2G reduce %d percent\n" ,level_2g_limit[level]); | //				ULOG_INFO("setting 2G reduce %d percent\n" ,wifi2g.mitigation[level]); | ||||||
| 				snprintf(filename, PATH_MAX, CUR_STATE_PATH, PHY0); | 				snprintf(filename, PATH_MAX, CUR_STATE_PATH, PHY0); | ||||||
| 				write_cur_state(filename, level_2g_limit[level]); | 				write_cur_state(filename, wifi2g.mitigation[level]); | ||||||
| 				w2g_threshold_level = level; | 				w2g_threshold_level = level; | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		if (w5g_cur_temper >= level_5g_lo[level] && w5g_cur_temper < level_5g_hi[level]) { | 		if (w5g_cur_temper >= wifi5g.thresholds_low[level] && w5g_cur_temper < wifi5g.thresholds_high[level]) { | ||||||
| 			ULOG_DBG("5G at level %d , %d degree\n" ,level, w5g_cur_temper); | //			ULOG_INFO("5G at level %d , %d degree\n" ,level, w5g_cur_temper); | ||||||
| 			if (w5g_threshold_level != level) { | 			if (w5g_threshold_level != level) { | ||||||
| 				ULOG_DBG("setting 5G reduce %d percent\n" ,level_5g_limit[level]); | //				ULOG_INFO("setting 5G reduce %d percent\n" ,wifi5g.mitigation[level]); | ||||||
| 				snprintf(filename, PATH_MAX, CUR_STATE_PATH, PHY1); | 				snprintf(filename, PATH_MAX, CUR_STATE_PATH, PHY1); | ||||||
| 				write_cur_state(filename, level_5g_limit[level]); | 				write_cur_state(filename, wifi5g.mitigation[level]); | ||||||
| 				w5g_threshold_level = level; | 				w5g_threshold_level = level; | ||||||
|  | 				set_cpu_freq(wifi5g.cpu_freq[level]); | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| static void cooling_init() { | static void cooling_init() { | ||||||
| 	char filename[256]; | 	char filename[PATH_MAX]; | ||||||
| 	int i; | 	int i,result=0; | ||||||
|  |  | ||||||
| 	for (i=0 ; i <= 1; i++) { | 	for (i=0 ; i <= 1; i++) { | ||||||
| 		snprintf(filename, PATH_MAX, CUR_STATE_PATH, i); | 		snprintf(filename, PATH_MAX, CUR_STATE_PATH, i); | ||||||
| 		write_cur_state(filename, 0); | 		write_cur_state(filename, 0); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	if(load_config_file) | ||||||
|  | 		result = load_config(); | ||||||
|  |  | ||||||
|  | 	if (result == 1 || load_config_file == 0) | ||||||
|  | 		load_default_config(); | ||||||
| } | } | ||||||
|  |  | ||||||
| void print_usage(void) | void print_usage(void) | ||||||
| { | { | ||||||
| 	printf("\nWifi-cooling daemon usage\n"); | 	printf("\nWifi-cooling daemon usage\n"); | ||||||
| 	printf("Optional arguments:\n"); | 	printf("Optional arguments:\n"); | ||||||
| 	printf("  -c <file>        config file\n"); | 	printf("  -c <file>        setting with config file\n"); | ||||||
| 	printf("  -d               debug output\n"); | 	printf("  -d               default setting\n"); | ||||||
| 	printf("  -h               this usage screen\n"); | 	printf("  -h               this usage screen\n"); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -185,17 +312,18 @@ int main(int argc, char *argv[]) | |||||||
| 	setpriority(PRIO_PROCESS, getpid(), -20); | 	setpriority(PRIO_PROCESS, getpid(), -20); | ||||||
|  |  | ||||||
| 	ulog_open(ULOG_STDIO | ULOG_SYSLOG, LOG_DAEMON, "cooling"); | 	ulog_open(ULOG_STDIO | ULOG_SYSLOG, LOG_DAEMON, "cooling"); | ||||||
| 	ulog_threshold(LOG_INFO); | 	ulog_threshold(LOG_ERR); | ||||||
|  | //	ulog_threshold(LOG_INFO); | ||||||
|  |  | ||||||
|  	while ((ch = getopt(argc, argv, "c:dh")) != -1) { |  	while ((ch = getopt(argc, argv, "c:dh")) != -1) { | ||||||
| 		switch (ch) { | 		switch (ch) { | ||||||
| 		case 'c': | 		case 'c': | ||||||
| 			printf("wifi-cooling load configuration file %s\n", optarg); | 			printf("wifi-cooling load configuration file %s\n", optarg); | ||||||
| 			config_file = optarg; | 			config_file = optarg; | ||||||
|  | 			load_config_file=1; | ||||||
| 			break; | 			break; | ||||||
| 		case 'd': | 		case 'd': | ||||||
| 			printf("wifi-cooling ulog_threshold set to debug level\n"); | 			printf("wifi-cooling set to default value\n"); | ||||||
| 			ulog_threshold(LOG_DEBUG); |  | ||||||
| 			break; | 			break; | ||||||
| 		case 'h': | 		case 'h': | ||||||
| 		default: | 		default: | ||||||
|   | |||||||
| @@ -1,15 +1,11 @@ | |||||||
| sampling 5000 | [wifi2g] | ||||||
|  | thresholds_high     105         110         115         120 | ||||||
|  | thresholds_low      0           105         110         115 | ||||||
|  | mitigation          0           35          50          70 | ||||||
|  | CPU_freq            1008000     800000      800000      800000 | ||||||
|  |  | ||||||
| [tsens_tz_sensor1] | [wifi5g] | ||||||
| sampling 	5000 | thresholds_high     105         110         115         120 | ||||||
| thresholds 			105			110			115			119			120 | thresholds_low      0           105         110         115 | ||||||
| thresholds_clr 		0			100			105			110			115 | mitigation          0           20          30          50 | ||||||
| actions 			cooling		cooling	 	cooling		cooling		shutdown | CPU_freq            1008000     800000      800000      800000 | ||||||
| action_info 		0			35	 		50			70			800000 |  | ||||||
|  |  | ||||||
| [tsens_tz_sensor4] |  | ||||||
| sampling 	5000 |  | ||||||
| thresholds 			105			110			115			119			120 |  | ||||||
| thresholds_clr 		0			100			105			110			115 |  | ||||||
| actions 			cooling		cooling		cooling		cooling		shutdown |  | ||||||
| action_info 		0			20			30	 		50			800000 |  | ||||||
|   | |||||||
| @@ -1,15 +1,11 @@ | |||||||
| sampling 5000 | [wifi2g] | ||||||
|  | thresholds_high     105         110         115         120 | ||||||
|  | thresholds_low      0           105         110         115 | ||||||
|  | mitigation          0           20          50          70 | ||||||
|  | CPU_freq            1008000     800000      800000      800000 | ||||||
|  |  | ||||||
| [tsens_tz_sensor1] | [wifi5g] | ||||||
| sampling 	5000 | thresholds_high     105         110         115         120 | ||||||
| thresholds 			105			115			119			125 | thresholds_low      0           105         110         115 | ||||||
| thresholds_clr 		0			105			110			120 | mitigation          0           20          50          70 | ||||||
| actions 			cooling		cooling	 	cooling		cooling | CPU_freq            1008000     800000      800000      800000 | ||||||
| action_info 		0			20	 		50			70 |  | ||||||
|  |  | ||||||
| [tsens_tz_sensor4] |  | ||||||
| sampling 	5000 |  | ||||||
| thresholds 			105			115			119			125 |  | ||||||
| thresholds_clr 		0			105			110			120 |  | ||||||
| actions 			cooling		cooling		cooling		cooling |  | ||||||
| action_info 		0			20			50	 		70 |  | ||||||
|   | |||||||
| @@ -117,8 +117,6 @@ hostapd_common_add_device_config() { | |||||||
| 	config_add_boolean legacy_rates | 	config_add_boolean legacy_rates | ||||||
| 	config_add_int cell_density | 	config_add_int cell_density | ||||||
| 	config_add_int rts_threshold | 	config_add_int rts_threshold | ||||||
| 	config_add_int rssi_reject_assoc_rssi |  | ||||||
| 	config_add_int rssi_ignore_probe_request |  | ||||||
| 	config_add_int maxassoc | 	config_add_int maxassoc | ||||||
| 	config_add_boolean maxassoc_ignore_probe | 	config_add_boolean maxassoc_ignore_probe | ||||||
|  |  | ||||||
| @@ -162,7 +160,7 @@ hostapd_prepare_device_config() { | |||||||
|  |  | ||||||
| 	json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \ | 	json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \ | ||||||
| 		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \ | 		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \ | ||||||
| 		rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc \ | 		rts_threshold beacon_rate maxassoc \ | ||||||
| 		multiple_bssid he_co_locate rnr_beacon ema acs_exclude_dfs \ | 		multiple_bssid he_co_locate rnr_beacon ema acs_exclude_dfs \ | ||||||
| 		maxassoc_ignore_probe band | 		maxassoc_ignore_probe band | ||||||
|  |  | ||||||
| @@ -261,8 +259,6 @@ hostapd_prepare_device_config() { | |||||||
| 		hostapd_add_rate brlist "$br" | 		hostapd_add_rate brlist "$br" | ||||||
| 	done | 	done | ||||||
|  |  | ||||||
| 	[ -n "$rssi_reject_assoc_rssi" ] && append base_cfg "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N" |  | ||||||
| 	[ -n "$rssi_ignore_probe_request" ] && append base_cfg "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N" |  | ||||||
| 	[ -n "$beacon_rate" ] && append base_cfg "beacon_rate=$beacon_rate" "$N" | 	[ -n "$beacon_rate" ] && append base_cfg "beacon_rate=$beacon_rate" "$N" | ||||||
| 	[ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N" | 	[ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N" | ||||||
| 	[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" | 	[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" | ||||||
| @@ -472,6 +468,9 @@ hostapd_common_add_bss_config() { | |||||||
| 	config_add_string uci_section | 	config_add_string uci_section | ||||||
|  |  | ||||||
| 	config_add_boolean dynamic_probe_resp | 	config_add_boolean dynamic_probe_resp | ||||||
|  |  | ||||||
|  | 	config_add_int rssi_reject_assoc_rssi | ||||||
|  | 	config_add_int rssi_ignore_probe_request | ||||||
| } | } | ||||||
|  |  | ||||||
| hostapd_set_vlan_file() { | hostapd_set_vlan_file() { | ||||||
| @@ -725,7 +724,8 @@ hostapd_set_bss_options() { | |||||||
| 		airtime_bss_weight airtime_bss_limit airtime_sta_weight \ | 		airtime_bss_weight airtime_bss_limit airtime_sta_weight \ | ||||||
| 		multicast_to_unicast_all proxy_arp per_sta_vif \ | 		multicast_to_unicast_all proxy_arp per_sta_vif \ | ||||||
| 		eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id \ | 		eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id \ | ||||||
| 		vendor_elements fils uci_section dynamic_probe_resp multi_psk | 		vendor_elements fils uci_section dynamic_probe_resp multi_psk \ | ||||||
|  | 		rssi_reject_assoc_rssi rssi_ignore_probe_request | ||||||
|  |  | ||||||
| 	set_default fils 0 | 	set_default fils 0 | ||||||
| 	set_default isolate 0 | 	set_default isolate 0 | ||||||
| @@ -780,6 +780,8 @@ hostapd_set_bss_options() { | |||||||
| 	append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N" | 	append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N" | ||||||
| 	append bss_conf "utf8_ssid=$utf8_ssid" "$N" | 	append bss_conf "utf8_ssid=$utf8_ssid" "$N" | ||||||
| 	append bss_conf "multi_ap=$multi_ap" "$N" | 	append bss_conf "multi_ap=$multi_ap" "$N" | ||||||
|  | 	[ -n "$rssi_reject_assoc_rssi" ] && append bss_conf "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N" | ||||||
|  | 	[ -n "$rssi_ignore_probe_request" ] && append bss_conf "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N" | ||||||
| 	[ -n "$vendor_elements" ] && append bss_conf "vendor_elements=$vendor_elements" "$N" | 	[ -n "$vendor_elements" ] && append bss_conf "vendor_elements=$vendor_elements" "$N" | ||||||
|  |  | ||||||
| 	[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N" | 	[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N" | ||||||
|   | |||||||
| @@ -144,7 +144,7 @@ function netifd_reload() { | |||||||
|  |  | ||||||
| 			push(ssid.interfaces, iface.ifname); | 			push(ssid.interfaces, iface.ifname); | ||||||
| 			ssid.bands[band] = iface.ifname; | 			ssid.bands[band] = iface.ifname; | ||||||
| 			ssid.mpsk = config.multi_psk; | 			ssid.mpsk = ssid?.mpsk ? true : config.multi_psk; | ||||||
| 			for (let sta in iface.stations) { | 			for (let sta in iface.stations) { | ||||||
| 				let stacfg = sta.config; | 				let stacfg = sta.config; | ||||||
|  |  | ||||||
| @@ -308,18 +308,18 @@ function sta_auth_cache(ifname, addr, idx, phrase) { | |||||||
| function auth_cb(msg) { | function auth_cb(msg) { | ||||||
| 	let data = msg.data; | 	let data = msg.data; | ||||||
|  |  | ||||||
| 	if (!is_ssid_mpsk(data.iface)) |  | ||||||
| 		return; |  | ||||||
|  |  | ||||||
| 	printf(`Event ${msg.type}: ${msg.data}\n`); | 	printf(`Event ${msg.type}: ${msg.data}\n`); | ||||||
| 	switch (msg.type) { | 	switch (msg.type) { | ||||||
| 	case 'sta_auth': | 	case 'sta_auth': | ||||||
|  | 		if (!is_ssid_mpsk(data.iface)) | ||||||
|  | 			return; | ||||||
|  |  | ||||||
| 		return { | 		return { | ||||||
| 			psk: sta_auth_psk(data.iface, data.sta), | 			psk: sta_auth_psk(data.iface, data.sta), | ||||||
| 			force_psk: true, | 			force_psk: true, | ||||||
| 		}; | 		}; | ||||||
| 	case 'sta_connected': | 	case 'sta_connected': | ||||||
| 		if (data.psk_idx == null) | 		if (data.psk_idx == null || !is_ssid_mpsk(data.iface)) | ||||||
| 			return; | 			return; | ||||||
| 		return sta_auth_cache(data.iface, data.sta, data.psk_idx, data.psk); | 		return sta_auth_cache(data.iface, data.sta, data.psk_idx, data.psk); | ||||||
| 	case 'reload': | 	case 'reload': | ||||||
|   | |||||||
| @@ -0,0 +1,14 @@ | |||||||
|  | --- a/src/ap/beacon.c | ||||||
|  | +++ b/src/ap/beacon.c | ||||||
|  | @@ -934,8 +934,10 @@ void handle_probe_req(struct hostapd_dat | ||||||
|  |  	int ubus_response; | ||||||
|  |   | ||||||
|  |  	if (hapd->iconf->rssi_ignore_probe_request && ssi_signal && | ||||||
|  | -	    ssi_signal < hapd->iconf->rssi_ignore_probe_request) | ||||||
|  | +	    ssi_signal < hapd->iconf->rssi_ignore_probe_request) { | ||||||
|  | +		hostapd_ubus_notify_rssi(hapd, "rssi-ignore-probe", mgmt->sa, ssi_signal); | ||||||
|  |  		return; | ||||||
|  | +	} | ||||||
|  |   | ||||||
|  |  	if (len < IEEE80211_HDRLEN) | ||||||
|  |  		return; | ||||||
| @@ -1944,6 +1944,21 @@ void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 * | |||||||
| 	ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1); | 	ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi) | ||||||
|  | { | ||||||
|  | 	if (!hapd->ubus.obj.has_subscribers) | ||||||
|  | 		return; | ||||||
|  |  | ||||||
|  | 	if (!addr) | ||||||
|  | 		return; | ||||||
|  |  | ||||||
|  | 	blob_buf_init(&b, 0); | ||||||
|  | 	blobmsg_add_macaddr(&b, "address", addr); | ||||||
|  | 	blobmsg_add_u32(&b, "rssi", rssi); | ||||||
|  |  | ||||||
|  | 	ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1); | ||||||
|  | } | ||||||
|  |  | ||||||
| void hostapd_ubus_notify_csa(struct hostapd_data *hapd, int freq) | void hostapd_ubus_notify_csa(struct hostapd_data *hapd, int freq) | ||||||
| { | { | ||||||
| 	if (!hapd->ubus.obj.has_subscribers) | 	if (!hapd->ubus.obj.has_subscribers) | ||||||
|   | |||||||
| @@ -56,6 +56,7 @@ void hostapd_ubus_notify_beacon_report(struct hostapd_data *hapd, | |||||||
| 				       size_t len); | 				       size_t len); | ||||||
| void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequency, | void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequency, | ||||||
| 					int chan_width, int cf1, int cf2); | 					int chan_width, int cf1, int cf2); | ||||||
|  | void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi); | ||||||
|  |  | ||||||
| void hostapd_ubus_notify_bss_transition_response( | void hostapd_ubus_notify_bss_transition_response( | ||||||
| 	struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code, | 	struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code, | ||||||
|   | |||||||
| @@ -40,6 +40,11 @@ edgecore,oap101e-6e) | |||||||
| 	ucidef_set_led_netdev "wan" "wan" "red:ethernet" "eth1" | 	ucidef_set_led_netdev "wan" "wan" "red:ethernet" "eth1" | ||||||
|         ucidef_set_led_default "power" "POWER" "blue:management" "on" |         ucidef_set_led_default "power" "POWER" "blue:management" "on" | ||||||
| 	;; | 	;; | ||||||
|  | emplus,wap385c) | ||||||
|  | 	ucidef_set_led_default "ledr" "LEDR" "sys:red" "on" | ||||||
|  | 	ucidef_set_led_default "ledg" "LEDG" "sys:green" "on" | ||||||
|  | 	ucidef_set_led_default "ledb" "LEDB" "sys:blue" "on" | ||||||
|  | 	;; | ||||||
| hfcl,ion4x_w|\ | hfcl,ion4x_w|\ | ||||||
| hfcl,ion4xi_w) | hfcl,ion4xi_w) | ||||||
| 	ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt" | 	ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt" | ||||||
|   | |||||||
| @@ -48,6 +48,7 @@ qcom_setup_interfaces() | |||||||
| 		ucidef_add_switch "switch1" \ | 		ucidef_add_switch "switch1" \ | ||||||
| 			"6u@eth1" "1:lan" "2:lan" "3:lan" "4:lan" | 			"6u@eth1" "1:lan" "2:lan" "3:lan" "4:lan" | ||||||
| 		;; | 		;; | ||||||
|  | 	emplus,wap385c|\ | ||||||
| 	hfcl,ion4x_w|\ | 	hfcl,ion4x_w|\ | ||||||
| 	hfcl,ion4xi_w) | 	hfcl,ion4xi_w) | ||||||
| 		ucidef_set_interface_wan "eth0" | 		ucidef_set_interface_wan "eth0" | ||||||
|   | |||||||
| @@ -129,6 +129,7 @@ ath11k/IPQ5018/hw1.0/caldata.bin) | |||||||
| 	edgecore,oap101-6e|\ | 	edgecore,oap101-6e|\ | ||||||
| 	edgecore,oap101e|\ | 	edgecore,oap101e|\ | ||||||
| 	edgecore,oap101e-6e|\ | 	edgecore,oap101e-6e|\ | ||||||
|  | 	emplus,wap385c|\ | ||||||
| 	hfcl,ion4x_w|\ | 	hfcl,ion4x_w|\ | ||||||
| 	hfcl,ion4xi_w|\ | 	hfcl,ion4xi_w|\ | ||||||
| 	optimcloud,d60|\ | 	optimcloud,d60|\ | ||||||
| @@ -157,6 +158,7 @@ ath11k/qcn6122/hw1.0/caldata_1.bin) | |||||||
| 	edgecore,oap101-6e|\ | 	edgecore,oap101-6e|\ | ||||||
| 	edgecore,oap101e|\ | 	edgecore,oap101e|\ | ||||||
| 	edgecore,oap101e-6e|\ | 	edgecore,oap101e-6e|\ | ||||||
|  | 	emplus,wap385c|\ | ||||||
| 	udaya,a6-id2|\ | 	udaya,a6-id2|\ | ||||||
| 	udaya,a6-od2|\ | 	udaya,a6-od2|\ | ||||||
| 	hfcl,ion4xi_w|\ | 	hfcl,ion4xi_w|\ | ||||||
|   | |||||||
| @@ -76,6 +76,7 @@ platform_check_image() { | |||||||
| 	cybertan,eww631-a1|\ | 	cybertan,eww631-a1|\ | ||||||
| 	cybertan,eww631-b1|\ | 	cybertan,eww631-b1|\ | ||||||
| 	edgecore,eap104|\ | 	edgecore,eap104|\ | ||||||
|  | 	emplus,wap385c|\ | ||||||
| 	wallys,dr5018|\ | 	wallys,dr5018|\ | ||||||
| 	hfcl,ion4x_w|\ | 	hfcl,ion4x_w|\ | ||||||
| 	hfcl,ion4xi_w|\ | 	hfcl,ion4xi_w|\ | ||||||
| @@ -129,6 +130,7 @@ platform_do_upgrade() { | |||||||
|                 ;; |                 ;; | ||||||
| 	cig,wf186w|\ | 	cig,wf186w|\ | ||||||
| 	cig,wf186h|\ | 	cig,wf186h|\ | ||||||
|  | 	emplus,wap385c|\ | ||||||
| 	udaya,a6-id2|\ | 	udaya,a6-id2|\ | ||||||
| 	udaya,a6-od2|\ | 	udaya,a6-od2|\ | ||||||
| 	wallys,dr5018|\ | 	wallys,dr5018|\ | ||||||
|   | |||||||
| @@ -0,0 +1,760 @@ | |||||||
|  | /dts-v1/; | ||||||
|  | /* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Permission to use, copy, modify, and/or distribute this software for any | ||||||
|  |  * purpose with or without fee is hereby granted, provided that the above | ||||||
|  |  * copyright notice and this permission notice appear in all copies. | ||||||
|  |  * | ||||||
|  |  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||||||
|  |  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||||||
|  |  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||||||
|  |  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||||||
|  |  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||||||
|  |  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||||||
|  |  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | #include "ipq5018.dtsi" | ||||||
|  | #include <dt-bindings/input/input.h> | ||||||
|  |  | ||||||
|  | / { | ||||||
|  | 	#address-cells = <0x2>; | ||||||
|  | 	#size-cells = <0x2>; | ||||||
|  | 	model = "Emplus WAP385C"; | ||||||
|  | 	compatible = "emplus,wap385c", "qcom,ipq5018-mp03.3", "qcom,ipq5018"; | ||||||
|  | 	interrupt-parent = <&intc>; | ||||||
|  |  | ||||||
|  | 	aliases { | ||||||
|  | 		sdhc1 = &sdhc_1; /* SDC1 eMMC slot */ | ||||||
|  | 		serial0 = &blsp1_uart1; | ||||||
|  | 		serial1 = &blsp1_uart2; | ||||||
|  | 		ethernet1 = "/soc/dp1"; | ||||||
|  |  | ||||||
|  | 		led-boot = &led_power; | ||||||
|  | 		led-failsafe = &led_power; | ||||||
|  | 		led-running = &led_power; | ||||||
|  | 		led-upgrade = &led_power; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	chosen { | ||||||
|  | 		bootargs = "console=ttyMSM0,115200,n8 rw init=/init"; | ||||||
|  | 		bootargs-append = " swiotlb=1 coherent_pool=2M"; | ||||||
|  | 		stdout-path = "serial0"; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	reserved-memory { | ||||||
|  | 	#ifdef __IPQ_MEM_PROFILE_256_MB__ | ||||||
|  | 	/*		   256 MB Profile | ||||||
|  | 	 * +==========+==============+=========================+ | ||||||
|  | 	 * |	  |	      |			 | | ||||||
|  | 	 * |  Region  | Start Offset |	  Size	   | | ||||||
|  | 	 * |	  |	      |			 | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |    NSS   |  0x40000000  |	   8MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |   Linux  |  0x40800000  | Depends on total memory | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |   uboot  |  0x4A600000  |	   4MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |    SBL   |  0x4AA00000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |   smem   |  0x4AB00000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |    TZ    |  0x4AC00000  |	   4MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |    Q6    |	      |			 | | ||||||
|  | 	 * |   code/  |  0x4B000000  |	  20MB	   | | ||||||
|  | 	 * |   data   |	      |			 | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |  IPQ5018 |	      |			 | | ||||||
|  | 	 * |   data   |  0x4C400000  |	  13MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |  IPQ5018 |	      |			 | | ||||||
|  | 	 * |  M3 Dump |  0x4D100000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |  IPQ5018 |	      |			 | | ||||||
|  | 	 * |   QDSS   |  0x4D200000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_1|	      |			 | | ||||||
|  | 	 * |   data   |  0x4D300000  |	  13MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_1|	      |			 | | ||||||
|  | 	 * |  M3 Dump |  0x4E000000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_1|	      |			 | | ||||||
|  | 	 * |   QDSS   |  0x4E100000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_2|	      |			 | | ||||||
|  | 	 * |   data   |  0x4E200000  |	  13MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_2|	      |			 | | ||||||
|  | 	 * |  M3 Dump |  0x4EF00000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_2|	      |			 | | ||||||
|  | 	 * |   QDSS   |  0x4F000000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |						   | | ||||||
|  | 	 * |	    Rest of the memory for Linux	   | | ||||||
|  | 	 * |						   | | ||||||
|  | 	 * +===================================================+ | ||||||
|  | 	 */ | ||||||
|  | 		q6_mem_regions: q6_mem_regions@4B000000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4B000000 0x0 0x4100000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_code_data: q6_code_data@4B000000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4B000000 0x0 0x1400000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_ipq5018_data: q6_ipq5018_data@4C400000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4C400000 0x0 0xD00000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		m3_dump: m3_dump@4D100000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4D100000 0x0 0x100000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_etr_region: q6_etr_dump@4D200000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4D200000 0x0 0x100000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_qcn6122_data1: q6_qcn6122_data1@4D300000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4D300000 0x0 0xD00000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E000000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4E000000 0x0 0x100000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E100000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4E100000 0x0 0x100000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_qcn6122_data2: q6_qcn6122_data2@4E200000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4E200000 0x0 0xD00000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		m3_dump_qcn6122_2: m3_dump_qcn6122_2@4EF00000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4EF00000 0x0 0x100000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F000000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4F000000 0x0 0x100000>; | ||||||
|  | 		}; | ||||||
|  | 	#else | ||||||
|  | 	/*		 512MB/1GB Profiles | ||||||
|  | 	 * +==========+==============+=========================+ | ||||||
|  | 	 * |	  |	      |			 | | ||||||
|  | 	 * |  Region  | Start Offset |	  Size	   | | ||||||
|  | 	 * |	  |	      |			 | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |    NSS   |  0x40000000  |	  16MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |   Linux  |  0x41000000  | Depends on total memory | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |   uboot  |  0x4A600000  |	   4MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |    SBL   |  0x4AA00000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |   smem   |  0x4AB00000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |    TZ    |  0x4AC00000  |	   4MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |    Q6    |	      |			 | | ||||||
|  | 	 * |   code/  |  0x4B000000  |	  20MB	   | | ||||||
|  | 	 * |   data   |	      |			 | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |  IPQ5018 |	      |			 | | ||||||
|  | 	 * |   data   |  0x4C400000  |	  13MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |  IPQ5018 |	      |			 | | ||||||
|  | 	 * |  M3 Dump |  0x4D100000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |  IPQ5018 |	      |			 | | ||||||
|  | 	 * |   QDSS   |  0x4D200000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |  IPQ5018 |	      |			 | | ||||||
|  | 	 * |  Caldb   |  0x4D300000  |	   2MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_1|	      |			 | | ||||||
|  | 	 * |   data   |  0x4D500000  |	  13MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_1|	      |			 | | ||||||
|  | 	 * |  M3 Dump |  0x4E200000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_1|	      |			 | | ||||||
|  | 	 * |   QDSS   |  0x4E300000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_1|	      |			 | | ||||||
|  | 	 * |  Caldb   |  0x4E400000  |	   5MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_2|	      |			 | | ||||||
|  | 	 * |   data   |  0x4E900000  |	  13MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_2|	      |			 | | ||||||
|  | 	 * |  M3 Dump |  0x4F600000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_2|	      |			 | | ||||||
|  | 	 * |   QDSS   |  0x4F700000  |	   1MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * | QCN6122_2|	      |			 | | ||||||
|  | 	 * |  Caldb   |  0x4F800000  |	   5MB	   | | ||||||
|  | 	 * +----------+--------------+-------------------------+ | ||||||
|  | 	 * |						   | | ||||||
|  | 	 * |	    Rest of the memory for Linux	   | | ||||||
|  | 	 * |						   | | ||||||
|  | 	 * +===================================================+ | ||||||
|  | 	 */ | ||||||
|  | 		q6_mem_regions: q6_mem_regions@4B000000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4B000000 0x0 0x4D00000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_code_data: q6_code_data@4B000000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4B000000 0x0 01400000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_ipq5018_data: q6_ipq5018_data@4C400000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4C400000 0x0 0xD00000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		m3_dump: m3_dump@4D100000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4D100000 0x0 0x100000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_etr_region: q6_etr_dump@4D200000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4D200000 0x0 0x100000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_caldb_region: q6_caldb_region@4D300000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4D300000 0x0 0x200000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_qcn6122_data1: q6_qcn6122_data1@4D500000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4D500000 0x0 0xD00000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4E200000 0x0 0x100000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4E300000 0x0 0x100000>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E400000 { | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x4E400000 0x0 0x500000>; | ||||||
|  | 		}; | ||||||
|  | 	#endif | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	soc { | ||||||
|  | 		serial@78af000 { | ||||||
|  | 			status = "ok"; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		qpic_bam: dma@7984000{ | ||||||
|  | 			status = "ok"; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		nand: qpic-nand@79b0000 { | ||||||
|  | 			pinctrl-0 = <&qspi_nand_pins>; | ||||||
|  | 			pinctrl-names = "default"; | ||||||
|  | 			status = "ok"; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		spi_0: spi@78b5000 { /* BLSP1 QUP0 */ | ||||||
|  | 			pinctrl-0 = <&blsp0_spi_pins>; | ||||||
|  | 			pinctrl-names = "default"; | ||||||
|  | 			cs-select = <0>; | ||||||
|  | 			status = "ok"; | ||||||
|  |  | ||||||
|  | 			m25p80@0 { | ||||||
|  | 				#address-cells = <1>; | ||||||
|  | 				#size-cells = <1>; | ||||||
|  | 				reg = <0>; | ||||||
|  | 				compatible = "n25q128a11"; | ||||||
|  | 				linux,modalias = "m25p80", "n25q128a11"; | ||||||
|  | 				spi-max-frequency = <50000000>; | ||||||
|  | 				use-default-sizes; | ||||||
|  | 			}; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		mdio0: mdio@88000 { | ||||||
|  | 			status = "ok"; | ||||||
|  |  | ||||||
|  | 			ethernet-phy@0 { | ||||||
|  | 				reg = <7>; | ||||||
|  | 			}; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		mdio1: mdio@90000 { | ||||||
|  | 			status = "ok"; | ||||||
|  | 			pinctrl-0 = <&mdio1_pins>; | ||||||
|  | 			pinctrl-names = "default"; | ||||||
|  | 			phy-reset-gpio = <&tlmm 23 0>; | ||||||
|  |  | ||||||
|  | 			ethernet-phy@0 { | ||||||
|  | 				reg = <24>; | ||||||
|  | 			}; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		ess-instance { | ||||||
|  | 			num_devices = <0x1>; | ||||||
|  | 			ess-switch@0x39c00000 { | ||||||
|  | 				switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/ | ||||||
|  | 				cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/ | ||||||
|  | 				qcom,port_phyinfo { | ||||||
|  | 					port@0 { | ||||||
|  | 						port_id = <1>; | ||||||
|  | 						phy_address = <7>; | ||||||
|  | 						mdiobus = <&mdio0>; | ||||||
|  | 					}; | ||||||
|  | 					port@1 { | ||||||
|  | 						port_id = <2>; | ||||||
|  | 						phy_address = <0x18>; | ||||||
|  | 						mdiobus = <&mdio1>; | ||||||
|  | 						port_mac_sel = "QGMAC_PORT"; | ||||||
|  | 					}; | ||||||
|  | 				}; | ||||||
|  | 				led_source@0 { | ||||||
|  | 					source = <0>; | ||||||
|  | 					mode = "normal"; | ||||||
|  | 					speed = "all"; | ||||||
|  | 					blink_en = "enable"; | ||||||
|  | 					active = "high"; | ||||||
|  | 				}; | ||||||
|  | 			}; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		wifi0: wifi@c000000 { | ||||||
|  | 			status = "ok"; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		dp1 { | ||||||
|  | 			device_type = "network"; | ||||||
|  | 			compatible = "qcom,nss-dp"; | ||||||
|  | 			clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>; | ||||||
|  | 			clock-names = "nss-snoc-gmac-axi-clk"; | ||||||
|  | 			qcom,id = <1>; | ||||||
|  | 			reg = <0x39C00000 0x10000>; | ||||||
|  | 			interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>; | ||||||
|  | 			qcom,mactype = <2>; | ||||||
|  | 			qcom,link-poll = <1>; | ||||||
|  | 			qcom,phy-mdio-addr = <7>; | ||||||
|  | 			mdio-bus = <&mdio0>; | ||||||
|  | 			local-mac-address = [000000000000]; | ||||||
|  | 			phy-mode = "sgmii"; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		nss-macsec1 { | ||||||
|  | 			compatible = "qcom,nss-macsec"; | ||||||
|  | 			phy_addr = <0x18>; | ||||||
|  | 			mdiobus = <&mdio1>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		lpass: lpass@0xA000000{ | ||||||
|  | 			status = "disabled"; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		pcm_lb: pcm_lb@0 { | ||||||
|  | 			status = "disabled"; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	qcom,test@0 { | ||||||
|  | 		status = "ok"; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	thermal-zones { | ||||||
|  | 		status = "ok"; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &tlmm { | ||||||
|  | 	pinctrl-0 = <&blsp0_uart_pins>; | ||||||
|  | 	pinctrl-names = "default"; | ||||||
|  |  | ||||||
|  | 	blsp0_uart_pins: uart_pins { | ||||||
|  | 		blsp0_uart_rx_tx { | ||||||
|  | 			pins = "gpio20", "gpio21"; | ||||||
|  | 			function = "blsp0_uart0"; | ||||||
|  | 			bias-disable; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	blsp0_spi_pins: blsp0_spi_pins { | ||||||
|  | 		mux { | ||||||
|  | 			pins = "gpio10", "gpio11", "gpio12", "gpio13"; | ||||||
|  | 			function = "blsp0_spi"; | ||||||
|  | 			drive-strength = <2>; | ||||||
|  | 			bias-disable; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	qspi_nand_pins: qspi_nand_pins { | ||||||
|  | 		qspi_clock { | ||||||
|  | 			pins = "gpio9"; | ||||||
|  | 			function = "qspi_clk"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-disable; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		qspi_cs { | ||||||
|  | 			pins = "gpio8"; | ||||||
|  | 			function = "qspi_cs"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-disable; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		qspi_data { | ||||||
|  | 			pins = "gpio4", "gpio5", "gpio6", "gpio7"; | ||||||
|  | 			function = "qspi_data"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-disable; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	mdio1_pins: mdio_pinmux { | ||||||
|  | 		mux_0 { | ||||||
|  | 			pins = "gpio36"; | ||||||
|  | 			function = "mdc"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-pull-up; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		mux_1 { | ||||||
|  | 			pins = "gpio37"; | ||||||
|  | 			function = "mdio"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-pull-up; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	poe_dc_pins: poe_dc_pins { | ||||||
|  | 		T2P_DET { | ||||||
|  | 			pins = "gpio31"; | ||||||
|  | 			function = "gpio"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-disable; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		12V_DET { | ||||||
|  | 			pins = "gpio32"; | ||||||
|  | 			function = "gpio"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-disable; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	button_pins: button_pins { | ||||||
|  | 		reset_button { | ||||||
|  | 			pins = "gpio27"; | ||||||
|  | 			function = "gpio"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-pull-up; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	leds_pins: leds_pinmux { | ||||||
|  | 		linux,phandle = <0x4d>; | ||||||
|  | 		phandle = <0x4d>; | ||||||
|  |  | ||||||
|  | 		led_G { | ||||||
|  | 			pins = "gpio24"; | ||||||
|  | 			function = "gpio"; | ||||||
|  | 			bias-pull-down; | ||||||
|  | 			drive-strength = <0x08>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		led_B { | ||||||
|  | 			pins = "gpio28"; | ||||||
|  | 			function = "gpio"; | ||||||
|  | 			bias-pull-down; | ||||||
|  | 			drive-strength = <0x08>; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		led_R { | ||||||
|  | 			pins = "gpio38"; | ||||||
|  | 			function = "gpio"; | ||||||
|  | 			bias-pull-down; | ||||||
|  | 			drive-strength = <0x08>; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &soc { | ||||||
|  | 	gpio_keys { | ||||||
|  | 		compatible = "gpio-keys"; | ||||||
|  | 		pinctrl-0 = <&button_pins>; | ||||||
|  | 		pinctrl-names = "default"; | ||||||
|  |  | ||||||
|  | 		button@1 { | ||||||
|  | 			label = "reset"; | ||||||
|  | 			linux,code = <KEY_RESTART>; | ||||||
|  | 			gpios = <&tlmm 27 GPIO_ACTIVE_LOW>; | ||||||
|  | 			linux,input-type = <1>; | ||||||
|  | 			debounce-interval = <60>; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	leds { | ||||||
|  | 		compatible = "gpio-leds"; | ||||||
|  | 		pinctrl-0 = <&leds_pins>; | ||||||
|  | 		pinctrl-names = "default"; | ||||||
|  |  | ||||||
|  | 		led@24 { | ||||||
|  | 			label = "sys:green"; | ||||||
|  | 			gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>; | ||||||
|  | 			default-state = "on"; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		led@28 { | ||||||
|  | 			label = "sys:blue"; | ||||||
|  | 			gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>; | ||||||
|  | 			default-state = "on"; | ||||||
|  | 		}; | ||||||
|  |  | ||||||
|  | 		led_power: led@38 { | ||||||
|  | 			label = "sys:red"; | ||||||
|  | 			gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>; | ||||||
|  | 			linux,default-trigger = "wap385c:sys:red"; | ||||||
|  | 			default-state = "on"; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &q6v5_wcss { | ||||||
|  | 	compatible = "qcom,ipq5018-q6-mpd"; | ||||||
|  | 	#address-cells = <1>; | ||||||
|  | 	#size-cells = <1>; | ||||||
|  | 	ranges; | ||||||
|  | 	firmware = "IPQ5018/q6_fw.mdt"; | ||||||
|  | 	reg = <0x0cd00000 0x4040>, | ||||||
|  | 		<0x1938000 0x8>, | ||||||
|  | 		<0x193d204 0x4>; | ||||||
|  | 	reg-names = "qdsp6", | ||||||
|  | 			"tcsr-msip", | ||||||
|  | 			"tcsr-q6"; | ||||||
|  | 	resets = <&gcc GCC_WCSSAON_RESET>, | ||||||
|  | 			<&gcc GCC_WCSS_Q6_BCR>; | ||||||
|  |  | ||||||
|  | 	reset-names = "wcss_aon_reset", | ||||||
|  | 			"wcss_q6_reset"; | ||||||
|  |  | ||||||
|  | 	clocks = <&gcc GCC_Q6_AXIS_CLK>, | ||||||
|  | 		<&gcc GCC_WCSS_ECAHB_CLK>, | ||||||
|  | 		<&gcc GCC_Q6_AXIM_CLK>, | ||||||
|  | 		<&gcc GCC_Q6_AXIM2_CLK>, | ||||||
|  | 		<&gcc GCC_Q6_AHB_CLK>, | ||||||
|  | 		<&gcc GCC_Q6_AHB_S_CLK>, | ||||||
|  | 		<&gcc GCC_WCSS_AXI_S_CLK>; | ||||||
|  | 	clock-names = "gcc_q6_axis_clk", | ||||||
|  | 		"gcc_wcss_ecahb_clk", | ||||||
|  | 		"gcc_q6_axim_clk", | ||||||
|  | 		"gcc_q6_axim2_clk", | ||||||
|  | 		"gcc_q6_ahb_clk", | ||||||
|  | 		"gcc_q6_ahb_s_clk", | ||||||
|  | 		"gcc_wcss_axi_s_clk"; | ||||||
|  |  | ||||||
|  | 	#ifdef __IPQ_MEM_PROFILE_256_MB__ | ||||||
|  | 		memory-region = <&q6_mem_regions>, <&q6_etr_region>; | ||||||
|  | 	#else | ||||||
|  | 		memory-region = <&q6_mem_regions>, <&q6_etr_region>, | ||||||
|  | 				<&q6_caldb_region>; | ||||||
|  | 	#endif | ||||||
|  |  | ||||||
|  | 	qcom,rproc = <&q6v5_wcss>; | ||||||
|  | 	qcom,bootargs_smem = <507>; | ||||||
|  | 	boot-args = <0x1 0x4 0x3 0x0F 0x0 0x0>, | ||||||
|  | 			<0x2 0x4 0x2 0x12 0x0 0x0>; | ||||||
|  | 	status = "ok"; | ||||||
|  |  | ||||||
|  | 	q6_wcss_pd1: remoteproc_pd1@4ab000 { | ||||||
|  | 		compatible = "qcom,ipq5018-wcss-ahb-mpd"; | ||||||
|  | 		reg = <0x4ab000 0x20>; | ||||||
|  | 		reg-names = "rmb"; | ||||||
|  | 		firmware = "IPQ5018/q6_fw.mdt"; | ||||||
|  | 		m3_firmware = "IPQ5018/m3_fw.mdt"; | ||||||
|  | 		interrupts-extended = <&wcss_smp2p_in 8 0>, | ||||||
|  | 			<&wcss_smp2p_in 9 0>, | ||||||
|  | 			<&wcss_smp2p_in 12 0>, | ||||||
|  | 			<&wcss_smp2p_in 11 0>; | ||||||
|  | 		interrupt-names = "fatal", | ||||||
|  | 			"ready", | ||||||
|  | 			"spawn-ack", | ||||||
|  | 			"stop-ack"; | ||||||
|  |  | ||||||
|  | 		resets = <&gcc GCC_WCSSAON_RESET>, | ||||||
|  | 				<&gcc GCC_WCSS_BCR>, | ||||||
|  | 				<&gcc GCC_CE_BCR>; | ||||||
|  | 		reset-names = "wcss_aon_reset", | ||||||
|  | 				"wcss_reset", | ||||||
|  | 				"ce_reset"; | ||||||
|  |  | ||||||
|  | 		clocks = <&gcc GCC_WCSS_AHB_S_CLK>, | ||||||
|  | 				<&gcc GCC_WCSS_ACMT_CLK>, | ||||||
|  | 				<&gcc GCC_WCSS_AXI_M_CLK>; | ||||||
|  | 		clock-names = "gcc_wcss_ahb_s_clk", | ||||||
|  | 			"gcc_wcss_acmt_clk", | ||||||
|  | 			"gcc_wcss_axi_m_clk"; | ||||||
|  |  | ||||||
|  | 		qcom,halt-regs = <&tcsr_q6_block 0xa000 0xd000 0x0>; | ||||||
|  |  | ||||||
|  | 		qcom,smem-states = <&wcss_smp2p_out 8>, | ||||||
|  | 			<&wcss_smp2p_out 9>, | ||||||
|  | 			<&wcss_smp2p_out 10>; | ||||||
|  | 		qcom,smem-state-names = "shutdown", | ||||||
|  | 			"stop", | ||||||
|  | 			"spawn"; | ||||||
|  |  | ||||||
|  | 	#ifdef __IPQ_MEM_PROFILE_256_MB__ | ||||||
|  | 		memory-region = <&q6_ipq5018_data>, <&m3_dump>, | ||||||
|  | 				<&q6_etr_region>; | ||||||
|  | 	#else | ||||||
|  | 		memory-region = <&q6_ipq5018_data>, <&m3_dump>, | ||||||
|  | 				<&q6_etr_region>, <&q6_caldb_region>; | ||||||
|  | 	#endif | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	q6_wcss_pd2: remoteproc_pd2 { | ||||||
|  | 		compatible = "qcom,ipq5018-wcss-pcie-mpd"; | ||||||
|  | 		firmware = "IPQ5018/q6_fw.mdt"; | ||||||
|  | 		m3_firmware = "qcn6122/m3_fw.mdt"; | ||||||
|  | 		interrupts-extended = <&wcss_smp2p_in 16 0>, | ||||||
|  | 			<&wcss_smp2p_in 17 0>, | ||||||
|  | 			<&wcss_smp2p_in 20 0>, | ||||||
|  | 			<&wcss_smp2p_in 19 0>; | ||||||
|  | 		interrupt-names = "fatal", | ||||||
|  | 			"ready", | ||||||
|  | 			"spawn-ack", | ||||||
|  | 			"stop-ack"; | ||||||
|  | 		qcom,smem-states = <&wcss_smp2p_out 16>, | ||||||
|  | 			<&wcss_smp2p_out 17>, | ||||||
|  | 			<&wcss_smp2p_out 18>; | ||||||
|  | 		qcom,smem-state-names = "shutdown", | ||||||
|  | 			"stop", | ||||||
|  | 			"spawn"; | ||||||
|  | 	#ifdef __IPQ_MEM_PROFILE_256_MB__ | ||||||
|  | 		memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>, | ||||||
|  | 				<&q6_qcn6122_etr_1>; | ||||||
|  | 	#else | ||||||
|  | 		memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>, | ||||||
|  | 				<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>; | ||||||
|  | 	#endif | ||||||
|  |  | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &wifi0 { | ||||||
|  | 	/* IPQ5018 */ | ||||||
|  | 	qcom,multipd_arch; | ||||||
|  | 	qcom,rproc = <&q6_wcss_pd1>; | ||||||
|  | 	qcom,userpd-subsys-name = "q6v5_wcss_userpd1"; | ||||||
|  | #ifdef __IPQ_MEM_PROFILE_256_MB__ | ||||||
|  | 	qcom,tgt-mem-mode = <2>; | ||||||
|  | #else | ||||||
|  | 	qcom,tgt-mem-mode = <1>; | ||||||
|  | #endif | ||||||
|  | 	qcom,board_id = <0x24>; | ||||||
|  | #ifdef __CNSS2__ | ||||||
|  | 	qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>; | ||||||
|  | 	qcom,caldb-addr = <0x4D300000 0x4D300000 0 0 0>; | ||||||
|  | 	qcom,caldb-size = <0x200000>; | ||||||
|  | 	mem-region = <&q6_ipq5018_data>; | ||||||
|  | #else | ||||||
|  | 	memory-region = <&q6_ipq5018_data>; | ||||||
|  | #endif | ||||||
|  | 	status = "ok"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &wifi1 { | ||||||
|  | 	/* QCN6122 5G */ | ||||||
|  | 	qcom,multipd_arch; | ||||||
|  | 	qcom,userpd-subsys-name = "q6v5_wcss_userpd2"; | ||||||
|  | 	qcom,rproc = <&q6_wcss_pd2>; | ||||||
|  | #ifdef __IPQ_MEM_PROFILE_256_MB__ | ||||||
|  | 	qcom,tgt-mem-mode = <2>; | ||||||
|  | #else | ||||||
|  | 	qcom,tgt-mem-mode = <1>; | ||||||
|  | #endif | ||||||
|  | 	qcom,board_id = <0x60>; | ||||||
|  | #ifdef __CNSS2__ | ||||||
|  | 	qcom,bdf-addr = <0x4D500000 0x4D500000 0x4D300000 0x0 0x0>; | ||||||
|  | 	qcom,caldb-addr = <0x4E400000 0x4E400000 0 0 0>; | ||||||
|  | 	qcom,caldb-size = <0x500000>; | ||||||
|  | 	mem-region = <&q6_qcn6122_data1>; | ||||||
|  | #else | ||||||
|  | 	memory-region = <&q6_qcn6122_data1>; | ||||||
|  | #endif | ||||||
|  | 	status = "ok"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &dwc_0 { | ||||||
|  | 	/delete-property/ #phy-cells; | ||||||
|  | 	/delete-property/ phys; | ||||||
|  | 	/delete-property/ phy-names; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &hs_m31phy_0 { | ||||||
|  | 	status = "ok"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &eud { | ||||||
|  | 	status = "ok"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &pcie_x1 { | ||||||
|  | 	perst-gpio = <&tlmm 18 GPIO_ACTIVE_LOW>; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &pcie_x2 { | ||||||
|  | 	perst-gpio = <&tlmm 15 GPIO_ACTIVE_LOW>; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &pcie_x1_rp { | ||||||
|  | 	status = "disabled"; | ||||||
|  |  | ||||||
|  | 	mhi_0: qcom,mhi@0 { | ||||||
|  | 		reg = <0 0 0 0 0 >; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &pcie_x2_rp { | ||||||
|  | 	status = "disabled"; | ||||||
|  |  | ||||||
|  | 	mhi_1: qcom,mhi@1 { | ||||||
|  | 		reg = <0 0 0 0 0 >; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &qfprom { | ||||||
|  | 	status = "ok"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &tsens { | ||||||
|  | 	status = "ok"; | ||||||
|  | }; | ||||||
| @@ -154,6 +154,15 @@ define Device/edgecore_oap101e_6e | |||||||
| endef | endef | ||||||
| TARGET_DEVICES += edgecore_oap101e_6e | TARGET_DEVICES += edgecore_oap101e_6e | ||||||
|  |  | ||||||
|  | define Device/emplus_wap385c | ||||||
|  |   DEVICE_TITLE := Emplus WAP385C | ||||||
|  |   DEVICE_DTS := qcom-ipq5018-emplus-wap385c | ||||||
|  |   SUPPORTED_DEVICES := emplus,wap385c | ||||||
|  |   DEVICE_PACKAGES := ath11k-wifi-emplus-wap385c ath11k-firmware-ipq50xx-map-spruce | ||||||
|  |   DEVICE_DTS_CONFIG := config@mp03.3 | ||||||
|  | endef | ||||||
|  | TARGET_DEVICES += emplus_wap385c | ||||||
|  |  | ||||||
| define Device/hfcl_ion4x_w | define Device/hfcl_ion4x_w | ||||||
|   DEVICE_TITLE := HFCL ION4x_w |   DEVICE_TITLE := HFCL ION4x_w | ||||||
|   DEVICE_DTS := qcom-ipq5018-hfcl-ion4x_w |   DEVICE_DTS := qcom-ipq5018-hfcl-ion4x_w | ||||||
|   | |||||||
| @@ -26,6 +26,12 @@ edgecore,eap101) | |||||||
| 	ucidef_set_led_netdev "poe" "poe" "green:wan" "eth0" | 	ucidef_set_led_netdev "poe" "poe" "green:wan" "eth0" | ||||||
|         ucidef_set_led_default "power" "POWER" "green:led_pwr" "on" |         ucidef_set_led_default "power" "POWER" "green:led_pwr" "on" | ||||||
| 	;; | 	;; | ||||||
|  | emplus,wap386v2) | ||||||
|  | 	ucidef_set_led_default "power" "POWER" "red:power" "on" | ||||||
|  | 	ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth0" "tx rx link" | ||||||
|  | 	ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wifi2" "phy1tpt" | ||||||
|  | 	ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt" | ||||||
|  | 	;; | ||||||
| hfcl,ion4xi|\ | hfcl,ion4xi|\ | ||||||
| hfcl,ion4x|\ | hfcl,ion4x|\ | ||||||
| hfcl,ion4x_2|\ | hfcl,ion4x_2|\ | ||||||
|   | |||||||
| @@ -34,10 +34,10 @@ qcom_setup_interfaces() | |||||||
| 		ucidef_set_interface_lan "eth1" | 		ucidef_set_interface_lan "eth1" | ||||||
| 		ucidef_set_interface_wan "eth0" | 		ucidef_set_interface_wan "eth0" | ||||||
| 		;; | 		;; | ||||||
|        cig,wf660a) | 	cig,wf660a|\ | ||||||
|  | 	emplus,wap386v2) | ||||||
| 		ucidef_set_interface_wan "eth0"		 | 		ucidef_set_interface_wan "eth0"		 | ||||||
| 		;; | 		;; | ||||||
|  |  | ||||||
| 	yuncore,fap650) | 	yuncore,fap650) | ||||||
| 		ucidef_set_interface_lan "eth3 eth2 eth1 eth0" | 		ucidef_set_interface_lan "eth3 eth2 eth1 eth0" | ||||||
| 		ucidef_set_interface_wan "eth4" | 		ucidef_set_interface_wan "eth4" | ||||||
| @@ -76,6 +76,9 @@ qcom_setup_macs() | |||||||
| 		ucidef_set_network_device_mac eth0 $wan_mac | 		ucidef_set_network_device_mac eth0 $wan_mac | ||||||
| 		ip link set eth0 address $wan_mac | 		ip link set eth0 address $wan_mac | ||||||
| 		;; | 		;; | ||||||
|  | 	emplus,wap386v2) | ||||||
|  | 		wan_mac=$(cat /sys/class/net/eth0/address) | ||||||
|  | 		;; | ||||||
| 	yuncore,ax840) | 	yuncore,ax840) | ||||||
| 		wan_mac=$(cat /sys/class/net/eth1/address) | 		wan_mac=$(cat /sys/class/net/eth1/address) | ||||||
| 		lan_mac=$(macaddr_add "$wan_mac" 1) | 		lan_mac=$(macaddr_add "$wan_mac" 1) | ||||||
|   | |||||||
| @@ -76,6 +76,7 @@ case "$FIRMWARE" in | |||||||
| 	cig,wf188n|\ | 	cig,wf188n|\ | ||||||
| 	cig,wf660a|\ | 	cig,wf660a|\ | ||||||
| 	edgecore,eap101|\ | 	edgecore,eap101|\ | ||||||
|  | 	emplus,wap386v2|\ | ||||||
| 	hfcl,ion4xi|\ | 	hfcl,ion4xi|\ | ||||||
| 	hfcl,ion4x|\ | 	hfcl,ion4x|\ | ||||||
| 	hfcl,ion4x_2|\ | 	hfcl,ion4x_2|\ | ||||||
| @@ -109,7 +110,8 @@ ath11k-macs) | |||||||
| 	edgecore,eap101) | 	edgecore,eap101) | ||||||
| 		ath11k_generate_macs_eap101 | 		ath11k_generate_macs_eap101 | ||||||
| 		;; | 		;; | ||||||
| 	cig,wf188n) | 	cig,wf188n|\ | ||||||
|  | 	emplus,wap386v2) | ||||||
| 		ath11k_generate_macs | 		ath11k_generate_macs | ||||||
| 		;; | 		;; | ||||||
| 	cig,wf660a) | 	cig,wf660a) | ||||||
|   | |||||||
| @@ -122,6 +122,7 @@ platform_check_image() { | |||||||
| 	wallys,dr6018|\ | 	wallys,dr6018|\ | ||||||
| 	wallys,dr6018-v4|\ | 	wallys,dr6018-v4|\ | ||||||
| 	edgecore,eap101|\ | 	edgecore,eap101|\ | ||||||
|  | 	emplus,wap386v2|\ | ||||||
| 	hfcl,ion4xi|\ | 	hfcl,ion4xi|\ | ||||||
| 	hfcl,ion4x|\ | 	hfcl,ion4x|\ | ||||||
| 	hfcl,ion4x_2|\ | 	hfcl,ion4x_2|\ | ||||||
| @@ -145,7 +146,8 @@ platform_do_upgrade() { | |||||||
| 	cig,wf660a) | 	cig,wf660a) | ||||||
| 		spi_nor_emmc_do_upgrade_bootconfig $1 | 		spi_nor_emmc_do_upgrade_bootconfig $1 | ||||||
| 		;; | 		;; | ||||||
| 	cig,wf188n) | 	cig,wf188n|\ | ||||||
|  | 	emplus,wap386v2) | ||||||
| 		[ -f /proc/boot_info/rootfs/upgradepartition ] && { | 		[ -f /proc/boot_info/rootfs/upgradepartition ] && { | ||||||
| 			CI_UBIPART="$(cat /proc/boot_info/rootfs/upgradepartition)" | 			CI_UBIPART="$(cat /proc/boot_info/rootfs/upgradepartition)" | ||||||
| 			CI_BOOTCFG=1 | 			CI_BOOTCFG=1 | ||||||
|   | |||||||
| @@ -0,0 +1,356 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Permission to use, copy, modify, and/or distribute this software for any | ||||||
|  |  * purpose with or without fee is hereby granted, provided that the above | ||||||
|  |  * copyright notice and this permission notice appear in all copies. | ||||||
|  |  * | ||||||
|  |  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||||||
|  |  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||||||
|  |  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||||||
|  |  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||||||
|  |  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||||||
|  |  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||||||
|  |  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | /dts-v1/; | ||||||
|  |  | ||||||
|  | #include "ipq6018.dtsi" | ||||||
|  | #include "ipq6018-cpr-regulator.dtsi" | ||||||
|  | #include <dt-bindings/input/input.h> | ||||||
|  |  | ||||||
|  | / { | ||||||
|  | 	model = "Emplus WAP386 v2"; | ||||||
|  | 	compatible = "emplus,wap386v2", "qcom,ipq6018-cp03", "qcom,ipq6018"; | ||||||
|  |  | ||||||
|  | 	aliases { | ||||||
|  | 		/* | ||||||
|  | 		 * Aliases as required by u-boot | ||||||
|  | 		 * to patch MAC addresses | ||||||
|  | 		 */ | ||||||
|  | 		ethernet0 = "/soc/dp1"; | ||||||
|  |  | ||||||
|  | 		led-boot = &led_power; | ||||||
|  | 		led-failsafe = &led_power; | ||||||
|  | 		led-running = &led_power; | ||||||
|  | 		led-upgrade = &led_power; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	chosen { | ||||||
|  | 		stdout-path = "serial0:115200n8"; | ||||||
|  | 		bootargs-append = " swiotlb=1 coherent_pool=2M"; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	/* | ||||||
|  | 	 * +=========+==============+========================+ | ||||||
|  | 	 * |        |              |                         | | ||||||
|  | 	 * | Region | Start Offset |          Size           | | ||||||
|  | 	 * |        |              |                         | | ||||||
|  | 	 * +--------+--------------+-------------------------+ | ||||||
|  | 	 * |        |              |                         | | ||||||
|  | 	 * |        |              |                         | | ||||||
|  | 	 * |        |              |                         | | ||||||
|  | 	 * |        |              |                         | | ||||||
|  | 	 * | Linux  |  0x41000000  |         139MB           | | ||||||
|  | 	 * |        |              |                         | | ||||||
|  | 	 * |        |              |                         | | ||||||
|  | 	 * |        |              |                         | | ||||||
|  | 	 * +--------+--------------+-------------------------+ | ||||||
|  | 	 * | TZ App |  0x49B00000  |           6MB           | | ||||||
|  | 	 * +--------+--------------+-------------------------+ | ||||||
|  | 	 * | ||||||
|  | 	 * From the available 145 MB for Linux in the first 256 MB, | ||||||
|  | 	 * we are reserving 6 MB for TZAPP. | ||||||
|  | 	 * | ||||||
|  | 	 * Refer arch/arm64/boot/dts/qcom/qcom-ipq6018-memory.dtsi | ||||||
|  | 	 * for memory layout. | ||||||
|  | 	 */ | ||||||
|  |  | ||||||
|  | /* TZAPP is enabled only in default memory profile */ | ||||||
|  | #if !defined(__IPQ_MEM_PROFILE_256_MB__) && !defined(__IPQ_MEM_PROFILE_512_MB__) | ||||||
|  | 	reserved-memory { | ||||||
|  | 		tzapp:tzapp@49B00000 {	/* TZAPPS */ | ||||||
|  | 			no-map; | ||||||
|  | 			reg = <0x0 0x49B00000 0x0 0x00600000>; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  | #endif | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &tlmm { | ||||||
|  | 	gpio-reserved-ranges = <20 1>; | ||||||
|  |  | ||||||
|  | 	uart_pins: uart_pins { | ||||||
|  | 		mux { | ||||||
|  | 			pins = "gpio44", "gpio45"; | ||||||
|  | 			function = "blsp2_uart"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-pull-down; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	spi_0_pins: spi_0_pins { | ||||||
|  | 		mux { | ||||||
|  | 			pins = "gpio38", "gpio39", "gpio40", "gpio41"; | ||||||
|  | 			function = "blsp0_spi"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-pull-down; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	button_pins: button_pins { | ||||||
|  | 		reset_button { | ||||||
|  | 			pins = "gpio9"; | ||||||
|  | 			function = "gpio"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-pull-down; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	mdio_pins: mdio_pinmux { | ||||||
|  | 		mux_0 { | ||||||
|  | 			pins = "gpio64"; | ||||||
|  | 			function = "mdc"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-pull-up; | ||||||
|  | 		}; | ||||||
|  | 		mux_1 { | ||||||
|  | 			pins = "gpio65"; | ||||||
|  | 			function = "mdio"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-pull-up; | ||||||
|  | 		}; | ||||||
|  | 		mux_2 { | ||||||
|  | 			pins = "gpio75"; | ||||||
|  | 			function = "gpio"; | ||||||
|  | 			bias-pull-up; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	leds_pins: leds_pins { | ||||||
|  | 		led_5g { | ||||||
|  | 			pins = "gpio31"; | ||||||
|  | 			function = "gpio"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-pull-down; | ||||||
|  | 		}; | ||||||
|  | 		led_2g { | ||||||
|  | 			pins = "gpio30"; | ||||||
|  | 			function = "gpio"; | ||||||
|  | 			drive-strength = <8>; | ||||||
|  | 			bias-pull-down; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &soc { | ||||||
|  | 	mdio@90000 { | ||||||
|  | 		pinctrl-0 = <&mdio_pins>; | ||||||
|  | 		pinctrl-names = "default"; | ||||||
|  | 		phy-reset-gpio = <&tlmm 75 0>; | ||||||
|  | 		status = "ok"; | ||||||
|  | 		phy0: ethernet-phy@0 { | ||||||
|  | 			reg = <3>; | ||||||
|  | 		}; | ||||||
|  | 		phy1: ethernet-phy@1 { | ||||||
|  | 			reg = <4>; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	ess-switch@3a000000 { | ||||||
|  | 		switch_cpu_bmp = <0x1>;  /* cpu port bitmap */ | ||||||
|  | 		switch_lan_bmp = <0x08>; /* lan port bitmap */ | ||||||
|  | 		switch_wan_bmp = <0x10>; /* wan port bitmap */ | ||||||
|  | 		switch_inner_bmp = <0xc0>; /*inner port bitmap*/ | ||||||
|  | 		switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/ | ||||||
|  | 		switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/ | ||||||
|  | 		switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/ | ||||||
|  | 		qcom,port_phyinfo { | ||||||
|  | 			port@0 { | ||||||
|  | 				port_id = <2>; | ||||||
|  | 				phy_address = <3>; | ||||||
|  | 			}; | ||||||
|  | 			port@1 { | ||||||
|  | 				port_id = <3>; | ||||||
|  | 				phy_address = <4>; | ||||||
|  | 			}; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	dp1 { | ||||||
|  | 		device_type = "network"; | ||||||
|  | 		compatible = "qcom,nss-dp"; | ||||||
|  | 		qcom,id = <3>; | ||||||
|  | 		reg = <0x3a001400 0x200>; | ||||||
|  | 		qcom,mactype = <0>; | ||||||
|  | 		local-mac-address = [000000000000]; | ||||||
|  | 		qcom,link-poll = <1>; | ||||||
|  | 		qcom,phy-mdio-addr = <4>; | ||||||
|  | 		phy-mode = "sgmii"; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	gpio_keys { | ||||||
|  | 		compatible = "gpio-keys"; | ||||||
|  | 		pinctrl-0 = <&button_pins>; | ||||||
|  | 		pinctrl-names = "default"; | ||||||
|  |  | ||||||
|  | 		button@9 { | ||||||
|  | 			label = "reset"; | ||||||
|  | 			linux,code = <KEY_RESTART>; | ||||||
|  | 			gpios = <&tlmm 9 GPIO_ACTIVE_LOW>; | ||||||
|  | 			linux,input-type = <1>; | ||||||
|  | 			debounce-interval = <60>; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  |  | ||||||
|  | 	leds { | ||||||
|  | 		compatible = "gpio-leds"; | ||||||
|  | 		pinctrl-0 = <&leds_pins>; | ||||||
|  | 		pinctrl-names = "default"; | ||||||
|  |  | ||||||
|  | 		led_power: led@28 { | ||||||
|  | 			label = "red:power"; | ||||||
|  | 			gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>; | ||||||
|  | 			linux,default-trigger = "wap386v2:red:power"; | ||||||
|  | 			default-state = "on"; | ||||||
|  | 		}; | ||||||
|  | 		led@29 { | ||||||
|  | 			label = "blue:wan"; | ||||||
|  | 			gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>; | ||||||
|  | 			linux,default-trigger = "wap386v2:blue:eth"; | ||||||
|  | 			default-state = "on"; | ||||||
|  | 		}; | ||||||
|  | 		led@30 { | ||||||
|  | 			label = "blue:wifi2"; | ||||||
|  | 			gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>; | ||||||
|  | 			linux,default-trigger = "wap386v2:blue:2g"; | ||||||
|  | 			default-state = "on"; | ||||||
|  | 		}; | ||||||
|  | 		led@31 { | ||||||
|  | 			label = "blue:wifi5"; | ||||||
|  | 			gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>; | ||||||
|  | 			linux,default-trigger = "wap386v2:blue:5g"; | ||||||
|  | 			default-state = "on"; | ||||||
|  | 		}; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &blsp1_uart3 { | ||||||
|  | 	pinctrl-0 = <&uart_pins>; | ||||||
|  | 	pinctrl-names = "default"; | ||||||
|  | 	status = "ok"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &spi_0 { | ||||||
|  | 	pinctrl-0 = <&spi_0_pins>; | ||||||
|  | 	pinctrl-names = "default"; | ||||||
|  | 	cs-select = <0>; | ||||||
|  | 	status = "ok"; | ||||||
|  |  | ||||||
|  | 	m25p80@0 { | ||||||
|  | 		#address-cells = <1>; | ||||||
|  | 		#size-cells = <1>; | ||||||
|  | 		reg = <0>; | ||||||
|  | 		compatible = "n25q128a11"; | ||||||
|  | 		linux,modalias = "m25p80", "n25q128a11"; | ||||||
|  | 		spi-max-frequency = <50000000>; | ||||||
|  | 		use-default-sizes; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &wifi0 { | ||||||
|  | 	qcom,board_id = <0x30>; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &pcie_phy { | ||||||
|  | 	status = "ok"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &pcie0 { | ||||||
|  | #if defined(__CNSS2__) | ||||||
|  | 	status = "ok"; | ||||||
|  | #endif | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &qpic_bam { | ||||||
|  | 	status = "ok"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &qpic_nand { | ||||||
|  | 	status = "ok"; | ||||||
|  |  | ||||||
|  | 	nand@0 { | ||||||
|  | 		reg = <0>; | ||||||
|  | 		#address-cells = <1>; | ||||||
|  | 		#size-cells = <1>; | ||||||
|  |  | ||||||
|  | 		nand-ecc-strength = <4>; | ||||||
|  | 		nand-ecc-step-size = <512>; | ||||||
|  | 		nand-bus-width = <8>; | ||||||
|  | 	}; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &ssphy_0 { | ||||||
|  | 	status = "ok"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &nss_crypto { | ||||||
|  | 	status = "ok"; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &CPU0 { | ||||||
|  | 	operating-points = < | ||||||
|  | 		/* kHz   uV (fixed) */ | ||||||
|  | 		864000   1100000 | ||||||
|  | 		1056000  1100000 | ||||||
|  | 		1320000  1100000 | ||||||
|  | 		1440000  1100000 | ||||||
|  | 		1608000  1100000 | ||||||
|  | 		1800000  1100000 | ||||||
|  | 	>; | ||||||
|  | 	clock-latency = <200000>; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &CPU1 { | ||||||
|  | 	operating-points = < | ||||||
|  | 		/* kHz   uV (fixed) */ | ||||||
|  | 		864000   1100000 | ||||||
|  | 		1056000  1100000 | ||||||
|  | 		1320000  1100000 | ||||||
|  | 		1440000  1100000 | ||||||
|  | 		1608000  1100000 | ||||||
|  | 		1800000  1100000 | ||||||
|  | 	>; | ||||||
|  | 	clock-latency = <200000>; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &CPU2 { | ||||||
|  | 	operating-points = < | ||||||
|  | 		/* kHz   uV (fixed) */ | ||||||
|  | 		864000   1100000 | ||||||
|  | 		1056000  1100000 | ||||||
|  | 		1320000  1100000 | ||||||
|  | 		1440000  1100000 | ||||||
|  | 		1608000  1100000 | ||||||
|  | 		1800000  1100000 | ||||||
|  | 	>; | ||||||
|  | 	clock-latency = <200000>; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &CPU3 { | ||||||
|  | 	operating-points = < | ||||||
|  | 		/* kHz   uV (fixed) */ | ||||||
|  | 		864000   1100000 | ||||||
|  | 		1056000  1100000 | ||||||
|  | 		1320000  1100000 | ||||||
|  | 		1440000  1100000 | ||||||
|  | 		1608000  1100000 | ||||||
|  | 		1800000  1100000 | ||||||
|  | 	>; | ||||||
|  | 	clock-latency = <200000>; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | &rpm_glink { | ||||||
|  | 	status = "disabled"; | ||||||
|  | }; | ||||||
| @@ -76,6 +76,15 @@ define Device/edgecore_eap101 | |||||||
| endef | endef | ||||||
| TARGET_DEVICES += edgecore_eap101 | TARGET_DEVICES += edgecore_eap101 | ||||||
|  |  | ||||||
|  | define Device/emplus_wap386v2 | ||||||
|  |   DEVICE_TITLE := Emplus WAP386v2 | ||||||
|  |   DEVICE_DTS := qcom-ipq6018-emplus-wap386v2 | ||||||
|  |   DEVICE_DTS_CONFIG := config@cp03-c1 | ||||||
|  |   SUPPORTED_DEVICES := emplus,wap386v2 | ||||||
|  |   DEVICE_PACKAGES := ath11k-wifi-qcom-ipq6018 uboot-env | ||||||
|  | endef | ||||||
|  | TARGET_DEVICES += emplus_wap386v2 | ||||||
|  |  | ||||||
| define Device/indio_um-310ax-v1 | define Device/indio_um-310ax-v1 | ||||||
|   DEVICE_TITLE := Indio UM-310AX V1 |   DEVICE_TITLE := Indio UM-310AX V1 | ||||||
|   DEVICE_DTS := qcom-ipq6018-indio-um-310ax-v1 |   DEVICE_DTS := qcom-ipq6018-indio-um-310ax-v1 | ||||||
|   | |||||||
| @@ -16,14 +16,14 @@ ath11k_generate_macs() { | |||||||
| 	echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs | 	echo -ne \\x${mac3//:/\\x} >> /lib/firmware/ath11k-macs | ||||||
| } | } | ||||||
|  |  | ||||||
| ath11k_generate_macs_sonicfi() { | ath11k_generate_macs_rap650c() { | ||||||
| 	mac=$(fw_printenv -n BaseMacAddress) | 	mac=$(fw_printenv -n BaseMacAddress) | ||||||
| 	[ -z "$mac" ] && return; | 	[ -z "$mac" ] && return; | ||||||
|  |  | ||||||
| 	touch /lib/firmware/ath11k-macs | 	touch /lib/firmware/ath11k-macs | ||||||
| 	eth=$(macaddr_canonicalize $mac) | 	eth=$(macaddr_canonicalize $mac) | ||||||
| 	mac1=$(macaddr_add $eth 2) | 	mac1=$(macaddr_add $eth 3) | ||||||
| 	mac2=$(macaddr_add $eth 3) | 	mac2=$(macaddr_add $eth 2) | ||||||
| 	mac3=$(macaddr_add $eth 4) | 	mac3=$(macaddr_add $eth 4) | ||||||
| 	echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs | 	echo -ne \\x${mac1//:/\\x} >> /lib/firmware/ath11k-macs | ||||||
| 	echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs | 	echo -ne \\x${mac2//:/\\x} >> /lib/firmware/ath11k-macs | ||||||
| @@ -112,8 +112,8 @@ ath11k-macs) | |||||||
| 	cig,wf196) | 	cig,wf196) | ||||||
| 		ath11k_generate_macs_wf196 | 		ath11k_generate_macs_wf196 | ||||||
| 		;; | 		;; | ||||||
| 	sonicfi*) | 	sonicfi,rap650c) | ||||||
| 		ath11k_generate_macs_sonicfi | 		ath11k_generate_macs_rap650c | ||||||
| 		;; | 		;; | ||||||
| 	esac | 	esac | ||||||
| 	;; | 	;; | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ | |||||||
|  		return 0; |  		return 0; | ||||||
| -	if (WARN_ON_ONCE(rate->nss < 1 || rate->nss > 8)) | -	if (WARN_ON_ONCE(rate->nss < 1 || rate->nss > 8)) | ||||||
| +	if (rate->nss < 1 || rate->nss > 8) { | +	if (rate->nss < 1 || rate->nss > 8) { | ||||||
| +		printk_once(1, "invalid rate->nss: %d\n", rate->nss); | +		printk_once(KERN_WARNING "cfg80211_calculate_bitrate_he: invalid rate->nss: %d\n", rate->nss); | ||||||
|  		return 0; |  		return 0; | ||||||
| - | - | ||||||
| +	} | +	} | ||||||
|   | |||||||
| @@ -0,0 +1,119 @@ | |||||||
|  | --- a/drivers/net/wireless/ath/ath11k/peer.c | ||||||
|  | +++ b/drivers/net/wireless/ath/ath11k/peer.c | ||||||
|  | @@ -819,10 +819,7 @@ int ath11k_peer_delete(struct ath11k *ar | ||||||
|  |  #ifdef CPTCFG_ATH11K_NSS_SUPPORT | ||||||
|  |  		mutex_unlock(&ar->ab->base_ast_lock); | ||||||
|  |  #endif | ||||||
|  | -		ath11k_warn(ar->ab, | ||||||
|  | -			    "failed to find peer vdev_id %d addr %pM in delete\n", | ||||||
|  | -			    vdev_id, addr); | ||||||
|  | -		return -EINVAL; | ||||||
|  | +		return 0; | ||||||
|  |          } | ||||||
|  |   | ||||||
|  |  #ifdef CPTCFG_ATH11K_NSS_SUPPORT | ||||||
|  | @@ -883,6 +880,7 @@ int ath11k_peer_create(struct ath11k *ar | ||||||
|  |  	struct ieee80211_vif *vif = arvif->vif; | ||||||
|  |  	struct ath11k_sta *arsta; | ||||||
|  |  	int ret, fbret; | ||||||
|  | +	u8 vdev_id = 0; | ||||||
|  |   | ||||||
|  |  	lockdep_assert_held(&ar->conf_mutex); | ||||||
|  |   | ||||||
|  | @@ -891,20 +889,21 @@ int ath11k_peer_create(struct ath11k *ar | ||||||
|  |  			    "failed to create peer due to insufficient peer entry resource in firmware\n"); | ||||||
|  |  		return -ENOBUFS; | ||||||
|  |  	} | ||||||
|  | + | ||||||
|  |  	mutex_lock(&ar->ab->tbl_mtx_lock); | ||||||
|  |  	spin_lock_bh(&ar->ab->base_lock); | ||||||
|  |  	peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr); | ||||||
|  | +	if (peer) | ||||||
|  | +		vdev_id = peer->vdev_id; | ||||||
|  | +	spin_unlock_bh(&ar->ab->base_lock); | ||||||
|  | +	mutex_unlock(&ar->ab->tbl_mtx_lock); | ||||||
|  | + | ||||||
|  |  	if (peer) { | ||||||
|  | -		if (peer->vdev_id == param->vdev_id) { | ||||||
|  | -			spin_unlock_bh(&ar->ab->base_lock); | ||||||
|  | -			mutex_unlock(&ar->ab->tbl_mtx_lock); | ||||||
|  | +		if (vdev_id == param->vdev_id) | ||||||
|  |  			return -EINVAL; | ||||||
|  | -		} | ||||||
|  | -		ath11k_peer_rhash_delete(ar->ab, peer); | ||||||
|  | -	} | ||||||
|  |   | ||||||
|  | -	spin_unlock_bh(&ar->ab->base_lock); | ||||||
|  | -	mutex_unlock(&ar->ab->tbl_mtx_lock); | ||||||
|  | +		ath11k_peer_delete(ar, vdev_id, param->peer_addr); | ||||||
|  | +	} | ||||||
|  |   | ||||||
|  |  	ret = ath11k_wmi_send_peer_create_cmd(ar, param); | ||||||
|  |  	if (ret) { | ||||||
|  | --- a/drivers/net/wireless/ath/ath11k/dp.c | ||||||
|  | +++ b/drivers/net/wireless/ath/ath11k/dp.c | ||||||
|  | @@ -28,7 +28,7 @@ void ath11k_dp_peer_cleanup(struct ath11 | ||||||
|  |  	spin_lock_bh(&ab->base_lock); | ||||||
|  |  	peer = ath11k_peer_find(ab, vdev_id, addr); | ||||||
|  |  	if (!peer) { | ||||||
|  | -		ath11k_warn(ab, "failed to lookup peer %pM on vdev %d\n", | ||||||
|  | +		ath11k_dbg(ab, ATH11K_DBG_MAC, "failed to lookup peer %pM on vdev %d\n", | ||||||
|  |  			    addr, vdev_id); | ||||||
|  |  		spin_unlock_bh(&ab->base_lock); | ||||||
|  |  		return; | ||||||
|  | --- a/drivers/net/wireless/ath/ath11k/dp_rx.c | ||||||
|  | +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c | ||||||
|  | @@ -1204,9 +1204,9 @@ int ath11k_dp_rx_ampdu_stop(struct ath11 | ||||||
|  |   | ||||||
|  |  	peer = ath11k_peer_find(ab, vdev_id, params->sta->addr); | ||||||
|  |  	if (!peer) { | ||||||
|  | -		ath11k_warn(ab, "failed to find the peer to stop rx aggregation\n"); | ||||||
|  | +		ath11k_dbg(ab, ATH11K_DBG_MAC, "failed to find the peer to stop rx aggregation\n"); | ||||||
|  |  		spin_unlock_bh(&ab->base_lock); | ||||||
|  | -		return -ENOENT; | ||||||
|  | +		return 0; | ||||||
|  |  	} | ||||||
|  |   | ||||||
|  |  	paddr = peer->rx_tid[params->tid].paddr; | ||||||
|  | --- a/drivers/net/wireless/ath/ath11k/mac.c | ||||||
|  | +++ b/drivers/net/wireless/ath/ath11k/mac.c | ||||||
|  | @@ -4075,7 +4075,7 @@ static int ath11k_clear_peer_keys(struct | ||||||
|  |  	peer = ath11k_peer_find(ab, arvif->vdev_id, addr); | ||||||
|  |  	if (!peer) { | ||||||
|  |  		spin_unlock_bh(&ab->base_lock); | ||||||
|  | -		return -ENOENT; | ||||||
|  | +		return 0; | ||||||
|  |  	} | ||||||
|  |  	for (i = 0; i < ARRAY_SIZE(keys); i++) { | ||||||
|  |  		keys[i]= peer->keys[i]; | ||||||
|  | @@ -4325,6 +4325,10 @@ static int ath11k_mac_op_set_key(struct | ||||||
|  |   | ||||||
|  |  	spin_lock_bh(&ab->base_lock); | ||||||
|  |  	peer = ath11k_peer_find(ab, arvif->vdev_id, peer_addr); | ||||||
|  | +	if (!peer && cmd == DISABLE_KEY) { | ||||||
|  | +		ret = 0; | ||||||
|  | +		goto unlock; | ||||||
|  | +	} | ||||||
|  |   | ||||||
|  |  	/* TODO: Check if vdev specific security cfg is mandatory */ | ||||||
|  |  	ret = ath11k_nss_vdev_set_cmd(arvif, ATH11K_NSS_WIFI_VDEV_SECURITY_TYPE_CMD, key->cipher); | ||||||
|  | @@ -5961,7 +5965,7 @@ static void ath11k_mac_op_sta_rc_update( | ||||||
|  |  	peer = ath11k_peer_find(ar->ab, arvif->vdev_id, sta->addr); | ||||||
|  |  	if (!peer) { | ||||||
|  |  		spin_unlock_bh(&ar->ab->base_lock); | ||||||
|  | -		ath11k_warn(ar->ab, "mac sta rc update failed to find peer %pM on vdev %i\n", | ||||||
|  | +		ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac sta rc update failed to find peer %pM on vdev %i\n", | ||||||
|  |  			    sta->addr, arvif->vdev_id); | ||||||
|  |  		return; | ||||||
|  |  	} | ||||||
|  | --- a/drivers/net/wireless/ath/ath11k/wmi.c | ||||||
|  | +++ b/drivers/net/wireless/ath/ath11k/wmi.c | ||||||
|  | @@ -8425,7 +8425,7 @@ static void ath11k_peer_sta_kickout_even | ||||||
|  |  	peer = ath11k_peer_find_by_addr(ab, arg.mac_addr); | ||||||
|  |  	if (!peer) { | ||||||
|  |  		spin_unlock_bh(&ab->base_lock); | ||||||
|  | -		ath11k_warn(ab, "peer not found %pM\n", | ||||||
|  | +		ath11k_dbg(ab, ATH11K_DBG_WMI, "peer not found %pM\n", | ||||||
|  |  			    arg.mac_addr); | ||||||
|  |  		goto exit; | ||||||
|  |  	} | ||||||
| @@ -8,6 +8,9 @@ boot() { | |||||||
| 	edgecore,eap112) | 	edgecore,eap112) | ||||||
| 		bootcount=$(fw_printenv -n bootcount) | 		bootcount=$(fw_printenv -n bootcount) | ||||||
| 		[ "$bootcount" != 0 ] && fw_setenv bootcount 0 | 		[ "$bootcount" != 0 ] && fw_setenv bootcount 0 | ||||||
|  | 		# enable dualboot | ||||||
|  | 		avail=$(fw_printenv -n upgrade_available) | ||||||
|  | 		[ ${avail} -eq 0 ] && fw_setenv upgrade_available 1 | ||||||
| 		;; | 		;; | ||||||
| 	esac | 	esac | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| REQUIRE_IMAGE_METADATA=1 | REQUIRE_IMAGE_METADATA=1 | ||||||
|  |  | ||||||
| senao_swap_active_fw() { | swap_wap588m_active_fw() { | ||||||
| 	echo "Doing swap active_fw" > /dev/console | 	echo "Doing swap active_fw" > /dev/console | ||||||
|         tmp_active_fw=$(fw_printenv | grep active_fw | awk -F= {'print $2'}) |         tmp_active_fw=$(fw_printenv | grep active_fw | awk -F= {'print $2'}) | ||||||
| 	if [ $tmp_active_fw == "0" ]; then | 	if [ $tmp_active_fw == "0" ]; then | ||||||
| @@ -12,6 +12,18 @@ senao_swap_active_fw() { | |||||||
| 	fi | 	fi | ||||||
| } | } | ||||||
|  |  | ||||||
|  | senao_swap_active_fw() { | ||||||
|  | 	echo "Doing swap active_fw" > /dev/console | ||||||
|  | 	tmp_active_fw=$(fw_printenv -n active_fw) | ||||||
|  | 	if [ $tmp_active_fw == "0" ]; then | ||||||
|  | 		fw_setenv active_fw 1 | ||||||
|  | 		fw_setenv mtdparts nmbm0:1024k\(bl2\),512k\(u-boot-env\),2048k\(factory\),2048k\(fip\),112640k\(ubi_1\),112640k\(ubi\),384k\(cert\),640k\(userconfig\),384k\(crashdump\) | ||||||
|  | 	else | ||||||
|  | 		fw_setenv active_fw 0 | ||||||
|  | 		fw_setenv mtdparts nmbm0:1024k\(bl2\),512k\(u-boot-env\),2048k\(factory\),2048k\(fip\),112640k\(ubi\),112640k\(ubi_1\),384k\(cert\),640k\(userconfig\),384k\(crashdump\) | ||||||
|  | 	fi | ||||||
|  | } | ||||||
|  |  | ||||||
| platform_do_upgrade() { | platform_do_upgrade() { | ||||||
| 	local board=$(board_name) | 	local board=$(board_name) | ||||||
|  |  | ||||||
| @@ -94,5 +106,8 @@ platform_post_upgrade_success() { | |||||||
| 		senao,jeap6500) | 		senao,jeap6500) | ||||||
| 			senao_swap_active_fw | 			senao_swap_active_fw | ||||||
| 		;; | 		;; | ||||||
|  | 		emplus,wap588m) | ||||||
|  | 			swap_wap588m_active_fw | ||||||
|  | 		;; | ||||||
| 	esac | 	esac | ||||||
| } | } | ||||||
|   | |||||||
| @@ -493,10 +493,22 @@ define Build/Compile | |||||||
| 	$(MAKE) -C $(PKG_BUILD_DIR)/tools | 	$(MAKE) -C $(PKG_BUILD_DIR)/tools | ||||||
| endef | endef | ||||||
|  |  | ||||||
|  |  | ||||||
| define Build/Install | define Build/Install | ||||||
| 	: | 	: | ||||||
| endef | endef | ||||||
|  |  | ||||||
|  | ifdef CONFIG_TARGET_PROFILE | ||||||
|  | TARGET_PROFILE=$(subst ",,$(CONFIG_TARGET_PROFILE)) | ||||||
|  | PATCH_PROFILE_NAME=patches-$(subst DEVICE_,,$(TARGET_PROFILE)) | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | define Build/Patch | ||||||
|  | 	$(Build/Patch/Default) | ||||||
|  | 	$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_PROFILE_NAME)/,profile/) | ||||||
|  | endef | ||||||
|  |  | ||||||
|  |  | ||||||
| define Package/kmod-mt76/install | define Package/kmod-mt76/install | ||||||
| 	true | 	true | ||||||
| endef | endef | ||||||
|   | |||||||
| @@ -0,0 +1,26 @@ | |||||||
|  | Index: mt76-2024-04-03-1e336a85/mt7915/mt7915.h | ||||||
|  | =================================================================== | ||||||
|  | --- mt76-2024-04-03-1e336a85.orig/mt7915/mt7915.h | ||||||
|  | +++ mt76-2024-04-03-1e336a85/mt7915/mt7915.h | ||||||
|  | @@ -71,8 +71,8 @@ | ||||||
|  |  #define MT7915_CFEND_RATE_DEFAULT	0x49	/* OFDM 24M */ | ||||||
|  |  #define MT7915_CFEND_RATE_11B		0x03	/* 11B LP, 11M */ | ||||||
|  |   | ||||||
|  | -#define MT7915_THERMAL_THROTTLE_MAX	100 | ||||||
|  | -#define MT7915_CDEV_THROTTLE_MAX	99 | ||||||
|  | +#define MT7915_THERMAL_THROTTLE_MAX	80 | ||||||
|  | +#define MT7915_CDEV_THROTTLE_MAX	79 | ||||||
|  |   | ||||||
|  |  #define MT7915_SKU_RATE_NUM		161 | ||||||
|  |  #define MT7915_SKU_PATH_NUM		185 | ||||||
|  | @@ -86,8 +86,8 @@ | ||||||
|  |   | ||||||
|  |  #define MT7915_CRIT_TEMP_IDX		0 | ||||||
|  |  #define MT7915_MAX_TEMP_IDX		1 | ||||||
|  | -#define MT7915_CRIT_TEMP		110 | ||||||
|  | -#define MT7915_MAX_TEMP			120 | ||||||
|  | +#define MT7915_CRIT_TEMP		103 | ||||||
|  | +#define MT7915_MAX_TEMP			118 | ||||||
|  |   | ||||||
|  |  struct mt7915_vif; | ||||||
|  |  struct mt7915_sta; | ||||||
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								feeds/qca-wifi-7/ath12k-wifi/board-2.bin.rap7110c_341x.QCN92XX
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								feeds/qca-wifi-7/ath12k-wifi/board-2.bin.rap7110c_341x.QCN92XX
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -121,8 +121,6 @@ hostapd_common_add_device_config() { | |||||||
| 	config_add_boolean legacy_rates | 	config_add_boolean legacy_rates | ||||||
| 	config_add_int cell_density | 	config_add_int cell_density | ||||||
| 	config_add_int rts_threshold | 	config_add_int rts_threshold | ||||||
| 	config_add_int rssi_reject_assoc_rssi |  | ||||||
| 	config_add_int rssi_ignore_probe_request |  | ||||||
| 	config_add_int maxassoc | 	config_add_int maxassoc | ||||||
| 	config_add_int reg_power_type | 	config_add_int reg_power_type | ||||||
| 	config_add_boolean stationary_ap | 	config_add_boolean stationary_ap | ||||||
| @@ -147,7 +145,7 @@ hostapd_prepare_device_config() { | |||||||
|  |  | ||||||
| 	json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \ | 	json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \ | ||||||
| 		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \ | 		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \ | ||||||
| 		rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc \ | 		rts_threshold beacon_rate maxassoc \ | ||||||
| 		rnr_beacon mbssid:0 band reg_power_type stationary_ap acs_exclude_dfs\ | 		rnr_beacon mbssid:0 band reg_power_type stationary_ap acs_exclude_dfs\ | ||||||
| 		maxassoc_ignore_probe band | 		maxassoc_ignore_probe band | ||||||
|  |  | ||||||
| @@ -244,8 +242,6 @@ hostapd_prepare_device_config() { | |||||||
| 		hostapd_add_rate brlist "$br" | 		hostapd_add_rate brlist "$br" | ||||||
| 	done | 	done | ||||||
|  |  | ||||||
| 	[ -n "$rssi_reject_assoc_rssi" ] && append base_cfg "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N" |  | ||||||
| 	[ -n "$rssi_ignore_probe_request" ] && append base_cfg "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N" |  | ||||||
| 	[ -n "$beacon_rate" ] && append base_cfg "beacon_rate=$beacon_rate" "$N" | 	[ -n "$beacon_rate" ] && append base_cfg "beacon_rate=$beacon_rate" "$N" | ||||||
| 	[ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N" | 	[ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N" | ||||||
| 	[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" | 	[ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" | ||||||
| @@ -427,6 +423,9 @@ hostapd_common_add_bss_config() { | |||||||
|  |  | ||||||
| 	config_add_boolean apup | 	config_add_boolean apup | ||||||
| 	config_add_string apup_peer_ifname_prefix | 	config_add_string apup_peer_ifname_prefix | ||||||
|  |  | ||||||
|  | 	config_add_int rssi_reject_assoc_rssi | ||||||
|  | 	config_add_int rssi_ignore_probe_request | ||||||
| } | } | ||||||
|  |  | ||||||
| hostapd_set_vlan_file() { | hostapd_set_vlan_file() { | ||||||
| @@ -680,7 +679,8 @@ hostapd_set_bss_options() { | |||||||
| 		ppsk airtime_bss_weight airtime_bss_limit airtime_sta_weight \ | 		ppsk airtime_bss_weight airtime_bss_limit airtime_sta_weight \ | ||||||
| 		multicast_to_unicast_all proxy_arp per_sta_vif \ | 		multicast_to_unicast_all proxy_arp per_sta_vif \ | ||||||
| 		eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id radius_server_clients radius_server_auth_port \ | 		eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id radius_server_clients radius_server_auth_port \ | ||||||
| 		vendor_elements fils ocv apup uci_section dynamic_probe_resp multi_psk | 		vendor_elements fils ocv apup uci_section dynamic_probe_resp multi_psk \ | ||||||
|  | 		rssi_reject_assoc_rssi rssi_ignore_probe_request | ||||||
|  |  | ||||||
| 	set_default fils 0 | 	set_default fils 0 | ||||||
| 	set_default isolate 0 | 	set_default isolate 0 | ||||||
| @@ -737,6 +737,8 @@ hostapd_set_bss_options() { | |||||||
| 	append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N" | 	append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N" | ||||||
| 	append bss_conf "utf8_ssid=$utf8_ssid" "$N" | 	append bss_conf "utf8_ssid=$utf8_ssid" "$N" | ||||||
| 	append bss_conf "multi_ap=$multi_ap" "$N" | 	append bss_conf "multi_ap=$multi_ap" "$N" | ||||||
|  | 	[ -n "$rssi_reject_assoc_rssi" ] && append bss_conf "rssi_reject_assoc_rssi=$rssi_reject_assoc_rssi" "$N" | ||||||
|  | 	[ -n "$rssi_ignore_probe_request" ] && append bss_conf "rssi_ignore_probe_request=$rssi_ignore_probe_request" "$N" | ||||||
| 	[ -n "$vendor_elements" ] && append bss_conf "vendor_elements=$vendor_elements" "$N" | 	[ -n "$vendor_elements" ] && append bss_conf "vendor_elements=$vendor_elements" "$N" | ||||||
|  |  | ||||||
| 	[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N" | 	[ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N" | ||||||
| @@ -775,11 +777,16 @@ hostapd_set_bss_options() { | |||||||
| 			set_default sae_require_mfp 1 | 			set_default sae_require_mfp 1 | ||||||
| 			[ "$ppsk" -eq 0 ] && set_default sae_pwe 2 | 			[ "$ppsk" -eq 0 ] && set_default sae_pwe 2 | ||||||
| 		;; | 		;; | ||||||
| 		psk-sae|psk2-radius|eap-eap2) | 		psk-sae|eap-eap2) | ||||||
| 			set_default ieee80211w 1 | 			set_default ieee80211w 1 | ||||||
| 			set_default sae_require_mfp 1 | 			set_default sae_require_mfp 1 | ||||||
| 			[ "$ppsk" -eq 0 ] && set_default sae_pwe 2 | 			[ "$ppsk" -eq 0 ] && set_default sae_pwe 2 | ||||||
| 		;; | 		;; | ||||||
|  |                 psk2-radius) | ||||||
|  | 			set_default ieee80211w 1 | ||||||
|  | 			set_default sae_require_mfp 0 | ||||||
|  | 			[ "$ppsk" -eq 0 ] && set_default sae_pwe 4 | ||||||
|  |                 ;; | ||||||
| 	esac | 	esac | ||||||
| 	[ -n "$sae_require_mfp" ] && append bss_conf "sae_require_mfp=$sae_require_mfp" "$N" | 	[ -n "$sae_require_mfp" ] && append bss_conf "sae_require_mfp=$sae_require_mfp" "$N" | ||||||
| 	[ -n "$sae_pwe" ] && append bss_conf "sae_pwe=$sae_pwe" "$N" | 	[ -n "$sae_pwe" ] && append bss_conf "sae_pwe=$sae_pwe" "$N" | ||||||
|   | |||||||
| @@ -144,7 +144,7 @@ function netifd_reload() { | |||||||
|  |  | ||||||
| 			push(ssid.interfaces, iface.ifname); | 			push(ssid.interfaces, iface.ifname); | ||||||
| 			ssid.bands[band] = iface.ifname; | 			ssid.bands[band] = iface.ifname; | ||||||
| 			ssid.mpsk = config.multi_psk; | 			ssid.mpsk = ssid?.mpsk ? true : config.multi_psk; | ||||||
| 			for (let sta in iface.stations) { | 			for (let sta in iface.stations) { | ||||||
| 				let stacfg = sta.config; | 				let stacfg = sta.config; | ||||||
|  |  | ||||||
| @@ -308,18 +308,18 @@ function sta_auth_cache(ifname, addr, idx, phrase) { | |||||||
| function auth_cb(msg) { | function auth_cb(msg) { | ||||||
| 	let data = msg.data; | 	let data = msg.data; | ||||||
|  |  | ||||||
| 	if (!is_ssid_mpsk(data.iface)) |  | ||||||
| 		return; |  | ||||||
|  |  | ||||||
| 	printf(`Event ${msg.type}: ${msg.data}\n`); | 	printf(`Event ${msg.type}: ${msg.data}\n`); | ||||||
| 	switch (msg.type) { | 	switch (msg.type) { | ||||||
| 	case 'sta_auth': | 	case 'sta_auth': | ||||||
|  | 		if (!is_ssid_mpsk(data.iface)) | ||||||
|  | 			return; | ||||||
|  |  | ||||||
| 		return { | 		return { | ||||||
| 			psk: sta_auth_psk(data.iface, data.sta), | 			psk: sta_auth_psk(data.iface, data.sta), | ||||||
| 			force_psk: true, | 			force_psk: true, | ||||||
| 		}; | 		}; | ||||||
| 	case 'sta_connected': | 	case 'sta_connected': | ||||||
| 		if (data.psk_idx == null) | 		if (data.psk_idx == null || !is_ssid_mpsk(data.iface)) | ||||||
| 			return; | 			return; | ||||||
| 		return sta_auth_cache(data.iface, data.sta, data.psk_idx, data.psk); | 		return sta_auth_cache(data.iface, data.sta, data.psk_idx, data.psk); | ||||||
| 	case 'reload': | 	case 'reload': | ||||||
|   | |||||||
| @@ -0,0 +1,14 @@ | |||||||
|  | --- a/src/ap/beacon.c | ||||||
|  | +++ b/src/ap/beacon.c | ||||||
|  | @@ -934,8 +934,10 @@ void handle_probe_req(struct hostapd_dat | ||||||
|  |  	int ubus_response; | ||||||
|  |   | ||||||
|  |  	if (hapd->iconf->rssi_ignore_probe_request && ssi_signal && | ||||||
|  | -	    ssi_signal < hapd->iconf->rssi_ignore_probe_request) | ||||||
|  | +	    ssi_signal < hapd->iconf->rssi_ignore_probe_request) { | ||||||
|  | +		hostapd_ubus_notify_rssi(hapd, "rssi-ignore-probe", mgmt->sa, ssi_signal); | ||||||
|  |  		return; | ||||||
|  | +	} | ||||||
|  |   | ||||||
|  |  	if (len < IEEE80211_HDRLEN) | ||||||
|  |  		return; | ||||||
| @@ -1923,6 +1923,21 @@ void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 * | |||||||
| 	ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1); | 	ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi) | ||||||
|  | { | ||||||
|  | 	if (!hapd->ubus.obj.has_subscribers) | ||||||
|  | 		return; | ||||||
|  |  | ||||||
|  | 	if (!addr) | ||||||
|  | 		return; | ||||||
|  |  | ||||||
|  | 	blob_buf_init(&b, 0); | ||||||
|  | 	blobmsg_add_macaddr(&b, "address", addr); | ||||||
|  | 	blobmsg_add_u32(&b, "rssi", rssi); | ||||||
|  |  | ||||||
|  | 	ubus_notify(ctx, &hapd->ubus.obj, type, b.head, -1); | ||||||
|  | } | ||||||
|  |  | ||||||
| void hostapd_ubus_notify_csa(struct hostapd_data *hapd, int freq) | void hostapd_ubus_notify_csa(struct hostapd_data *hapd, int freq) | ||||||
| { | { | ||||||
| 	if (!hapd->ubus.obj.has_subscribers) | 	if (!hapd->ubus.obj.has_subscribers) | ||||||
|   | |||||||
| @@ -56,6 +56,7 @@ void hostapd_ubus_notify_beacon_report(struct hostapd_data *hapd, | |||||||
| 				       size_t len); | 				       size_t len); | ||||||
| void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequency, | void hostapd_ubus_notify_radar_detected(struct hostapd_iface *iface, int frequency, | ||||||
| 					int chan_width, int cf1, int cf2); | 					int chan_width, int cf1, int cf2); | ||||||
|  | void hostapd_ubus_notify_rssi(struct hostapd_data *hapd, const char *type, const u8 *addr, int rssi); | ||||||
|  |  | ||||||
| void hostapd_ubus_notify_bss_transition_response( | void hostapd_ubus_notify_bss_transition_response( | ||||||
| 	struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code, | 	struct hostapd_data *hapd, const u8 *addr, u8 dialog_token, u8 status_code, | ||||||
|   | |||||||
| @@ -19,15 +19,6 @@ sonicfi,rap750e-s|\ | |||||||
| sonicfi,rap750w-311a) | sonicfi,rap750w-311a) | ||||||
| 	ucidef_set_led_default "power" "POWER" "pwm:blue" "on" | 	ucidef_set_led_default "power" "POWER" "pwm:blue" "on" | ||||||
| 	;; | 	;; | ||||||
| zyxel,nwa130be) |  | ||||||
| 	#eth0: APPE: phyaddr 4  green:2.5G  orange:others |  | ||||||
| 	ssdk_sh debug phy set 4 0x40078074 0x670 |  | ||||||
| 	ssdk_sh debug phy set 4 0x40078078 0x8600 |  | ||||||
|  |  | ||||||
| 	#eth1:  MHT: phyaddr 3  green:2.5G orange:others |  | ||||||
| 	ssdk_sh debug phy set 3 0x40078074 0x670 |  | ||||||
| 	ssdk_sh debug phy set 3 0x40078078 0x8600 |  | ||||||
| 	;; |  | ||||||
| esac | esac | ||||||
|  |  | ||||||
| board_config_flush | board_config_flush | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ ipq53xx_setup_interfaces() | |||||||
| 		ucidef_set_interfaces_lan_wan "eth1" "eth0" | 		ucidef_set_interfaces_lan_wan "eth1" "eth0" | ||||||
| 		;; | 		;; | ||||||
| 	sonicfi,rap7110c-341x|\ | 	sonicfi,rap7110c-341x|\ | ||||||
| 	sonicfi,rap750e-h|\) | 	sonicfi,rap750e-h|\ | ||||||
| 	sonicfi,rap750e-s) | 	sonicfi,rap750e-s) | ||||||
| 		ucidef_set_interfaces_lan_wan "" "eth0" | 		ucidef_set_interfaces_lan_wan "" "eth0" | ||||||
| 		;; | 		;; | ||||||
| @@ -95,7 +95,7 @@ qcom_setup_macs() | |||||||
|                 wan_mac=$(cat /sys/class/net/eth0/address) |                 wan_mac=$(cat /sys/class/net/eth0/address) | ||||||
|                 ucidef_set_wireless_macaddr_base 2g $(macaddr_add "$wan_mac" 1) |                 ucidef_set_wireless_macaddr_base 2g $(macaddr_add "$wan_mac" 1) | ||||||
|                 ucidef_set_wireless_macaddr_base 5g $(macaddr_add "$wan_mac" 2) |                 ucidef_set_wireless_macaddr_base 5g $(macaddr_add "$wan_mac" 2) | ||||||
|                 [ "$board" = "sonicfi,rap7110c-34x" ] && |                 [ "$board" = "sonicfi,rap7110c-341x" ] && | ||||||
|                     ucidef_set_wireless_macaddr_base 6g $(macaddr_add "$wan_mac" 3) |                     ucidef_set_wireless_macaddr_base 6g $(macaddr_add "$wan_mac" 3) | ||||||
|                 ;; |                 ;; | ||||||
|         sonicfi,rap750w-311a) |         sonicfi,rap750w-311a) | ||||||
|   | |||||||
							
								
								
									
										22
									
								
								feeds/qca-wifi-7/ipq53xx/base-files/etc/init.d/phy_quirks
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								feeds/qca-wifi-7/ipq53xx/base-files/etc/init.d/phy_quirks
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,22 @@ | |||||||
|  | #!/bin/sh /etc/rc.common | ||||||
|  |  | ||||||
|  | START=99 | ||||||
|  |  | ||||||
|  | boot() { | ||||||
|  | 	. /lib/functions.sh | ||||||
|  |  | ||||||
|  | 	case "$(board_name)" in | ||||||
|  | 	edgecore,eap105) | ||||||
|  | 		ssdk_sh debug phy set 0x1 0x601FD032 0xff | ||||||
|  | 		;; | ||||||
|  | 	zyxel,nwa130be) | ||||||
|  | 		#eth0: APPE: phyaddr 4  green:2.5G  orange:others | ||||||
|  | 		ssdk_sh debug phy set 4 0x40078074 0x670 | ||||||
|  | 		ssdk_sh debug phy set 4 0x40078078 0x8600 | ||||||
|  |  | ||||||
|  | 		#eth1:  MHT: phyaddr 3  green:2.5G orange:others | ||||||
|  | 		ssdk_sh debug phy set 3 0x40078074 0x670 | ||||||
|  | 		ssdk_sh debug phy set 3 0x40078078 0x8600 | ||||||
|  | 		;; | ||||||
|  | 	esac | ||||||
|  | } | ||||||
| @@ -132,6 +132,8 @@ platform_do_upgrade() { | |||||||
|  |  | ||||||
| 	board=$(board_name) | 	board=$(board_name) | ||||||
| 	case $board in | 	case $board in | ||||||
|  | 	sercomm,ap72tip-v4|\ | ||||||
|  | 	sercomm,ap72tip|\ | ||||||
| 	cig,wf189w|\ | 	cig,wf189w|\ | ||||||
| 	cig,wf189h|\ | 	cig,wf189h|\ | ||||||
| 	cig,wf189) | 	cig,wf189) | ||||||
| @@ -171,10 +173,6 @@ platform_do_upgrade() { | |||||||
| 		sonicfi_dualimage_check | 		sonicfi_dualimage_check | ||||||
| 		nand_upgrade_tar "$1" | 		nand_upgrade_tar "$1" | ||||||
| 		;; | 		;; | ||||||
| 	sercomm,ap72tip-v4|\ |  | ||||||
| 	sercomm,ap72tip) |  | ||||||
| 		nand_upgrade_tar "$1" |  | ||||||
| 		;; |  | ||||||
| 	zyxel,nwa130be) | 	zyxel,nwa130be) | ||||||
| 		nand_upgrade_tar "$1" | 		nand_upgrade_tar "$1" | ||||||
| 		;; | 		;; | ||||||
|   | |||||||
| @@ -1223,3 +1223,5 @@ CONFIG_PSTORE=y | |||||||
| CONFIG_PSTORE_CONSOLE=y | CONFIG_PSTORE_CONSOLE=y | ||||||
| CONFIG_PSTORE_PMSG=y | CONFIG_PSTORE_PMSG=y | ||||||
| CONFIG_PSTORE_RAM=y | CONFIG_PSTORE_RAM=y | ||||||
|  | # CONFIG_RTL8221D_PHY is not set | ||||||
|  | # CONFIG_INPUT_LSM303AGR is not set | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ | |||||||
| #include "ipq5332-default-memory.dtsi" | #include "ipq5332-default-memory.dtsi" | ||||||
|  |  | ||||||
| / { | / { | ||||||
| 	model = "Sercomm WiFi-7"; | 	model = "Sercomm AP72TIP-v4"; | ||||||
| 	compatible = "sercomm,ap72tip-v4", "qcom,ipq5332-ap-mi01.6", "qcom,ipq5332"; | 	compatible = "sercomm,ap72tip-v4", "qcom,ipq5332-ap-mi01.6", "qcom,ipq5332"; | ||||||
|  |  | ||||||
| 	aliases { | 	aliases { | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ | |||||||
| #include "ipq5332-default-memory.dtsi" | #include "ipq5332-default-memory.dtsi" | ||||||
|  |  | ||||||
| / { | / { | ||||||
| 	model = "Sercomm WiFi-7"; | 	model = "Sercomm AP72TIP"; | ||||||
| 	compatible = "sercomm,ap72tip", "qcom,ipq5332-ap-mi01.6", "qcom,ipq5332"; | 	compatible = "sercomm,ap72tip", "qcom,ipq5332-ap-mi01.6", "qcom,ipq5332"; | ||||||
|  |  | ||||||
| 	aliases { | 	aliases { | ||||||
| @@ -255,7 +255,7 @@ | |||||||
| 					gpios = <&tca6416 14 GPIO_ACTIVE_HIGH>; | 					gpios = <&tca6416 14 GPIO_ACTIVE_HIGH>; | ||||||
| 				}; | 				}; | ||||||
| 		}; | 		}; | ||||||
| /* | 		 | ||||||
| 		gpio_keys { | 		gpio_keys { | ||||||
| 			compatible = "gpio-keys"; | 			compatible = "gpio-keys"; | ||||||
| 			pinctrl-0 = <&button_pins>; | 			pinctrl-0 = <&button_pins>; | ||||||
| @@ -263,11 +263,11 @@ | |||||||
| 			button@1 { | 			button@1 { | ||||||
| 				label = "rst"; | 				label = "rst"; | ||||||
| 				linux,code = <KEY_RESTART>; | 				linux,code = <KEY_RESTART>; | ||||||
| 				gpios = <&tlmm 25 GPIO_ACTIVE_LOW>; | 				gpios = <&tlmm 1 GPIO_ACTIVE_LOW>; | ||||||
| 				linux,input-type = <1>; | 				linux,input-type = <1>; | ||||||
| 				debounce-interval = <60>; | 				debounce-interval = <60>; | ||||||
| 			}; | 			}; | ||||||
| 		};*/ | 		}; | ||||||
|  |  | ||||||
| 		wsi: wsi { | 		wsi: wsi { | ||||||
| 			id = <0>; | 			id = <0>; | ||||||
| @@ -546,13 +546,13 @@ | |||||||
| 		drive-strength = <8>; | 		drive-strength = <8>; | ||||||
| 		bias-pull-down; | 		bias-pull-down; | ||||||
| 	};*/ | 	};*/ | ||||||
| /* | 	 | ||||||
| 	button_pins: button-state { | 	button_pins: button-state { | ||||||
| 		pins = "gpio25"; | 		pins = "gpio1"; | ||||||
| 		function = "gpio"; | 		function = "gpio"; | ||||||
| 		drive-strength = <8>; | 		drive-strength = <8>; | ||||||
| 		bias-pull-up; | 		bias-pull-up; | ||||||
| 	};*/ | 	}; | ||||||
|  |  | ||||||
| 	pwm_pins: pwm-state { | 	pwm_pins: pwm-state { | ||||||
| 		pins = "gpio46"; | 		pins = "gpio46"; | ||||||
|   | |||||||
| @@ -397,7 +397,7 @@ export function info(name) { | |||||||
| 			mode: data.mode, | 			mode: data.mode, | ||||||
| 			channel: format_channel(data.wiphy_freq), | 			channel: format_channel(data.wiphy_freq), | ||||||
| 			freq: format_frequency(data.wiphy_freq), | 			freq: format_frequency(data.wiphy_freq), | ||||||
| 			htmode: data.radio.htmode, | 			htmode: data?.radio?.htmode, | ||||||
| 			center_freq1: format_channel(data.center_freq1) || 'unknown', | 			center_freq1: format_channel(data.center_freq1) || 'unknown', | ||||||
| 			center_freq2: format_channel(data.center_freq2) || 'unknown', | 			center_freq2: format_channel(data.center_freq2) || 'unknown', | ||||||
| 			txpower: data.wiphy_tx_power_level / 100, | 			txpower: data.wiphy_tx_power_level / 100, | ||||||
|   | |||||||
| @@ -88,6 +88,8 @@ cig,wf189h|\ | |||||||
| cig,wf186h|\ | cig,wf186h|\ | ||||||
| cig,wf196|\ | cig,wf196|\ | ||||||
| cig,wf188n|\ | cig,wf188n|\ | ||||||
|  | emplus,wap385c|\ | ||||||
|  | emplus,wap386v2|\ | ||||||
| yuncore,ax840|\ | yuncore,ax840|\ | ||||||
| yuncore,fap655) | yuncore,fap655) | ||||||
| 	PART_NAME=rootfs_1 | 	PART_NAME=rootfs_1 | ||||||
|   | |||||||
							
								
								
									
										14
									
								
								feeds/ucentral/ucentral-client/files/etc/init.d/cpm
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								feeds/ucentral/ucentral-client/files/etc/init.d/cpm
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | #!/bin/sh /etc/rc.common | ||||||
|  |  | ||||||
|  | START=90 | ||||||
|  | STOP=01 | ||||||
|  |  | ||||||
|  | boot() { | ||||||
|  |     mkdir -p /tmp/cpm/ || { logger -t init "Failed to create /tmp/cpm"; exit 1; } | ||||||
|  |     opkg list-installed > /tmp/packages.state || { logger -t init "Failed to list packages"; exit 1; } | ||||||
|  |     if [ -x /usr/share/ucentral/package_list.uc ]; then | ||||||
|  |         /usr/share/ucentral/package_list.uc || { logger -t init "Failed to execute package_list.uc"; exit 1; } | ||||||
|  |     else | ||||||
|  |         logger -t init "package_list.uc not found or not executable" | ||||||
|  |     fi | ||||||
|  | } | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| { | { | ||||||
| 	"major": 4, | 	"major": 4, | ||||||
| 	"minor": 0, | 	"minor": 1, | ||||||
| 	"patch": 0 | 	"patch": 0 | ||||||
| } | } | ||||||
|   | |||||||
| @@ -4,10 +4,10 @@ PKG_NAME:=ucentral-schema | |||||||
| PKG_RELEASE:=1 | PKG_RELEASE:=1 | ||||||
|  |  | ||||||
| PKG_SOURCE_URL=https://github.com/Telecominfraproject/wlan-ucentral-schema.git | PKG_SOURCE_URL=https://github.com/Telecominfraproject/wlan-ucentral-schema.git | ||||||
| PKG_MIRROR_HASH:=ee5d5073bd9ae88590e419f94eb6c59f04a2fc0c3117be435bcb885e0ea28bf1 | PKG_MIRROR_HASH:=aac8731d564f4ccd85a366417b9a02c1d3de9b6533d1474b58768249c50707f1 | ||||||
| PKG_SOURCE_PROTO:=git | PKG_SOURCE_PROTO:=git | ||||||
| PKG_SOURCE_DATE:=2025-01-27 | PKG_SOURCE_DATE:=2025-06-27 | ||||||
| PKG_SOURCE_VERSION:=b4cfdc6a1caa279ae8c6c42b6932620fb2aed9c1 | PKG_SOURCE_VERSION:=125a148764c9ef7a02086b6fadccd7b96bfdf591 | ||||||
| PKG_MAINTAINER:=John Crispin <john@phrozen.org> | PKG_MAINTAINER:=John Crispin <john@phrozen.org> | ||||||
| PKG_LICENSE:=BSD-3-Clause | PKG_LICENSE:=BSD-3-Clause | ||||||
|  |  | ||||||
|   | |||||||
| @@ -0,0 +1,59 @@ | |||||||
|  | From 6866492b26cf59d5557d1ea0fdae24834410afff Mon Sep 17 00:00:00 2001 | ||||||
|  | From: John Crispin <john@phrozen.org> | ||||||
|  | Date: Wed, 11 Jun 2025 14:24:48 +0200 | ||||||
|  | Subject: [PATCH] netifd: add gcmp-256 as a cipher suite when SAE is enabled on | ||||||
|  |  HE/EHT | ||||||
|  |  | ||||||
|  | Fixes: WIFI-14594 | ||||||
|  | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
|  | --- | ||||||
|  |  .../config/netifd/patches/200-gcmp-256.patch  | 37 +++++++++++++++++++ | ||||||
|  |  1 file changed, 37 insertions(+) | ||||||
|  |  create mode 100644 package/network/config/netifd/patches/200-gcmp-256.patch | ||||||
|  |  | ||||||
|  | diff --git a/package/network/config/netifd/patches/200-gcmp-256.patch b/package/network/config/netifd/patches/200-gcmp-256.patch | ||||||
|  | new file mode 100644 | ||||||
|  | index 0000000000..defe66a816 | ||||||
|  | --- /dev/null | ||||||
|  | +++ b/package/network/config/netifd/patches/200-gcmp-256.patch | ||||||
|  | @@ -0,0 +1,37 @@ | ||||||
|  | +--- a/scripts/netifd-wireless.sh | ||||||
|  | ++++ b/scripts/netifd-wireless.sh | ||||||
|  | +@@ -39,11 +39,10 @@ prepare_key_wep() { | ||||||
|  | + } | ||||||
|  | +  | ||||||
|  | + _wdev_prepare_channel() { | ||||||
|  | +-	json_get_vars channel band hwmode | ||||||
|  | ++	json_get_vars channel band hwmode htmode | ||||||
|  | +  | ||||||
|  | + 	auto_channel=0 | ||||||
|  | + 	enable_ht=0 | ||||||
|  | +-	htmode= | ||||||
|  | + 	hwmode="${hwmode##11}" | ||||||
|  | +  | ||||||
|  | + 	case "$channel" in | ||||||
|  | +@@ -80,6 +79,11 @@ _wdev_prepare_channel() { | ||||||
|  | + 			esac | ||||||
|  | + 		;; | ||||||
|  | + 	esac | ||||||
|  | ++ | ||||||
|  | ++	case "$htmode" in | ||||||
|  | ++		HE*|EHT*) wpa3_cipher="GCMP-256 ";; | ||||||
|  | ++		*) wpa3_cipher="";; | ||||||
|  | ++	esac | ||||||
|  | + } | ||||||
|  | +  | ||||||
|  | + _wdev_handler() { | ||||||
|  | +@@ -216,6 +220,9 @@ wireless_vif_parse_encryption() { | ||||||
|  | + 		wpa_cipher="GCMP" | ||||||
|  | + 	else | ||||||
|  | + 		wpa_cipher="CCMP" | ||||||
|  | ++		case "$encryption" in | ||||||
|  | ++			sae*|wpa3*|psk3*|owe) wpa_cipher="${wpa3_cipher}$wpa_cipher";; | ||||||
|  | ++		esac | ||||||
|  | + 	fi | ||||||
|  | +  | ||||||
|  | + 	case "$encryption" in | ||||||
|  | --  | ||||||
|  | 2.34.1 | ||||||
|  |  | ||||||
							
								
								
									
										26
									
								
								profiles/emplus_wap385c.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								profiles/emplus_wap385c.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | |||||||
|  | --- | ||||||
|  | profile: emplus_wap385c | ||||||
|  | target: ipq50xx | ||||||
|  | subtarget: generic | ||||||
|  | description: Build image for Emplus WAP385C | ||||||
|  | image: bin/targets/ipq50xx/generic/openwrt-ipq50xx-emplus_wap385c-squashfs-sysupgrade.tar | ||||||
|  | feeds: | ||||||
|  |   - name: ipq807x | ||||||
|  |     path: ../../feeds/ipq807x_v5.4 | ||||||
|  | include: | ||||||
|  |   - ucentral-ap | ||||||
|  | packages: | ||||||
|  |   - ipq50xx | ||||||
|  |   - iperf3 | ||||||
|  |   - lscpu | ||||||
|  |   - tree | ||||||
|  | diffconfig: | | ||||||
|  |   CONFIG_KERNEL_IPQ_MEM_PROFILE=512 | ||||||
|  |   CONFIG_BUSYBOX_CUSTOM=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_TFTP=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_GET=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PUT=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PROGRESS_BAR=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_MPSTAT=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_PSTREE=y | ||||||
							
								
								
									
										24
									
								
								profiles/emplus_wap386v2.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								profiles/emplus_wap386v2.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | |||||||
|  | --- | ||||||
|  | profile: emplus_wap386v2 | ||||||
|  | target: ipq60xx | ||||||
|  | subtarget: generic | ||||||
|  | description: Build image for the EMPLUS WAP386V2 | ||||||
|  | image: bin/targets/ipq60xx/generic/openwrt-ipq60xx-emplus_wap386v2-squashfs-sysupgrade.tar | ||||||
|  | feeds: | ||||||
|  |   - name: ipq807x | ||||||
|  |     path: ../../feeds/ipq807x_v5.4 | ||||||
|  | include: | ||||||
|  |   - ucentral-ap | ||||||
|  | packages: | ||||||
|  |   - ipq60xx | ||||||
|  |   - iperf3 | ||||||
|  | diffconfig: | | ||||||
|  |   CONFIG_BUSYBOX_CUSTOM=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_TFTP=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PROGRESS_BAR=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_HPA_COMPAT=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_GET=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PUT=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_LSOF=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_MPSTAT=y | ||||||
|  |   CONFIG_BUSYBOX_CONFIG_PSTREE=y | ||||||
		Reference in New Issue
	
	Block a user